diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-12-08 17:13:12 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-12-08 17:13:12 +0300 |
commit | 302352723e8fbf69b9d02604c84a79fa56e69b7b (patch) | |
tree | a89672143d8c1f4bec0ae0ba85c2a1f992845d5d /sql/sp_head.h | |
parent | 97d2a9233bea5937f136ecc513fcbb28481b9289 (diff) | |
download | mariadb-git-302352723e8fbf69b9d02604c84a79fa56e69b7b.tar.gz |
Backport of:
----------------------------------------------------------
revno: 2617.69.24
committer: Konstantin Osipov <kostja@sun.com>
branch nick: 5.4-42546
timestamp: Fri 2009-08-14 19:22:05 +0400
message:
A pre-requisite for a fix for Bug#42546 "Backup: RESTORE fails, thinking it
finds an existing table"
Back-port from WL 148 "Foreign keys" feature tree a patch
that introduced Prelocking_strategy class -- a way to parameterize
open_tables() behaviour, implemented by Dmitry Lenev.
(Part of WL#4284).
sql/sql_base.cc:
Implement different prelocking strategies. Use an instance of
prelocking_strategy in open_tables().
sql/sql_class.h:
Add declarations for class Prelocking_strategy.
sql/sql_lex.h:
Add a helper method to access last table of the global table list
(lex->query_tables).
sql/sql_parse.cc:
Use a special prelocking strategy when locking tables for LOCK TABLES.
sql/sql_table.cc:
Use normal open_and_lock_tables_derived() in ALTER TABLE.
sql/sql_yacc.yy:
Modify the grammar to not pollute the global table list with tables
that should not be opened.
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r-- | sql/sp_head.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h index dd11f8693ac..5610ecd2a72 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -454,10 +454,10 @@ public: /* This method is intended for attributes of a routine which need - to propagate upwards to the LEX of the caller (when a property of a - sp_head needs to "taint" the caller). + to propagate upwards to the Query_tables_list of the caller (when + a property of a sp_head needs to "taint" the calling statement). */ - void propagate_attributes(LEX *lex) + void propagate_attributes(Query_tables_list *prelocking_ctx) { /* If this routine needs row-based binary logging, the entire top statement @@ -466,7 +466,7 @@ public: the substatements not). */ if (m_flags & BINLOG_ROW_BASED_IF_MIXED) - lex->set_stmt_unsafe(); + prelocking_ctx->set_stmt_unsafe(); } |