You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
1. What did you do?
droptable if exists t;
createtablet(a char(2) binary primary key, b char(2));
insert into t values("", "");
insert into t values("a ", "b ");
-- case 1:set @@sql_mode="";
select*from t tmp where a ="a ";
-- case 2:set @@sql_mode="PAD_CHAR_TO_FULL_LENGTH";
select*from t tmp where a ="a ";
2. What did you expect to see?
In MySQL the results of case 1 and case 2 are not empty:
MySQL(root@localhost:test) >-- case 1:
MySQL(root@localhost:test) >set @@sql_mode="";
Query OK, 0 rows affected (0.00 sec)
MySQL(root@localhost:test) >select*from t tmp where a ="a ";
+---+------+
| a | b |
+---+------+
| a | b |
+---+------+1 row inset (0.00 sec)
MySQL(root@localhost:test) >-- case 2:
MySQL(root@localhost:test) >set @@sql_mode="PAD_CHAR_TO_FULL_LENGTH";
Query OK, 0 rows affected (0.00 sec)
MySQL(root@localhost:test) >select*from t tmp where a ="a ";
+----+------+
| a | b |
+----+------+
| a | b |
+----+------+1 row inset (0.00 sec)
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. What did you do?
2. What did you expect to see?
In MySQL the results of case 1 and case 2 are not empty:
MySQL version:
3. What did you see instead?
In TiDB both results are empty:
4. What version of TiDB are you using?
The text was updated successfully, but these errors were encountered: