Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions tests/integration_tests/tidb_mysql_test/r/date_formats.result
Original file line number Diff line number Diff line change
Expand Up @@ -317,13 +317,13 @@ a
%m.%d.%Y
select get_format(TIME, 'internal') as a;
a

%H%i%s
select get_format(DATETIME, 'eur') as a;
a

%Y-%m-%d %H.%i.%s
select get_format(TIMESTAMP, 'eur') as a;
a

%Y-%m-%d %H.%i.%s
select get_format(DATE, 'TEST') as a;
a

Expand Down Expand Up @@ -469,7 +469,7 @@ Thursday 01 January 2009
SET NAMES utf8;
SELECT LEAST('%', GET_FORMAT(datetime, 'eur'), CAST(GET_FORMAT(datetime, 'eur') AS CHAR(65535)));
LEAST('%', GET_FORMAT(datetime, 'eur'), CAST(GET_FORMAT(datetime, 'eur') AS CHAR(65535)))

%
SET NAMES latin1;
#
# End of 5.1 tests
Expand Down Expand Up @@ -541,12 +541,11 @@ b b IN ('20161213') b in ('20161213', 0)
SELECT b, b = '121314',
CASE b WHEN '121314' then 'found' ELSE 'not found' END FROM t8;
b b = '121314' CASE b WHEN '121314' then 'found' ELSE 'not found' END
10:13:14 0 not found
11:13:14 0 not found
12:13:14 1 found
10:13:14 0 not found
SELECT b, b in ('121314'), b in ('121314', 0) FROM t8;
b b in ('121314') b in ('121314', 0)
10:13:14 0 0
11:13:14 0 0
12:13:14 1 1
10:13:14 0 0
DROP TABLE t6, t7, t8;
2 changes: 2 additions & 0 deletions tests/integration_tests/tidb_mysql_test/t/date_formats.test
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,10 @@ SELECT b, b = '20161213',
SELECT b, b IN ('20161213'), b in ('20161213', 0) FROM t7;

#Uses datatype TIME
--sorted_result
SELECT b, b = '121314',
CASE b WHEN '121314' then 'found' ELSE 'not found' END FROM t8;
--sorted_result
SELECT b, b in ('121314'), b in ('121314', 0) FROM t8;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To ensure proper test cleanup and avoid potential side effects in subsequent tests, it's good practice to drop the tables created for this test case. Consider adding DROP TABLE t6, t7, t8; after these queries.

SELECT b, b in ('121314'), b in ('121314', 0) FROM t8;
DROP TABLE t6, t7, t8;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add a --sorted_result to this SQL? It seems that its result also changed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added, :)


#DROP TABLE t1, t2, t3;