Commit 8b9db117 authored by Sergei Petrunia's avatar Sergei Petrunia

MDEV-21341: Fix optimizer-related UBSAN failures, part #2

Remove Query_tables_list::lock_tables_state - it is not used and it causes
errors like this:

sql_lex.h:1675:7: runtime error: load of value 2779096485, which is not a
valid value for type 'enum_lock_tables_state'
parent 0ac0bc8c
......@@ -1190,28 +1190,6 @@ class Query_tables_list
Sroutine_hash_entry **sroutines_list_own_last;
uint sroutines_list_own_elements;
/**
Locking state of tables in this particular statement.
If we under LOCK TABLES or in prelocked mode we consider tables
for the statement to be "locked" if there was a call to lock_tables()
(which called handler::start_stmt()) for tables of this statement
and there was no matching close_thread_tables() call.
As result this state may differ significantly from one represented
by Open_tables_state::lock/locked_tables_mode more, which are always
"on" under LOCK TABLES or in prelocked mode.
*/
enum enum_lock_tables_state {
LTS_NOT_LOCKED = 0,
LTS_LOCKED
};
enum_lock_tables_state lock_tables_state;
bool is_query_tables_locked()
{
return (lock_tables_state == LTS_LOCKED);
}
/**
Number of tables which were open by open_tables() and to be locked
by lock_tables().
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment