-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix bug of datetime default value Co-authored-by: Fei Han <[email protected]>
- Loading branch information
1 parent
1ab053a
commit 45df0d1
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
mysql> drop table if exists test.t | ||
mysql> create table test.t(a int) | ||
mysql> alter table test.t set tiflash replica 1 | ||
mysql> insert into test.t (a) values (1); | ||
mysql> insert into test.t (a) values (1); | ||
|
||
SLEEP 15 | ||
|
||
|
||
>> DBGInvoke __try_flush() | ||
|
||
mysql> set session tidb_isolation_read_engines='tiflash'; select /*+ read_from_storage(tiflash[t]) */ * from test.t; | ||
+------+ | ||
| a | | ||
+------+ | ||
| 1 | | ||
| 1 | | ||
+------+ | ||
|
||
mysql> alter table test.t add column b datetime default '8124-05-31 23:47:33'; | ||
mysql> set session tidb_isolation_read_engines='tiflash'; select /*+ read_from_storage(t) */ * from test.t; | ||
+------+---------------------+ | ||
| a | b | | ||
+------+---------------------+ | ||
| 1 | 8124-05-31 23:47:33 | | ||
| 1 | 8124-05-31 23:47:33 | | ||
+------+---------------------+ | ||
|
||
mysql> alter table test.t add column c datetime default 19910905; | ||
mysql> set session tidb_isolation_read_engines='tiflash'; select /*+ read_from_storage(t) */ * from test.t; | ||
+------+---------------------+---------------------+ | ||
| a | b | c | | ||
+------+---------------------+---------------------+ | ||
| 1 | 8124-05-31 23:47:33 | 1991-09-05 00:00:00 | | ||
| 1 | 8124-05-31 23:47:33 | 1991-09-05 00:00:00 | | ||
+------+---------------------+---------------------+ |