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!
What did you do?
start tidb-server with plan cache enabled;
create session 1, and execute:
mysql> create table t(a int, b int);
Query OK, 0 rows affected (0.05 sec)
mysql> prepare stmt from 'select * from t where a = (select a from t where a = ?)';
Query OK, 0 rows affected (0.01 sec)
mysql> set @param = 1;
Query OK, 0 rows affected (0.00 sec)
mysql> execute stmt using @param;
Empty set (0.00 sec)
keep session 1 connected, create session 2, and execute:
mysql> insert into t values(1,1);
Query OK, 1 row affected (0.00 sec)
back to session 1:
mysql> select * from t;
+------+------+
| a | b |
+------+------+
| 1 | 1 |
+------+------+
1 row in set (0.00 sec)
mysql> execute stmt using @param;
Empty set (0.00 sec)
mysql> select * from t where a = (select a from t where a = 1);
+------+------+
| a | b |
+------+------+
| 1 | 1 |
+------+------+
1 row in set (0.00 sec)
What did you expect to see?
second execute stmt using @param; in session 1 should return one row.
What did you see instead?
second execute stmt using @param; in session 1 returns empty result.
What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
mysql> select tidb_version();
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: None
Git Commit Hash: a4cff40a18da37b146ad763a8f7cd6756fdf569d
Git Branch: master
UTC Build Time: 2018-10-24 06:46:18
GoVersion: go version go1.11rc1 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
The text was updated successfully, but these errors were encountered:
Bug Report
Please answer these questions before submitting your issue. Thanks!
second
execute stmt using @param;
in session 1 should return one row.second
execute stmt using @param;
in session 1 returns empty result.tidb-server -V
or runselect tidb_version();
on TiDB)?The text was updated successfully, but these errors were encountered: