Skip to content

Commit 38c02fb

Browse files
authored
sql-statement-create-binding: add note about truncation (#21825) (#21857)
1 parent 232b7fc commit 38c02fb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sql-statements/sql-statement-create-binding.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ mysql> SELECT @@LAST_PLAN_FROM_BINDING;
168168

169169
```
170170

171+
## SQL statement truncation
172+
173+
When you use `CREATE BINDING ... FROM HISTORY USING PLAN DIGEST`, the binding can fail if the SQL statement stored in [statement summary tables](/statement-summary-tables.md) for that digest is truncated because it is longer than [`tidb_stmt_summary_max_sql_length`](/system-variables.md#tidb_stmt_summary_max_sql_length-new-in-v40). In this case, you need to increase `tidb_stmt_summary_max_sql_length`.
174+
171175
## MySQL compatibility
172176

173177
This statement is a TiDB extension to MySQL syntax.

0 commit comments

Comments
 (0)