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

Remove usage of the _db_strict_keyword_ in favor of the more reliable

DBUG_EXECUTE_IF macro. The usage of the former caused breakage in other
trees as it got removed from the dbug library.
This commit is contained in:
Davi Arnaut
2008-10-02 16:13:42 -03:00
parent f80fbfa282
commit 787fa9325f

View File

@ -3720,6 +3720,18 @@ void assign_new_table_id(TABLE_SHARE *share)
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
/* Cause a spurious statement reprepare for debug purposes. */
static inline bool inject_reprepare(THD *thd)
{
if (thd->m_reprepare_observer && thd->stmt_arena->is_reprepared == FALSE)
{
thd->m_reprepare_observer->report_error(thd);
return TRUE;
}
return FALSE;
}
/** /**
Compare metadata versions of an element obtained from the table Compare metadata versions of an element obtained from the table
definition cache and its corresponding node in the parse tree. definition cache and its corresponding node in the parse tree.
@ -3773,15 +3785,7 @@ check_and_update_table_version(THD *thd,
tables->set_table_ref_id(table_share); tables->set_table_ref_id(table_share);
} }
#ifndef DBUG_OFF DBUG_EXECUTE_IF("reprepare_each_statement", return inject_reprepare(thd););
/* Spuriously reprepare each statement. */
if (_db_strict_keyword_("reprepare_each_statement") &&
thd->m_reprepare_observer && thd->stmt_arena->is_reprepared == FALSE)
{
thd->m_reprepare_observer->report_error(thd);
return TRUE;
}
#endif
return FALSE; return FALSE;
} }