diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-12-09 19:00:46 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-12-09 19:00:46 +0300 |
commit | b9d2f55a9d98c2a8fe4d67de51e7e7b84d2b7440 (patch) | |
tree | dc2ce09da5a4bdc6df0682821cabff45fcb7658e /mysys/safemalloc.c | |
parent | e001a9f0d076b50dd35eb21d5f03619dffc14410 (diff) | |
download | mariadb-git-b9d2f55a9d98c2a8fe4d67de51e7e7b84d2b7440.tar.gz |
------------------------------------------------------------
revno: 2617.68.23
committer: Dmitry Lenev <dlenev@mysql.com>
branch nick: mysql-next-bg-pre1
timestamp: Wed 2009-09-16 09:34:42 +0400
message:
Pre-requisite patch for fixing bug #30977 "Concurrent statement
using stored function and DROP FUNCTION breaks SBR".
CREATE TABLE SELECT statements take exclusive metadata lock on table
being created. Invariant of metadata locking subsystem states that
such lock should be taken before taking any kind of shared locks.
Once metadata locks on stored routines are introduced statements like
"CREATE TABLE ... SELECT f1()" will break this invariant by taking
shared locks on routines before exclusive lock on target table.
To avoid this, open_tables() is reworked to process tables which are
directly used by the statement before stored routines are processed.
sql/sql_base.cc:
Refactored open_tables() implementation to process stored routines
only after tables which are directly used by statement were processed.
To achieve this moved handling of routines in open_tables() out of
loop which iterates over tables to a new separate loop. And in its
turn this allowed to split handling of particular table or view to
an auxiliary function, which made code in open_tables() simpler and
more easy to understand.
Diffstat (limited to 'mysys/safemalloc.c')
0 files changed, 0 insertions, 0 deletions