diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-09-11 20:53:16 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-09-12 16:42:04 +0200 |
commit | 611dc0dcf4b39c670daf229f10e43b8b33f6e8c3 (patch) | |
tree | 3f7298e86fb0341d38c2b6892cbf4bd872f0664d /sql | |
parent | a2290919533df16afdfdbd0679f80734b5a36109 (diff) | |
download | mariadb-git-611dc0dcf4b39c670daf229f10e43b8b33f6e8c3.tar.gz |
missing element in prelocked_mode_name[] array
different fix for a63a250d40:
BUG#23509275 :DBUG_PRINT in THD::decide_logging_format prints incorrectly, access out-of-bound
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_class.cc | 2 | ||||
-rw-r--r-- | sql/sql_class.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 05a8ee8091c..62339b2690a 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -4736,9 +4736,11 @@ int THD::decide_logging_format(TABLE_LIST *tables) { static const char *prelocked_mode_name[] = { "NON_PRELOCKED", + "LOCK_TABLES", "PRELOCKED", "PRELOCKED_UNDER_LOCK_TABLES", }; + compile_time_assert(array_elements(prelocked_mode_name) == LTM_always_last); DBUG_PRINT("debug", ("prelocked_mode: %s", prelocked_mode_name[locked_tables_mode])); } diff --git a/sql/sql_class.h b/sql/sql_class.h index da83382d5e9..27bc40e3761 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1075,7 +1075,8 @@ enum enum_locked_tables_mode LTM_NONE= 0, LTM_LOCK_TABLES, LTM_PRELOCKED, - LTM_PRELOCKED_UNDER_LOCK_TABLES + LTM_PRELOCKED_UNDER_LOCK_TABLES, + LTM_always_last }; |