diff options
author | unknown <bar@bar.intranet.mysql.r18.ru> | 2004-03-29 17:27:30 +0500 |
---|---|---|
committer | unknown <bar@bar.intranet.mysql.r18.ru> | 2004-03-29 17:27:30 +0500 |
commit | 5babbd233b88d547b9642ac029c7b24113e709c1 (patch) | |
tree | 2a9955ea05446234f82e9a8e823ef327b42d45be /mysql-test/t | |
parent | 0d47f003ec82e8e6d96668e5191a496a432d408a (diff) | |
download | mariadb-git-5babbd233b88d547b9642ac029c7b24113e709c1.tar.gz |
Better tests for BINARY
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/binary.test | 15 | ||||
-rw-r--r-- | mysql-test/t/ctype_cp1251.test | 17 |
2 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/t/binary.test b/mysql-test/t/binary.test index 48912a390ed..20a047e0b26 100644 --- a/mysql-test/t/binary.test +++ b/mysql-test/t/binary.test @@ -51,3 +51,18 @@ select b from t1 where binary b like ''; select b from t1 group by binary b like ''; select b from t1 having binary b like ''; drop table t1; + +# +# Test of binary and upper/lower +# +create table t1 (a char(15) binary, b binary(15)); +insert into t1 values ('aaa','bbb'),('AAA','BBB'); +select upper(a),upper(b) from t1; +select lower(a),lower(b) from t1; +select * from t1 where upper(a)='AAA'; +select * from t1 where lower(a)='aaa'; +select * from t1 where upper(b)='BBB'; +select * from t1 where lower(b)='bbb'; +select charset(a), charset(b), charset(binary 'ccc') from t1 limit 1; +select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1; +drop table t1; diff --git a/mysql-test/t/ctype_cp1251.test b/mysql-test/t/ctype_cp1251.test index fffade35389..66a8a5aa909 100644 --- a/mysql-test/t/ctype_cp1251.test +++ b/mysql-test/t/ctype_cp1251.test @@ -4,6 +4,8 @@ drop table if exists t1; --enable_warnings +SET NAMES cp1251; + # # Test problem with LEFT() (Bug #514) # @@ -15,3 +17,18 @@ select a, left(a,1) as b from t1; select a, left(a,1) as b from t1 group by a; SELECT DISTINCT RIGHT(a,1) from t1; drop table t1; + +# +# Test of binary and upper/lower +# +create table t1 (a char(15) binary, b binary(15)); +insert into t1 values ('aaa','bbb'),('AAA','BBB'); +select upper(a),upper(b) from t1; +select lower(a),lower(b) from t1; +select * from t1 where upper(a)='AAA'; +select * from t1 where lower(a)='aaa'; +select * from t1 where upper(b)='BBB'; +select * from t1 where lower(b)='bbb'; +select charset(a), charset(b), charset(binary 'ccc') from t1 limit 1; +select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1; +drop table t1; |