diff options
author | Dmitry Lenev <dlenev@mysql.com> | 2010-07-26 13:22:38 +0400 |
---|---|---|
committer | Dmitry Lenev <dlenev@mysql.com> | 2010-07-26 13:22:38 +0400 |
commit | c67cf159e928fe63582a4233d130dada0f866cb7 (patch) | |
tree | 2396088554d3c13a06531edacc638b9e7ba47cab | |
parent | 97bfd559f190fa9daf9886909844c3e12cc192a1 (diff) | |
download | mariadb-git-c67cf159e928fe63582a4233d130dada0f866cb7.tar.gz |
Test for bug #53820 "ALTER a MEDIUMINT column table causes full
table copy".
This patch only adds test case as the bug itself was addressed
by Ramil's fix for bug 50946 "fast index creation still seems
to copy the table".
-rw-r--r-- | mysql-test/r/alter_table.result | 13 | ||||
-rw-r--r-- | mysql-test/t/alter_table.test | 16 |
2 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 90dde034e10..304f562d47d 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -1370,3 +1370,16 @@ CREATE TABLE t1 (id int); INSERT INTO t1 VALUES (1), (2); ALTER TABLE t1 ADD COLUMN (f1 INT), ADD COLUMN (f2 INT), ADD KEY f2k(f2); DROP TABLE t1; +# +# Test for bug #53820 "ALTER a MEDIUMINT column table causes full +# table copy". +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a INT, b MEDIUMINT); +INSERT INTO t1 VALUES (1, 1), (2, 2); +# The below ALTER should not copy table and so no rows should +# be shown as affected. +ALTER TABLE t1 CHANGE a id INT; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +DROP TABLE t1; diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index d7f7a12cbf8..5b5fdf50c16 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -1128,3 +1128,19 @@ INSERT INTO t1 VALUES (1), (2); ALTER TABLE t1 ADD COLUMN (f1 INT), ADD COLUMN (f2 INT), ADD KEY f2k(f2); DROP TABLE t1; + +--echo # +--echo # Test for bug #53820 "ALTER a MEDIUMINT column table causes full +--echo # table copy". +--echo # +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +CREATE TABLE t1 (a INT, b MEDIUMINT); +INSERT INTO t1 VALUES (1, 1), (2, 2); +--echo # The below ALTER should not copy table and so no rows should +--echo # be shown as affected. +--enable_info +ALTER TABLE t1 CHANGE a id INT; +--disable_info +DROP TABLE t1; |