summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2016-12-19 16:09:20 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2016-12-19 16:09:20 +0400
commit19896d4b3ab459d135aee6ee67cb92bce92f9b87 (patch)
treefc4ec1483f62851316c5622a75384bbb554c3342 /mysql-test
parent2f6fede8d5f7e98319b4b7b557bd565fdb42fac3 (diff)
downloadmariadb-git-19896d4b3ab459d135aee6ee67cb92bce92f9b87.tar.gz
MDEV-10274 Bundling insert with create statement for table with unsigned Decimal primary key issues warning 1194.
Flags are important for key_length calculations, so them should be set before it, not after.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/create.result7
-rw-r--r--mysql-test/t/create.test9
2 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 0164aa4b610..829b54dea49 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -2498,4 +2498,11 @@ end|
create table t1 as select f1();
ERROR 42S02: Table 'test.t1' doesn't exist
drop function f1;
+#
+# MDEV-10274 Bundling insert with create statement
+# for table with unsigned Decimal primary key issues warning 1194
+#
+create table t1(ID decimal(2,1) unsigned NOT NULL, PRIMARY KEY (ID))engine=memory
+select 2.1 ID;
+drop table t1;
End of 5.5 tests
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 5c90c3e17a4..1e77dac9bc9 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -2081,4 +2081,13 @@ DELIMITER ;|
create table t1 as select f1();
drop function f1;
+--echo #
+--echo # MDEV-10274 Bundling insert with create statement
+--echo # for table with unsigned Decimal primary key issues warning 1194
+--echo #
+
+create table t1(ID decimal(2,1) unsigned NOT NULL, PRIMARY KEY (ID))engine=memory
+ select 2.1 ID;
+drop table t1;
+
--echo End of 5.5 tests