diff options
author | unknown <joreland@mysql.com> | 2004-11-08 11:53:50 +0100 |
---|---|---|
committer | unknown <joreland@mysql.com> | 2004-11-08 11:53:50 +0100 |
commit | 1490901ecc1af83fc85c7997ae36c72f9bcf9215 (patch) | |
tree | 3b36208e252e1d2bef98d39e3030d97cc76669cc /mysql-test | |
parent | 1489c41711adf942f0ffe7125cac9d2d5bff3da5 (diff) | |
parent | 5b8fca7422d49214f2fd93cf11df1cca41262435 (diff) | |
download | mariadb-git-1490901ecc1af83fc85c7997ae36c72f9bcf9215.tar.gz |
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/Makefile.am | 2 | ||||
-rw-r--r-- | mysql-test/r/alter_table.result | 10 | ||||
-rw-r--r-- | mysql-test/r/ctype_ujis.result | 40 | ||||
-rw-r--r-- | mysql-test/t/alter_table.test | 12 | ||||
-rw-r--r-- | mysql-test/t/ctype_ujis.test | 36 |
5 files changed, 99 insertions, 1 deletions
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index ad02d304d1b..fcf352f46e6 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -37,7 +37,7 @@ test_DATA = std_data/client-key.pem std_data/client-cert.pem std_data/cacert.pem CLEANFILES = $(test_SCRIPTS) $(test_DATA) INCLUDES = -I$(srcdir)/../include -I../include -I.. -bin_PROGRAMS = mysql_test_run_new +EXTRA_PROGRAMS = mysql_test_run_new noinst_HEADERS = my_manage.h mysql_test_run_new_SOURCES= mysql_test_run_new.c my_manage.c diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 89b8bd66848..9e14ca85a29 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -483,3 +483,13 @@ ERROR 42000: Incorrect table name 't1\\' rename table t1 to `t1\\`; ERROR 42000: Incorrect table name 't1\\' drop table t1; +create table t1 (a text) character set koi8r; +insert into t1 values (_koi8r'ΤΕΣΤ'); +select hex(a) from t1; +hex(a) +D4C5D3D4 +alter table t1 convert to character set cp1251; +select hex(a) from t1; +hex(a) +F2E5F1F2 +drop table t1; diff --git a/mysql-test/r/ctype_ujis.result b/mysql-test/r/ctype_ujis.result index 7c3ae52cbc9..d02ac0062f8 100644 --- a/mysql-test/r/ctype_ujis.result +++ b/mysql-test/r/ctype_ujis.result @@ -126,3 +126,43 @@ Field Type Null Key Default Extra a char(1) b enum('€’','€€') YES NULL DROP TABLE t1; +CREATE TABLE t1 +( +a INTEGER NOT NULL, +b VARCHAR(50) NOT NULL DEFAULT '', +PRIMARY KEY (a), +KEY b (b(10)) +) TYPE=InnoDB CHARACTER SET 'ujis' COLLATE 'ujis_japanese_ci'; +INSERT INTO t1 (a, b) VALUES (0, 'aaabbbcccddd'); +INSERT INTO t1 (a, b) VALUES (1, 'eeefffggghhh'); +INSERT INTO t1 (a, b) VALUES (2, 'iiijjjkkkl'); +SELECT t1.* FROM t1 WHERE b='aaabbbcccddd' ORDER BY a; +a b +0 aaabbbcccddd +SELECT t1.* FROM t1 WHERE b='eeefffggghhh' ORDER BY a; +a b +1 eeefffggghhh +SELECT t1.* FROM t1 WHERE b='iiijjjkkkl' ORDER BY a; +a b +2 iiijjjkkkl +DROP TABLE t1; +CREATE TABLE t1 +( +a INTEGER NOT NULL, +b VARCHAR(50) NOT NULL DEFAULT '', +PRIMARY KEY (a), +KEY b (b(10)) +) TYPE=MyISAM CHARACTER SET 'ujis' COLLATE 'ujis_japanese_ci'; +INSERT INTO t1 (a, b) VALUES (0, 'aaabbbcccddd'); +INSERT INTO t1 (a, b) VALUES (1, 'eeefffggghhh'); +INSERT INTO t1 (a, b) VALUES (2, 'iiijjjkkkl'); +SELECT t1.* FROM t1 WHERE b='aaabbbcccddd' ORDER BY a; +a b +0 aaabbbcccddd +SELECT t1.* FROM t1 WHERE b='eeefffggghhh' ORDER BY a; +a b +1 eeefffggghhh +SELECT t1.* FROM t1 WHERE b='iiijjjkkkl' ORDER BY a; +a b +2 iiijjjkkkl +DROP TABLE t1; diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index e46027ae8d9..66a4adc90fe 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -324,3 +324,15 @@ alter table t1 rename to `t1\\`; rename table t1 to `t1\\`; drop table t1; +# +# Bug #6479 ALTER TABLE ... changing charset fails for TEXT columns +# +# The column's character set was changed but the actual data was not +# modified. In other words, the values were reinterpreted +# as UTF8 instead of being converted. +create table t1 (a text) character set koi8r; +insert into t1 values (_koi8r'ΤΕΣΤ'); +select hex(a) from t1; +alter table t1 convert to character set cp1251; +select hex(a) from t1; +drop table t1; diff --git a/mysql-test/t/ctype_ujis.test b/mysql-test/t/ctype_ujis.test index e5405d9f1bd..9cfb6b14d7e 100644 --- a/mysql-test/t/ctype_ujis.test +++ b/mysql-test/t/ctype_ujis.test @@ -83,3 +83,39 @@ CREATE TABLE t1 ( SHOW CREATE TABLE t1; SHOW COLUMNS FROM t1; DROP TABLE t1; + +# +# Bug #6345 Unexpected behaviour with partial indices +# +--disable_warnings +CREATE TABLE t1 +( + a INTEGER NOT NULL, + b VARCHAR(50) NOT NULL DEFAULT '', + PRIMARY KEY (a), + KEY b (b(10)) +) TYPE=InnoDB CHARACTER SET 'ujis' COLLATE 'ujis_japanese_ci'; +--enable_warnings +INSERT INTO t1 (a, b) VALUES (0, 'aaabbbcccddd'); +INSERT INTO t1 (a, b) VALUES (1, 'eeefffggghhh'); +INSERT INTO t1 (a, b) VALUES (2, 'iiijjjkkkl'); +SELECT t1.* FROM t1 WHERE b='aaabbbcccddd' ORDER BY a; +SELECT t1.* FROM t1 WHERE b='eeefffggghhh' ORDER BY a; +SELECT t1.* FROM t1 WHERE b='iiijjjkkkl' ORDER BY a; +DROP TABLE t1; +--disable_warnings +CREATE TABLE t1 +( + a INTEGER NOT NULL, + b VARCHAR(50) NOT NULL DEFAULT '', + PRIMARY KEY (a), + KEY b (b(10)) +) TYPE=MyISAM CHARACTER SET 'ujis' COLLATE 'ujis_japanese_ci'; +--enable_warnings +INSERT INTO t1 (a, b) VALUES (0, 'aaabbbcccddd'); +INSERT INTO t1 (a, b) VALUES (1, 'eeefffggghhh'); +INSERT INTO t1 (a, b) VALUES (2, 'iiijjjkkkl'); +SELECT t1.* FROM t1 WHERE b='aaabbbcccddd' ORDER BY a; +SELECT t1.* FROM t1 WHERE b='eeefffggghhh' ORDER BY a; +SELECT t1.* FROM t1 WHERE b='iiijjjkkkl' ORDER BY a; +DROP TABLE t1; |