diff options
author | unknown <bar@mysql.com> | 2004-11-19 14:33:55 +0400 |
---|---|---|
committer | unknown <bar@mysql.com> | 2004-11-19 14:33:55 +0400 |
commit | 9e9715963a549ee83d907bc5497acd21995c4543 (patch) | |
tree | dee18d86c5fe0d442ad012f2a9273035eafe1e65 | |
parent | e136b462502804bb7345e5a65ee253228ff4d4ca (diff) | |
download | mariadb-git-9e9715963a549ee83d907bc5497acd21995c4543.tar.gz |
Reuse ctype_common.inc instead of retyping
the same queries.
-rw-r--r-- | mysql-test/r/ctype_big5.result | 56 | ||||
-rw-r--r-- | mysql-test/t/ctype_big5.test | 12 |
2 files changed, 55 insertions, 13 deletions
diff --git a/mysql-test/r/ctype_big5.result b/mysql-test/r/ctype_big5.result index 44fad0cd96a..789b6e586ad 100644 --- a/mysql-test/r/ctype_big5.result +++ b/mysql-test/r/ctype_big5.result @@ -1,10 +1,58 @@ drop table if exists t1; -SET NAMES big5; -CREATE TABLE t1 (c CHAR(10) CHARACTER SET big5, KEY(c)); +SET @test_character_set= 'big5'; +SET @test_collation= 'big5_chinese_ci'; +SET @safe_character_set_server= @@character_set_server; +SET @safe_collation_server= @@collation_server; +SET character_set_server= @test_character_set; +SET collation_server= @test_collation; +CREATE DATABASE d1; +USE d1; +CREATE TABLE t1 (c CHAR(10), KEY(c)); +SHOW FULL COLUMNS FROM t1; +Field Type Collation Null Key Default Extra Privileges Comment +c char(10) big5_chinese_ci YES MUL NULL select,insert,update,references INSERT INTO t1 VALUES ('aaa'),('aaaa'),('aaaaa'); -SELECT * FROM t1 WHERE c LIKE 'aaa%'; -c +SELECT c as want3results FROM t1 WHERE c LIKE 'aaa%'; +want3results aaa aaaa aaaaa DROP TABLE t1; +CREATE TABLE t1 (c1 varchar(15), KEY c1 (c1(2))); +SHOW FULL COLUMNS FROM t1; +Field Type Collation Null Key Default Extra Privileges Comment +c1 varchar(15) big5_chinese_ci YES MUL NULL select,insert,update,references +INSERT INTO t1 VALUES ('location'),('loberge'),('lotre'),('boabab'); +SELECT c1 as want3results from t1 where c1 like 'l%'; +want3results +location +loberge +lotre +SELECT c1 as want3results from t1 where c1 like 'lo%'; +want3results +location +loberge +lotre +SELECT c1 as want1result from t1 where c1 like 'loc%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'loca%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'locat%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'locati%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'locatio%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'location%'; +want1result +location +DROP TABLE t1; +DROP DATABASE d1; +USE test; +SET character_set_server= @safe_character_set_server; +SET collation_server= @safe_collation_server; diff --git a/mysql-test/t/ctype_big5.test b/mysql-test/t/ctype_big5.test index 9bf1808636e..b1d71a6af15 100644 --- a/mysql-test/t/ctype_big5.test +++ b/mysql-test/t/ctype_big5.test @@ -7,12 +7,6 @@ drop table if exists t1; --enable_warnings -SET NAMES big5; - -# -# Bug 1883: LIKE did not work in some cases with a key. -# -CREATE TABLE t1 (c CHAR(10) CHARACTER SET big5, KEY(c)); -INSERT INTO t1 VALUES ('aaa'),('aaaa'),('aaaaa'); -SELECT * FROM t1 WHERE c LIKE 'aaa%'; -DROP TABLE t1; +SET @test_character_set= 'big5'; +SET @test_collation= 'big5_chinese_ci'; +-- source include/ctype_common.inc |