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
{{ message }}
Repository navigation
[Feature Request]: explain a prepared statement #22765
Is there an existing issue for the same feature request?
I have checked the existing issues.
Is your feature request related to a problem?
mysql> prepare stmt from 'select * from t where j % 100 = ? and i = (select max(i) from t where j % 100 = ?)';
mysql> set @a = 1;
Query OK, 0 rows affected (0.00 sec)
mysql> execute stmt using @a, @a;
+---------+---------+---------+
| i | j | k |
+---------+---------+---------+
| 5000000 | 5000001 | 5000002 |
+---------+---------+---------+
1 row in set (0.02 sec)
This is all good, except we cannot explain the prepared statement.
Describe the feature you'd like
We want to be able to run
mysql> explain execute stmt using @A, @A;
ERROR 1064 (HY000): SQL parser error: You have an error in your SQL syntax; check the manual that corresponds to your MatrixOne server version for the right syntax to use. syntax error at line 1 column 26 near " using @A, @A";
Describe implementation you've considered
No response
Documentation, Adoption, Use Case, Migration Strategy
Activity
fengttt commentedon Nov 6, 2025
Correct syntax,
explain ANALYZE FORCE execute stmt using @A, @A;