diff options
author | unknown <bar@mysql.com> | 2004-10-21 14:48:37 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2004-10-21 14:48:37 +0500 |
commit | 655e1a9d8afde07a77446deb4ed75759f3741274 (patch) | |
tree | 1b927731719500bd82d43b78d0cf6138b1217910 /mysql-test | |
parent | 8f8236008193394ea2785c0095adf02839cde83a (diff) | |
download | mariadb-git-655e1a9d8afde07a77446deb4ed75759f3741274.tar.gz |
Bug #5679 utf8_unicode_ci LIKE--trailing % doesn't equal zero characters
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/t/ctype_uca.test | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/mysql-test/t/ctype_uca.test b/mysql-test/t/ctype_uca.test index cbb2bd7ba4b..708a31d637e 100644 --- a/mysql-test/t/ctype_uca.test +++ b/mysql-test/t/ctype_uca.test @@ -7,8 +7,35 @@ DROP TABLE IF EXISTS t1; # # Test Unicode collations. # - set names utf8; + +# +# Check trailing spaces +# +set collation_connection=utf8_unicode_ci; + +select 'a' = 'a', 'a' = 'a ', 'a ' = 'a'; + +select 'a\t' = 'a' , 'a\t' < 'a' , 'a\t' > 'a'; +select 'a\t' = 'a ', 'a\t' < 'a ', 'a\t' > 'a '; + +select 'a' = 'a\t', 'a' < 'a\t', 'a' > 'a\t'; +select 'a ' = 'a\t', 'a ' < 'a\t', 'a ' > 'a\t'; + +select 'a a' > 'a', 'a \t' < 'a'; + +# +# Bug #5679 utf8_unicode_ci LIKE--trailing % doesn't equal zero characters +# +CREATE TABLE t ( + c char(20) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +INSERT INTO t VALUES ('a'),('ab'),('aba'); +ALTER TABLE t ADD INDEX (c); +SELECT c FROM t WHERE c LIKE 'a%'; +#should find 3 rows but only found 2 +DROP TABLE t; + create table t1 (c1 char(10) character set utf8 collate utf8_bin); # |