diff options
author | Dmitry Lenev <dlenev@mysql.com> | 2010-05-21 16:41:24 +0400 |
---|---|---|
committer | Dmitry Lenev <dlenev@mysql.com> | 2010-05-21 16:41:24 +0400 |
commit | 705b98dff714298a9b9e77cab364a05f439c3b7b (patch) | |
tree | 23df0e72499a1f25870f5e09512eae5871f70fa6 /sql/sp_head.h | |
parent | 1bfe9789ff917b97ed9def4194fc7d95fa866f7b (diff) | |
download | mariadb-git-705b98dff714298a9b9e77cab364a05f439c3b7b.tar.gz |
Follow-up for the fix for bug #46947 "Embedded SELECT without
FOR UPDATE is causing a lock".
This patch tries to address problems which were exposed
during backporting of original patch to 5.1 tree.
- It ensures that we don't change locking behavior of simple
SELECT statements on InnoDB tables when they are executed
under LOCK TABLES ... READ and with @@innodb_table_locks=0.
Also we no longer pass TL_READ_DEFAULT/TL_WRITE_DEFAULT
lock types, which are supposed to be parser-only, to
handler::start_stmt() method.
- It makes check_/no_concurrent_insert.inc auxiliary scripts
more robust against changes in test cases that use them
and also ensures that they don't unnecessarily change
environment of caller.
mysql-test/include/check_concurrent_insert.inc:
Reset DEBUG_SYNC facility before and after using it in
auxiliary script. This makes this script more robust against
changes in test cases calling it. It also ensures that script
does not unnecessarily change environment of caller.
mysql-test/include/check_no_concurrent_insert.inc:
Reset DEBUG_SYNC facility before and after using it in
auxiliary script. This makes this script more robust against
changes in test cases calling it. It also ensures that script
does not unnecessarily change environment of caller.
mysql-test/r/innodb-lock.result:
Added coverage for LOCK TABLES ... READ behavior in
@@innodb_table_locks = 0 mode. This test also checks
that an appropriate type of lock is passed to
handler::start_stmt() method.
mysql-test/t/innodb-lock.test:
Added coverage for LOCK TABLES ... READ behavior in
@@innodb_table_locks = 0 mode. This test also checks
that an appropriate type of lock is passed to
handler::start_stmt() method.
sql/sql_base.cc:
Since we no longer set TL_READ as lock type for tables used
in simple SELECT right in the parser, in order to preserve
behavior for such statements on InnoDB tables when in
LOCK TABLES mode with @innodb_table_locks = 0,
check_lock_and_start_stmt() had to be changed to convert
TL_READ_DEFAULT to an appropriate type of read lock before
passing it to handler::start_stmt() method.
We do similar thing for TL_WRITE_DEFAULT as this lock type
is also supposed to be parser-only type.
As consequence read_lock_type_for_table() had to be
adjusted to behave properly when it is called from
check_lock_and_start_stmt() in prelocked mode.
Diffstat (limited to 'sql/sp_head.h')
0 files changed, 0 insertions, 0 deletions