diff options
author | evgen@moonbone.local <> | 2006-07-22 02:15:36 +0400 |
---|---|---|
committer | evgen@moonbone.local <> | 2006-07-22 02:15:36 +0400 |
commit | 8540557457b420f975efcf15198b2b28aaae72c5 (patch) | |
tree | 24ec659d65ddf3233923209c11f693320c279d3a /sql/field.h | |
parent | bcf822841b8a938ef90600e8eb26093724af2617 (diff) | |
parent | c875b8eb938112e807579ee8c820f8bbf3bb3cd6 (diff) | |
download | mariadb-git-8540557457b420f975efcf15198b2b28aaae72c5.tar.gz |
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/work/autopush/12185-bug-5.0-opt-mysql
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h index 3b33d3651e3..0bbcd1099a0 100644 --- a/sql/field.h +++ b/sql/field.h @@ -782,6 +782,8 @@ public: enum utype unireg_check_arg, const char *field_name_arg, struct st_table *table_arg, CHARSET_INFO *cs); + Field_timestamp(bool maybe_null_arg, const char *field_name_arg, + struct st_table *table_arg, CHARSET_INFO *cs); enum_field_types type() const { return FIELD_TYPE_TIMESTAMP;} enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; } enum Item_result cmp_type () const { return INT_RESULT; } @@ -1130,6 +1132,21 @@ public: { flags|= BLOB_FLAG; } + Field_blob(uint32 len_arg,bool maybe_null_arg, const char *field_name_arg, + struct st_table *table_arg, CHARSET_INFO *cs, bool set_packlength) + :Field_longstr((char*) 0,len_arg, maybe_null_arg ? (uchar*) "": 0, 0, + NONE, field_name_arg, table_arg, cs) + { + flags|= BLOB_FLAG; + packlength= 4; + if (set_packlength) + { + uint32 char_lengt= len_arg/cs->mbmaxlen; + packlength= char_length <= 255 ? 1 : + char_length <= 65535 ? 2 : + char_length <= 16777215 ? 3 : 4; + } + } enum_field_types type() const { return FIELD_TYPE_BLOB;} enum ha_base_keytype key_type() const { return binary() ? HA_KEYTYPE_VARBINARY2 : HA_KEYTYPE_VARTEXT2; } |