Handle IF [NOT] EXITS for ddl statements in distill.

This commit is contained in:
Daniel Nichter
2013-08-03 14:01:25 -07:00
parent cd6e41be0e
commit 9059853136
2 changed files with 16 additions and 0 deletions

View File

@@ -1440,6 +1440,20 @@ is(
"distill REPLACE without INTO (bug 984053)"
);
# IF EXISTS
# https://bugs.launchpad.net/percona-toolkit/+bug/821690
is(
$qr->distill("DROP TABLE IF EXISTS foo"),
"DROP TABLE foo",
"distill DROP TABLE IF EXISTS foo (bug 821690)"
);
is(
$qr->distill("CREATE TABLE IF NOT EXISTS foo"),
"CREATE TABLE foo",
"distill CREATE TABLE IF NOT EXISTS foo",
);
# #############################################################################
# Done.
# #############################################################################