diff options
author | unknown <tsmith@maint2.mysql.com> | 2006-09-12 19:40:00 +0200 |
---|---|---|
committer | unknown <tsmith@maint2.mysql.com> | 2006-09-12 19:40:00 +0200 |
commit | bc053aa0a1764220d3c0191f1293f78decfe7c4d (patch) | |
tree | 1a304e121de5b8b9285480986927f6230f33230d /mysql-test/t/windows.test | |
parent | 9e89ea6fa8734c2538a416b29fc3120447f6b733 (diff) | |
parent | f320b01a805637b4269a8a3aa3e9b5455995f58f (diff) | |
download | mariadb-git-bc053aa0a1764220d3c0191f1293f78decfe7c4d.tar.gz |
Merge maint2.mysql.com:/data/localhome/tsmith/bk/mrg/g51
into maint2.mysql.com:/data/localhome/tsmith/bk/mrg/51
libmysqld/libmysqld.def:
Auto merged
mysql-test/t/handler.test:
Auto merged
sql/log.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'mysql-test/t/windows.test')
-rw-r--r-- | mysql-test/t/windows.test | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/mysql-test/t/windows.test b/mysql-test/t/windows.test index d6bcfeb8cb3..79517df6517 100644 --- a/mysql-test/t/windows.test +++ b/mysql-test/t/windows.test @@ -18,3 +18,42 @@ create table nu (a int); drop table nu; # End of 4.1 tests + +# +# Bug #20789: Merge Subtable Rename Causes Crash +# +CREATE TABLE `t1` ( + `TIM` datetime NOT NULL, + `VAL` double default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +CREATE TABLE `t2` ( + `TIM` datetime NOT NULL, + `VAL` double default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +CREATE TABLE `mt` ( + `TIM` datetime NOT NULL, + `VAL` double default NULL +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST +UNION=(`t1`,`t2`); + +# insert into the merge table and thus open it. +INSERT INTO mt VALUES ('2006-01-01',0); + +# Alter one of the tables that are part of the merge table +ALTER TABLE `t2` RENAME TO `t`; + +# Insert into the merge table that has just been altered +--error 1015 +INSERT INTO mt VALUES ('2006-01-01',0); +--error 1015 +select * from mt; + +FLUSH TABLES; +--error 1017 +select * from mt; + +# Alter one of the tables that are part of the merge table +ALTER TABLE `t` RENAME TO `t2`; +INSERT INTO mt VALUES ('2006-01-01',0); +select * from mt; + |