diff options
author | svoj@mysql.com/april.(none) <> | 2006-09-28 22:10:06 +0500 |
---|---|---|
committer | svoj@mysql.com/april.(none) <> | 2006-09-28 22:10:06 +0500 |
commit | b271d7653bcea54865e14d9dac52cf126ad97fcf (patch) | |
tree | 5b56c6cdb8550603c89fdebaffbeb7bf12678aaa /mysql-test/t/merge.test | |
parent | 43097593e36c32bc5eac2befb0a9133194feb882 (diff) | |
download | mariadb-git-b271d7653bcea54865e14d9dac52cf126ad97fcf.tar.gz |
BUG#21617 - crash when selecting from merge table with inconsistent indexes
Crash may happen when selecting from a merge table that has underlying
tables with less indexes than in a merge table itself.
If number of keys in merge table is not bigger than requested key number,
return error.
Diffstat (limited to 'mysql-test/t/merge.test')
-rw-r--r-- | mysql-test/t/merge.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index a723443b395..219a33d344b 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -376,4 +376,15 @@ select * from t3; check table t1, t2; drop table t1, t2, t3; +# +# BUG#21617 - crash when selecting from merge table with inconsistent +# indexes +# +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(2),(1); +CREATE TABLE t2(a INT, KEY(a)) ENGINE=MERGE UNION=(t1); +--error 1030 +SELECT * FROM t2 WHERE a=2; +DROP TABLE t1, t2; + # End of 4.1 tests |