-
Notifications
You must be signed in to change notification settings - Fork 409
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
* cherry pick #1903 to release-4.0 Signed-off-by: ti-srebot <ti-srebot@pingcap.com> * Fix test Co-authored-by: Yu Lei <leiysky@outlook.com>
- Loading branch information
Showing
2 changed files
with
35 additions
and
3 deletions.
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,23 @@ | ||
mysql> drop table if exists test.t | ||
mysql> create table test.t(a char(10)) | ||
mysql> insert into test.t values(''), ('abc') | ||
mysql> alter table test.t set tiflash replica 1 | ||
|
||
func> wait_table test t | ||
|
||
mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where substring(a, -3, 4) = 'abc' | ||
a | ||
abc | ||
|
||
mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where substring(a, -3, 2) = 'ab' | ||
a | ||
abc | ||
|
||
mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t where substring(a, -4, 3) = 'abc' | ||
# Empty | ||
|
||
mysql> set session tidb_isolation_read_engines='tiflash'; select count(*) from test.t where substring(a, 0, 3) = '' order by a | ||
count(*) | ||
2 | ||
|
||
mysql> drop table if exists test.t |