summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.(none)>2008-05-20 11:29:16 +0400
committerunknown <kostja@bodhi.(none)>2008-05-20 11:29:16 +0400
commit37b2c32d95200f91c6bd427783867e0d0d295c5c (patch)
treeaa69b884f7e82cd03745af3a77cf7d18e6236410 /sql/sql_base.cc
parent1c12291b2f39641d283590b528dc3ce63a687928 (diff)
downloadmariadb-git-37b2c32d95200f91c6bd427783867e0d0d295c5c.tar.gz
Bug#27430 "Crash in subquery code when in PS and table DDL changed after
PREPARE": rename members, methods, classes to follow the spec (a code review request) sql/mysql_priv.h: enum_metadata_type -> enum_table_ref_type sql/sp_head.cc: Metadata_version_observer -> Reprepare_observer sql/sql_base.cc: metadata -> table_ref sql/sql_class.cc: Replace an abstract interface with a concrete implementation. sql/sql_class.h: enum_metadata_type -> enum_table_ref_type sql/sql_prepare.cc: Move implementation of Execute_observer to sql_class.cc and rename the class to Reprepare_observer. Use getters instead of direct access to the members. sql/table.h: metadata -> table_ref
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index d7c4d899b0e..ebe090b9896 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -3737,8 +3737,8 @@ void assign_new_table_id(TABLE_SHARE *share)
@sa Execute_observer
@sa check_prepared_statement() to see cases when an observer is installed
- @sa TABLE_LIST::is_metadata_id_equal()
- @sa TABLE_SHARE::get_metadata_id()
+ @sa TABLE_LIST::is_table_ref_id_equal()
+ @sa TABLE_SHARE::get_table_ref_id()
@param[in] thd used to report errors
@param[in,out] tables TABLE_LIST instance created by the parser
@@ -3754,10 +3754,10 @@ bool
check_and_update_table_version(THD *thd,
TABLE_LIST *tables, TABLE_SHARE *table_share)
{
- if (! tables->is_metadata_id_equal(table_share))
+ if (! tables->is_table_ref_id_equal(table_share))
{
- if (thd->m_metadata_observer &&
- thd->m_metadata_observer->report_error(thd))
+ if (thd->m_reprepare_observer &&
+ thd->m_reprepare_observer->report_error(thd))
{
/*
Version of the table share is different from the
@@ -3768,14 +3768,14 @@ check_and_update_table_version(THD *thd,
return TRUE;
}
/* Always maintain the latest version and type */
- tables->set_metadata_id(table_share);
+ tables->set_table_ref_id(table_share);
}
#if 0
#ifndef DBUG_OFF
/* Spuriously reprepare each statement. */
- if (thd->m_metadata_observer && thd->stmt_arena->is_reprepared == FALSE)
+ if (thd->m_reprepare_observer && thd->stmt_arena->is_reprepared == FALSE)
{
- thd->m_metadata_observer->report_error(thd);
+ thd->m_reprepare_observer->report_error(thd);
return TRUE;
}
#endif
@@ -3865,7 +3865,7 @@ retry:
Note, the assert below is known to fail inside stored
procedures (Bug#27011).
*/
- DBUG_ASSERT(thd->m_metadata_observer);
+ DBUG_ASSERT(thd->m_reprepare_observer);
check_and_update_table_version(thd, table_list, share);
/* Always an error. */
DBUG_ASSERT(thd->is_error());