Skip to content

Commit

Permalink
tests: fix the error msg in default_as_expession (pingcap#52268)
Browse files Browse the repository at this point in the history
  • Loading branch information
zimulala authored and imalasong committed Apr 1, 2024
1 parent 73e4286 commit 641fbbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/integrationtest/r/ddl/default_as_expression.result
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +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: '2024-03'
Error 1292 (22007): Incorrect datetime value:<time>
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'));
Expand Down
1 change: 1 addition & 0 deletions tests/integrationtest/t/ddl/default_as_expression.test
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ insert into t0 values (4, default);
insert into t1 values (4, default);
show create table t0;
show create table t1;
-- replace_regex /Incorrect datetime value:.*/Incorrect datetime value:<time>/
-- error 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'));
Expand Down

0 comments on commit 641fbbc

Please sign in to comment.