summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 5ee4f3dea02..afa9777e00a 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -198,6 +198,19 @@ bool foreign_key_prefix(Key *a, Key *b)
** Thread specific functions
****************************************************************************/
+/** Push an error to the error stack and return TRUE for now. */
+
+bool
+Reprepare_observer::report_error(THD *thd)
+{
+ my_error(ER_NEED_REPREPARE, MYF(ME_NO_WARNING_FOR_ERROR|ME_NO_SP_HANDLER));
+
+ m_invalidated= TRUE;
+
+ return TRUE;
+}
+
+
Open_tables_state::Open_tables_state(ulong version_arg)
:version(version_arg), state_flags(0U)
{
@@ -2770,7 +2783,8 @@ void THD::restore_backup_open_tables_state(Open_tables_state *backup)
DBUG_ASSERT(open_tables == 0 && temporary_tables == 0 &&
handler_tables == 0 && derived_tables == 0 &&
lock == 0 && locked_tables == 0 &&
- prelocked_mode == NON_PRELOCKED);
+ prelocked_mode == NON_PRELOCKED &&
+ m_reprepare_observer == NULL);
set_open_tables_state(backup);
DBUG_VOID_RETURN;
}