summaryrefslogtreecommitdiff
path: root/mysql-test/t/alter_table.test
diff options
context:
space:
mode:
authormonty@mysql.com <>2005-05-14 16:24:36 +0300
committermonty@mysql.com <>2005-05-14 16:24:36 +0300
commitbeb5867dfb429a88dc2b732fb1d379560d29fc29 (patch)
tree438b1bf66c03f295f0c2546a80859345423c0539 /mysql-test/t/alter_table.test
parentb4e92e6360df30ab8d5e1baaf4d4d5d7cb8bc5f1 (diff)
downloadmariadb-git-beb5867dfb429a88dc2b732fb1d379560d29fc29.tar.gz
After merge fixes
Diffstat (limited to 'mysql-test/t/alter_table.test')
-rw-r--r--mysql-test/t/alter_table.test102
1 files changed, 52 insertions, 50 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test
index d133403f42b..c3ba2c8a7a4 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -166,56 +166,6 @@ ALTER TABLE t1 ENABLE KEYS;
drop table t1;
#
-# Test that data get converted when character set is changed
-# Test that data doesn't get converted when src or dst is BINARY/BLOB
-#
-set names koi8r;
-create table t1 (a char(10) character set koi8r);
-insert into t1 values ('ΤΕΣΤ');
-select a,hex(a) from t1;
-alter table t1 change a a char(10) character set cp1251;
-select a,hex(a) from t1;
-alter table t1 change a a binary(10);
-select a,hex(a) from t1;
-alter table t1 change a a char(10) character set cp1251;
-select a,hex(a) from t1;
-alter table t1 change a a char(10) character set koi8r;
-select a,hex(a) from t1;
-alter table t1 change a a varchar(10) character set cp1251;
-select a,hex(a) from t1;
-alter table t1 change a a char(10) character set koi8r;
-select a,hex(a) from t1;
-alter table t1 change a a text character set cp1251;
-select a,hex(a) from t1;
-alter table t1 change a a char(10) character set koi8r;
-select a,hex(a) from t1;
-delete from t1;
-
-#
-# Test ALTER TABLE .. CHARACTER SET ..
-#
-show create table t1;
-alter table t1 DEFAULT CHARACTER SET latin1;
-show create table t1;
-alter table t1 CONVERT TO CHARACTER SET latin1;
-show create table t1;
-alter table t1 DEFAULT CHARACTER SET cp1251;
-show create table t1;
-
-drop table t1;
-
-#
-# Bug#2821
-# Test that table CHARACTER SET does not affect blobs
-#
-create table t1 (myblob longblob,mytext longtext)
-default charset latin1 collate latin1_general_cs;
-show create table t1;
-alter table t1 character set latin2;
-show create table t1;
-drop table t1;
-
-#
# Test ALTER TABLE ENABLE/DISABLE keys when things are locked
#
@@ -317,6 +267,58 @@ insert into t1 (a) values(1);
--replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
show table status like 't1';
drop table t1;
+
+#
+# Test that data get converted when character set is changed
+# Test that data doesn't get converted when src or dst is BINARY/BLOB
+#
+set names koi8r;
+create table t1 (a char(10) character set koi8r);
+insert into t1 values ('ΤΕΣΤ');
+select a,hex(a) from t1;
+alter table t1 change a a char(10) character set cp1251;
+select a,hex(a) from t1;
+alter table t1 change a a binary(10);
+select a,hex(a) from t1;
+alter table t1 change a a char(10) character set cp1251;
+select a,hex(a) from t1;
+alter table t1 change a a char(10) character set koi8r;
+select a,hex(a) from t1;
+alter table t1 change a a varchar(10) character set cp1251;
+select a,hex(a) from t1;
+alter table t1 change a a char(10) character set koi8r;
+select a,hex(a) from t1;
+alter table t1 change a a text character set cp1251;
+select a,hex(a) from t1;
+alter table t1 change a a char(10) character set koi8r;
+select a,hex(a) from t1;
+delete from t1;
+
+#
+# Test ALTER TABLE .. CHARACTER SET ..
+#
+show create table t1;
+alter table t1 DEFAULT CHARACTER SET latin1;
+show create table t1;
+alter table t1 CONVERT TO CHARACTER SET latin1;
+show create table t1;
+alter table t1 DEFAULT CHARACTER SET cp1251;
+show create table t1;
+
+drop table t1;
+
+#
+# Bug#2821
+# Test that table CHARACTER SET does not affect blobs
+#
+create table t1 (myblob longblob,mytext longtext)
+default charset latin1 collate latin1_general_cs;
+show create table t1;
+alter table t1 character set latin2;
+show create table t1;
+drop table t1;
+
+#
# Bug 2361 (Don't drop UNIQUE with DROP PRIMARY KEY)
#