MDEV-28405 main.information_schema_tables fails sporadically with ER_NEED_REPREPARE or extra warning

This commit is contained in:
Alexander Barkov 2022-04-25 09:08:09 +04:00
commit 3fec38d91d

View file

@ -24,9 +24,14 @@ LOOP
END LOOP $
--delimiter ;
--connection default
# Avoid "Prepared statement needs to be re-prepared"
# Note, the code could probably eventually fixed to avoid forcing re-pepare if
# the *temporary* instance of Sp_caches (not the permanent one) was invalidated.
--disable_ps_protocol
--disable_warnings
SELECT v.* FROM v JOIN INFORMATION_SCHEMA.TABLES WHERE DATA_LENGTH = -1;
--enable_warnings
--enable_ps_protocol
# Cleanup
--replace_result $conid CONID
--eval KILL $conid