MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
Find a file
unknown 810fc001d9 Fix for bug#20390 "SELECT FOR UPDATE does not release locks
of untouched rows in full table scans".

SELECT ... FOR UPDATE/LOCK IN SHARE MODE statements as well as
UPDATE/DELETE statements which were executed using full table
scan were not releasing locks on rows which didn't satisfy
WHERE condition.
This bug surfaced in 5.0 and affected NDB tables. (InnoDB tables
intentionally don't support such unlocking in default mode).

This problem occured because code implementing join didn't call
handler::unlock_row() for rows which didn't satisfy part of condition
attached to this particular table/level of nested loop. So we solve
the problem adding this call.
Note that we already had this call in place in 4.1 but it was lost
(actually not quite correctly placed) when we have introduced nested 
joins.

Also note that additional QA should be requested once this patch is
pushed as interaction between handler::unlock_row() and many recent
MySQL features such as subqueries, unions, views is not tested enough.


mysql-test/r/ndb_lock.result:
  Enabled back part of the test that covers bug #20390 "SELECT FOR
  UPDATE does not release locks of untouched rows in full table scans".
  Adjusted test in such way that it now covers both execution paths
  in which we unlock non-matching rows inspected during table scan.
mysql-test/t/ndb_lock.test:
  Enabled back part of the test that covers bug #20390 "SELECT FOR
  UPDATE does not release locks of untouched rows in full table scans".
  Adjusted test in such way that it now covers both execution paths
  in which we unlock non-matching rows inspected during table scan.
sql/sql_select.cc:
  evaluate_join_record() should call handler::unlock_row() for records
  which don't satisfy condition which was pushed-down to this table/level
  of nested loop.
  We just put back the thing that we already have in 4.1 and which was lost
  when we have introduced nested joins.
2007-01-15 12:32:38 +03:00
bdb gen_rec.awk: 2006-11-27 18:29:50 +01:00
BitKeeper Merge mysql.com:/home/bk/MERGE/mysql-4.1-merge 2006-11-13 17:54:01 +01:00
BUILD Remove compiler warnings 2006-11-20 22:42:06 +02:00
client Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0 2006-11-27 21:45:16 +01:00
cmd-line-utils Remove compiler warnings 2006-11-20 22:42:06 +02:00
config/ac-macros ha_innodb.m4, Makefile.am, ha_ndbcluster.m4, Makefile.shared, ha_berkeley.m4: 2006-11-27 21:15:25 +01:00
dbug Remove compiler warnings 2006-11-20 22:42:06 +02:00
Docs Merge mysql.com:/home/kent/bk/mysql-4.1-build 2006-11-28 18:07:50 +01:00
extra Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0 2006-11-27 21:45:16 +01:00
heap Remove compiler warnings 2006-11-20 22:42:06 +02:00
include Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0 2006-11-27 21:45:16 +01:00
innobase Merge trift2.:/MySQL/M50/clone-5.0 2006-11-14 12:47:53 +01:00
libmysql Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2006-11-29 02:44:12 +03:00
libmysql_r Merge mysql.com:/home/kent/bk/mysql-4.1 2006-11-27 18:47:07 +01:00
libmysqld Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2006-11-29 02:44:12 +03:00
man Makefile.am, configure.in: 2006-07-28 23:12:40 +02:00
myisam Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2006-11-20 22:46:52 +02:00
myisammrg Remove compiler warnings 2006-11-20 22:42:06 +02:00
mysql-test Fix for bug#20390 "SELECT FOR UPDATE does not release locks 2007-01-15 12:32:38 +03:00
mysys Remove compiler warnings 2006-11-20 22:42:06 +02:00
ndb Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0 2006-11-27 21:45:16 +01:00
netware netware/BUILD/nwbootstrap : Editing "mwenv" is now obsolete and even plain wrong - drop it. 2006-11-28 18:36:53 +01:00
os2 Merge 2005-09-29 03:20:31 +02:00
pstack Makefile.am, configure.in: 2005-09-24 15:51:45 +02:00
regex Remove compiler warnings 2006-11-20 22:42:06 +02:00
scripts Merge kahlann.erinye.com:/home/df/mysql/build/mtr-4.1 2006-11-14 14:48:29 +01:00
server-tools Fix Bug #19044 IM aborts on exit 2006-12-04 19:48:49 +03:00
sql Fix for bug#20390 "SELECT FOR UPDATE does not release locks 2007-01-15 12:32:38 +03:00
sql-bench Set thread_stack after return from end_thread() 2005-12-03 18:13:06 +02:00
sql-common Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0 2006-11-27 21:45:16 +01:00
SSL Remove client-req-pem and server-req.pem 2006-05-03 11:53:16 +02:00
strings Merge bk-internal:/home/bk/mysql-5.0 2006-11-27 16:25:52 +01:00
support-files Merge trift2.:/MySQL/M41/bug22081-4.1 2006-11-16 14:38:15 +01:00
tests A fix and a test case for Bug#24179 "select b into $var" fails with 2006-12-01 13:25:06 +03:00
tools Bug#19575 MySQL-shared-5.0.21-0.glibc23 causes segfault in SSL_library_init 2006-05-31 16:19:06 +02:00
VC++Files Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0 2006-08-06 16:47:49 +02:00
vio Remove compiler warnings 2006-11-20 22:42:06 +02:00
win Additional files for cmake support 2006-08-31 19:52:42 +02:00
zlib Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint 2006-09-18 10:37:26 +05:00
.bzrignore Remove compiler warnings 2006-11-20 22:42:06 +02:00
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
CMakeLists.txt Merge mysql.com:/Users/kent/mysql/bk/mysql-5.0.27-release 2006-10-21 01:13:50 +02:00
configure.in gen_rec.awk: 2006-11-27 18:29:50 +01:00
COPYING - manual.texi will be replaced with a manual written in DocBook/XML. This ChangeSet removes all 2005-04-13 11:51:38 +02:00
Makefile.am Merge bk@192.168.21.1:mysql-5.0-opt 2006-11-17 10:30:16 +04:00
README make_binary_distribution.sh: 2006-11-07 22:26:37 +01:00

This is a release of MySQL, a dual-license SQL database server.
MySQL is brought to you by the MySQL team at MySQL AB.

License information can be found in these files:
- For GPL (free) distributions, see the COPYING file and
  the EXCEPTIONS-CLIENT file.
- For commercial distributions, see the LICENSE.mysql file.


For further information about MySQL or additional documentation, see:
- The latest information about MySQL: http://www.mysql.com
- The current MySQL documentation: http://dev.mysql.com/doc

Some manual sections of special interest:

- If you are migrating from an older version of MySQL, please read the
  "Upgrading from..." section first!
- To see what MySQL can do, take a look at the features section.
- For installation instructions, see the Installing and Upgrading chapter.
- For the new features/bugfix history, see the Change History appendix.
- For the currently known bugs/misfeatures (known errors) see the Problems
  and Common Errors appendix.
- For a list of developers and other contributors, see the Credits
  appendix.

A local copy of the MySQL Reference Manual can be found in the Docs
directory in GNU Info format.  You can also browse the manual online or
download it in any of several formats at the URL given earlier in this
file.

************************************************************

IMPORTANT:

Bug or error reports should be sent to http://bugs.mysql.com.