diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-08-14 09:16:07 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-08-14 09:16:07 +0200 |
commit | 47a1087ff6c402eda6ac2229fc132defc97dadf9 (patch) | |
tree | 1527c67845a816a5b04ead37f3769a0e3060e588 /sql/sql_base.cc | |
parent | 72290cd14b2acbc1b2ba80b6ad9944018fe3b82b (diff) | |
parent | 191f7b0fc1a1c319ea360ffe5440280a26703506 (diff) | |
download | mariadb-git-47a1087ff6c402eda6ac2229fc132defc97dadf9.tar.gz |
Merge branch 'bb-10.0-serg' into 10.0
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 21a004c4ec6..6ec94016366 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. Copyright (c) 2010, 2016, MariaDB This program is free software; you can redistribute it and/or modify @@ -4851,6 +4851,15 @@ handle_view(THD *thd, Query_tables_list *prelocking_ctx, &table_list->view->sroutines_list, table_list->top_table()); } + + /* + If a trigger was defined on one of the associated tables then assign the + 'trg_event_map' value of the view to the next table in table_list. When a + Stored function is invoked, all the associated tables including the tables + associated with the trigger are prelocked. + */ + if (table_list->trg_event_map && table_list->next_global) + table_list->next_global->trg_event_map= table_list->trg_event_map; return FALSE; } |