diff options
author | Davi Arnaut <davi@mysql.com> | 2008-06-17 11:12:21 -0300 |
---|---|---|
committer | Davi Arnaut <davi@mysql.com> | 2008-06-17 11:12:21 -0300 |
commit | c20188e011915e1532dd8bf19b1509618e6fb3b8 (patch) | |
tree | f39cf90ded924b0b4efe69724a020b3169a8709a /mysql-test/r/alter_table.result | |
parent | 41659299736acf00d998036c2c30491e6e21041e (diff) | |
download | mariadb-git-c20188e011915e1532dd8bf19b1509618e6fb3b8.tar.gz |
Bug#33873: Fast ALTER TABLE doesn't work with multibyte character sets
The problem was that when comparing tables for a possible
fast alter table, the comparison was being performed using
the parsed information and not the final definition.
The solution is to use the possible final table layout to
compare if a fast alter is possible or not.
Diffstat (limited to 'mysql-test/r/alter_table.result')
-rw-r--r-- | mysql-test/r/alter_table.result | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 3cec1f546d2..d6986f4a956 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -1184,3 +1184,42 @@ check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (id int, c int) character set latin1; +INSERT INTO t1 VALUES (1,1); +ALTER TABLE t1 CHANGE c d int; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 CHANGE d c int; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 MODIFY c VARCHAR(10); +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 CHANGE c d varchar(10); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 CHANGE d c varchar(10); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (id int, c int) character set utf8; +INSERT INTO t1 VALUES (1,1); +ALTER TABLE t1 CHANGE c d int; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 CHANGE d c int; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 MODIFY c VARCHAR(10); +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 CHANGE c d varchar(10); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 CHANGE d c varchar(10); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +DROP TABLE t1; +End of 5.1 tests |