diff options
author | monty@mashka.mysql.fi <> | 2002-08-08 03:29:36 +0300 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2002-08-08 03:29:36 +0300 |
commit | 1bb7665a9c4405439b89dfc2c621d22f5275beec (patch) | |
tree | da5d29e4a08217e2773b16c5aef05ab734c760e4 /sql/field.h | |
parent | a4b77125fd05de4a00b0d648649014fa1bb2d4bb (diff) | |
parent | 2c4fa340cccbf11dc7b7f944cf7ca30af48edf4f (diff) | |
download | mariadb-git-1bb7665a9c4405439b89dfc2c621d22f5275beec.tar.gz |
merge
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/field.h b/sql/field.h index 785f55657ad..956c77e5024 100644 --- a/sql/field.h +++ b/sql/field.h @@ -73,6 +73,9 @@ public: virtual void set_default() { memcpy(ptr, ptr + table->rec_buff_length, pack_length()); + if (null_ptr) + *null_ptr= ((*null_ptr & (uchar) ~null_bit) | + null_ptr[table->rec_buff_length] & null_bit); } virtual bool binary() const { return 1; } virtual bool zero_pack() const { return 1; } @@ -93,12 +96,12 @@ public: virtual int key_cmp(const byte *str, uint length) { return cmp(ptr,(char*) str); } virtual uint decimals() const { return 0; } - virtual void sql_type(String &str) const =0; /* Caller beware: sql_type can change str.Ptr, so check ptr() to see if it changed if you are using your own buffer in str and restore it with set() if needed */ + virtual void sql_type(String &str) const =0; virtual uint size_of() const =0; // For new field inline bool is_null(uint row_offset=0) { return null_ptr ? (null_ptr[row_offset] & null_bit ? 1 : 0) : table->null_row; } |