summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-06-20 09:34:33 +0200
committerSergei Golubchik <serg@mariadb.org>2022-06-20 11:11:53 +0200
commitf7d2374083184261897e86bced158d9ae2c4aaaf (patch)
tree29dee8743274929c78c64eb4af0403a2c0f24920
parentdb2a0e701cf7577ec83f42d9e4b3910aeae990dc (diff)
downloadmariadb-git-f7d2374083184261897e86bced158d9ae2c4aaaf.tar.gz
fixup! MDEV-28883 Re-design the upper level of handling UPDATE and DELETE statements
compilation failure (fall-through) and ubsan failure (load of value 2779096485, which is not a valid value for type 'enum_lock_tables_state')
-rw-r--r--sql/sql_lex.cc1
-rw-r--r--sql/sql_lex.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 070cf524f2f..78c067ac0c9 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -4074,6 +4074,7 @@ bool LEX::can_not_use_merged(bool no_update_or_delete)
(m_sql_cmd->sql_command_code() == SQLCOM_UPDATE_MULTI ||
query_tables->is_multitable()))
return TRUE;
+ /* Fall through */
default:
return FALSE;
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 0badc320c73..e733b4fc53f 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -1782,7 +1782,7 @@ public:
These constructor and destructor serve for creation/destruction
of Query_tables_list instances which are used as backup storage.
*/
- Query_tables_list() {}
+ Query_tables_list() : lock_tables_state(LTS_NOT_LOCKED) {}
~Query_tables_list() {}
/* Initializes (or resets) Query_tables_list object for "real" use. */