Commit aedf3143 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-16708: spurious ER_NEED_REPREPARE for gtid_slave_pos and event_scheduler

do not try to detect metadata change (and reprepare) for
internal short-lived TABLE_LIST objects that couldn't have
possibly lived long enough to see prepare and cache the metadata.
parent 510662e8
# Can't test with embedded server that doesn't support grants
-- source include/not_embedded.inc
--disable_ps_protocol
call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted");
let $collation_server=`select @@collation_server`;
......@@ -172,4 +171,3 @@ select name, originator, status from mysql.event;
# Cleanup
drop event ev;
--enable_ps_protocol
......@@ -2815,7 +2815,13 @@ static bool
check_and_update_table_version(THD *thd,
TABLE_LIST *tables, TABLE_SHARE *table_share)
{
if (! tables->is_table_ref_id_equal(table_share))
/*
First, verify that TABLE_LIST was indeed *created by the parser* -
it must be in the global TABLE_LIST list. Standalone TABLE_LIST objects
created with TABLE_LIST::init_one_table() have a short life time and
aren't linked anywhere.
*/
if (tables->prev_global && !tables->is_table_ref_id_equal(table_share))
{
if (thd->m_reprepare_observer &&
thd->m_reprepare_observer->report_error(thd))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment