diff options
-rw-r--r-- | mysql-test/r/create.result | 2 | ||||
-rw-r--r-- | mysql-test/t/create.test | 7 | ||||
-rw-r--r-- | sql/sql_select.cc | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 2e2aa41c671..e6192eb6ccb 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -176,3 +176,5 @@ Column 'k1' cannot be null insert into t1 values (NULL, NULL); Column 'k1' cannot be null drop table t1; +create table t1 select x'4132'; +drop table t1; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 86c3f6be0f5..d46807f1dca 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -127,3 +127,10 @@ insert into t1 values ("a", 1), ("b", 2); !$1048 insert into t1 values (NULL, 3); !$1048 insert into t1 values (NULL, NULL); drop table t1; + +# +# Bug # 801 +# + +create table t1 select x'4132'; +drop table t1; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 80e329a7f03..4008bf75f01 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -3664,6 +3664,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, case Item::STRING_ITEM: case Item::REF_ITEM: case Item::NULL_ITEM: + case Item::VARBIN_ITEM: { bool maybe_null=item->maybe_null; Field *new_field; |