• unknown's avatar
    Remove dflt_field from field structure as this was only needed when createing... · 57f138f7
    unknown authored
    Remove dflt_field from field structure as this was only needed when createing temporary table and I found another soultion that doesn't increase the size of the field structure for all table instances. (Better fix for bug #19089)
    Fixed compiler warnings
    Fixed valgrind warning in Item_date_add_intervall::eq. (Recoding of bugfix #19490)
    
    
    sql/field.cc:
      remove dflt_field from field structure (not needed)
      Simple cleanup of code that been copied elsewhere
    sql/field.h:
      remove dflt_field from field structure (not needed)
    sql/item.h:
      Removed compiler warnings
    sql/item_timefunc.cc:
      Fixed Item_date_add_intervall::eq
      The problem was that when we call 'eq' 'this' is not fixed, which means we can't call const_item() or a value function.
      I fixed this so that we check eq for all arguments and that the sign and type are identical.
      (The original code gave a 'accessing uninitialized data' in valgrind.
    sql/mysql_priv.h:
      Added default fields to create_tmp_field
    sql/sql_insert.cc:
      New default_field parameter to create_tmp_field()
    sql/sql_select.cc:
      New default_field parameter to create_tmp_field()
      Use this in create_tmp_table() to set right default value for a field
    57f138f7
mysql_priv.h 61.9 KB