1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

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).
This commit is contained in:
Konstantin Osipov
2009-12-08 17:13:12 +03:00
parent b9895d46c1
commit c20afa6d49
12 changed files with 790 additions and 418 deletions

View File

@ -1052,6 +1052,17 @@ public:
}
}
/** Return a pointer to the last element in query table list. */
TABLE_LIST *last_table()
{
/* Don't use offsetof() macro in order to avoid warnings. */
return query_tables ?
(TABLE_LIST*) ((char*) query_tables_last -
((char*) &(query_tables->next_global) -
(char*) query_tables)) :
0;
}
/**
Has the parser/scanner detected that this statement is unsafe?
*/
@ -1751,6 +1762,12 @@ struct LEX: public Query_tables_list
bool subqueries, ignore;
st_parsing_options parsing_options;
Alter_info alter_info;
/*
For CREATE TABLE statement last element of table list which is not
part of SELECT or LIKE part (i.e. either element for table we are
creating or last of tables referenced by foreign keys).
*/
TABLE_LIST *create_last_non_select_table;
/* Prepared statements SQL syntax:*/
LEX_STRING prepared_stmt_name; /* Statement name (in all queries) */
/*