From 2780ff533fa561a0a9a94fdedb88167adced6ca1 Mon Sep 17 00:00:00 2001 From: NiwakaDev Date: Mon, 25 Sep 2023 07:56:51 +0900 Subject: [PATCH] chore: add integration test for issue2437 --- .../standalone/common/alter/add_incorrect_col.result | 12 ++++++++++++ .../standalone/common/alter/add_incorrect_col.sql | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 tests/cases/standalone/common/alter/add_incorrect_col.result create mode 100644 tests/cases/standalone/common/alter/add_incorrect_col.sql diff --git a/tests/cases/standalone/common/alter/add_incorrect_col.result b/tests/cases/standalone/common/alter/add_incorrect_col.result new file mode 100644 index 000000000000..c8d9dcf3460f --- /dev/null +++ b/tests/cases/standalone/common/alter/add_incorrect_col.result @@ -0,0 +1,12 @@ +CREATE TABLE select_should_not_fail_after_incorrect_alter(i INTEGER, j TIMESTAMP TIME INDEX); + +Affected Rows: 0 + +ALTER TABLE select_should_not_fail_after_incorrect_alter ADD column k string NOT NULL; + +Error: 1004(InvalidArguments), Invalid alter table(select_should_not_fail_after_incorrect_alter) request: no default value for column k + +DROP TABLE select_should_not_fail_after_incorrect_alter; + +Affected Rows: 1 + diff --git a/tests/cases/standalone/common/alter/add_incorrect_col.sql b/tests/cases/standalone/common/alter/add_incorrect_col.sql new file mode 100644 index 000000000000..a313a85d2ec9 --- /dev/null +++ b/tests/cases/standalone/common/alter/add_incorrect_col.sql @@ -0,0 +1,5 @@ +CREATE TABLE select_should_not_fail_after_incorrect_alter(i INTEGER, j TIMESTAMP TIME INDEX); + +ALTER TABLE select_should_not_fail_after_incorrect_alter ADD column k string NOT NULL; + +DROP TABLE select_should_not_fail_after_incorrect_alter;