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 dd02b98d14 Fix for bug #12739 "Deadlock in multithreaded environment during creating/
droping trigger on InnoDB table".

Deadlock occured in cases when we were trying to create two triggers for
the same InnoDB table concurrently and both threads were able to reach
close_cached_table() simultaneously. Bugfix implements new approach to
table locking and table cache invalidation during creation/dropping
of trigger.

No testcase is supplied since bug was repeatable only under high concurrency.


sql/mysql_priv.h:
  reopen_name_locked_table():
    Changed function signature to make it more robust against erroneous usage.
sql/sql_base.cc:
  reopen_name_locked_table():
    Changed function signature to make it more robust against erroneous usage.
    Obtaining LOCK_open lock is now resposibility of caller.
    When searching for the table to open we should not prefer connection's current
    database over database which was explicitly specified in TABLE_LIST::db member
    (even if database is not explicitly specified for table in original query
    TABLE_LIST::db will be set properly at parsing stage).
    Fixed behavior of function in cases when error occurs during opening of table.
sql/sql_table.cc:
  prepare_for_restore()/prepare_for_repair():
    We should not prefer connection's current database over database which was
    specified in TABLE_LIST::db member (even if database is not explicitly
    specified for table in original query TABLE_LIST::db will be set properly
    at parsing stage). Fixed behavior in unlikely case when we are unable
    to open table which we are restoring/reparing at the end of preparation
    stage.
sql/sql_trigger.cc:
  mysql_create_or_drop_trigger():
    Now instead of opening and locking table, creating trigger, and then trying
    to invalidate all instances of this table in table cache, we obtain name
    lock on table first (thus ensuring that no other thread has this table
    open), open it, create trigger and then close table therefore releasing lock.
    New approach is more in line with other places where change .frm files
    (i.e. change table meta-data).
    With this change we also get rid of deadlock which occured in cases when we
    were trying to create two triggers for the same InnoDB table concurrently
    and both threads were able to reach close_cached_table() simultaneously.
    (Alternative was to forbid to InnoDB downgrade locks for CREATE/DROP
     TRIGGER statements in one way or another but I think that proposed
     solution is better long term).
2005-10-17 22:37:24 +04:00
bdb sql/mysql_priv.h 2005-06-09 15:48:57 +02:00
BitKeeper Merge mysql.com:/home/alexi/dev/mysql-4.1-0 2005-09-06 23:49:54 +04:00
BUILD Revert 2005-10-05 14:37:42 +02:00
client 4.1 -> 5.0 merge 2005-10-07 14:26:32 +05:00
cmd-line-utils Changed __USE_XOPEN to _XOPEN_SOURCE and got rid of 2005-10-04 20:22:39 +03:00
config/ac-macros Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0 2005-09-27 17:05:12 +02:00
dbug Several fixes revelaled by Intel compiler. 2005-09-23 16:47:08 +03:00
Docs Merge mysql.com:/space/my/mysql-4.1-build 2005-07-06 08:50:22 +02:00
extra Merge mysql.com:/home/jimw/my/mysql-5.0-13071 2005-10-05 10:07:04 -07:00
heap Bug#12891: 2005-09-01 19:31:08 +05:00
include my_pthread.h: 2005-10-06 03:49:14 +02:00
innobase Merge msdesk.(none):/home/msvensson/mysql-4.1 2005-10-06 14:40:18 +02:00
libmysql Merging 2005-08-04 16:27:53 +05:00
libmysql_r Merge 2005-07-06 00:06:11 +02:00
libmysqld Moving archive from example to sql. 2005-09-28 19:04:51 -07:00
man Merge snake-hub.snake.net:/src/extern/MySQL/bk/merge-4.1 2005-09-18 13:22:10 -05:00
myisam Merge mysql.com:/home/dellis/mysqlab/bk/local_mysql-4.1 2005-10-06 15:52:01 -05:00
myisammrg Merge mysql.com:/home/mydev/mysql-4.1-4100 2005-09-23 17:27:07 +02:00
mysql-test after merge fix 2005-10-07 15:09:44 +05:00
mysys Fixed a bug in argument sending to get_one_option. 2005-10-06 22:09:15 +03:00
ndb make_binary_distribution.sh: 2005-10-07 01:56:11 +02:00
netware Applied a couple of Netware related patches. 2005-08-28 11:38:18 +03:00
NEW-RPMS
os2 Merge 2005-09-29 03:20:31 +02:00
pstack
regex Merge 2005-09-29 03:20:31 +02:00
scripts Merge 2005-10-07 12:55:00 +02:00
server-tools fix compile failure (which shows up in cygwin environment) 2005-10-07 20:25:51 +04:00
sql Fix for bug #12739 "Deadlock in multithreaded environment during creating/ 2005-10-17 22:37:24 +04:00
sql-bench
sql-common Added option --valgrind-mysqltest to mysql-test-run 2005-09-14 01:41:44 +03:00
SSL
strings Merge msdesk.(none):/home/msvensson/mysql-4.1 2005-10-06 14:40:18 +02:00
support-files Merge mysql.com:/space/my/mysql-4.1 into mysql.com:/space/my/mysql-5.0 2005-09-29 14:35:07 +02:00
tests A fix and a test case for Bug#6513 "Test Suite: Values inserted by using 2005-09-22 02:11:21 +04:00
tools Merge 2005-07-06 00:06:11 +02:00
VC++Files mysqld.vcproj: 2005-10-01 21:05:09 +02:00
vio Merge moonbone.local:/work/12887-bug-4.1-mysql 2005-09-15 22:54:59 +04:00
zlib Import zlib-1.2.3 library 2005-08-09 10:22:48 -07:00
.bzrignore Merge mysqldev@production.mysql.com:my/mysql-5.0-release 2005-09-23 00:46:59 +04:00
.cvsignore
configure.in Raise the version. 2005-09-30 13:37:19 +02:00
COPYING
Makefile.am portability.h: 2005-09-29 19:37:03 +02:00
README README: 2005-09-12 12:44:13 -05: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.
- For commercial distributions, see the MySQLEULA.txt 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 Installation chapter.
- For future plans, see the TODO appendix.
- For the new features/bugfix history, see the News appendix.
- For the currently known bugs/misfeatures (known errors) see the problems
  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.