diff options
author | unknown <cmiller@zippy.(none)> | 2006-07-05 16:16:09 -0400 |
---|---|---|
committer | unknown <cmiller@zippy.(none)> | 2006-07-05 16:16:09 -0400 |
commit | 30de4903ae2b9cd03bd5f853715e7fc7b648c2c7 (patch) | |
tree | a0c67909c6e1a1b67caf4558144a68911d8dfb15 /sql/field.h | |
parent | f92fd7c98adad9542e7d8d29ee24db504980541f (diff) | |
parent | 2ef57b836248f945657c7bd0fe02fa7fe3660b54 (diff) | |
download | mariadb-git-30de4903ae2b9cd03bd5f853715e7fc7b648c2c7.tar.gz |
Merge zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1
into zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1-new-maint
BUILD/compile-dist:
Auto merged
BitKeeper/deleted/.del-partition_innodb.result:
Auto merged
BitKeeper/deleted/.del-partition_innodb.test:
Auto merged
client/mysqltest.c:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/create_not_windows.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/partition.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/innodb_mysql.test:
Auto merged
mysql-test/t/partition.test:
Auto merged
mysql-test/t/ps_1general.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/wait_timeout.test:
Auto merged
mysys/my_lib.c:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/unireg.cc:
Auto merged
mysql-test/extra/rpl_tests/rpl_log.test:
manuakl merge
mysql-test/lib/mtr_process.pl:
manuakl merge
mysql-test/mysql-test-run.pl:
manuakl merge
mysql-test/r/type_newdecimal.result:
manuakl merge
mysql-test/t/create.test:
manuakl merge
mysql-test/t/func_group.test:
manuakl merge
mysql-test/t/type_newdecimal.test:
manuakl merge
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sql/field.h b/sql/field.h index f611b16277e..b1221e34cc5 100644 --- a/sql/field.h +++ b/sql/field.h @@ -124,7 +124,7 @@ public: static bool type_can_have_key_part(enum_field_types); static enum_field_types field_type_merge(enum_field_types, enum_field_types); static Item_result result_merge_type(enum_field_types); - bool eq(Field *field) + virtual bool eq(Field *field) { return (ptr == field->ptr && null_ptr == field->null_ptr && null_bit == field->null_bit); @@ -351,6 +351,8 @@ public: return field_length / charset()->mbmaxlen; } + /* Hash value */ + virtual void hash(ulong *nr, ulong *nr2); friend bool reopen_table(THD *,struct st_table *,bool); friend int cre_myisam(my_string name, register TABLE *form, uint options, ulonglong auto_increment_value); @@ -823,7 +825,7 @@ public: if ((*null_value= is_null())) return 0; #ifdef WORDS_BIGENDIAN - if (table->s->db_low_byte_first) + if (table && table->s->db_low_byte_first) return sint4korr(ptr); #endif long tmp; @@ -1121,6 +1123,7 @@ public: char *new_ptr, uchar *new_null_ptr, uint new_null_bit); uint is_equal(create_field *new_field); + void hash(ulong *nr, ulong *nr2); }; @@ -1388,6 +1391,13 @@ public: bit_ptr= bit_ptr_arg; bit_ofs= bit_ofs_arg; } + bool eq(Field *field) + { + return (Field::eq(field) && + field->type() == type() && + bit_ptr == ((Field_bit *)field)->bit_ptr && + bit_ofs == ((Field_bit *)field)->bit_ofs); + } void move_field_offset(my_ptrdiff_t ptr_diff) { Field::move_field_offset(ptr_diff); |