diff options
author | Alexander Barkov <bar@mariadb.com> | 2019-12-16 13:08:17 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2019-12-16 13:08:17 +0400 |
commit | 3d98892232359b7262cf82d00bc8f94b1511f26b (patch) | |
tree | b48c157fde886efc051ada08296eb6cb4f4eedc2 /mysql-test | |
parent | a3a8360d577b44131577c5d40336c632d35487ae (diff) | |
parent | fc860d3fa3bc854fbe6aab9179d7a4aaf6eb9edf (diff) | |
download | mariadb-git-3d98892232359b7262cf82d00bc8f94b1511f26b.tar.gz |
Merge remote-tracking branch 'origin/5.5' into 10.1
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/type_int.result | 13 | ||||
-rw-r--r-- | mysql-test/t/type_int.test | 12 |
2 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/r/type_int.result b/mysql-test/r/type_int.result index 1364f58169e..ad2b9399464 100644 --- a/mysql-test/r/type_int.result +++ b/mysql-test/r/type_int.result @@ -20,6 +20,19 @@ COALESCE(@a) 1 DROP TABLE t1; # +# MDEV-21065 UNIQUE constraint causes a query with string comparison to omit a row in the result set +# +CREATE TABLE t1 (c0 INT UNIQUE); +INSERT INTO t1 VALUES (NULL), (NULL), (NULL), (NULL), (1), (0); +SELECT * FROM t1 WHERE c0 < '\n2'; +c0 +0 +1 +DROP TABLE t1; +SELECT CAST('\n2' AS INT); +CAST('\n2' AS INT) +2 +# # End of 5.5 tests # # diff --git a/mysql-test/t/type_int.test b/mysql-test/t/type_int.test index 8eba40c7e32..90b3945c4bf 100644 --- a/mysql-test/t/type_int.test +++ b/mysql-test/t/type_int.test @@ -15,6 +15,18 @@ SELECT COALESCE(@a) FROM t1 ORDER BY STRCMP(STDDEV_SAMP(a), 'bar'); DROP TABLE t1; --echo # +--echo # MDEV-21065 UNIQUE constraint causes a query with string comparison to omit a row in the result set +--echo # + +CREATE TABLE t1 (c0 INT UNIQUE); +INSERT INTO t1 VALUES (NULL), (NULL), (NULL), (NULL), (1), (0); +SELECT * FROM t1 WHERE c0 < '\n2'; +DROP TABLE t1; + +SELECT CAST('\n2' AS INT); + + +--echo # --echo # End of 5.5 tests --echo # |