diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-04-04 22:41:58 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-04-24 11:15:38 +0200 |
commit | 5057d4637525eadad438d25ee6a4870a4e6b384c (patch) | |
tree | a656a8c9f563a10bd9fb4de64f94b0779860f2ce /sql/sql_lex.h | |
parent | 822071ca5b6d109e5497f1c15efa44fe47d277c5 (diff) | |
download | mariadb-git-5057d4637525eadad438d25ee6a4870a4e6b384c.tar.gz |
bugfix: multi-update checked privileges on views incorrectly
it always required UPDATE privilege on views, not being able to detect
when a views was not actually updated in multi-update.
fix: instead of marking all tables as "updating" by default,
only set "updating" on tables that will actually be updated
by multi-update. And mark the view "updating" if any of the
view's tables is.
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 5b589714e1a..c20994d1ff9 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -589,7 +589,7 @@ public: enum_mdl_type mdl_type= MDL_SHARED_READ, List<Index_hint> *hints= 0, LEX_STRING *option= 0); - virtual void set_lock_for_tables(thr_lock_type lock_type) {} + virtual void set_lock_for_tables(thr_lock_type lock_type, bool for_update) {} friend class st_select_lex_unit; friend bool mysql_new_select(LEX *lex, bool move_down); @@ -960,7 +960,7 @@ public: TABLE_LIST *convert_right_join(); List<Item>* get_item_list(); ulong get_table_join_options(); - void set_lock_for_tables(thr_lock_type lock_type); + void set_lock_for_tables(thr_lock_type lock_type, bool for_update); inline void init_order() { order_list.elements= 0; |