Skip to content

Binding from history can't work #41126

@fzzf678

Description

@fzzf678

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> prepare stmt from 'select min(2)';
Query OK, 0 rows affected (0.00 sec)

mysql> execute stmt;
+--------+
| min(2) |
+--------+
|      2 |
+--------+
1 row in set (0.01 sec)

mysql> select plan_digest from information_schema.statements_summary where query_sample_text = 'select min(2)';
+------------------------------------------------------------------+
| plan_digest                                                      |
+------------------------------------------------------------------+
| 924c7002fe994ab4e2fb723ad30548e3f1aae40ae6186a1c92520a669022d61d |
+------------------------------------------------------------------+
1 row in set (0.01 sec)

mysql> create binding from history using plan digest '924c7002fe994ab4e2fb723ad30548e3f1aae40ae6186a1c92520a669022d61d';
ERROR 1105 (HY000): binding failed: line 1 column 12 near "( ? )"

2. What did you expect to see? (Required)

Binding created success without error

3. What did you see instead (Required)

Error

4. What is your TiDB version? (Required)

master

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions