diff options
author | unknown <andrey@example.com> | 2006-11-16 14:01:51 +0100 |
---|---|---|
committer | unknown <andrey@example.com> | 2006-11-16 14:01:51 +0100 |
commit | d63fa0a4078985e656e4c057583fc572add8d3a5 (patch) | |
tree | 24e96e21bb2b19afcae7133bcd7191800c783ad8 /mysql-test/r/alter_table.result | |
parent | db42257de8504d78046a6c5227491ce8edaebe29 (diff) | |
download | mariadb-git-d63fa0a4078985e656e4c057583fc572add8d3a5.tar.gz |
Fix for bug#24219 ALTER TABLE ... RENAME TO ... , DISABLE KEYS leads to crash
(this is the 5.0 patch, because 4.1 differs)
There was an improper order of doing chained operations.
To the documentor: ENABLE|DISABLE KEYS combined with RENAME TO, and no other
ALTER TABLE clause, leads to server crash independent of the presence of
indices and data in the table.
mysql-test/r/alter_table.result:
post-merge fix
my locale is utf8, and this breaks non-utf8 stuff when doing manual merge :(
sql/sql_table.cc:
If there is operation on the KEYS, first do it
and then do a rename if there is such. Or, we will crash because
the underlying table has changed.
Diffstat (limited to 'mysql-test/r/alter_table.result')
-rw-r--r-- | mysql-test/r/alter_table.result | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index a8d7b917f37..ba8c11efbe1 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -428,42 +428,42 @@ t1 MyISAM 10 Fixed 1 37 X X X X X X X X latin1_swedish_ci NULL drop table t1; set names koi8r; create table t1 (a char(10) character set koi8r); -insert into t1 values ('ÔÅÓÔ'); +insert into t1 values ('ÔÅÓÔ'); select a,hex(a) from t1; a hex(a) -ÔÅÓÔ D4C5D3D4 +ÔÅÓÔ D4C5D3D4 alter table t1 change a a char(10) character set cp1251; select a,hex(a) from t1; a hex(a) -ÔÅÓÔ F2E5F1F2 +ÔÅÓÔ F2E5F1F2 alter table t1 change a a binary(4); select a,hex(a) from t1; a hex(a) -òåñò F2E5F1F2 +òåñò F2E5F1F2 alter table t1 change a a char(10) character set cp1251; select a,hex(a) from t1; a hex(a) -ÔÅÓÔ F2E5F1F2 +ÔÅÓÔ F2E5F1F2 alter table t1 change a a char(10) character set koi8r; select a,hex(a) from t1; a hex(a) -ÔÅÓÔ D4C5D3D4 +ÔÅÓÔ D4C5D3D4 alter table t1 change a a varchar(10) character set cp1251; select a,hex(a) from t1; a hex(a) -ÔÅÓÔ F2E5F1F2 +ÔÅÓÔ F2E5F1F2 alter table t1 change a a char(10) character set koi8r; select a,hex(a) from t1; a hex(a) -ÔÅÓÔ D4C5D3D4 +ÔÅÓÔ D4C5D3D4 alter table t1 change a a text character set cp1251; select a,hex(a) from t1; a hex(a) -ÔÅÓÔ F2E5F1F2 +ÔÅÓÔ F2E5F1F2 alter table t1 change a a char(10) character set koi8r; select a,hex(a) from t1; a hex(a) -ÔÅÓÔ D4C5D3D4 +ÔÅÓÔ D4C5D3D4 delete from t1; show create table t1; Table Create Table @@ -528,7 +528,7 @@ ALTER TABLE T12207 DISCARD TABLESPACE; ERROR HY000: Table storage engine for 'T12207' doesn't have this option DROP TABLE T12207; create table t1 (a text) character set koi8r; -insert into t1 values (_koi8r'ÔÅÓÔ'); +insert into t1 values (_koi8r'ÔÅÓÔ'); select hex(a) from t1; hex(a) D4C5D3D4 @@ -556,16 +556,6 @@ ERROR 3D000: No database selected alter table test.t1 rename test.t1; use test; drop table t1; -create table t1 (mycol int(10) not null); -alter table t1 alter column mycol set default 0; -desc t1; -Field Type Null Key Default Extra -mycol int(10) NO 0 -drop table t1; -create table t1 (t varchar(255) default null, key t (t(80))) -engine=myisam default charset=latin1; -alter table t1 change t t text; -drop table t1; DROP TABLE IF EXISTS bug24219; DROP TABLE IF EXISTS bug24219_2; CREATE TABLE bug24219 (a INT, INDEX(a)); @@ -577,3 +567,13 @@ SHOW INDEX FROM bug24219_2; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment bug24219_2 1 a 1 a A NULL NULL NULL YES BTREE disabled DROP TABLE bug24219_2; +create table t1 (mycol int(10) not null); +alter table t1 alter column mycol set default 0; +desc t1; +Field Type Null Key Default Extra +mycol int(10) NO 0 +drop table t1; +create table t1 (t varchar(255) default null, key t (t(80))) +engine=myisam default charset=latin1; +alter table t1 change t t text; +drop table t1; |