diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2008-10-09 15:49:13 +0500 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2008-10-09 15:49:13 +0500 |
commit | 1e4f12d65dff1532f9922e714e1cd672127acb17 (patch) | |
tree | 4dd114a067665ead4db8b458d2ef58771c4c9d21 /mysql-test/r/alter_table.result | |
parent | 56810c9d6560f073ec09078a139f059e9d3ea01f (diff) | |
download | mariadb-git-1e4f12d65dff1532f9922e714e1cd672127acb17.tar.gz |
Bug#39372 "Smart" ALTER TABLE not so smart after all.
The problem was that PACK_KEYS and MAX_ROWS clause in ALTER TABLE did not trigger
table reconstruction.
The fix is to rebuild a table if PACK_KEYS or MAX_ROWS are specified.
mysql-test/r/alter_table.result:
test result
mysql-test/t/alter_table.test:
test case
sql/sql_table.cc:
The problem was that PACK_KEYS and MAX_ROWS clause in ALTER TABLE did not trigger
table reconstruction.
The fix is to rebuild a table if PACK_KEYS or MAX_ROWS are specified.
Diffstat (limited to 'mysql-test/r/alter_table.result')
-rw-r--r-- | mysql-test/r/alter_table.result | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index d6986f4a956..e01f4fa047b 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -1222,4 +1222,22 @@ ALTER TABLE t1 CHANGE d c varchar(10); affected rows: 0 info: Records: 0 Duplicates: 0 Warnings: 0 DROP TABLE t1; +create table t1(f1 int not null, f2 int not null, key (f1), key (f2)); +select index_length into @unpaked_keys_size from +information_schema.tables where table_name='t1'; +alter table t1 pack_keys=1; +select index_length into @paked_keys_size from +information_schema.tables where table_name='t1'; +select (@unpaked_keys_size > @paked_keys_size); +(@unpaked_keys_size > @paked_keys_size) +1 +select max_data_length into @orig_max_data_length from +information_schema.tables where table_name='t1'; +alter table t1 max_rows=100; +select max_data_length into @changed_max_data_length from +information_schema.tables where table_name='t1'; +select (@orig_max_data_length > @changed_max_data_length); +(@orig_max_data_length > @changed_max_data_length) +1 +drop table t1; End of 5.1 tests |