Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: SELECT * FROM BUG_12595 WHERE a LIKE 'ha|%an' ESCAPE '|';The query result is empty #272

Closed
1 task
shangyanwen opened this issue Jul 21, 2022 · 3 comments
Assignees
Labels
A-bug Something isn't working

Comments

@shangyanwen
Copy link
Contributor

Describe the problem

SET @OLD_SQL_MODE12595=@@SQL_MODE, @@SQL_MODE='';
SHOW LOCAL VARIABLES LIKE 'SQL_MODE';

CREATE TABLE BUG_12595(a varchar(100))engine=stonedb;
INSERT INTO BUG_12595 VALUES ('hakan%'), ('hakank'), ("ha%an");

SELECT * FROM BUG_12595 WHERE a LIKE 'ha|%an' ESCAPE '|';
##test result
Empty set (0.02 sec)

Expected behavior

##innodb test result
mysql> SELECT * FROM BUG_12595 WHERE a LIKE 'ha|%an' ESCAPE '|';
+-------+
| a     |
+-------+
| ha%an |
+-------+
1 row in set (0.07 sec)

How To Reproduce

SET @OLD_SQL_MODE12595=@@SQL_MODE, @@SQL_MODE='';
SHOW LOCAL VARIABLES LIKE 'SQL_MODE';

CREATE TABLE BUG_12595(a varchar(100))engine=stonedb;
INSERT INTO BUG_12595 VALUES ('hakan%'), ('hakank'), ("ha%an");

SELECT * FROM BUG_12595 WHERE a LIKE 'ha|%an' ESCAPE '|';

Environment

  1. StoneDB for mysql5.7 (release)
  2. Ubuntu 20.04.4

Are you interested in submitting a PR to solve the problem?

  • Yes, I will!
@shangyanwen shangyanwen added the A-bug Something isn't working label Jul 21, 2022
@konghaiya konghaiya self-assigned this Sep 27, 2022
@shangyanwen shangyanwen added this to the stonedb_5.7_v1.0.1 milestone Sep 29, 2022
@RingsC RingsC assigned adofsauron and unassigned konghaiya Nov 23, 2022
@adofsauron
Copy link
Collaborator

ACK

@adofsauron
Copy link
Collaborator

the same as #271

mergify bot pushed a commit that referenced this issue Nov 25, 2022
    Reasons: The escape character is not properly passed to the tianmu blur match handler
@RingsC
Copy link
Contributor

RingsC commented Nov 25, 2022

fixed in PR #1002 . and close it manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants