diff options
author | svoj@mysql.com/june.mysql.com <> | 2008-03-14 19:38:22 +0400 |
---|---|---|
committer | svoj@mysql.com/june.mysql.com <> | 2008-03-14 19:38:22 +0400 |
commit | 1f0e9f5a5ded1cfb7640b5d6d7f697a56e8cb5b5 (patch) | |
tree | daf13becfa89ba481b4a9543f23a500ae9708045 /mysql-test/t/merge.test | |
parent | 9c4e4640ad9dcb7acf1c3fad83f61817083e7c0c (diff) | |
download | mariadb-git-1f0e9f5a5ded1cfb7640b5d6d7f697a56e8cb5b5.tar.gz |
BUG#28248 - mysqldump results with MERGE ... UNION=() cannot be executed
When there are no underlying tables specified for a merge table,
SHOW CREATE TABLE outputs a statement that cannot be executed. The
same is true for mysqldump (it generates dumps that cannot be
executed).
This happens because SQL parser does not accept empty UNION() clause.
This patch changes the following:
- it is now possible to execute CREATE/ALTER statement with
empty UNION() clause.
- the same as above, but still worth noting: it is now possible to
remove underlying tables mapping using ALTER TABLE ... UNION=().
- SHOW CREATE TABLE does not output UNION() clause if there are
no underlying tables specified for a merge table. This makes
mysqldump slightly smaller.
Diffstat (limited to 'mysql-test/t/merge.test')
-rw-r--r-- | mysql-test/t/merge.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index 35443987858..e5cc4d703f2 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -542,5 +542,18 @@ SELECT * FROM t3; DROP TABLE t1, t2, t3; +# +# BUG#28248 - mysqldump results with MERGE ... UNION=() cannot be executed +# +CREATE TABLE t1(a INT); +CREATE TABLE m1(a INT) ENGINE=MERGE; +SHOW CREATE TABLE m1; +DROP TABLE m1; +CREATE TABLE m1(a INT) ENGINE=MERGE UNION=(); +SHOW CREATE TABLE m1; +ALTER TABLE m1 UNION=(t1); +ALTER TABLE m1 UNION=(); +SHOW CREATE TABLE m1; +DROP TABLE t1, m1; --echo End of 5.0 tests |