1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-16708: fixed issue with handling of the directive --enable-prepared-warnings in mysqltest

This commit is contained in:
Dmitry Shulga
2021-06-07 00:39:15 +07:00
committed by Sergei Golubchik
parent fc71746a6a
commit b126c3f3fa
50 changed files with 141 additions and 7 deletions

View File

@ -63,6 +63,7 @@ drop view if exists v1, v2;
TRUNCATE TABLE mysql.general_log;
delimiter |;
--enable_prepare_warnings
create procedure p_verify_reprepare_count(expected int)
begin
declare old_reprepare_count int default @reprepare_count;
@ -80,6 +81,7 @@ begin
select '' as "SUCCESS";
end if;
end|
--disable_prepare_warnings
delimiter ;|
set @reprepare_count= 0;
flush status;
@ -902,14 +904,18 @@ begin
return x;
end|
delimiter ;|
--enable_prepare_warnings
create procedure p1(out x int) select max(a) from t1 into x;
--disable_prepare_warnings
prepare stmt from "select * from v1";
execute stmt;
execute stmt;
call p_verify_reprepare_count(0);
drop procedure p1;
--enable_prepare_warnings
create procedure p1(out x int) select max(a) from t2 into x;
--disable_prepare_warnings
--echo # XXX: used to be a bug. The prelocked list was not invalidated
--echo # and we kept opening table t1, whereas the procedure
--echo # is now referring to table t2