summaryrefslogtreecommitdiff
path: root/mysql-test/t/strict.test
diff options
context:
space:
mode:
authorunknown <ramil/ram@ramil.myoffice.izhnet.ru>2007-03-29 09:38:46 +0500
committerunknown <ramil/ram@ramil.myoffice.izhnet.ru>2007-03-29 09:38:46 +0500
commit77924c56e01f060f628e7bcf9265d89b667d5882 (patch)
treeabad879904dff40d4b3c38b77d9a16805f8d0522 /mysql-test/t/strict.test
parent7cdd99c129e4b206b7bf63fc8f1ed455a1f20d84 (diff)
parent86010101e294559d83d0c99def8160eddcf4ce55 (diff)
downloadmariadb-git-77924c56e01f060f628e7bcf9265d89b667d5882.tar.gz
Merge mysql.com:/home/ram/work/b26359/b26359.5.0
into mysql.com:/home/ram/work/b26359/b26359.5.1 mysql-test/r/strict.result: Auto merged mysql-test/t/strict.test: Auto merged mysql-test/r/type_date.result: merging sql/field.cc: merging sql/field.h: merging
Diffstat (limited to 'mysql-test/t/strict.test')
-rw-r--r--mysql-test/t/strict.test50
1 files changed, 50 insertions, 0 deletions
diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test
index 402208d02cc..3ff84c35f16 100644
--- a/mysql-test/t/strict.test
+++ b/mysql-test/t/strict.test
@@ -1200,3 +1200,53 @@ create table t1 (i int)
comment '123456789*123456789*123456789*123456789*123456789*123456789*';
show create table t1;
drop table t1;
+
+#
+# Bug #26359: Strings becoming truncated and converted to numbers under STRICT mode
+#
+set sql_mode= 'traditional';
+create table t1(col1 tinyint, col2 tinyint unsigned,
+ col3 smallint, col4 smallint unsigned,
+ col5 mediumint, col6 mediumint unsigned,
+ col7 int, col8 int unsigned,
+ col9 bigint, col10 bigint unsigned);
+--error 1366
+insert into t1(col1) values('-');
+--error 1366
+insert into t1(col2) values('+');
+--error 1366
+insert into t1(col3) values('-');
+--error 1366
+insert into t1(col4) values('+');
+--error 1366
+insert into t1(col5) values('-');
+--error 1366
+insert into t1(col6) values('+');
+--error 1366
+insert into t1(col7) values('-');
+--error 1366
+insert into t1(col8) values('+');
+--error 1366
+insert into t1(col9) values('-');
+--error 1366
+insert into t1(col10) values('+');
+drop table t1;
+
+#
+# Bug #27176: Assigning a string to an year column has unexpected results
+#
+set sql_mode='traditional';
+create table t1(a year);
+--error 1366
+insert into t1 values ('-');
+--error 1366
+insert into t1 values ('+');
+--error 1366
+insert into t1 values ('');
+--error 1265
+insert into t1 values ('2000a');
+--error 1265
+insert into t1 values ('2E3x');
+drop table t1;
+
+--echo End of 5.0 tests