summaryrefslogtreecommitdiff
path: root/mysql-test/t/sql_mode.test
diff options
context:
space:
mode:
authoringo@mysql.com <>2004-09-14 13:49:08 +0200
committeringo@mysql.com <>2004-09-14 13:49:08 +0200
commitce8db2bfb79acb058fd94261138cf66aeeb9b50d (patch)
tree86a33cde82dfc9f51099cdf06db8f3121e81da25 /mysql-test/t/sql_mode.test
parentad12db7678874ff40d0dcdff8cb586e3625a8162 (diff)
downloadmariadb-git-ce8db2bfb79acb058fd94261138cf66aeeb9b50d.tar.gz
BUG#5318 - failure: 'IGNORE_SPACE' affects numeric values after DEFAULT.
Added a check to recover from IGNORE_SPACE in this situation: <ident-character(s)><space><dot><ident-character(s)> The ignored space led to the false identification of the dot as an ident separator (like "db.table").
Diffstat (limited to 'mysql-test/t/sql_mode.test')
-rw-r--r--mysql-test/t/sql_mode.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/t/sql_mode.test b/mysql-test/t/sql_mode.test
index 95e83b4b9e2..63a5d6d3671 100644
--- a/mysql-test/t/sql_mode.test
+++ b/mysql-test/t/sql_mode.test
@@ -28,3 +28,24 @@ set sql_mode="postgresql,oracle,mssql,db2,maxdb";
select @@sql_mode;
show create table t1;
drop table t1;
+
+#
+# BUG#5318 - failure: 'IGNORE_SPACE' affects numeric values after DEFAULT
+#
+# Force the usage of the default
+set session sql_mode = '';
+# statement for comparison, value starts with '.'
+create table t1 ( min_num dec(6,6) default .000001);
+show create table t1;
+drop table t1 ;
+#
+set session sql_mode = 'IGNORE_SPACE';
+# statement for comparison, value starts with '0'
+create table t1 ( min_num dec(6,6) default 0.000001);
+show create table t1;
+drop table t1 ;
+# This statement fails, value starts with '.'
+create table t1 ( min_num dec(6,6) default .000001);
+show create table t1;
+drop table t1 ;
+