summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2006-07-22 02:15:36 +0400
committerunknown <evgen@moonbone.local>2006-07-22 02:15:36 +0400
commitf171d628c7d7f44cd6786f6456a5e35a3b5d8c0f (patch)
tree24ec659d65ddf3233923209c11f693320c279d3a /sql/field.h
parentf57bb34775c7482e15a6d067873730f9434726e8 (diff)
parent35209c68eab3137bf40ca1657a2404006c2aa392 (diff)
downloadmariadb-git-f171d628c7d7f44cd6786f6456a5e35a3b5d8c0f.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 mysql-test/r/create.result: Auto merged mysql-test/t/innodb.test: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/item.cc: Auto merged mysql-test/r/union.result: SCCS merged mysql-test/t/union.test: SCCS merged
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h17
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; }