summaryrefslogtreecommitdiff
path: root/mysql-test/t/type_blob.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/type_blob.test')
-rw-r--r--mysql-test/t/type_blob.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test
index fa67afa48e8..66dd71d2305 100644
--- a/mysql-test/t/type_blob.test
+++ b/mysql-test/t/type_blob.test
@@ -534,6 +534,17 @@ DROP TABLE b15776;
--error ER_PARSE_ERROR
CREATE TABLE b15776 (a year(-2));
+## For timestamp, we silently rewrite widths to 14 or 19.
+--error ER_TOO_BIG_PRECISION
+CREATE TABLE b15776 (a timestamp(4294967294));
+--error ER_TOO_BIG_PRECISION
+CREATE TABLE b15776 (a timestamp(4294967295));
+--error ER_TOO_BIG_DISPLAYWIDTH
+CREATE TABLE b15776 (a timestamp(4294967296));
+--error ER_PARSE_ERROR
+CREATE TABLE b15776 (a timestamp(-1));
+--error ER_PARSE_ERROR
+CREATE TABLE b15776 (a timestamp(-2));
# We've already tested the case, but this should visually show that
# widths that are too large to be interpreted cause DISPLAYWIDTH errors.
@@ -631,3 +642,12 @@ DROP FUNCTION f1;
DROP TABLE t1;
--echo End of 5.1 tests
+
+#
+# Problem when comparing blobs #778901
+#
+
+CREATE TABLE t1 ( f1 blob, f2 blob );
+INSERT INTO t1 VALUES ('','');
+SELECT f1,f2,"found row" FROM t1 WHERE f1 = f2 ;
+DROP TABLE t1;