mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
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
This commit is contained in:
commit
f171d628c7
8 changed files with 82 additions and 17 deletions
17
sql/field.h
17
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; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue