From: Jon Olav Hauglid Date: July 23 2010 7:11am Subject: bzr commit into mysql-next-mr-bugfixing branch (jon.hauglid:3319) Bug#6295 List-Archive: http://lists.mysql.com/commits/114204 X-Bug: 6295 Message-Id: <201007230711.o6N7BfTS005521@acsinet15.oracle.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8973186217414197276==" --===============8973186217414197276== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #At file:///export/home/x/mysql-next-mr-bugfixing-bug6295/ based on revid:jonathan.perkin@stripped 3319 Jon Olav Hauglid 2010-07-23 A pre-requisite patch for Bug#6295. This patch prepares the way for fixing "Triggers are not processed for NOT NULL columns" by implementing the following changes: Since NOT NULL fields now must be able to store NULL temporarily, we can no longer use null_ptr (i.e. the ability to store NULL) to check for nullability. Nullability is now checked using the NOT_NULL_FLAG rather than using null_ptr directly. Changed Field constructors to have nullability as an explicit parameter since we cannot rely on checking null_ptr != NULL. Changed nullability checks to use Field functions rather than directly accessing Field member variables. This is done to make it easier to split nullability from the ability to store NULL. Renamed maybe_null to is_nullable. modified: sql/field.cc sql/field.h sql/field_conv.cc sql/filesort.cc sql/item.cc sql/key.cc sql/log_event.cc sql/log_event_old.cc sql/opt_range.cc sql/opt_sum.cc sql/rpl_record.cc sql/sql_load.cc sql/sql_partition.cc sql/sql_select.cc sql/sql_select.h sql/sql_show.cc sql/sql_table.cc sql/table.cc sql/unireg.cc storage/csv/ha_tina.cc storage/federated/ha_federated.cc storage/heap/ha_heap.cc storage/ibmdb2i/ha_ibmdb2i.cc storage/innobase/handler/ha_innodb.cc storage/myisam/ha_myisam.cc === modified file 'sql/field.cc' --- a/sql/field.cc 2010-07-19 16:09:51 +0000 +++ b/sql/field.cc 2010-07-23 07:11:24 +0000 @@ -1110,10 +1110,10 @@ bool Field::type_can_have_key_part(enum Numeric fields base class constructor. */ Field_num::Field_num(uchar *ptr_arg,uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, utype unireg_check_arg, - const char *field_name_arg, + uchar null_bit_arg, bool is_nullable, + utype unireg_check_arg, const char *field_name_arg, uint8 dec_arg, bool zero_arg, bool unsigned_arg) - :Field(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, + :Field(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, unireg_check_arg, field_name_arg), dec(dec_arg),zerofill(zero_arg),unsigned_flag(unsigned_arg) { @@ -1358,8 +1358,8 @@ String *Field::val_int_as_str(String *va /// This is used as a table name when the table structure is not set up Field::Field(uchar *ptr_arg,uint32 length_arg,uchar *null_ptr_arg, - uchar null_bit_arg, - utype unireg_check_arg, const char *field_name_arg) + uchar null_bit_arg, bool is_nullable, + utype unireg_check_arg, const char *field_name_arg) :ptr(ptr_arg), null_ptr(null_ptr_arg), table(0), orig_table(0), table_name(0), field_name(field_name_arg), @@ -1368,7 +1368,7 @@ Field::Field(uchar *ptr_arg,uint32 lengt field_length(length_arg), null_bit(null_bit_arg), is_created_from_null_item(FALSE) { - flags=null_ptr ? 0: NOT_NULL_FLAG; + flags=is_nullable ? 0: NOT_NULL_FLAG; comment.str= (char*) ""; comment.length=0; field_index= 0; @@ -1728,9 +1728,10 @@ my_decimal* Field_num::val_decimal(my_de Field_str::Field_str(uchar *ptr_arg,uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, utype unireg_check_arg, + uchar null_bit_arg, bool is_nullable, + utype unireg_check_arg, const char *field_name_arg, CHARSET_INFO *charset_arg) - :Field(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, + :Field(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, unireg_check_arg, field_name_arg) { field_charset= charset_arg; @@ -1882,7 +1883,7 @@ Field *Field::new_field(MEM_ROOT *root, Field *Field::new_key_field(MEM_ROOT *root, TABLE *new_table, uchar *new_ptr, uchar *new_null_ptr, - uint new_null_bit) + uint new_null_bit, bool is_nullable) { Field *tmp; if ((tmp= new_field(root, new_table, table == new_table))) @@ -1890,6 +1891,7 @@ Field *Field::new_key_field(MEM_ROOT *ro tmp->ptr= new_ptr; tmp->null_ptr= new_null_ptr; tmp->null_bit= new_null_bit; + tmp->flags= is_nullable ? 0: NOT_NULL_FLAG; } return tmp; } @@ -2534,12 +2536,12 @@ void Field_decimal::sql_type(String &res Field_new_decimal::Field_new_decimal(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, + uchar null_bit_arg, bool is_nullable, enum utype unireg_check_arg, const char *field_name_arg, uint8 dec_arg,bool zero_arg, bool unsigned_arg) - :Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, + :Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, unireg_check_arg, field_name_arg, dec_arg, zero_arg, unsigned_arg) { precision= my_decimal_length_to_precision(len_arg, dec_arg, unsigned_arg); @@ -2551,12 +2553,11 @@ Field_new_decimal::Field_new_decimal(uch Field_new_decimal::Field_new_decimal(uint32 len_arg, - bool maybe_null_arg, + bool is_nullable, const char *name, uint8 dec_arg, bool unsigned_arg) - :Field_num((uchar*) 0, len_arg, - maybe_null_arg ? (uchar*) "": 0, 0, + :Field_num((uchar*) 0, len_arg, is_nullable ? (uchar*) "": 0, 0, is_nullable, NONE, name, dec_arg, 0, unsigned_arg) { precision= my_decimal_length_to_precision(len_arg, dec_arg, unsigned_arg); @@ -4725,12 +4726,13 @@ void Field_double::sql_type(String &res) Field_timestamp::Field_timestamp(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, + bool is_nullable, enum utype unireg_check_arg, const char *field_name_arg, TABLE_SHARE *share, CHARSET_INFO *cs) :Field_str(ptr_arg, MAX_DATETIME_WIDTH, null_ptr_arg, null_bit_arg, - unireg_check_arg, field_name_arg, cs) + is_nullable, unireg_check_arg, field_name_arg, cs) { /* For 4.0 MYD and 4.0 InnoDB compatibility */ flags|= ZEROFILL_FLAG | UNSIGNED_FLAG | BINARY_FLAG; @@ -4745,12 +4747,12 @@ Field_timestamp::Field_timestamp(uchar * } -Field_timestamp::Field_timestamp(bool maybe_null_arg, +Field_timestamp::Field_timestamp(bool is_nullable, const char *field_name_arg, CHARSET_INFO *cs) :Field_str((uchar*) 0, MAX_DATETIME_WIDTH, - maybe_null_arg ? (uchar*) "": 0, 0, - NONE, field_name_arg, cs) + is_nullable ? (uchar*) "": 0, 0, + is_nullable, NONE, field_name_arg, cs) { /* For 4.0 MYD and 4.0 InnoDB compatibility */ flags|= ZEROFILL_FLAG | UNSIGNED_FLAG | BINARY_FLAG; @@ -6789,7 +6791,7 @@ Field *Field_string::new_field(MEM_ROOT Field *field; if (type() != MYSQL_TYPE_VAR_STRING || keep_type) field= Field::new_field(root, new_table, keep_type); - else if ((field= new Field_varstring(field_length, maybe_null(), field_name, + else if ((field= new Field_varstring(field_length, is_nullable(), field_name, new_table->s, charset()))) { /* @@ -7239,14 +7241,15 @@ Field *Field_varstring::new_field(MEM_RO Field *Field_varstring::new_key_field(MEM_ROOT *root, TABLE *new_table, uchar *new_ptr, uchar *new_null_ptr, - uint new_null_bit) + uint new_null_bit, bool is_nullable) { Field_varstring *res; if ((res= (Field_varstring*) Field::new_key_field(root, new_table, new_ptr, new_null_ptr, - new_null_bit))) + new_null_bit, + is_nullable))) { /* Keys length prefixes are always packed with 2 bytes */ res->length_bytes= 2; @@ -7293,12 +7296,12 @@ void Field_varstring::hash(ulong *nr, ul ****************************************************************************/ Field_blob::Field_blob(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - TABLE_SHARE *share, uint blob_pack_length, - CHARSET_INFO *cs) + bool is_nullable, enum utype unireg_check_arg, + const char *field_name_arg, TABLE_SHARE *share, + uint blob_pack_length, CHARSET_INFO *cs) :Field_longstr(ptr_arg, BLOB_PACK_LENGTH_TO_MAX_LENGH(blob_pack_length), - null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_arg, - cs), + null_ptr_arg, null_bit_arg, is_nullable, unireg_check_arg, + field_name_arg, cs), packlength(blob_pack_length) { DBUG_ASSERT(blob_pack_length <= 4); // Only pack lengths 1-4 supported currently @@ -8530,9 +8533,10 @@ uint Field_num::is_equal(Create_field *n */ Field_bit::Field_bit(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, uchar *bit_ptr_arg, uchar bit_ofs_arg, - enum utype unireg_check_arg, const char *field_name_arg) - : Field(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, + uchar null_bit_arg, bool is_nullable, uchar *bit_ptr_arg, + uchar bit_ofs_arg, enum utype unireg_check_arg, + const char *field_name_arg) + : Field(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, unireg_check_arg, field_name_arg), bit_ptr(bit_ptr_arg), bit_ofs(bit_ofs_arg), bit_len(len_arg & 7), bytes_in_rec(len_arg / 8) @@ -8598,12 +8602,12 @@ Field_bit::do_last_null_byte() const Field *Field_bit::new_key_field(MEM_ROOT *root, TABLE *new_table, uchar *new_ptr, uchar *new_null_ptr, - uint new_null_bit) + uint new_null_bit, bool is_nullable) { Field_bit *res; if ((res= (Field_bit*) Field::new_key_field(root, new_table, new_ptr, new_null_ptr, - new_null_bit))) + new_null_bit, is_nullable))) { /* Move bits normally stored in null_pointer to new_ptr */ res->bit_ptr= new_ptr; @@ -9049,9 +9053,10 @@ void Field_bit::set_default() Field_bit_as_char::Field_bit_as_char(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, + bool is_nullable, enum utype unireg_check_arg, const char *field_name_arg) - :Field_bit(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, 0, 0, + :Field_bit(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, 0, 0, unireg_check_arg, field_name_arg) { flags|= UNSIGNED_FLAG; @@ -9728,18 +9733,19 @@ Field *make_field(TABLE_SHARE *share, uc { uchar *UNINIT_VAR(bit_ptr); uchar UNINIT_VAR(bit_offset); + bool is_nullable= f_maybe_null(pack_flag); if (field_type == MYSQL_TYPE_BIT && !f_bit_as_char(pack_flag)) { bit_ptr= null_pos; bit_offset= null_bit; - if (f_maybe_null(pack_flag)) // if null field + if (is_nullable) // if null field { bit_ptr+= (null_bit == 7); // shift bit_ptr and bit_offset bit_offset= (bit_offset + 1) & 7; } } - if (!f_maybe_null(pack_flag)) + if (!is_nullable) { null_pos=0; null_bit=0; @@ -9774,13 +9780,13 @@ Field *make_field(TABLE_SHARE *share, uc if (field_type == MYSQL_TYPE_STRING || field_type == MYSQL_TYPE_DECIMAL || // 3.23 or 4.0 string field_type == MYSQL_TYPE_VAR_STRING) - return new Field_string(ptr,field_length,null_pos,null_bit, + return new Field_string(ptr,field_length,null_pos,null_bit,is_nullable, unireg_check, field_name, field_charset); if (field_type == MYSQL_TYPE_VARCHAR) return new Field_varstring(ptr,field_length, HA_VARCHAR_PACKLENGTH(field_length), - null_pos,null_bit, + null_pos,null_bit, is_nullable, unireg_check, field_name, share, field_charset); @@ -9793,22 +9799,22 @@ Field *make_field(TABLE_SHARE *share, uc #ifdef HAVE_SPATIAL if (f_is_geom(pack_flag)) - return new Field_geom(ptr,null_pos,null_bit, + return new Field_geom(ptr,null_pos,null_bit,is_nullable, unireg_check, field_name, share, pack_length, geom_type); #endif if (f_is_blob(pack_flag)) - return new Field_blob(ptr,null_pos,null_bit, + return new Field_blob(ptr,null_pos,null_bit,is_nullable, unireg_check, field_name, share, pack_length, field_charset); if (interval) { if (f_is_enum(pack_flag)) - return new Field_enum(ptr,field_length,null_pos,null_bit, + return new Field_enum(ptr,field_length,null_pos,null_bit,is_nullable, unireg_check, field_name, pack_length, interval, field_charset); else - return new Field_set(ptr,field_length,null_pos,null_bit, + return new Field_set(ptr,field_length,null_pos,null_bit,is_nullable, unireg_check, field_name, pack_length, interval, field_charset); } @@ -9816,82 +9822,82 @@ Field *make_field(TABLE_SHARE *share, uc switch (field_type) { case MYSQL_TYPE_DECIMAL: - return new Field_decimal(ptr,field_length,null_pos,null_bit, + return new Field_decimal(ptr,field_length,null_pos,null_bit,is_nullable, unireg_check, field_name, f_decimals(pack_flag), f_is_zerofill(pack_flag) != 0, f_is_dec(pack_flag) == 0); case MYSQL_TYPE_NEWDECIMAL: - return new Field_new_decimal(ptr,field_length,null_pos,null_bit, + return new Field_new_decimal(ptr,field_length,null_pos,null_bit,is_nullable, unireg_check, field_name, f_decimals(pack_flag), f_is_zerofill(pack_flag) != 0, f_is_dec(pack_flag) == 0); case MYSQL_TYPE_FLOAT: - return new Field_float(ptr,field_length,null_pos,null_bit, + return new Field_float(ptr,field_length,null_pos,null_bit,is_nullable, unireg_check, field_name, f_decimals(pack_flag), f_is_zerofill(pack_flag) != 0, f_is_dec(pack_flag)== 0); case MYSQL_TYPE_DOUBLE: - return new Field_double(ptr,field_length,null_pos,null_bit, + return new Field_double(ptr,field_length,null_pos,null_bit,is_nullable, unireg_check, field_name, f_decimals(pack_flag), f_is_zerofill(pack_flag) != 0, f_is_dec(pack_flag)== 0); case MYSQL_TYPE_TINY: - return new Field_tiny(ptr,field_length,null_pos,null_bit, + return new Field_tiny(ptr,field_length,null_pos,null_bit,is_nullable, unireg_check, field_name, f_is_zerofill(pack_flag) != 0, f_is_dec(pack_flag) == 0); case MYSQL_TYPE_SHORT: - return new Field_short(ptr,field_length,null_pos,null_bit, + return new Field_short(ptr,field_length,null_pos,null_bit,is_nullable, unireg_check, field_name, f_is_zerofill(pack_flag) != 0, f_is_dec(pack_flag) == 0); case MYSQL_TYPE_INT24: - return new Field_medium(ptr,field_length,null_pos,null_bit, + return new Field_medium(ptr,field_length,null_pos,null_bit,is_nullable, unireg_check, field_name, f_is_zerofill(pack_flag) != 0, f_is_dec(pack_flag) == 0); case MYSQL_TYPE_LONG: - return new Field_long(ptr,field_length,null_pos,null_bit, + return new Field_long(ptr,field_length,null_pos,null_bit,is_nullable, unireg_check, field_name, f_is_zerofill(pack_flag) != 0, f_is_dec(pack_flag) == 0); case MYSQL_TYPE_LONGLONG: - return new Field_longlong(ptr,field_length,null_pos,null_bit, + return new Field_longlong(ptr,field_length,null_pos,null_bit,is_nullable, unireg_check, field_name, f_is_zerofill(pack_flag) != 0, f_is_dec(pack_flag) == 0); case MYSQL_TYPE_TIMESTAMP: - return new Field_timestamp(ptr,field_length, null_pos, null_bit, + return new Field_timestamp(ptr,field_length, null_pos, null_bit,is_nullable, unireg_check, field_name, share, field_charset); case MYSQL_TYPE_YEAR: - return new Field_year(ptr,field_length,null_pos,null_bit, + return new Field_year(ptr,field_length,null_pos,null_bit,is_nullable, unireg_check, field_name); case MYSQL_TYPE_DATE: - return new Field_date(ptr,null_pos,null_bit, + return new Field_date(ptr,null_pos,null_bit,is_nullable, unireg_check, field_name, field_charset); case MYSQL_TYPE_NEWDATE: - return new Field_newdate(ptr,null_pos,null_bit, + return new Field_newdate(ptr,null_pos,null_bit,is_nullable, unireg_check, field_name, field_charset); case MYSQL_TYPE_TIME: - return new Field_time(ptr,null_pos,null_bit, + return new Field_time(ptr,null_pos,null_bit,is_nullable, unireg_check, field_name, field_charset); case MYSQL_TYPE_DATETIME: - return new Field_datetime(ptr,null_pos,null_bit, + return new Field_datetime(ptr,null_pos,null_bit,is_nullable, unireg_check, field_name, field_charset); case MYSQL_TYPE_NULL: return new Field_null(ptr, field_length, unireg_check, field_name, field_charset); case MYSQL_TYPE_BIT: return f_bit_as_char(pack_flag) ? - new Field_bit_as_char(ptr, field_length, null_pos, null_bit, - unireg_check, field_name) : - new Field_bit(ptr, field_length, null_pos, null_bit, bit_ptr, - bit_offset, unireg_check, field_name); + new Field_bit_as_char(ptr, field_length, null_pos, null_bit, + is_nullable, unireg_check, field_name) : + new Field_bit(ptr, field_length, null_pos, null_bit, is_nullable, bit_ptr, + bit_offset, unireg_check, field_name); default: // Impossible (Wrong version) break; === modified file 'sql/field.h' --- a/sql/field.h 2010-06-19 07:50:33 +0000 +++ b/sql/field.h 2010-07-23 07:11:24 +0000 @@ -143,7 +143,7 @@ public: bool is_created_from_null_item; Field(uchar *ptr_arg,uint32 length_arg,uchar *null_ptr_arg, - uchar null_bit_arg, utype unireg_check_arg, + uchar null_bit_arg, bool is_nullable, utype unireg_check_arg, const char *field_name_arg); virtual ~Field() {} /* Store functions returns 1 on overflow and -1 on fatal error */ @@ -237,7 +237,7 @@ public: my_ptrdiff_t l_offset= (my_ptrdiff_t) (table->s->default_values - table->record[0]); memcpy(ptr, ptr + l_offset, pack_length()); - if (null_ptr) + if (real_is_nullable()) *null_ptr= ((*null_ptr & (uchar) ~null_bit) | (null_ptr[l_offset] & null_bit)); } @@ -270,31 +270,25 @@ public: virtual void sql_type(String &str) const =0; virtual uint size_of() const =0; // For new field inline bool is_null(my_ptrdiff_t row_offset= 0) - { return null_ptr ? (null_ptr[row_offset] & null_bit ? 1 : 0) : table->null_row; } + { return real_is_nullable() ? (null_ptr[row_offset] & null_bit ? TRUE : FALSE) : table->null_row; } inline bool is_real_null(my_ptrdiff_t row_offset= 0) - { return null_ptr ? (null_ptr[row_offset] & null_bit ? 1 : 0) : 0; } + { return real_is_nullable() ? (null_ptr[row_offset] & null_bit ? TRUE : FALSE) : FALSE; } inline bool is_null_in_record(const uchar *record) { - if (!null_ptr) - return 0; - return test(record[(uint) (null_ptr -table->record[0])] & - null_bit); - } - inline bool is_null_in_record_with_offset(my_ptrdiff_t offset) - { - if (!null_ptr) - return 0; - return test(null_ptr[offset] & null_bit); + if (!real_is_nullable()) + return FALSE; + return test(record[(uint) (null_ptr -table->record[0])] & null_bit); } inline void set_null(my_ptrdiff_t row_offset= 0) - { if (null_ptr) null_ptr[row_offset]|= null_bit; } + { if (real_is_nullable()) null_ptr[row_offset]|= null_bit; } inline void set_notnull(my_ptrdiff_t row_offset= 0) - { if (null_ptr) null_ptr[row_offset]&= (uchar) ~null_bit; } - inline bool maybe_null(void) { return null_ptr != 0 || table->maybe_null; } + { if (null_ptr) null_ptr[row_offset]&= (uchar) ~null_bit; } + inline bool is_nullable(void) { return real_is_nullable() || table->maybe_null; } /** Signals that this field is NULL-able. */ - inline bool real_maybe_null(void) { return null_ptr != 0; } + inline bool real_is_nullable(void) + { return !(flags & NOT_NULL_FLAG); } enum { LAST_NULL_BYTE_UNDEF= 0 @@ -338,7 +332,7 @@ public: bool keep_type); virtual Field *new_key_field(MEM_ROOT *root, TABLE *new_table, uchar *new_ptr, uchar *new_null_ptr, - uint new_null_bit); + uint new_null_bit, bool is_nullable); Field *clone(MEM_ROOT *mem_root, TABLE *new_table); inline void move_field(uchar *ptr_arg,uchar *null_ptr_arg,uchar null_bit_arg) { @@ -638,8 +632,8 @@ public: const uint8 dec; bool zerofill,unsigned_flag; // Purify cannot handle bit fields Field_num(uchar *ptr_arg,uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, utype unireg_check_arg, - const char *field_name_arg, + uchar null_bit_arg, bool is_nullable, utype unireg_check_arg, + const char *field_name_arg, uint8 dec_arg, bool zero_arg, bool unsigned_arg); Item_result result_type () const { return REAL_RESULT; } enum Derivation derivation(void) const { return DERIVATION_NUMERIC; } @@ -676,8 +670,8 @@ protected: enum Derivation field_derivation; public: Field_str(uchar *ptr_arg,uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, utype unireg_check_arg, - const char *field_name_arg, CHARSET_INFO *charset); + uchar null_bit_arg, bool is_nullable, utype unireg_check_arg, + const char *field_name_arg, CHARSET_INFO *charset); Item_result result_type () const { return STRING_RESULT; } uint decimals() const { return NOT_FIXED_DEC; } int store(double nr); @@ -712,10 +706,10 @@ protected: bool count_spaces); public: Field_longstr(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, utype unireg_check_arg, + uchar null_bit_arg, bool is_nullable, utype unireg_check_arg, const char *field_name_arg, CHARSET_INFO *charset_arg) - :Field_str(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, unireg_check_arg, - field_name_arg, charset_arg) + :Field_str(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, + unireg_check_arg, field_name_arg, charset_arg) {} int store_decimal(const my_decimal *d); @@ -728,11 +722,12 @@ public: my_bool not_fixed; Field_real(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, utype unireg_check_arg, + uchar null_bit_arg, bool is_nullable, utype unireg_check_arg, const char *field_name_arg, uint8 dec_arg, bool zero_arg, bool unsigned_arg) - :Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, unireg_check_arg, - field_name_arg, dec_arg, zero_arg, unsigned_arg), + :Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, + unireg_check_arg, field_name_arg, dec_arg, zero_arg, + unsigned_arg), not_fixed(dec_arg >= NOT_FIXED_DEC) {} int store_decimal(const my_decimal *); @@ -750,10 +745,10 @@ public: class Field_decimal :public Field_real { public: Field_decimal(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - uint8 dec_arg,bool zero_arg,bool unsigned_arg) - :Field_real(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, + uchar null_bit_arg, bool is_nullable, + enum utype unireg_check_arg, const char *field_name_arg, + uint8 dec_arg,bool zero_arg,bool unsigned_arg) + :Field_real(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, unireg_check_arg, field_name_arg, dec_arg, zero_arg, unsigned_arg) {} @@ -800,10 +795,10 @@ public: CREATE TABLE ( DECIMAL(x,y)) */ Field_new_decimal(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, + uchar null_bit_arg, bool is_nullable, enum utype unireg_check_arg, const char *field_name_arg, uint8 dec_arg, bool zero_arg, bool unsigned_arg); - Field_new_decimal(uint32 len_arg, bool maybe_null_arg, + Field_new_decimal(uint32 len_arg, bool is_nullable, const char *field_name_arg, uint8 dec_arg, bool unsigned_arg); enum_field_types type() const { return MYSQL_TYPE_NEWDECIMAL;} @@ -842,12 +837,12 @@ public: class Field_tiny :public Field_num { public: Field_tiny(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - bool zero_arg, bool unsigned_arg) - :Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, - unireg_check_arg, field_name_arg, - 0, zero_arg,unsigned_arg) + uchar null_bit_arg, bool is_nullable, + enum utype unireg_check_arg, const char *field_name_arg, + bool zero_arg, bool unsigned_arg) + :Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, + unireg_check_arg, field_name_arg, + 0, zero_arg,unsigned_arg) {} enum Item_result result_type () const { return INT_RESULT; } enum_field_types type() const { return MYSQL_TYPE_TINY;} @@ -886,17 +881,12 @@ public: class Field_short :public Field_num { public: Field_short(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - bool zero_arg, bool unsigned_arg) - :Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, - unireg_check_arg, field_name_arg, - 0, zero_arg,unsigned_arg) - {} - Field_short(uint32 len_arg,bool maybe_null_arg, const char *field_name_arg, - bool unsigned_arg) - :Field_num((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0,0, - NONE, field_name_arg, 0, 0, unsigned_arg) + uchar null_bit_arg, bool is_nullable, + enum utype unireg_check_arg, const char *field_name_arg, + bool zero_arg, bool unsigned_arg) + :Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, + unireg_check_arg, field_name_arg, + 0, zero_arg,unsigned_arg) {} enum Item_result result_type () const { return INT_RESULT; } enum_field_types type() const { return MYSQL_TYPE_SHORT;} @@ -960,12 +950,12 @@ public: class Field_medium :public Field_num { public: Field_medium(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - bool zero_arg, bool unsigned_arg) - :Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, - unireg_check_arg, field_name_arg, - 0, zero_arg,unsigned_arg) + uchar null_bit_arg, bool is_nullable, + enum utype unireg_check_arg, const char *field_name_arg, + bool zero_arg, bool unsigned_arg) + :Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, + unireg_check_arg, field_name_arg, + 0, zero_arg,unsigned_arg) {} enum Item_result result_type () const { return INT_RESULT; } enum_field_types type() const { return MYSQL_TYPE_INT24;} @@ -1002,18 +992,18 @@ public: class Field_long :public Field_num { public: Field_long(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - bool zero_arg, bool unsigned_arg) - :Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, - unireg_check_arg, field_name_arg, - 0, zero_arg,unsigned_arg) - {} - Field_long(uint32 len_arg,bool maybe_null_arg, const char *field_name_arg, - bool unsigned_arg) - :Field_num((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0,0, - NONE, field_name_arg,0,0,unsigned_arg) + uchar null_bit_arg, bool is_nullable, + enum utype unireg_check_arg, const char *field_name_arg, + bool zero_arg, bool unsigned_arg) + :Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, + unireg_check_arg, field_name_arg, + 0, zero_arg,unsigned_arg) {} + Field_long(uint32 len_arg,bool is_nullable, const char *field_name_arg, + bool unsigned_arg) + :Field_num((uchar*) 0, len_arg, is_nullable ? (uchar*) "": 0,0, + is_nullable, NONE, field_name_arg,0,0,unsigned_arg) + {} enum Item_result result_type () const { return INT_RESULT; } enum_field_types type() const { return MYSQL_TYPE_LONG;} enum ha_base_keytype key_type() const @@ -1050,19 +1040,19 @@ public: class Field_longlong :public Field_num { public: Field_longlong(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - bool zero_arg, bool unsigned_arg) - :Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, - unireg_check_arg, field_name_arg, - 0, zero_arg,unsigned_arg) - {} - Field_longlong(uint32 len_arg,bool maybe_null_arg, - const char *field_name_arg, - bool unsigned_arg) - :Field_num((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0,0, - NONE, field_name_arg,0,0,unsigned_arg) + uchar null_bit_arg, bool is_nullable, + enum utype unireg_check_arg, const char *field_name_arg, + bool zero_arg, bool unsigned_arg) + :Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, + unireg_check_arg, field_name_arg, + 0, zero_arg,unsigned_arg) {} + Field_longlong(uint32 len_arg,bool is_nullable, + const char *field_name_arg, + bool unsigned_arg) + :Field_num((uchar*) 0, len_arg, is_nullable ? (uchar*) "": 0,0, + is_nullable, NONE, field_name_arg,0,0,unsigned_arg) + {} enum Item_result result_type () const { return INT_RESULT; } enum_field_types type() const { return MYSQL_TYPE_LONGLONG;} enum ha_base_keytype key_type() const @@ -1104,18 +1094,13 @@ public: class Field_float :public Field_real { public: Field_float(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, + uchar null_bit_arg, bool is_nullable, + enum utype unireg_check_arg, const char *field_name_arg, uint8 dec_arg,bool zero_arg,bool unsigned_arg) - :Field_real(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, + :Field_real(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, unireg_check_arg, field_name_arg, dec_arg, zero_arg, unsigned_arg) - {} - Field_float(uint32 len_arg, bool maybe_null_arg, const char *field_name_arg, - uint8 dec_arg) - :Field_real((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0, (uint) 0, - NONE, field_name_arg, dec_arg, 0, 0) - {} + {} enum_field_types type() const { return MYSQL_TYPE_FLOAT;} enum ha_base_keytype key_type() const { return HA_KEYTYPE_FLOAT; } int store(const char *to,uint length,CHARSET_INFO *charset); @@ -1139,23 +1124,23 @@ private: class Field_double :public Field_real { public: Field_double(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - uint8 dec_arg,bool zero_arg,bool unsigned_arg) - :Field_real(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, + uchar null_bit_arg, bool is_nullable, + enum utype unireg_check_arg, const char *field_name_arg, + uint8 dec_arg,bool zero_arg,bool unsigned_arg) + :Field_real(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, unireg_check_arg, field_name_arg, dec_arg, zero_arg, unsigned_arg) {} - Field_double(uint32 len_arg, bool maybe_null_arg, const char *field_name_arg, - uint8 dec_arg) - :Field_real((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "" : 0, (uint) 0, - NONE, field_name_arg, dec_arg, 0, 0) - {} - Field_double(uint32 len_arg, bool maybe_null_arg, const char *field_name_arg, + Field_double(uint32 len_arg, bool is_nullable, const char *field_name_arg, + uint8 dec_arg) + :Field_real((uchar*) 0, len_arg, is_nullable ? (uchar*) "" : 0, (uint) 0, + is_nullable, NONE, field_name_arg, dec_arg, 0, 0) + {} + Field_double(uint32 len_arg, bool is_nullable, const char *field_name_arg, uint8 dec_arg, my_bool not_fixed_arg) - :Field_real((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "" : 0, (uint) 0, - NONE, field_name_arg, dec_arg, 0, 0) - {not_fixed= not_fixed_arg; } + :Field_real((uchar*) 0, len_arg, is_nullable ? (uchar*) "" : 0, (uint) 0, + is_nullable, NONE, field_name_arg, dec_arg, 0, 0) + {not_fixed= not_fixed_arg; } enum_field_types type() const { return MYSQL_TYPE_DOUBLE;} enum ha_base_keytype key_type() const { return HA_KEYTYPE_DOUBLE; } int store(const char *to,uint length,CHARSET_INFO *charset); @@ -1184,7 +1169,7 @@ public: Field_null(uchar *ptr_arg, uint32 len_arg, enum utype unireg_check_arg, const char *field_name_arg, CHARSET_INFO *cs) - :Field_str(ptr_arg, len_arg, null, 1, + :Field_str(ptr_arg, len_arg, null, 1, TRUE, unireg_check_arg, field_name_arg, cs) {} enum_field_types type() const { return MYSQL_TYPE_NULL;} @@ -1211,11 +1196,11 @@ public: class Field_timestamp :public Field_str { public: Field_timestamp(uchar *ptr_arg, uint32 len_arg, - uchar *null_ptr_arg, uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - TABLE_SHARE *share, CHARSET_INFO *cs); - Field_timestamp(bool maybe_null_arg, const char *field_name_arg, - CHARSET_INFO *cs); + uchar *null_ptr_arg, uchar null_bit_arg, bool is_nullable, + enum utype unireg_check_arg, const char *field_name_arg, + TABLE_SHARE *share, CHARSET_INFO *cs); + Field_timestamp(bool is_nullable, const char *field_name_arg, + CHARSET_INFO *cs); enum_field_types type() const { return MYSQL_TYPE_TIMESTAMP;} enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; } enum Item_result cmp_type () const { return INT_RESULT; } @@ -1290,10 +1275,10 @@ public: class Field_year :public Field_tiny { public: Field_year(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg) - :Field_tiny(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, - unireg_check_arg, field_name_arg, 1, 1) + uchar null_bit_arg, bool is_nullable, + enum utype unireg_check_arg, const char *field_name_arg) + :Field_tiny(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, + unireg_check_arg, field_name_arg, 1, 1) {} enum_field_types type() const { return MYSQL_TYPE_YEAR;} int store(const char *to,uint length,CHARSET_INFO *charset); @@ -1311,15 +1296,11 @@ public: class Field_date :public Field_str { public: Field_date(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - CHARSET_INFO *cs) - :Field_str(ptr_arg, MAX_DATE_WIDTH, null_ptr_arg, null_bit_arg, - unireg_check_arg, field_name_arg, cs) + bool is_nullable, enum utype unireg_check_arg, + const char *field_name_arg, CHARSET_INFO *cs) + :Field_str(ptr_arg, MAX_DATE_WIDTH, null_ptr_arg, null_bit_arg, is_nullable, + unireg_check_arg, field_name_arg, cs) { flags|= BINARY_FLAG; } - Field_date(bool maybe_null_arg, const char *field_name_arg, - CHARSET_INFO *cs) - :Field_str((uchar*) 0, MAX_DATE_WIDTH, maybe_null_arg ? (uchar*) "": 0,0, - NONE, field_name_arg, cs) { flags|= BINARY_FLAG; } enum_field_types type() const { return MYSQL_TYPE_DATE;} enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; } enum Item_result cmp_type () const { return INT_RESULT; } @@ -1359,14 +1340,14 @@ public: class Field_newdate :public Field_str { public: Field_newdate(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - CHARSET_INFO *cs) - :Field_str(ptr_arg, 10, null_ptr_arg, null_bit_arg, - unireg_check_arg, field_name_arg, cs) + bool is_nullable, enum utype unireg_check_arg, + const char *field_name_arg, CHARSET_INFO *cs) + :Field_str(ptr_arg, 10, null_ptr_arg, null_bit_arg, is_nullable, + unireg_check_arg, field_name_arg, cs) { flags|= BINARY_FLAG; } - Field_newdate(bool maybe_null_arg, const char *field_name_arg, + Field_newdate(bool is_nullable, const char *field_name_arg, CHARSET_INFO *cs) - :Field_str((uchar*) 0,10, maybe_null_arg ? (uchar*) "": 0,0, + :Field_str((uchar*) 0,10, is_nullable ? (uchar*) "": 0,0, is_nullable, NONE, field_name_arg, cs) { flags|= BINARY_FLAG; } enum_field_types type() const { return MYSQL_TYPE_DATE;} enum_field_types real_type() const { return MYSQL_TYPE_NEWDATE; } @@ -1399,14 +1380,14 @@ public: class Field_time :public Field_str { public: Field_time(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - CHARSET_INFO *cs) - :Field_str(ptr_arg, 8, null_ptr_arg, null_bit_arg, - unireg_check_arg, field_name_arg, cs) + bool is_nullable, enum utype unireg_check_arg, + const char *field_name_arg, CHARSET_INFO *cs) + :Field_str(ptr_arg, 8, null_ptr_arg, null_bit_arg, is_nullable, + unireg_check_arg, field_name_arg, cs) { flags|= BINARY_FLAG; } - Field_time(bool maybe_null_arg, const char *field_name_arg, + Field_time(bool is_nullable, const char *field_name_arg, CHARSET_INFO *cs) - :Field_str((uchar*) 0,8, maybe_null_arg ? (uchar*) "": 0,0, + :Field_str((uchar*) 0,8, is_nullable ? (uchar*) "": 0,0, is_nullable, NONE, field_name_arg, cs) { flags|= BINARY_FLAG; } enum_field_types type() const { return MYSQL_TYPE_TIME;} enum ha_base_keytype key_type() const { return HA_KEYTYPE_INT24; } @@ -1438,15 +1419,15 @@ public: class Field_datetime :public Field_str { public: Field_datetime(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - CHARSET_INFO *cs) + bool is_nullable, enum utype unireg_check_arg, + const char *field_name_arg, CHARSET_INFO *cs) :Field_str(ptr_arg, MAX_DATETIME_WIDTH, null_ptr_arg, null_bit_arg, - unireg_check_arg, field_name_arg, cs) + is_nullable, unireg_check_arg, field_name_arg, cs) { flags|= BINARY_FLAG; } - Field_datetime(bool maybe_null_arg, const char *field_name_arg, + Field_datetime(bool is_nullable, const char *field_name_arg, CHARSET_INFO *cs) - :Field_str((uchar*) 0, MAX_DATETIME_WIDTH, maybe_null_arg ? (uchar*) "": 0,0, - NONE, field_name_arg, cs) { flags|= BINARY_FLAG; } + :Field_str((uchar*) 0, MAX_DATETIME_WIDTH, is_nullable ? (uchar*) "": 0,0, + is_nullable, NONE, field_name_arg, cs) { flags|= BINARY_FLAG; } enum_field_types type() const { return MYSQL_TYPE_DATETIME;} #ifdef HAVE_LONG_LONG enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONGLONG; } @@ -1496,17 +1477,17 @@ class Field_string :public Field_longstr public: bool can_alter_field_type; Field_string(uchar *ptr_arg, uint32 len_arg,uchar *null_ptr_arg, - uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - CHARSET_INFO *cs) + uchar null_bit_arg, bool is_nullable, + enum utype unireg_check_arg, const char *field_name_arg, + CHARSET_INFO *cs) :Field_longstr(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, - unireg_check_arg, field_name_arg, cs), - can_alter_field_type(1) {}; - Field_string(uint32 len_arg,bool maybe_null_arg, const char *field_name_arg, + is_nullable, unireg_check_arg, field_name_arg, cs), + can_alter_field_type(1) {}; + Field_string(uint32 len_arg,bool is_nullable, const char *field_name_arg, CHARSET_INFO *cs) - :Field_longstr((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0, 0, - NONE, field_name_arg, cs), - can_alter_field_type(1) {}; + :Field_longstr((uchar*) 0, len_arg, is_nullable ? (uchar*) "": 0, 0, + is_nullable, NONE, field_name_arg, cs), + can_alter_field_type(1) {}; enum_field_types type() const { @@ -1576,20 +1557,20 @@ public: uint32 length_bytes; Field_varstring(uchar *ptr_arg, uint32 len_arg, uint length_bytes_arg, - uchar *null_ptr_arg, uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - TABLE_SHARE *share, CHARSET_INFO *cs) - :Field_longstr(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, + uchar *null_ptr_arg, uchar null_bit_arg, bool is_nullable, + enum utype unireg_check_arg, const char *field_name_arg, + TABLE_SHARE *share, CHARSET_INFO *cs) + :Field_longstr(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, unireg_check_arg, field_name_arg, cs), length_bytes(length_bytes_arg) { share->varchar_fields++; } - Field_varstring(uint32 len_arg,bool maybe_null_arg, + Field_varstring(uint32 len_arg,bool is_nullable, const char *field_name_arg, TABLE_SHARE *share, CHARSET_INFO *cs) - :Field_longstr((uchar*) 0,len_arg, maybe_null_arg ? (uchar*) "": 0, 0, - NONE, field_name_arg, cs), + :Field_longstr((uchar*) 0,len_arg, is_nullable ? (uchar*) "": 0, 0, + is_nullable, NONE, field_name_arg, cs), length_bytes(len_arg < 256 ? 1 :2) { share->varchar_fields++; @@ -1640,7 +1621,7 @@ public: Field *new_field(MEM_ROOT *root, TABLE *new_table, bool keep_type); Field *new_key_field(MEM_ROOT *root, TABLE *new_table, uchar *new_ptr, uchar *new_null_ptr, - uint new_null_bit); + uint new_null_bit, bool is_nullable); uint is_equal(Create_field *new_field); void hash(ulong *nr, ulong *nr2); private: @@ -1662,20 +1643,21 @@ protected: public: Field_blob(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - TABLE_SHARE *share, uint blob_pack_length, CHARSET_INFO *cs); - Field_blob(uint32 len_arg,bool maybe_null_arg, const char *field_name_arg, + bool is_nullable, enum utype unireg_check_arg, + const char *field_name_arg, TABLE_SHARE *share, + uint blob_pack_length, CHARSET_INFO *cs); + Field_blob(uint32 len_arg,bool is_nullable, const char *field_name_arg, CHARSET_INFO *cs) - :Field_longstr((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0, 0, - NONE, field_name_arg, cs), + :Field_longstr((uchar*) 0, len_arg, is_nullable ? (uchar*) "": 0, 0, + is_nullable, NONE, field_name_arg, cs), packlength(4) { flags|= BLOB_FLAG; } - Field_blob(uint32 len_arg,bool maybe_null_arg, const char *field_name_arg, + Field_blob(uint32 len_arg,bool is_nullable, const char *field_name_arg, CHARSET_INFO *cs, bool set_packlength) - :Field_longstr((uchar*) 0,len_arg, maybe_null_arg ? (uchar*) "": 0, 0, - NONE, field_name_arg, cs) + :Field_longstr((uchar*) 0,len_arg, is_nullable ? (uchar*) "": 0, 0, + is_nullable, NONE, field_name_arg, cs) { flags|= BLOB_FLAG; packlength= 4; @@ -1688,7 +1670,8 @@ public: } } Field_blob(uint32 packlength_arg) - :Field_longstr((uchar*) 0, 0, (uchar*) "", 0, NONE, "temp", system_charset_info), + :Field_longstr((uchar*) 0, 0, (uchar*) "", 0, TRUE, + NONE, "temp", system_charset_info), packlength(packlength_arg) {} enum_field_types type() const { return MYSQL_TYPE_BLOB;} enum ha_base_keytype key_type() const @@ -1828,15 +1811,16 @@ public: enum geometry_type geom_type; Field_geom(uchar *ptr_arg, uchar *null_ptr_arg, uint null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - TABLE_SHARE *share, uint blob_pack_length, - enum geometry_type geom_type_arg) - :Field_blob(ptr_arg, null_ptr_arg, null_bit_arg, unireg_check_arg, - field_name_arg, share, blob_pack_length, &my_charset_bin) + bool is_nullable, enum utype unireg_check_arg, + const char *field_name_arg, TABLE_SHARE *share, + uint blob_pack_length, enum geometry_type geom_type_arg) + :Field_blob(ptr_arg, null_ptr_arg, null_bit_arg, is_nullable, + unireg_check_arg, field_name_arg, share, blob_pack_length, + &my_charset_bin) { geom_type= geom_type_arg; } - Field_geom(uint32 len_arg,bool maybe_null_arg, const char *field_name_arg, + Field_geom(uint32 len_arg,bool is_nullable, const char *field_name_arg, TABLE_SHARE *share, enum geometry_type geom_type_arg) - :Field_blob(len_arg, maybe_null_arg, field_name_arg, &my_charset_bin) + :Field_blob(len_arg, is_nullable, field_name_arg, &my_charset_bin) { geom_type= geom_type_arg; } enum ha_base_keytype key_type() const { return HA_KEYTYPE_VARBINARY2; } enum_field_types type() const { return MYSQL_TYPE_GEOMETRY; } @@ -1846,7 +1830,7 @@ public: int store(longlong nr, bool unsigned_val); int store_decimal(const my_decimal *); uint size_of() const { return sizeof(*this); } - int reset(void) { return !maybe_null() || Field_blob::reset(); } + int reset(void) { return !is_nullable() || Field_blob::reset(); } geometry_type get_geometry_type() { return geom_type; }; }; #endif /*HAVE_SPATIAL*/ @@ -1858,13 +1842,13 @@ protected: public: TYPELIB *typelib; Field_enum(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, + uchar null_bit_arg, bool is_nullable, enum utype unireg_check_arg, const char *field_name_arg, uint packlength_arg, TYPELIB *typelib_arg, CHARSET_INFO *charset_arg) - :Field_str(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, - unireg_check_arg, field_name_arg, charset_arg), + :Field_str(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, is_nullable, + unireg_check_arg, field_name_arg, charset_arg), packlength(packlength_arg),typelib(typelib_arg) { flags|=ENUM_FLAG; @@ -1905,14 +1889,13 @@ private: class Field_set :public Field_enum { public: Field_set(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, - enum utype unireg_check_arg, const char *field_name_arg, - uint32 packlength_arg, - TYPELIB *typelib_arg, CHARSET_INFO *charset_arg) + uchar null_bit_arg, bool is_nullable, + enum utype unireg_check_arg, const char *field_name_arg, + uint32 packlength_arg, + TYPELIB *typelib_arg, CHARSET_INFO *charset_arg) :Field_enum(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, - unireg_check_arg, field_name_arg, - packlength_arg, - typelib_arg,charset_arg) + is_nullable, unireg_check_arg, field_name_arg, + packlength_arg, typelib_arg,charset_arg) { flags=(flags & ~ENUM_FLAG) | SET_FLAG; } @@ -1949,8 +1932,9 @@ public: uint bit_len; // number of 'uneven' high bits uint bytes_in_rec; Field_bit(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, uchar *bit_ptr_arg, uchar bit_ofs_arg, - enum utype unireg_check_arg, const char *field_name_arg); + uchar null_bit_arg, bool is_nullable, uchar *bit_ptr_arg, + uchar bit_ofs_arg, enum utype unireg_check_arg, + const char *field_name_arg); enum_field_types type() const { return MYSQL_TYPE_BIT; } enum ha_base_keytype key_type() const { return HA_KEYTYPE_BIT; } uint32 key_length() const { return (uint32) (field_length + 7) / 8; } @@ -2013,7 +1997,7 @@ public: Field *new_key_field(MEM_ROOT *root, TABLE *new_table, uchar *new_ptr, uchar *new_null_ptr, - uint new_null_bit); + uint new_null_bit, bool is_nullable); void set_bit_ptr(uchar *bit_ptr_arg, uchar bit_ofs_arg) { bit_ptr= bit_ptr_arg; @@ -2049,7 +2033,7 @@ private: class Field_bit_as_char: public Field_bit { public: Field_bit_as_char(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, - uchar null_bit_arg, + uchar null_bit_arg, bool is_nullable, enum utype unireg_check_arg, const char *field_name_arg); enum ha_base_keytype key_type() const { return HA_KEYTYPE_BINARY; } uint size_of() const { return sizeof(*this); } === modified file 'sql/field_conv.cc' --- a/sql/field_conv.cc 2010-07-02 18:15:21 +0000 +++ b/sql/field_conv.cc 2010-07-23 07:11:24 +0000 @@ -116,7 +116,7 @@ static void do_outer_field_to_null_str(C int set_field_to_null(Field *field) { - if (field->real_maybe_null()) + if (field->real_is_nullable()) { field->set_null(); field->reset(); @@ -159,7 +159,7 @@ set_field_to_null(Field *field) int set_field_to_null_with_conversions(Field *field, bool no_conversions) { - if (field->real_maybe_null()) + if (field->real_is_nullable()) { field->set_null(); field->reset(); @@ -534,7 +534,7 @@ void Copy_field::set(uchar *to,Field *fr from_ptr=from->ptr; to_ptr=to; from_length=from->pack_length(); - if (from->maybe_null()) + if (from->is_nullable()) { from_null_ptr=from->null_ptr; from_bit= from->null_bit; @@ -590,11 +590,11 @@ void Copy_field::set(Field *to,Field *fr // set up null handling from_null_ptr=to_null_ptr=0; - if (from->maybe_null()) + if (from->is_nullable()) { from_null_ptr= from->null_ptr; from_bit= from->null_bit; - if (to_field->real_maybe_null()) + if (to_field->real_is_nullable()) { to_null_ptr= to->null_ptr; to_bit= to->null_bit; @@ -616,7 +616,7 @@ void Copy_field::set(Field *to,Field *fr do_copy= do_copy_not_null; } } - else if (to_field->real_maybe_null()) + else if (to_field->real_is_nullable()) { to_null_ptr= to->null_ptr; to_bit= to->null_bit; === modified file 'sql/filesort.cc' --- a/sql/filesort.cc 2010-07-20 08:10:38 +0000 +++ b/sql/filesort.cc 2010-07-23 07:11:24 +0000 @@ -750,7 +750,7 @@ static void make_sortkey(register SORTPA bool maybe_null=0; if ((field=sort_field->field)) { // Field - if (field->maybe_null()) + if (field->is_nullable()) { if (field->is_null()) { @@ -1458,7 +1458,7 @@ sortlength(THD *thd, SORT_FIELD *sortord *multi_byte_charset= 1; sortorder->length= cs->coll->strnxfrmlen(cs, sortorder->length); } - if (sortorder->field->maybe_null()) + if (sortorder->field->is_nullable()) length++; // Place for NULL marker } else @@ -1573,7 +1573,7 @@ get_addon_fields(THD *thd, Field **ptabf if (field->flags & BLOB_FLAG) return 0; length+= field->max_packed_col_length(field->pack_length()); - if (field->maybe_null()) + if (field->is_nullable()) null_fields++; fields++; } @@ -1595,7 +1595,7 @@ get_addon_fields(THD *thd, Field **ptabf continue; addonf->field= field; addonf->offset= length; - if (field->maybe_null()) + if (field->is_nullable()) { addonf->null_offset= null_fields/8; addonf->null_bit= 1<<(null_fields & 7); === modified file 'sql/item.cc' --- a/sql/item.cc 2010-07-20 04:22:14 +0000 +++ b/sql/item.cc 2010-07-23 07:11:24 +0000 @@ -2016,7 +2016,7 @@ Item_field::Item_field(THD *thd, Item_fi void Item_field::set_field(Field *field_par) { field=result_field=field_par; // for easy coding with fields - maybe_null=field->maybe_null(); + maybe_null=field->is_nullable(); decimals= field->decimals(); table_name= *field_par->table_name; field_name= field_par->field_name; @@ -5187,38 +5187,38 @@ Field *Item::tmp_table_field_from_field_ field= Field_new_decimal::create_from_item(this); break; case MYSQL_TYPE_TINY: - field= new Field_tiny((uchar*) 0, max_length, null_ptr, 0, Field::NONE, - name, 0, unsigned_flag); + field= new Field_tiny((uchar*) 0, max_length, null_ptr, 0, maybe_null, + Field::NONE, name, 0, unsigned_flag); break; case MYSQL_TYPE_SHORT: - field= new Field_short((uchar*) 0, max_length, null_ptr, 0, Field::NONE, - name, 0, unsigned_flag); + field= new Field_short((uchar*) 0, max_length, null_ptr, 0, maybe_null, + Field::NONE, name, 0, unsigned_flag); break; case MYSQL_TYPE_LONG: - field= new Field_long((uchar*) 0, max_length, null_ptr, 0, Field::NONE, - name, 0, unsigned_flag); + field= new Field_long((uchar*) 0, max_length, null_ptr, 0, maybe_null, + Field::NONE, name, 0, unsigned_flag); break; #ifdef HAVE_LONG_LONG case MYSQL_TYPE_LONGLONG: - field= new Field_longlong((uchar*) 0, max_length, null_ptr, 0, Field::NONE, - name, 0, unsigned_flag); + field= new Field_longlong((uchar*) 0, max_length, null_ptr, 0, maybe_null, + Field::NONE, name, 0, unsigned_flag); break; #endif case MYSQL_TYPE_FLOAT: - field= new Field_float((uchar*) 0, max_length, null_ptr, 0, Field::NONE, - name, decimals, 0, unsigned_flag); + field= new Field_float((uchar*) 0, max_length, null_ptr, 0, maybe_null, + Field::NONE, name, decimals, 0, unsigned_flag); break; case MYSQL_TYPE_DOUBLE: - field= new Field_double((uchar*) 0, max_length, null_ptr, 0, Field::NONE, - name, decimals, 0, unsigned_flag); + field= new Field_double((uchar*) 0, max_length, null_ptr, 0, maybe_null, + Field::NONE, name, decimals, 0, unsigned_flag); break; case MYSQL_TYPE_NULL: field= new Field_null((uchar*) 0, max_length, Field::NONE, name, &my_charset_bin); break; case MYSQL_TYPE_INT24: - field= new Field_medium((uchar*) 0, max_length, null_ptr, 0, Field::NONE, - name, 0, unsigned_flag); + field= new Field_medium((uchar*) 0, max_length, null_ptr, 0, maybe_null, + Field::NONE, name, 0, unsigned_flag); break; case MYSQL_TYPE_NEWDATE: case MYSQL_TYPE_DATE: @@ -5234,11 +5234,11 @@ Field *Item::tmp_table_field_from_field_ field= new Field_datetime(maybe_null, name, &my_charset_bin); break; case MYSQL_TYPE_YEAR: - field= new Field_year((uchar*) 0, max_length, null_ptr, 0, Field::NONE, - name); + field= new Field_year((uchar*) 0, max_length, null_ptr, 0, maybe_null, + Field::NONE, name); break; case MYSQL_TYPE_BIT: - field= new Field_bit_as_char(NULL, max_length, null_ptr, 0, + field= new Field_bit_as_char(NULL, max_length, null_ptr, 0, maybe_null, Field::NONE, name); break; default: @@ -8150,7 +8150,7 @@ Field *Item_type_holder::make_field_by_t switch (fld_type) { case MYSQL_TYPE_ENUM: DBUG_ASSERT(enum_set_typelib); - field= new Field_enum((uchar *) 0, max_length, null_ptr, 0, + field= new Field_enum((uchar *) 0, max_length, null_ptr, 0, maybe_null, Field::NONE, name, get_enum_pack_length(enum_set_typelib->count), enum_set_typelib, collation.collation); @@ -8159,7 +8159,7 @@ Field *Item_type_holder::make_field_by_t return field; case MYSQL_TYPE_SET: DBUG_ASSERT(enum_set_typelib); - field= new Field_set((uchar *) 0, max_length, null_ptr, 0, + field= new Field_set((uchar *) 0, max_length, null_ptr, 0, maybe_null, Field::NONE, name, get_set_pack_length(enum_set_typelib->count), enum_set_typelib, collation.collation); === modified file 'sql/key.cc' --- a/sql/key.cc 2010-07-02 18:15:21 +0000 +++ b/sql/key.cc 2010-07-23 07:11:24 +0000 @@ -537,8 +537,8 @@ int key_rec_cmp(void *key_p, uchar *firs if (key_part->null_bit) { /* The key_part can contain NULL values */ - bool first_is_null= field->is_null_in_record_with_offset(first_diff); - bool sec_is_null= field->is_null_in_record_with_offset(sec_diff); + bool first_is_null= field->is_real_null(first_diff); + bool sec_is_null= field->is_real_null(sec_diff); /* NULL is smaller then everything so if first is NULL and the other not then we know that we should return -1 and for the opposite === modified file 'sql/log_event.cc' --- a/sql/log_event.cc 2010-07-16 21:00:50 +0000 +++ b/sql/log_event.cc 2010-07-23 07:11:24 +0000 @@ -8197,7 +8197,7 @@ Table_map_log_event::Table_map_log_event bzero(m_null_bits, num_null_bytes); for (unsigned int i= 0 ; i < m_table->s->fields ; ++i) - if (m_table->field[i]->maybe_null()) + if (m_table->field[i]->is_nullable()) m_null_bits[(i / 8)]+= 1 << (i % 8); } === modified file 'sql/log_event_old.cc' --- a/sql/log_event_old.cc 2010-07-16 21:00:50 +0000 +++ b/sql/log_event_old.cc 2010-07-23 07:11:24 +0000 @@ -445,7 +445,7 @@ copy_extra_record_fields(TABLE *table, /* Set the null bit according to the values in record[1] */ - if ((*field_ptr)->maybe_null() && + if ((*field_ptr)->is_nullable() && (*field_ptr)->is_null_in_record(reinterpret_cast(table->record[1]))) (*field_ptr)->set_null(); else === modified file 'sql/opt_range.cc' --- a/sql/opt_range.cc 2010-07-16 21:00:50 +0000 +++ b/sql/opt_range.cc 2010-07-23 07:11:24 +0000 @@ -1696,7 +1696,7 @@ inline void SEL_ARG::make_root() SEL_ARG::SEL_ARG(Field *f,const uchar *min_value_arg, const uchar *max_value_arg) - :min_flag(0), max_flag(0), maybe_flag(0), maybe_null(f->real_maybe_null()), + :min_flag(0), max_flag(0), maybe_flag(0), maybe_null(f->real_is_nullable()), elements(1), use_count(1), field(f), min_value((uchar*) min_value_arg), max_value((uchar*) max_value_arg), next(0),prev(0), next_key_part(0),color(BLACK),type(KEY_RANGE) @@ -1708,7 +1708,7 @@ SEL_ARG::SEL_ARG(Field *field_,uint8 par uchar *min_value_, uchar *max_value_, uint8 min_flag_,uint8 max_flag_,uint8 maybe_flag_) :min_flag(min_flag_),max_flag(max_flag_),maybe_flag(maybe_flag_), - part(part_),maybe_null(field_->real_maybe_null()), elements(1),use_count(1), + part(part_),maybe_null(field_->real_is_nullable()), elements(1),use_count(1), field(field_), min_value(min_value_), max_value(max_value_), next(0),prev(0),next_key_part(0),color(BLACK),type(KEY_RANGE) { @@ -1799,7 +1799,7 @@ static int sel_cmp(Field *field, uchar * if (b_flag & (NO_MIN_RANGE | NO_MAX_RANGE)) return (b_flag & NO_MIN_RANGE) ? 1 : -1; - if (field->real_maybe_null()) // If null is part of key + if (field->real_is_nullable()) // If null is part of key { if (*a != *b) { @@ -2765,7 +2765,7 @@ void store_key_image_to_rec(Field *field /* Do the same as print_key() does */ my_bitmap_map *old_map; - if (field->real_maybe_null()) + if (field->real_is_nullable()) { if (*ptr) { @@ -5741,7 +5741,7 @@ static SEL_ARG * get_mm_leaf(RANGE_OPT_PARAM *param, COND *conf_func, Field *field, KEY_PART *key_part, Item_func::Functype type,Item *value) { - uint maybe_null=(uint) field->real_maybe_null(); + uint maybe_null=(uint) field->real_is_nullable(); bool optimize_range; SEL_ARG *tree= 0; MEM_ROOT *alloc= param->mem_root; @@ -10709,7 +10709,7 @@ void QUICK_GROUP_MIN_MAX_SELECT::update_ } } else if (have_min && min_max_arg_part && - min_max_arg_part->field->real_maybe_null()) + min_max_arg_part->field->real_is_nullable()) { /* If a MIN/MAX argument value is NULL, we can quickly determine @@ -11521,7 +11521,7 @@ print_key(KEY_PART *key_part, const ucha Field *field= key_part->field; store_length= key_part->store_length; - if (field->real_maybe_null()) + if (field->real_is_nullable()) { if (*key) { === modified file 'sql/opt_sum.cc' --- a/sql/opt_sum.cc 2010-06-11 08:15:55 +0000 +++ b/sql/opt_sum.cc 2010-07-23 07:11:24 +0000 @@ -160,7 +160,7 @@ static int get_index_min_value(TABLE *ta Check if case 1 from above holds. If it does, we should read the skipped tuple. */ - if (item_field->field->real_maybe_null() && + if (item_field->field->real_is_nullable() && ref->key_buff[prefix_len] == 1 && /* Last keypart (i.e. the argument to MIN) is set to NULL by @@ -172,7 +172,7 @@ static int get_index_min_value(TABLE *ta (error == HA_ERR_KEY_NOT_FOUND || key_cmp_if_same(table, ref->key_buff, ref->key, prefix_len))) { - DBUG_ASSERT(item_field->field->real_maybe_null()); + DBUG_ASSERT(item_field->field->real_is_nullable()); error= table->file->index_read_map(table->record[0], ref->key_buff, make_prev_keypart_map(ref->key_parts), === modified file 'sql/rpl_record.cc' --- a/sql/rpl_record.cc 2010-07-19 16:09:51 +0000 +++ b/sql/rpl_record.cc 2010-07-23 07:11:24 +0000 @@ -261,7 +261,7 @@ unpack_row(Relay_log_info const *rli, if (null_bits & null_mask) { - if (f->maybe_null()) + if (f->is_nullable()) { DBUG_PRINT("debug", ("Was NULL; null mask: 0x%x; null bits: 0x%x", null_mask, null_bits)); === modified file 'sql/sql_load.cc' --- a/sql/sql_load.cc 2010-07-16 21:00:50 +0000 +++ b/sql/sql_load.cc 2010-07-23 07:11:24 +0000 @@ -821,7 +821,7 @@ read_fixed_length(THD *thd, COPY_INFO &i ER_WARN_TOO_FEW_RECORDS, ER(ER_WARN_TOO_FEW_RECORDS), thd->warning_info->current_row_for_warning()); - if (!field->maybe_null() && field->type() == FIELD_TYPE_TIMESTAMP) + if (!field->is_nullable() && field->type() == FIELD_TYPE_TIMESTAMP) ((Field_timestamp*) field)->set_time(); } else @@ -952,7 +952,7 @@ read_sep_field(THD *thd, COPY_INFO &info DBUG_RETURN(1); } field->set_null(); - if (!field->maybe_null()) + if (!field->is_nullable()) { if (field->type() == MYSQL_TYPE_TIMESTAMP) ((Field_timestamp*) field)->set_time(); @@ -1023,7 +1023,7 @@ read_sep_field(THD *thd, COPY_INFO &info thd->warning_info->current_row_for_warning()); DBUG_RETURN(1); } - if (!field->maybe_null() && field->type() == FIELD_TYPE_TIMESTAMP) + if (!field->is_nullable() && field->type() == FIELD_TYPE_TIMESTAMP) ((Field_timestamp*) field)->set_time(); /* QQ: We probably should not throw warning for each field. @@ -1161,7 +1161,7 @@ read_xml_field(THD *thd, COPY_INFO &info field->set_null(); if (field == table->next_number_field) table->auto_increment_field_not_null= TRUE; - if (!field->maybe_null()) + if (!field->is_nullable()) { if (field->type() == FIELD_TYPE_TIMESTAMP) ((Field_timestamp *) field)->set_time(); === modified file 'sql/sql_partition.cc' --- a/sql/sql_partition.cc 2010-07-08 21:42:23 +0000 +++ b/sql/sql_partition.cc 2010-07-23 07:11:24 +0000 @@ -2909,7 +2909,7 @@ static void copy_to_part_field_buffers(F { *restore_ptr= field->ptr; restore_ptr++; - if (!field->maybe_null() || !field->is_null()) + if (!field->is_nullable() || !field->is_null()) { CHARSET_INFO *cs= ((Field_str*)field)->charset(); uint max_len= field->pack_length(); @@ -7062,7 +7062,7 @@ uint32 store_tuple_to_record(Field **pfi while (value < value_end) { loc_value= value; - if ((*pfield)->real_maybe_null()) + if ((*pfield)->real_is_nullable()) { if (*loc_value) (*pfield)->set_null(); @@ -7379,7 +7379,7 @@ int get_part_iter_for_interval_via_mappi Find minimum: Do special handling if the interval has left bound in form " NULL <= X ": */ - if (field->real_maybe_null() && part_info->has_null_value && + if (field->real_is_nullable() && part_info->has_null_value && !(flags & (NO_MIN_RANGE | NEAR_MIN)) && *min_value) { part_iter->ret_null_part= part_iter->ret_null_part_orig= TRUE; @@ -7510,7 +7510,7 @@ int get_part_iter_for_interval_via_walki } /* Handle the "t.field IS NULL" interval, it is a special case */ - if (field->real_maybe_null() && !(flags & (NO_MIN_RANGE | NO_MAX_RANGE)) && + if (field->real_is_nullable() && !(flags & (NO_MIN_RANGE | NO_MAX_RANGE)) && *min_value && *max_value) { /* @@ -7544,7 +7544,7 @@ int get_part_iter_for_interval_via_walki DBUG_RETURN(0); /* No partitions match */ } - if ((field->real_maybe_null() && + if ((field->real_is_nullable() && ((!(flags & NO_MIN_RANGE) && *min_value) || // NULL key_length(); - if (field->real_maybe_null()) + if (field->real_is_nullable()) store_length+= HA_KEY_NULL_LENGTH; if (field->real_type() == MYSQL_TYPE_VARCHAR) store_length+= HA_KEY_BLOB_LENGTH; === modified file 'sql/sql_select.cc' --- a/sql/sql_select.cc 2010-07-20 08:10:38 +0000 +++ b/sql/sql_select.cc 2010-07-23 07:11:24 +0000 @@ -595,7 +595,7 @@ JOIN::prepare(Item ***rref_pointer_array if (!real_order && /* Not a zero length NOT NULL field */ ((item->type() != Item::FIELD_ITEM || - ((Item_field *) item)->field->maybe_null() || + ((Item_field *) item)->field->is_nullable() || ((Item_field *) item)->field->sort_length()) && /* AND not a zero length NOT NULL string function. */ (item->type() != Item::FUNC_ITEM || @@ -3286,7 +3286,7 @@ add_key_field(KEY_FIELD **key_fields,uin { // Don't remove column IS NULL on a LEFT JOIN table if (!eq_func || (*value)->type() != Item::NULL_ITEM || - !field->table->maybe_null || field->null_ptr) + !field->table->maybe_null || field->real_is_nullable()) return; // Not a key. Skip it exists_optimize= KEY_OPTIMIZE_EXISTS; DBUG_ASSERT(num_values == 1); @@ -3306,7 +3306,7 @@ add_key_field(KEY_FIELD **key_fields,uin if (!(usable_tables & field->table->map)) { if (!eq_func || (*value)->type() != Item::NULL_ITEM || - !field->table->maybe_null || field->null_ptr) + !field->table->maybe_null || field->real_is_nullable()) return; // Can't use left join optimize exists_optimize= KEY_OPTIMIZE_EXISTS; } @@ -3418,7 +3418,7 @@ add_key_field(KEY_FIELD **key_fields,uin (*key_fields)->null_rejecting= ((cond->functype() == Item_func::EQ_FUNC || cond->functype() == Item_func::MULT_EQUAL_FUNC) && ((*value)->type() == Item::FIELD_ITEM) && - ((Item_field*)*value)->field->maybe_null()); + ((Item_field*)*value)->field->is_nullable()); (*key_fields)->cond_guard= NULL; (*key_fields)++; } @@ -3967,7 +3967,7 @@ update_ref_and_keys(THD *thd, DYNAMIC_AR return TRUE; /* Mark that we can optimize LEFT JOIN */ if (field->val->type() == Item::NULL_ITEM && - !field->field->real_maybe_null()) + !field->field->real_is_nullable()) field->field->table->reginfo.not_exists_optimize=1; } } @@ -5536,7 +5536,7 @@ static void calc_used_field_length(THD * rec_length+=field->pack_length(); if (flags & BLOB_FLAG) blobs++; - if (!(flags & NOT_NULL_FLAG)) + if (field->real_is_nullable()) null_fields++; } } @@ -7623,7 +7623,7 @@ static bool check_simple_equality(Item * /* As (NULL=NULL) != TRUE we can't just remove the predicate f=f */ if (left_field->eq(right_field)) /* f = f */ - return (!(left_field->maybe_null() && !left_item_equal)); + return (!(left_field->is_nullable() && !left_item_equal)); if (left_item_equal && left_item_equal == right_item_equal) { @@ -9436,7 +9436,7 @@ internal_remove_eq_conds(THD *thd, COND */ if (((field->type() == MYSQL_TYPE_DATE) || (field->type() == MYSQL_TYPE_DATETIME)) && - (field->flags & NOT_NULL_FLAG) && !field->table->maybe_null) + !field->real_is_nullable() && !field->table->maybe_null) { COND *new_cond; if ((new_cond= new Item_func_eq(args[0],new Item_int("0", 0, 2)))) @@ -9728,7 +9728,7 @@ Field *create_tmp_field_from_field(THD * if (convert_blob_length && convert_blob_length <= Field_varstring::MAX_SIZE && (org_field->flags & BLOB_FLAG)) new_field= new Field_varstring(convert_blob_length, - org_field->maybe_null(), + org_field->is_nullable(), org_field->field_name, table->s, org_field->charset()); else @@ -9743,7 +9743,7 @@ Field *create_tmp_field_from_field(THD * else new_field->field_name= name; new_field->flags|= (org_field->flags & NO_DEFAULT_VALUE_FLAG); - if (org_field->maybe_null() || (item && item->maybe_null)) + if (org_field->is_nullable() || (item && item->maybe_null)) new_field->flags&= ~NOT_NULL_FLAG; // Because of outer join if (org_field->type() == MYSQL_TYPE_VAR_STRING || org_field->type() == MYSQL_TYPE_VARCHAR) @@ -9957,7 +9957,7 @@ Field *create_tmp_field(THD *thd, TABLE If item have to be able to store NULLs but underlaid field can't do it, create_tmp_field_from_field() can't be used for tmp field creation. */ - if (field->maybe_null && !field->field->maybe_null()) + if (field->maybe_null && !field->field->is_nullable()) { result= create_tmp_field_from_item(thd, item, table, NULL, modify_item, convert_blob_length); @@ -10339,7 +10339,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARA thd->mem_root= mem_root_save; arg= sum_item->set_arg(i, thd, new Item_field(new_field)); thd->mem_root= &table->mem_root; - if (!(new_field->flags & NOT_NULL_FLAG)) + if (new_field->real_is_nullable()) { null_count++; /* @@ -10387,7 +10387,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARA ((Item_sum *) item)->result_field= new_field; tmp_from_field++; reclength+=new_field->pack_length(); - if (!(new_field->flags & NOT_NULL_FLAG)) + if (new_field->real_is_nullable()) null_count++; if (new_field->type() == MYSQL_TYPE_BIT) total_uneven_bit_length+= new_field->field_length & 7; @@ -10522,7 +10522,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARA uint length; bzero((uchar*) recinfo,sizeof(*recinfo)); - if (!(field->flags & NOT_NULL_FLAG)) + if (field->real_is_nullable()) { if (field->flags & GROUP_FLAG && !using_unique_constraint) { @@ -10665,10 +10665,11 @@ create_tmp_table(THD *thd,TMP_TABLE_PARA { cur_group->buff=(char*) group_buff; if (!(cur_group->field= field->new_key_field(thd->mem_root,table, - group_buff + - test(maybe_null), - field->null_ptr, - field->null_bit))) + group_buff + + test(maybe_null), + field->null_ptr, + field->null_bit, + field->real_is_nullable()))) goto err; /* purecov: inspected */ if (maybe_null) { @@ -10733,7 +10734,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARA key_part_info->field= new Field_string(table->record[0], (uint32) key_part_info->length, (uchar*) 0, - (uint) 0, + (uint) 0, FALSE, Field::NONE, NullS, &my_charset_bin); if (!key_part_info->field) @@ -10855,7 +10856,7 @@ TABLE *create_virtual_tmp_table(THD *thd goto error; (*field)->init(table); record_length+= (*field)->pack_length(); - if (! ((*field)->flags & NOT_NULL_FLAG)) + if ((*field)->real_is_nullable()) null_count++; if ((*field)->flags & BLOB_FLAG) @@ -10891,7 +10892,7 @@ TABLE *create_virtual_tmp_table(THD *thd for (field= table->field; *field; ++field) { Field *cur_field= *field; - if ((cur_field->flags & NOT_NULL_FLAG)) + if (!cur_field->real_is_nullable()) cur_field->move_field(field_pos); else { @@ -11014,7 +11015,7 @@ static bool create_myisam_tmp_table(TABL keyinfo->key_part[i].length > 4) seg->flag|= HA_SPACE_PACK; } - if (!(field->flags & NOT_NULL_FLAG)) + if (field->real_is_nullable()) { seg->null_bit= field->null_bit; seg->null_pos= (uint) (field->null_ptr - (uchar*) table->record[0]); @@ -13408,7 +13409,7 @@ list_contains_unique_index(TABLE *table, key_part < key_part_end; key_part++) { - if (key_part->field->maybe_null() || + if (key_part->field->is_nullable() || !find_func(key_part->field, data)) break; } @@ -14376,7 +14377,7 @@ join_init_cache(THD *thd,JOIN_TAB *table length+=field->fill_cache_field(copy); if (copy->type == CACHE_BLOB) (*blob_ptr++)=copy; - if (field->real_maybe_null()) + if (field->real_is_nullable()) null_fields++; if (field->type() == MYSQL_TYPE_BIT && ((Field_bit*)field)->bit_len) @@ -14481,7 +14482,7 @@ store_record_in_cache(JOIN_CACHE *cache) { uchar *str,*end; Field *field= copy->field; - if (field && field->maybe_null() && field->is_null()) + if (field && field->is_nullable() && field->is_null()) end= str= copy->str; else for (str=copy->str,end= str+copy->length; === modified file 'sql/sql_select.h' --- a/sql/sql_select.h 2010-07-02 18:15:21 +0000 +++ b/sql/sql_select.h 2010-07-23 07:11:24 +0000 @@ -662,14 +662,14 @@ public: Key segments are always packed with a 2 byte length prefix. See mi_rkey for details. */ - to_field= new Field_varstring(ptr, length, 2, null, 1, + to_field= new Field_varstring(ptr, length, 2, null, 1, null != NULL, Field::NONE, field_arg->field_name, field_arg->table->s, field_arg->charset()); to_field->init(field_arg->table); } else to_field=field_arg->new_key_field(thd->mem_root, field_arg->table, - ptr, null, 1); + ptr, null, 1, null != NULL); } virtual ~store_key() {} /** Not actually needed */ virtual const char *name() const=0; @@ -716,7 +716,7 @@ class store_key_field: public store_key uchar *null_ptr_arg, uint length, Field *from_field, const char *name_arg) :store_key(thd, to_field_arg,ptr, - null_ptr_arg ? null_ptr_arg : from_field->maybe_null() ? &err + null_ptr_arg ? null_ptr_arg : from_field->is_nullable() ? &err : (uchar*) 0, length), field_name(name_arg) { if (to_field) === modified file 'sql/sql_show.cc' --- a/sql/sql_show.cc 2010-07-19 16:09:51 +0000 +++ b/sql/sql_show.cc 2010-07-23 07:11:24 +0000 @@ -1078,7 +1078,7 @@ static bool get_field_default_value(THD else if (quoted) def_value->append(STRING_WITH_LEN("''")); } - else if (field->maybe_null() && quoted) + else if (field->is_nullable() && quoted) def_value->append(STRING_WITH_LEN("NULL")); // Null as default else return 0; @@ -1226,7 +1226,7 @@ int store_create_info(THD *thd, TABLE_LI } } - if (flags & NOT_NULL_FLAG) + if (!field->real_is_nullable()) packet->append(STRING_WITH_LEN(" NOT NULL")); else if (field->type() == MYSQL_TYPE_TIMESTAMP) { @@ -4159,7 +4159,7 @@ static int get_schema_column_record(THD table->field[5]->store(type.ptr(), type.length(), cs); table->field[5]->set_notnull(); } - pos=(uchar*) ((field->flags & NOT_NULL_FLAG) ? "NO" : "YES"); + pos=(uchar*) (!field->real_is_nullable() ? "NO" : "YES"); table->field[6]->store((const char*) pos, strlen((const char*) pos), cs); store_column_type(table, field, cs, 7); === modified file 'sql/sql_table.cc' --- a/sql/sql_table.cc 2010-07-20 08:10:38 +0000 +++ b/sql/sql_table.cc 2010-07-23 07:11:24 +0000 @@ -5762,7 +5762,7 @@ compare_tables(TABLE *table, /* Check that NULL behavior is same for old and new fields */ if ((tmp_new_field->flags & NOT_NULL_FLAG) != - (uint) (field->flags & NOT_NULL_FLAG)) + (uint) (!field->real_is_nullable())) { *need_copy_table= ALTER_TABLE_DATA_CHANGED; DBUG_RETURN(0); @@ -5827,7 +5827,7 @@ compare_tables(TABLE *table, table_part < table_part_end; table_part++) { - not_nullable= not_nullable && (! table_part->field->maybe_null()); + not_nullable= not_nullable && (! table_part->field->is_nullable()); } if ((table_key->flags & HA_NOSAME) && not_nullable) (*candidate_key_count)++; @@ -6977,7 +6977,7 @@ bool mysql_alter_table(THD *thd,char *ne key_part++) is_candidate_key= (is_candidate_key && - (! table->field[key_part->fieldnr-1]->maybe_null())); + (! table->field[key_part->fieldnr-1]->is_nullable())); if (is_candidate_key) candidate_key_count--; } @@ -7014,7 +7014,7 @@ bool mysql_alter_table(THD *thd,char *ne key_part++) is_candidate_key= (is_candidate_key && - (! table->field[key_part->fieldnr]->maybe_null())); + (! table->field[key_part->fieldnr]->is_nullable())); /* Check for "PRIMARY" === modified file 'sql/table.cc' --- a/sql/table.cc 2010-07-08 21:42:23 +0000 +++ b/sql/table.cc 2010-07-23 07:11:24 +0000 @@ -1361,7 +1361,7 @@ static int open_binary_frm(THD *thd, TAB null_bit_pos-= 8; } } - if (!(reg_field->flags & NOT_NULL_FLAG)) + if (reg_field->real_is_nullable()) { if (!(null_bit_pos= (null_bit_pos + 1) & 7)) null_pos++; @@ -1416,7 +1416,7 @@ static int open_binary_frm(THD *thd, TAB { uint fieldnr= key_part[i].fieldnr; if (!fieldnr || - share->field[fieldnr-1]->null_ptr || + share->field[fieldnr-1]->real_is_nullable() || share->field[fieldnr-1]->key_length() != key_part[i].length) { @@ -1441,7 +1441,7 @@ static int open_binary_frm(THD *thd, TAB } field= key_part->field= share->field[key_part->fieldnr-1]; key_part->type= field->key_type(); - if (field->null_ptr) + if (field->real_is_nullable()) { key_part->null_offset=(uint) ((uchar*) field->null_ptr - share->default_values); @@ -1546,7 +1546,7 @@ static int open_binary_frm(THD *thd, TAB key_part_column = expression from the WHERE clause as we need to test for NULL = NULL. */ - if (field->real_maybe_null()) + if (field->real_is_nullable()) key_part->key_part_flag|= HA_NULL_PART; } keyinfo->usable_key_parts= usable_parts; // Filesort === modified file 'sql/unireg.cc' --- a/sql/unireg.cc 2010-07-08 21:42:23 +0000 +++ b/sql/unireg.cc 2010-07-23 07:11:24 +0000 @@ -1049,7 +1049,7 @@ static bool make_empty_rec(THD *thd, Fil if (!(field->flags & NOT_NULL_FLAG)) { - *regfield->null_ptr|= regfield->null_bit; + regfield->set_null(); null_count++; } === modified file 'storage/csv/ha_tina.cc' --- a/storage/csv/ha_tina.cc 2010-07-08 21:20:08 +0000 +++ b/storage/csv/ha_tina.cc 2010-07-23 07:11:24 +0000 @@ -1672,7 +1672,7 @@ int ha_tina::create(const char *name, TA */ for (Field **field= table_arg->s->field; *field; field++) { - if ((*field)->real_maybe_null()) + if ((*field)->real_is_nullable()) { my_error(ER_CHECK_NOT_IMPLEMENTED, MYF(0), "nullable columns"); DBUG_RETURN(HA_ERR_UNSUPPORTED); === modified file 'storage/federated/ha_federated.cc' --- a/storage/federated/ha_federated.cc 2010-07-09 12:28:51 +0000 +++ b/storage/federated/ha_federated.cc 2010-07-23 07:11:24 +0000 @@ -1714,7 +1714,7 @@ static inline uint field_in_record_is_nu int null_offset; DBUG_ENTER("ha_federated::field_in_record_is_null"); - if (!field->null_ptr) + if (!field->real_is_nullable()) DBUG_RETURN(0); null_offset= (uint) ((char*)field->null_ptr - (char*)table->record[0]); === modified file 'storage/heap/ha_heap.cc' --- a/storage/heap/ha_heap.cc 2010-07-08 21:20:08 +0000 +++ b/storage/heap/ha_heap.cc 2010-07-23 07:11:24 +0000 @@ -702,7 +702,7 @@ heap_prepare_hp_create_info(TABLE *table seg->charset= &my_charset_bin; else seg->charset= field->charset_for_protocol(); - if (field->null_ptr) + if (field->real_is_nullable()) { seg->null_bit= field->null_bit; seg->null_pos= (uint) (field->null_ptr - (uchar*) table_arg->record[0]); === modified file 'storage/ibmdb2i/ha_ibmdb2i.cc' --- a/storage/ibmdb2i/ha_ibmdb2i.cc 2010-07-08 21:20:08 +0000 +++ b/storage/ibmdb2i/ha_ibmdb2i.cc 2010-07-23 07:11:24 +0000 @@ -2377,7 +2377,7 @@ int ha_ibmdb2i::add_index(TABLE *table_a for (int j=0 ; j < key_info[i].key_parts ;j++) { uint fieldnr= key_info[i].key_part[j].fieldnr; - if (table_arg->s->field[fieldnr]->null_ptr || + if (table_arg->s->field[fieldnr]->real_is_nullable() || table_arg->s->field[fieldnr]->key_length() != key_info[i].key_part[j].length) { === modified file 'storage/innobase/handler/ha_innodb.cc' --- a/storage/innobase/handler/ha_innodb.cc 2010-07-20 08:10:38 +0000 +++ b/storage/innobase/handler/ha_innodb.cc 2010-07-23 07:11:24 +0000 @@ -3912,7 +3912,7 @@ field_in_record_is_null( { int null_offset; - if (!field->null_ptr) { + if (!field->real_is_nullable()) { return(0); } @@ -4602,7 +4602,7 @@ include_field: prebuilt->need_to_access_clustered = TRUE; } - if (field->null_ptr) { + if (field->real_is_nullable()) { templ->mysql_null_byte_offset = (ulint) ((char*) field->null_ptr - (char*) table->record[0]); @@ -5111,7 +5111,7 @@ calc_row_difference( ; } - if (field->null_ptr) { + if (field->real_is_nullable()) { if (field_in_record_is_null(table, field, (char*) old_row)) { o_len = UNIV_SQL_NULL; @@ -6196,7 +6196,7 @@ create_table_def( goto err_col; } - if (field->null_ptr) { + if (field->real_is_nullable()) { nulls_allowed = 0; } else { nulls_allowed = DATA_NOT_NULL; === modified file 'storage/myisam/ha_myisam.cc' --- a/storage/myisam/ha_myisam.cc 2010-07-08 21:42:23 +0000 +++ b/storage/myisam/ha_myisam.cc 2010-07-23 07:11:24 +0000 @@ -279,7 +279,7 @@ int table2myisam(TABLE *table_arg, MI_KE keydef[i].seg[j].bit_pos= 0; keydef[i].seg[j].language= field->charset_for_protocol()->number; - if (field->null_ptr) + if (field->real_is_nullable()) { keydef[i].seg[j].null_bit= field->null_bit; keydef[i].seg[j].null_pos= (uint) (field->null_ptr- @@ -363,7 +363,7 @@ int table2myisam(TABLE *table_arg, MI_KE found->type() == MYSQL_TYPE_VAR_STRING ? FIELD_SKIP_ENDSPACE : FIELD_SKIP_PRESPACE); - if (found->null_ptr) + if (found->real_is_nullable()) { recinfo_pos->null_bit= found->null_bit; recinfo_pos->null_pos= (uint) (found->null_ptr - --===============8973186217414197276== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/jon.hauglid@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: jon.hauglid@stripped # target_branch: file:///export/home/x/mysql-next-mr-bugfixing-\ # bug6295/ # testament_sha1: 897358c03b06434e949170688352f9eb91d6dbbc # timestamp: 2010-07-23 09:11:32 +0200 # base_revision_id: jonathan.perkin@stripped\ # rt0yym16se4xi5lq # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWbcpzAEAIMF/gF//6d//f/// //fe6r////9gKp7w16b3D776TcAA+6Iu8y59tZimO3mrfT70Bu2qAcu7A5zAb3cHO7gd3ON13Ad2 AdA73yn1c9vPOsu9sbQm3p3PXCsvXrxra53333PmqTs2uHZS3WU6TTZrNJWtdb28nZtbUqYSSCJh DTRk00CnhATIR6Mo1NlNqeoPSaehNNAaaADE2gglBNACJqaTU2gCJ6TU09QGgDQNAAAAAAAAGp4g KSlNlDZRjU2o9TQMQ0AAAAAAMg000BoACTShITJDRT8hCPInqGeqDR5TIGRoB+qAAAADI0BoEShR poTJMU20GhNMFNiaGUntKbUabU8pptJiDJoAAxD0mmgVKICBoExNJpmhGQSn6GlPTU0ZAAANNAAA AAO/uooEx5FrTkoLUq0B520T23snh6+o8fi8ZTFXO3l2827Y3Yuvl4+b73dnzG++vQghhrb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