Loading sql/field.h +6 −3 Original line number Diff line number Diff line Loading @@ -986,20 +986,23 @@ class Field_datetime :public Field_str { class Field_string :public Field_longstr { public: bool can_alter_field_type; Field_string(char *ptr_arg, uint32 len_arg,uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const char *field_name_arg, struct st_table *table_arg, CHARSET_INFO *cs) :Field_longstr(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_arg, table_arg, cs) {}; unireg_check_arg, field_name_arg, table_arg, cs), can_alter_field_type(1) {}; Field_string(uint32 len_arg,bool maybe_null_arg, const char *field_name_arg, struct st_table *table_arg, CHARSET_INFO *cs) :Field_longstr((char*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0, 0, NONE, field_name_arg, table_arg, cs) {}; NONE, field_name_arg, table_arg, cs), can_alter_field_type(1) {}; enum_field_types type() const { return ((orig_table && return ((can_alter_field_type && orig_table && orig_table->s->db_create_options & HA_OPTION_PACK_RECORD && field_length >= 4) && orig_table->s->frm_version < FRM_VER_TRUE_VARCHAR ? Loading sql/sql_update.cc +5 −0 Original line number Diff line number Diff line Loading @@ -1093,6 +1093,11 @@ multi_update::initialize_tables(JOIN *join) /* ok to be on stack as this is not referenced outside of this func */ Field_string offset(table->file->ref_length, 0, "offset", table, &my_charset_bin); /* The field will be converted to varstring when creating tmp table if table to be updated was created by mysql 4.1. Deny this. */ offset.can_alter_field_type= 0; if (!(ifield= new Item_field(((Field *) &offset)))) DBUG_RETURN(1); ifield->maybe_null= 0; Loading Loading
sql/field.h +6 −3 Original line number Diff line number Diff line Loading @@ -986,20 +986,23 @@ class Field_datetime :public Field_str { class Field_string :public Field_longstr { public: bool can_alter_field_type; Field_string(char *ptr_arg, uint32 len_arg,uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const char *field_name_arg, struct st_table *table_arg, CHARSET_INFO *cs) :Field_longstr(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_arg, table_arg, cs) {}; unireg_check_arg, field_name_arg, table_arg, cs), can_alter_field_type(1) {}; Field_string(uint32 len_arg,bool maybe_null_arg, const char *field_name_arg, struct st_table *table_arg, CHARSET_INFO *cs) :Field_longstr((char*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0, 0, NONE, field_name_arg, table_arg, cs) {}; NONE, field_name_arg, table_arg, cs), can_alter_field_type(1) {}; enum_field_types type() const { return ((orig_table && return ((can_alter_field_type && orig_table && orig_table->s->db_create_options & HA_OPTION_PACK_RECORD && field_length >= 4) && orig_table->s->frm_version < FRM_VER_TRUE_VARCHAR ? Loading
sql/sql_update.cc +5 −0 Original line number Diff line number Diff line Loading @@ -1093,6 +1093,11 @@ multi_update::initialize_tables(JOIN *join) /* ok to be on stack as this is not referenced outside of this func */ Field_string offset(table->file->ref_length, 0, "offset", table, &my_charset_bin); /* The field will be converted to varstring when creating tmp table if table to be updated was created by mysql 4.1. Deny this. */ offset.can_alter_field_type= 0; if (!(ifield= new Item_field(((Field *) &offset)))) DBUG_RETURN(1); ifield->maybe_null= 0; Loading