Please answer these questions before submitting your issue. Thanks!
1. What did you do?
When browsing statements in the tidb-dashboard, the tidb-server will panic when plan cache is enabled. The minimal test-case is as follows:
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
id INT NOT NULL PRIMARY KEY auto_increment,
a timestamp NOT NULL
);
INSERT INTO t1 VALUES (null, '2020-05-30 20:30:00');
PREPARE mystmt FROM "SELECT * FROM t1 WHERE UNIX_TIMESTAMP(a) >= ?";
SET @a=1590868800;
EXECUTE mystmt USING @a;
(I will also upload the full test-case, which shows the original query generated by tidb-dashboard).
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. What did you do?
When browsing statements in the tidb-dashboard, the tidb-server will panic when plan cache is enabled. The minimal test-case is as follows:
(I will also upload the full test-case, which shows the original query generated by tidb-dashboard).
2. What did you expect to see?
No panic.
3. What did you see instead?
4. What version of TiDB are you using? (
tidb-server -V
or runselect tidb_version();
on TiDB)panic.txt