mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Patch to handle some bad situations resulting from the fix for BUG#19995.
sql/handler.cc: Generating table maps from all locks that can be available: THD::extra_lock, THD::lock, and THD::locked_tables. sql/sql_class.h: Adding member Open_tables:state::extra_lock to hold the extra lock used by select_create. Removing select_insert::lock. sql/sql_insert.cc: Adding member Open_tables:state::extra_lock to hold the extra lock used by select_create. Removing select_insert::lock.
This commit is contained in:
@@ -693,6 +693,14 @@ public:
|
||||
THD::prelocked_mode for more info.)
|
||||
*/
|
||||
MYSQL_LOCK *locked_tables;
|
||||
|
||||
/*
|
||||
CREATE-SELECT keeps an extra lock for the table being
|
||||
created. This field is used to keep the extra lock available for
|
||||
lower level routines, which would otherwise miss that lock.
|
||||
*/
|
||||
MYSQL_LOCK *extra_lock;
|
||||
|
||||
/*
|
||||
prelocked_mode_type enum and prelocked_mode member are used for
|
||||
indicating whenever "prelocked mode" is on, and what type of
|
||||
@@ -745,7 +753,7 @@ public:
|
||||
void reset_open_tables_state()
|
||||
{
|
||||
open_tables= temporary_tables= handler_tables= derived_tables= 0;
|
||||
lock= locked_tables= 0;
|
||||
extra_lock= lock= locked_tables= 0;
|
||||
prelocked_mode= NON_PRELOCKED;
|
||||
state_flags= 0U;
|
||||
}
|
||||
@@ -1591,9 +1599,6 @@ class select_insert :public select_result_interceptor {
|
||||
bool send_eof();
|
||||
/* not implemented: select_insert is never re-used in prepared statements */
|
||||
void cleanup();
|
||||
|
||||
protected:
|
||||
MYSQL_LOCK *lock;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user