From 1a45b5fffc77134dcdbb8e17eed7f2a5ad9dedc0 Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Thu, 1 Aug 2019 15:19:38 +0300 Subject: [PATCH] bailing out on missing _ghc table on failure to writing to it --- .../fail-drop-ghc-table-no-read/create.sql | 23 +++++++++++++++++++ .../expect_failure | 1 + .../fail-drop-ghc-table-no-read/extra_args | 1 + 3 files changed, 25 insertions(+) create mode 100644 localtests/fail-drop-ghc-table-no-read/create.sql create mode 100644 localtests/fail-drop-ghc-table-no-read/expect_failure create mode 100644 localtests/fail-drop-ghc-table-no-read/extra_args diff --git a/localtests/fail-drop-ghc-table-no-read/create.sql b/localtests/fail-drop-ghc-table-no-read/create.sql new file mode 100644 index 0000000..1973ec1 --- /dev/null +++ b/localtests/fail-drop-ghc-table-no-read/create.sql @@ -0,0 +1,23 @@ +drop table if exists gh_ost_test; +create table gh_ost_test ( + id int auto_increment, + i int not null, + color varchar(32), + primary key(id) +) auto_increment=1; + +insert into gh_ost_test values (null, 1, 'red'); + +drop event if exists gh_ost_test; +delimiter ;; +create event gh_ost_test + on schedule every 1 second + starts current_timestamp + interval 3 second + ends current_timestamp + interval 60 second + on completion not preserve + enable + do +begin + insert into gh_ost_test values (null, 1, 'blue'); + drop table if exists _gh_ost_test_ghc; +end ;; diff --git a/localtests/fail-drop-ghc-table-no-read/expect_failure b/localtests/fail-drop-ghc-table-no-read/expect_failure new file mode 100644 index 0000000..fd2f6bf --- /dev/null +++ b/localtests/fail-drop-ghc-table-no-read/expect_failure @@ -0,0 +1 @@ +Error 1146: Table 'test._gh_ost_test_ghc' doesn't exist diff --git a/localtests/fail-drop-ghc-table-no-read/extra_args b/localtests/fail-drop-ghc-table-no-read/extra_args new file mode 100644 index 0000000..ea18160 --- /dev/null +++ b/localtests/fail-drop-ghc-table-no-read/extra_args @@ -0,0 +1 @@ +--throttle-query='select sleep(1)'