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 369a5f1cdc Bug#25164 create table a as select * from A hangs
The problem from a user's perspective: user creates table A, and then tries
to CREATE TABLE a SELECT from A - and this causes a deadlock error, a hang,
or fails with a debug assert, but only if the storage engine is InnoDB.

The origin of the problem: InnoDB uses case-insensitive collation
(system_charset_info) when looking up the internal table share, thus returning
the same share for 'a' and 'A'.

Cause of the user-visible behavior: since the same share is returned to SQL
locking subsystem, it assumes that the same table is first locked (within the
same session) for WRITE, and then for READ, and returns a deadlock error.
However, the code is wrong in not properly cleaning up upon an error, leaving
external locks in place, which leads to assertion failures and hangs.

Fix that has been implemented: the SQL layer should properly propagate the
deadlock error, cleaning up and freeing all resources.

Further work towards a more complete solution: InnoDB should not use case
insensitive collation for table share hash if table names on disk honor the case.


mysql-test/r/innodb-deadlock.result:
  Bug#25164 test case result
mysql-test/t/innodb-deadlock.test:
  Bug#25164 test case. The CREATE TABLE may fail depending on the character set
  of the system and filesystem, but it should never hang.
sql/lock.cc:
  Unlock the storage engine "external" table level locks, if the MySQL thr_lock
  locking subsystem detects a deadlock error.
2007-08-27 10:13:54 -03:00
bdb my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
BitKeeper Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build 2007-06-18 20:15:27 +02:00
BUILD Do not use $static_link for GCOV builds, 2007-08-22 18:11:01 -06:00
client Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0-build 2007-08-02 15:39:34 +02:00
cmd-line-utils Generate "config.h" directly into the "include" directory, later copied 2007-07-30 21:09:45 +02:00
config/ac-macros Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-build 2007-08-01 18:30:55 -06:00
dbug CMakeLists.txt, README, configure.js 2007-08-03 21:51:37 +02:00
debian Change mode to -rw-rw-r-- 2007-04-19 21:59:25 -07:00
Docs Merge mysql.com:/home/kent/bk/tmp/mysql-4.1-build 2007-03-22 19:43:41 +01:00
extra CMakeLists.txt, README, configure.js 2007-08-03 21:51:37 +02:00
heap Fixing crash when compiled using -DNEW_HASH_FUNCTIONS 2007-05-08 17:04:56 +05:00
include Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl 2007-08-03 18:59:16 +02:00
innobase NULL MERGE this ChangeSet to 5.1 2007-08-15 17:20:54 -06:00
libmysql CMakeLists.txt, README, configure.js 2007-08-03 21:51:37 +02:00
libmysql_r my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
libmysqld Merge trift2.:/MySQL/M41/push-4.1 2007-06-18 19:44:58 +02:00
man my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myisam Merge synthia.local:/home/mydev/mysql-5.0-amain 2007-08-13 20:45:36 +02:00
myisammrg BUG#26976 - Missing table in merge not noted in related error msg + 2007-06-06 04:42:41 +05:00
mysql-test Bug#25164 create table a as select * from A hangs 2007-08-27 10:13:54 -03:00
mysys Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-08-08 11:34:35 +04:00
ndb Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 2007-08-01 04:56:58 +02:00
netware netware/*.def : Allocate 128K stack for all executables (bug#23504) 2007-06-07 12:59:31 +02:00
os2 Avoid the name conflict between the system-provided "md5.h" and the MySQL one 2007-07-19 14:14:03 +02:00
pstack my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
regex my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
scripts make_win_bin_dist: 2007-08-06 08:31:09 +02:00
server-tools CMakeLists.txt, README, configure.js 2007-08-03 21:51:37 +02:00
sql Bug#25164 create table a as select * from A hangs 2007-08-27 10:13:54 -03:00
sql-bench my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql-common Merge mysql.com:/home/hf/work/29494/my41-29494 2007-07-22 14:03:18 +05:00
SSL SSL/Makefile.am mysql-test/Makefile.am: 2007-07-27 17:39:07 +02:00
strings Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint 2007-08-07 06:53:40 -04:00
support-files Handle "support-files/mysqld_multi.server.sh" like other shell scripts. 2007-07-17 19:27:31 +02:00
tests Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-08-08 11:34:35 +04:00
tools Avoid the name conflict between the system-provided "md5.h" and the MySQL one 2007-07-19 14:14:03 +02:00
VC++Files Merge trift2.:/MySQL/M41/clone-4.1 2007-06-18 19:16:12 +02:00
vio Bug #29579 Clients using SSL can hang the server 2007-07-12 22:06:33 -04:00
win CMakeLists.txt, README, configure.js 2007-08-03 21:51:37 +02:00
zlib CMakeLists.txt, README, configure.js 2007-08-03 21:51:37 +02:00
.bzrignore Bug#24732 Executables do not include Vista manifests 2007-07-25 13:18:12 -04:00
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
CMakeLists.txt CMakeLists.txt: 2007-08-04 00:26:46 +02:00
configure.in Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-build 2007-08-01 18:30:55 -06: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
EXCEPTIONS-CLIENT EXCEPTIONS-CLIENT: 2007-03-14 18:28:16 +01:00
Makefile.am Remove the "row_lock" suite from the sources. 2007-07-26 17:25:03 +02: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.