Skip to content

Commit

Permalink
fix ci (#5752)
Browse files Browse the repository at this point in the history
ref #5750
  • Loading branch information
windtalker authored Aug 31, 2022
1 parent 79b36c3 commit 21a37ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tests/fullstack-test/expr/from_unixtime.test
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ func> wait_table test t

# This will throw error for now, but before https://github.com/pingcap/tics/issues/1433 fixed, it will cause segmentation fault
mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where FROM_UNIXTIME(1447430881, a)
ERROR 1105 (HY000) at line 1: Argument at index 1 for function fromUnixTime must be constant
{#REGEXP}.*Argument at index 1 for function fromUnixTime must be constant.*

mysql> drop table if exists test.t
18 changes: 9 additions & 9 deletions tests/fullstack-test/expr/str_to_date.test
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ mysql> set sql_mode=''; set tidb_allow_mpp=1; set tidb_isolation_read_engines='t
## Test suite 1 - Disallow zero day
# The sql_mode does not effect the result set
#mysql> set sql_mode='NO_ZERO_IN_DATE,NO_ZERO_DATE'; set tidb_allow_mpp=1; set tidb_isolation_read_engines='tiflash'; explain select a, ifnull(str_to_date(a, '%d/%m/%Y'),str_to_date('00/00/0000', '%d/%m/%Y')) as date, count(*) as cnt from test.t where suite = 1 group by a,date order by a
mysql> set sql_mode='NO_ZERO_IN_DATE,NO_ZERO_DATE'; set tidb_allow_mpp=1; set tidb_isolation_read_engines='tiflash'; select a, ifnull(str_to_date(a, '%d/%m/%Y'),str_to_date('00/00/0000', '%d/%m/%Y')) as date, count(*) as cnt from test.t where suite = 1 group by a,date order by a
+------------+------------+-----+
| a | date | cnt |
+------------+------------+-----+
| 0/0/2012 | NULL | 1 |
| 00/00/0000 | NULL | 1 |
| 13/05/2019 | 2019-05-13 | 1 |
| abc | NULL | 1 |
+------------+------------+-----+
#mysql> set sql_mode='NO_ZERO_IN_DATE,NO_ZERO_DATE'; set tidb_allow_mpp=1; set tidb_isolation_read_engines='tiflash'; select a, ifnull(str_to_date(a, '%d/%m/%Y'),str_to_date('00/00/0000', '%d/%m/%Y')) as date, count(*) as cnt from test.t where suite = 1 group by a,date order by a
#+------------+------------+-----+
#| a | date | cnt |
#+------------+------------+-----+
#| 0/0/2012 | NULL | 1 |
#| 00/00/0000 | NULL | 1 |
#| 13/05/2019 | 2019-05-13 | 1 |
#| abc | NULL | 1 |
#+------------+------------+-----+

## Test suite 2 - showing datetime with fractions
#mysql> set sql_mode=''; set tidb_allow_mpp=1; set tidb_isolation_read_engines='tiflash'; explain select a, str_to_date(a, '%d/%b/%Y %H:%i:%S.%f') as date from test.t where suite = 2 group by a,date order by a
Expand Down

0 comments on commit 21a37ab

Please sign in to comment.