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
create table t1
(
a int primary key,
b char(10)
);
prepare stmt4 from 'update t1 set a=? where b=?';
set @arg1=55, @arg2='five';
execute stmt4 using @arg1, @arg2;
prepare stmt4 from 'create table t2 (a int)';
execute stmt4;
deallocate prepare stmt4;
set global max_prepared_stmt_count=1;
prepare stmt from "select 1";
In the internal of TiDB, each prepared statement has a unique ID, and TiDB uses these ID to count how many statements there.
So if we run 2 prepare statements with the same statement name twice, TiDB will create 2 different prepared statements internally, and the count becomes to 2.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
ref #39736
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
#39736
The text was updated successfully, but these errors were encountered: