summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-05-26 19:16:10 +0200
committerSergei Golubchik <sergii@pisem.net>2011-05-26 19:16:10 +0200
commitc1a92f9caeb368021d5ffbe0df237ded29692c1a (patch)
tree27c69004708cbfb492ba02902699e4d331a8f11e
parent34c9428871a095ad72e629be843443cef4d7052f (diff)
downloadmariadb-git-c1a92f9caeb368021d5ffbe0df237ded29692c1a.tar.gz
innodb compatibility fix
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_information_schema.result8
-rw-r--r--storage/innobase/handler/ha_innodb.cc5
-rw-r--r--storage/innodb_plugin/handler/ha_innodb.cc6
3 files changed, 15 insertions, 4 deletions
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_information_schema.result b/mysql-test/suite/innodb_plugin/r/innodb_information_schema.result
index 8fbf8514879..64ba690837f 100644
--- a/mysql-test/suite/innodb_plugin/r/innodb_information_schema.result
+++ b/mysql-test/suite/innodb_plugin/r/innodb_information_schema.result
@@ -7,10 +7,10 @@ X RECORD `test`.```t'\"_str` `PRIMARY` 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc',
X RECORD `test`.```t'\"_str` `PRIMARY` 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\'
X RECORD `test`.```t'\"_str` `PRIMARY` 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0'
X RECORD `test`.```t'\"_str` `PRIMARY` 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0'
-X RECORD `test`.`t_min` `PRIMARY` 2 -128, 0x00, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0
-X RECORD `test`.`t_min` `PRIMARY` 2 -128, 0x00, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0
-X RECORD `test`.`t_max` `PRIMARY` 2 127, 0xFF, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615
-X RECORD `test`.`t_max` `PRIMARY` 2 127, 0xFF, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615
+X RECORD `test`.`t_min` `PRIMARY` 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0
+X RECORD `test`.`t_min` `PRIMARY` 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0
+X RECORD `test`.`t_max` `PRIMARY` 2 127, -1, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615
+X RECORD `test`.`t_max` `PRIMARY` 2 127, -1, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615
X RECORD `test`.```t'\"_str` `PRIMARY` 1 supremum pseudo-record
X RECORD `test`.```t'\"_str` `PRIMARY` 1 supremum pseudo-record
lock_table COUNT(*)
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index bbff8918395..4444e8c24d3 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -3210,6 +3210,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= 1 ;
+ 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 4dfd961b293..24b646e449b 100644
--- a/storage/innodb_plugin/handler/ha_innodb.cc
+++ b/storage/innodb_plugin/handler/ha_innodb.cc
@@ -3919,6 +3919,12 @@ get_innobase_type_from_mysql_type(
case HA_KEYTYPE_DOUBLE:
return(DATA_DOUBLE);
case HA_KEYTYPE_BINARY:
+ if (field->type() == MYSQL_TYPE_TINY)
+ if (field->type() == MYSQL_TYPE_TINY)
+ { // compatibility workaround
+ *unsigned_flag= 1 ;
+ return DATA_INT;
+ }
return(DATA_FIXBINARY);
case HA_KEYTYPE_VARBINARY2:
if (field->type() != MYSQL_TYPE_VARCHAR)