diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-06-07 18:13:02 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-06-07 18:13:02 +0200 |
commit | 9b98cae4cc44fa39813675b361b7aa65d129b29d (patch) | |
tree | 7f4baeea245f91006e88c62508c2859ed9390c2d /storage | |
parent | 29af1aefe914da6aca73498c077f7e37a36d7de4 (diff) | |
parent | 4d128777dde904c5f0adab9b093e854c9c580d41 (diff) | |
download | mariadb-git-9b98cae4cc44fa39813675b361b7aa65d129b29d.tar.gz |
merge with 5.1-micro
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 5 | ||||
-rw-r--r-- | storage/innodb_plugin/handler/ha_innodb.cc | 5 | ||||
-rw-r--r-- | storage/innodb_plugin/handler/i_s.cc | 2 | ||||
-rw-r--r-- | storage/xtradb/handler/ha_innodb.cc | 5 | ||||
-rw-r--r-- | storage/xtradb/handler/i_s.cc | 2 |
5 files changed, 13 insertions, 6 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index a195c09506a..ce264b1bbb4 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -3229,6 +3229,11 @@ get_innobase_type_from_mysql_type( case HA_KEYTYPE_DOUBLE: return(DATA_DOUBLE); case HA_KEYTYPE_BINARY: + if (field->type() == MYSQL_TYPE_TINY) + { // compatibility workaround + *unsigned_flag= DATA_UNSIGNED ; + return DATA_INT; + } return(DATA_FIXBINARY); case HA_KEYTYPE_VARBINARY2: if (field->type() != MYSQL_TYPE_VARCHAR) diff --git a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc index c45c8c912c3..38adab109fc 100644 --- a/storage/innodb_plugin/handler/ha_innodb.cc +++ b/storage/innodb_plugin/handler/ha_innodb.cc @@ -3995,6 +3995,11 @@ get_innobase_type_from_mysql_type( case HA_KEYTYPE_DOUBLE: return(DATA_DOUBLE); case HA_KEYTYPE_BINARY: + if (field->type() == MYSQL_TYPE_TINY) + { // compatibility workaround + *unsigned_flag= DATA_UNSIGNED; + return DATA_INT; + } return(DATA_FIXBINARY); case HA_KEYTYPE_VARBINARY2: if (field->type() != MYSQL_TYPE_VARCHAR) diff --git a/storage/innodb_plugin/handler/i_s.cc b/storage/innodb_plugin/handler/i_s.cc index b0149967e9b..4fe8beafedc 100644 --- a/storage/innodb_plugin/handler/i_s.cc +++ b/storage/innodb_plugin/handler/i_s.cc @@ -161,7 +161,7 @@ field_store_time_t( my_time.time_type = MYSQL_TIMESTAMP_DATETIME; #endif - return(field->store_time(&my_time, MYSQL_TIMESTAMP_DATETIME)); + return(field->store_time(&my_time)); } /*******************************************************************//** diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index c37bfe6a2c4..c4e6fa0df0d 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -4492,10 +4492,7 @@ get_innobase_type_from_mysql_type( case MYSQL_TYPE_LONG_BLOB: return(DATA_BLOB); case MYSQL_TYPE_NULL: - /* MySQL currently accepts "NULL" datatype, but will - reject such datatype in the next release. We will cope - with it and not trigger assertion failure in 5.1 */ - break; + return(DATA_FIXBINARY); default: ut_error; } diff --git a/storage/xtradb/handler/i_s.cc b/storage/xtradb/handler/i_s.cc index f6160614686..d989ce87aa3 100644 --- a/storage/xtradb/handler/i_s.cc +++ b/storage/xtradb/handler/i_s.cc @@ -168,7 +168,7 @@ field_store_time_t( my_time.time_type = MYSQL_TIMESTAMP_DATETIME; #endif - return(field->store_time(&my_time, MYSQL_TIMESTAMP_DATETIME)); + return(field->store_time(&my_time)); } /*******************************************************************//** |