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: incorrect result set.Insert value has space, delete space when select, query result is not displayed #247

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

Comments

@shangyanwen
Copy link
Contributor

Describe the problem

create table t3(s varchar(10) not null primary key)engine=stonedb;
insert into t3 values ('one '), ('two\t');
select * from t3 where s = 'one';           (note:No result is displayed)
Empty set (0.00 sec)        

Expected behavior

select * from t3 where s = 'one';
+------+
| s    |
+------+
| one  |
+------+
1 row in set (0.00 sec)

note:Above is the result of the InnoDB test run

How To Reproduce

create table t3(s varchar(10) not null primary key)engine=stonedb;
insert into t3 values ('one '), ('two\t');
select * from t3 where s = 'one'; 

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 19, 2022
@lylth lylth self-assigned this Sep 27, 2022
@shangyanwen shangyanwen changed the title bug: Insert value has space, delete space when select, query result is not displayed bug: incorrect result set.Insert value has space, delete space when select, query result is not displayed Sep 29, 2022
@shangyanwen shangyanwen added this to the stonedb_5.7_v1.0.1 milestone Sep 29, 2022
@lylth
Copy link
Contributor

lylth commented Oct 9, 2022

stonedb supports strict sql mode, when the inserted string contains spaces, the query should also contain spaces

mysql> insert into t3 values ('one '), ('two\t');
Query OK, 2 rows affected (0.00 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> select * from t3 where s = 'one ';
+------+
| s    |
+------+
| one  |
+------+
1 row in set (3 min 2.58 sec)

mysql> select * from t3 where s = 'two\t';
+------+
| s    |
+------+
| two    |
+------+
1 row in set (6.16 sec)

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

2 participants