2758 Davi Arnaut 2008-10-02 [merge]
Merge from main branch.
modified:
include/hash.h
mysql-test/mysql-test-run.pl
mysql-test/r/create.result
mysql-test/r/information_schema_db.result
mysql-test/t/create.test
mysql-test/t/information_schema_db.test
mysys/hash.c
sql/handler.cc
sql/mysql_priv.h
sql/sql_parse.cc
sql/sql_show.cc
sql/sql_yacc.yy
=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc 2008-09-29 13:53:40 +0000
+++ b/sql/sql_base.cc 2008-10-02 19:13:42 +0000
@@ -3720,6 +3720,18 @@ void assign_new_table_id(TABLE_SHARE *sh
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
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);
}
-#ifndef DBUG_OFF
- /* 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
+ DBUG_EXECUTE_IF("reprepare_each_statement", return inject_reprepare(thd););
return FALSE;
}
| Thread |
|---|
| • bzr push into mysql-5.1 branch (davi:2758) | Davi Arnaut | 2 Oct |