From 71f48cbbbc7cb85a20ce8019cea4454c88d8f57f Mon Sep 17 00:00:00 2001 From: Lynn Date: Mon, 1 Apr 2024 10:29:21 +0800 Subject: [PATCH 1/2] tests: fix the error msg --- tests/integrationtest/r/ddl/default_as_expression.result | 1 - tests/integrationtest/t/ddl/default_as_expression.test | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/integrationtest/r/ddl/default_as_expression.result b/tests/integrationtest/r/ddl/default_as_expression.result index 5774266b0df62..091d3a2839130 100644 --- a/tests/integrationtest/r/ddl/default_as_expression.result +++ b/tests/integrationtest/r/ddl/default_as_expression.result @@ -100,7 +100,6 @@ t1 CREATE TABLE `t1` ( KEY `idx` (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin alter table t0 modify column c1 datetime DEFAULT (date_format(now(), '%Y-%m-%d')); -Error 1292 (22007): Incorrect datetime value: '2024-03' alter table t0 alter column c1 SET DEFAULT (date_format(now(), '%Y-%m-%d')); insert into t0 values (5, default); alter table t1 modify column c1 datetime DEFAULT (date_format(now(), '%Y-%m-%d')); diff --git a/tests/integrationtest/t/ddl/default_as_expression.test b/tests/integrationtest/t/ddl/default_as_expression.test index 6c52f2c9602b1..c89a2a1af99bd 100644 --- a/tests/integrationtest/t/ddl/default_as_expression.test +++ b/tests/integrationtest/t/ddl/default_as_expression.test @@ -54,7 +54,7 @@ insert into t0 values (4, default); insert into t1 values (4, default); show create table t0; show create table t1; --- error 1292 +-- error 0, 1292 alter table t0 modify column c1 datetime DEFAULT (date_format(now(), '%Y-%m-%d')); alter table t0 alter column c1 SET DEFAULT (date_format(now(), '%Y-%m-%d')); insert into t0 values (5, default); From ff59efb1fefdcec2fbdc03f51efd4ae5de27c810 Mon Sep 17 00:00:00 2001 From: Lynn Date: Mon, 1 Apr 2024 10:39:27 +0800 Subject: [PATCH 2/2] */ddl: tiny update --- tests/integrationtest/r/ddl/default_as_expression.result | 1 + tests/integrationtest/t/ddl/default_as_expression.test | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integrationtest/r/ddl/default_as_expression.result b/tests/integrationtest/r/ddl/default_as_expression.result index 091d3a2839130..429a2c48d6d9c 100644 --- a/tests/integrationtest/r/ddl/default_as_expression.result +++ b/tests/integrationtest/r/ddl/default_as_expression.result @@ -100,6 +100,7 @@ t1 CREATE TABLE `t1` ( KEY `idx` (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin alter table t0 modify column c1 datetime DEFAULT (date_format(now(), '%Y-%m-%d')); +Error 1292 (22007): Incorrect datetime value: