mariadb/mysql-test/r/lock_multi.result

213 lines
4.5 KiB
Text
Raw Normal View History

drop table if exists t1,t2;
Cleanup after last merge client/mysqltest.c: Don't write error message to log if there is more than one possible error message include/mysqld_error.h: Made error messages more general libmysqld/Makefile.am: md5 is now in mysys mysql-test/include/have_isam.inc: Update to new result format mysql-test/include/not_embedded.inc: Update to new result format mysql-test/mysql-test-run.sh: Update to new result format mysql-test/r/auto_increment.result: Update to new result format mysql-test/r/count_distinct2.result: Update to new result format mysql-test/r/create.result: Update to new result format mysql-test/r/func_system.result: Update to new result format mysql-test/r/isam.result: Update to new result format mysql-test/r/lock.result: Update to new result format mysql-test/r/lock_multi.result: Update to new result format mysql-test/r/rename.result: Update to new result format mysql-test/r/rpl000001.result: Fix wrong test mysql-test/r/tablelock.result: Update to new result format mysql-test/t/rename.test: Update to new result format sql/share/czech/errmsg.txt: Made error messages more general sql/share/danish/errmsg.txt: Made error messages more general sql/share/dutch/errmsg.txt: Made error messages more general sql/share/english/errmsg.txt: Made error messages more general sql/share/estonian/errmsg.txt: Made error messages more general sql/share/french/errmsg.txt: Made error messages more general sql/share/german/errmsg.txt: Made error messages more general sql/share/greek/errmsg.txt: Made error messages more general sql/share/hungarian/errmsg.txt: Made error messages more general sql/share/italian/errmsg.txt: Made error messages more general sql/share/japanese/errmsg.txt: Made error messages more general sql/share/korean/errmsg.txt: Made error messages more general sql/share/norwegian-ny/errmsg.txt: Made error messages more general sql/share/norwegian/errmsg.txt: Made error messages more general sql/share/polish/errmsg.txt: Made error messages more general sql/share/portuguese/errmsg.txt: Made error messages more general sql/share/romanian/errmsg.txt: Made error messages more general sql/share/russian/errmsg.txt: Made error messages more general sql/share/slovak/errmsg.txt: Made error messages more general sql/share/spanish/errmsg.txt: Made error messages more general sql/share/swedish/errmsg.txt: Made error messages more general sql/share/ukrainian/errmsg.txt: Made error messages more general sql/sql_lex.cc: We can't remove lex->thd because sql_yacc uses it. sql/sql_lex.h: We can't remove lex->thd because sql_yacc uses it. sql/sql_yacc.yy: Cleanup support-files/mysql.spec.sh: Create MySQL-embedded rpm tools/mysqlmanager.c: Fix bug in merge
2001-10-08 06:24:04 +02:00
create table t1(n int);
insert into t1 values (1);
lock tables t1 write;
update low_priority t1 set n = 4;
select n from t1;
Cleanup after last merge client/mysqltest.c: Don't write error message to log if there is more than one possible error message include/mysqld_error.h: Made error messages more general libmysqld/Makefile.am: md5 is now in mysys mysql-test/include/have_isam.inc: Update to new result format mysql-test/include/not_embedded.inc: Update to new result format mysql-test/mysql-test-run.sh: Update to new result format mysql-test/r/auto_increment.result: Update to new result format mysql-test/r/count_distinct2.result: Update to new result format mysql-test/r/create.result: Update to new result format mysql-test/r/func_system.result: Update to new result format mysql-test/r/isam.result: Update to new result format mysql-test/r/lock.result: Update to new result format mysql-test/r/lock_multi.result: Update to new result format mysql-test/r/rename.result: Update to new result format mysql-test/r/rpl000001.result: Fix wrong test mysql-test/r/tablelock.result: Update to new result format mysql-test/t/rename.test: Update to new result format sql/share/czech/errmsg.txt: Made error messages more general sql/share/danish/errmsg.txt: Made error messages more general sql/share/dutch/errmsg.txt: Made error messages more general sql/share/english/errmsg.txt: Made error messages more general sql/share/estonian/errmsg.txt: Made error messages more general sql/share/french/errmsg.txt: Made error messages more general sql/share/german/errmsg.txt: Made error messages more general sql/share/greek/errmsg.txt: Made error messages more general sql/share/hungarian/errmsg.txt: Made error messages more general sql/share/italian/errmsg.txt: Made error messages more general sql/share/japanese/errmsg.txt: Made error messages more general sql/share/korean/errmsg.txt: Made error messages more general sql/share/norwegian-ny/errmsg.txt: Made error messages more general sql/share/norwegian/errmsg.txt: Made error messages more general sql/share/polish/errmsg.txt: Made error messages more general sql/share/portuguese/errmsg.txt: Made error messages more general sql/share/romanian/errmsg.txt: Made error messages more general sql/share/russian/errmsg.txt: Made error messages more general sql/share/slovak/errmsg.txt: Made error messages more general sql/share/spanish/errmsg.txt: Made error messages more general sql/share/swedish/errmsg.txt: Made error messages more general sql/share/ukrainian/errmsg.txt: Made error messages more general sql/sql_lex.cc: We can't remove lex->thd because sql_yacc uses it. sql/sql_lex.h: We can't remove lex->thd because sql_yacc uses it. sql/sql_yacc.yy: Cleanup support-files/mysql.spec.sh: Create MySQL-embedded rpm tools/mysqlmanager.c: Fix bug in merge
2001-10-08 06:24:04 +02:00
unlock tables;
Updated manual about embedded version. Speed up column-completion in 'mysql' Don't use ISAM if HAVE_ISAM is not defined A lot of fixes for the embedded version. All libraries are now included in libmysqld.a Changed arguments to convert_dirname() to make it more general. Renamed files in the 'merge' directory to all use a common prefix. Don't compile both assembler and C functions on x86 BitKeeper/deleted/.del-mf_pack2.c~f07795bbcf57be7: Delete: mysys/mf_pack2.c Docs/manual.texi: Updated chapter about embedded version acinclude.m4: Fix for using BDB and InnoDB with embedded client/completion_hash.cc: Speed up memory allocation client/completion_hash.h: Speed up memory allocation client/mysql.cc: Speed up memory allocation client/mysqldump.c: Fix to use now convert_dirname client/mysqltest.c: Fixed memory allocation bugs. Added --basedir=#, --compress=#, --server-arg, --server-file. Fixes for embedded version Changed silent mode to -s instead of -q include/my_global.h: Update to use HAVE_ISAM include/my_sys.h: Cleanup of fn_format() include/mysql.h: Prepare FIELD struct for 4.1 include/mysql_embed.h: Don't use ISAM in embedded version innobase/include/srv0srv.h: Make InnoDB startup/shutdown silent in embedded version innobase/log/log0log.c: Make InnoDB startup/shutdown silent in embedded version innobase/srv/srv0srv.c: Make InnoDB startup/shutdown silent in embedded version innobase/srv/srv0start.c: Make InnoDB startup/shutdown silent in embedded version isam/isamlog.c: new convert_dirname libmysql/libmysql.c: Prepare for 4.1 libmysqld/Makefile.am: Changed to create one libmysqld.a file that includes all other libraries. libmysqld/examples/Makefile.am: Changed to use new libmysqld.a libmysqld/examples/test-run: Lot's of fixes to get new mysqltest with embedded MySQL to work. libmysqld/lib_sql.cc: Changed type of arguments for mysql_server_init() to make code more portable. libmysqld/libmysqld.c: Cleanup merge/Makefile.am: Rename to use common prefix. merge/mrg_close.c: Rename to use common prefix. merge/mrg_create.c: Rename to use common prefix. merge/mrg_def.h: Rename to use common prefix. merge/mrg_delete.c: Rename to use common prefix. merge/mrg_extra.c: Rename to use common prefix. merge/mrg_info.c: Rename to use common prefix. merge/mrg_locking.c: Rename to use common prefix. merge/mrg_open.c: Rename to use common prefix. merge/mrg_panic.c: Rename to use common prefix. merge/mrg_rrnd.c: Rename to use common prefix. merge/mrg_rsame.c: Rename to use common prefix. merge/mrg_static.c: Rename to use common prefix. merge/mrg_update.c: Rename to use common prefix. myisam/myisamlog.c: Use new convert_dirname myisammrg/Makefile.am: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_close.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_create.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_def.h: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_delete.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_extra.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_info.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_locking.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_open.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_panic.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_queue.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_rfirst.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_rkey.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_rlast.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_rnext.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_rprev.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_rrnd.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_rsame.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_static.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_update.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_write.c: Renamed mymrgdef.h -> myrg_def.h mysql-test/include/master-slave.inc: Use short filenames for sockets (portability problem on Mac OS X) mysql-test/mysql-test-run.sh: cleanup mysql-test/r/auto_increment.result: Cleanup of tests for embedded version mysql-test/r/func_system.result: Cleanup of tests for embedded version mysql-test/r/isam.result: Cleanup of tests for embedded version mysql-test/r/lock.result: Cleanup of tests for embedded version mysql-test/r/show_check.result: Cleanup of tests for embedded version mysql-test/t/auto_increment.test: Cleanup of tests for embedded version mysql-test/t/backup.test: Cleanup of tests for embedded version mysql-test/t/count_distinct2-master.opt: Cleanup of tests for embedded version mysql-test/t/count_distinct2.test: Cleanup of tests for embedded version mysql-test/t/create.test: Cleanup of tests for embedded version mysql-test/t/flush.test: Cleanup of tests for embedded version mysql-test/t/func_system.test: Cleanup of tests for embedded version mysql-test/t/isam.test: Cleanup of tests for embedded version mysql-test/t/kill.test: Cleanup of tests for embedded version mysql-test/t/lock.test: Cleanup of tests for embedded version mysql-test/t/order_fill_sortbuf-master.opt: Cleanup of tests for embedded version mysql-test/t/rpl000015.test: Use short filenames for sockets (portability problem on Mac OS X) mysql-test/t/rpl000016.test: Use short filenames for sockets (portability problem on Mac OS X) mysql-test/t/rpl000017.test: Use short filenames for sockets (portability problem on Mac OS X) mysql-test/t/rpl000018.test: Use short filenames for sockets (portability problem on Mac OS X) mysql-test/t/show_check.test: Move ISAM specific tests to isam.test mysql-test/t/status.test: Cleanup of tests for embedded version mysql-test/t/tablelock.test: Cleanup mysys/Makefile.am: Removed not used mf_pack2.c mysys/charset.c: new convert_dirname mysys/default.c: new convert_dirname mysys/mf_dirname.c: Changed convert_dirname() to be more general mysys/mf_format.c: Changed bit flags to fn_format() to defines. Added handling of relative filenames BitKeeper/etc/ignore: Added libmysqld/examples/test-gdbinit scripts/mysql_explain_log to the ignore list mysys/mf_pack.c: new convert_dirname mysys/mf_tempfile.c: new convert_dirname scripts/Makefile.am: Adde mysql_explain_log scripts/mysql_config.sh: Added support of --libmysqld-libs sql/Makefile.am: Fix to use 'innodb_system_libs' sql/ha_innobase.cc: Make InnoDB startup/shutdown silent in embedded version sql/ha_isam.cc: Added handling of HAVE_ISAM sql/ha_isammrg.cc: Added handling of HAVE_ISAM sql/ha_myisam.cc: Handle relative paths; Needed to support BACKUP TABLE in embedded version sql/ha_myisammrg.cc: Rename of filenames sql/handler.cc: Added handling of HAVE_ISAM sql/item_func.cc: Fix for ecc (Intel Compiler) sql/mysql_priv.h: Added global variable 'mysql_embedded' sql/mysqld.cc: Use HAVE_ISAM sql/sql_parse.cc: Use new convert_dirname sql/sql_select.cc: Fix for ecc (Intel Compiler) sql/sql_table.cc: Added handling of relative filenames strings/Makefile.am: Don't compile both assembler and C functions on x86 strings/bchange.c: cleanup
2001-10-08 03:58:07 +02:00
n
4
Cleanup after last merge client/mysqltest.c: Don't write error message to log if there is more than one possible error message include/mysqld_error.h: Made error messages more general libmysqld/Makefile.am: md5 is now in mysys mysql-test/include/have_isam.inc: Update to new result format mysql-test/include/not_embedded.inc: Update to new result format mysql-test/mysql-test-run.sh: Update to new result format mysql-test/r/auto_increment.result: Update to new result format mysql-test/r/count_distinct2.result: Update to new result format mysql-test/r/create.result: Update to new result format mysql-test/r/func_system.result: Update to new result format mysql-test/r/isam.result: Update to new result format mysql-test/r/lock.result: Update to new result format mysql-test/r/lock_multi.result: Update to new result format mysql-test/r/rename.result: Update to new result format mysql-test/r/rpl000001.result: Fix wrong test mysql-test/r/tablelock.result: Update to new result format mysql-test/t/rename.test: Update to new result format sql/share/czech/errmsg.txt: Made error messages more general sql/share/danish/errmsg.txt: Made error messages more general sql/share/dutch/errmsg.txt: Made error messages more general sql/share/english/errmsg.txt: Made error messages more general sql/share/estonian/errmsg.txt: Made error messages more general sql/share/french/errmsg.txt: Made error messages more general sql/share/german/errmsg.txt: Made error messages more general sql/share/greek/errmsg.txt: Made error messages more general sql/share/hungarian/errmsg.txt: Made error messages more general sql/share/italian/errmsg.txt: Made error messages more general sql/share/japanese/errmsg.txt: Made error messages more general sql/share/korean/errmsg.txt: Made error messages more general sql/share/norwegian-ny/errmsg.txt: Made error messages more general sql/share/norwegian/errmsg.txt: Made error messages more general sql/share/polish/errmsg.txt: Made error messages more general sql/share/portuguese/errmsg.txt: Made error messages more general sql/share/romanian/errmsg.txt: Made error messages more general sql/share/russian/errmsg.txt: Made error messages more general sql/share/slovak/errmsg.txt: Made error messages more general sql/share/spanish/errmsg.txt: Made error messages more general sql/share/swedish/errmsg.txt: Made error messages more general sql/share/ukrainian/errmsg.txt: Made error messages more general sql/sql_lex.cc: We can't remove lex->thd because sql_yacc uses it. sql/sql_lex.h: We can't remove lex->thd because sql_yacc uses it. sql/sql_yacc.yy: Cleanup support-files/mysql.spec.sh: Create MySQL-embedded rpm tools/mysqlmanager.c: Fix bug in merge
2001-10-08 06:24:04 +02:00
drop table t1;
create table t1(n int);
insert into t1 values (1);
lock tables t1 read;
update low_priority t1 set n = 4;
select n from t1;
Updated manual about embedded version. Speed up column-completion in 'mysql' Don't use ISAM if HAVE_ISAM is not defined A lot of fixes for the embedded version. All libraries are now included in libmysqld.a Changed arguments to convert_dirname() to make it more general. Renamed files in the 'merge' directory to all use a common prefix. Don't compile both assembler and C functions on x86 BitKeeper/deleted/.del-mf_pack2.c~f07795bbcf57be7: Delete: mysys/mf_pack2.c Docs/manual.texi: Updated chapter about embedded version acinclude.m4: Fix for using BDB and InnoDB with embedded client/completion_hash.cc: Speed up memory allocation client/completion_hash.h: Speed up memory allocation client/mysql.cc: Speed up memory allocation client/mysqldump.c: Fix to use now convert_dirname client/mysqltest.c: Fixed memory allocation bugs. Added --basedir=#, --compress=#, --server-arg, --server-file. Fixes for embedded version Changed silent mode to -s instead of -q include/my_global.h: Update to use HAVE_ISAM include/my_sys.h: Cleanup of fn_format() include/mysql.h: Prepare FIELD struct for 4.1 include/mysql_embed.h: Don't use ISAM in embedded version innobase/include/srv0srv.h: Make InnoDB startup/shutdown silent in embedded version innobase/log/log0log.c: Make InnoDB startup/shutdown silent in embedded version innobase/srv/srv0srv.c: Make InnoDB startup/shutdown silent in embedded version innobase/srv/srv0start.c: Make InnoDB startup/shutdown silent in embedded version isam/isamlog.c: new convert_dirname libmysql/libmysql.c: Prepare for 4.1 libmysqld/Makefile.am: Changed to create one libmysqld.a file that includes all other libraries. libmysqld/examples/Makefile.am: Changed to use new libmysqld.a libmysqld/examples/test-run: Lot's of fixes to get new mysqltest with embedded MySQL to work. libmysqld/lib_sql.cc: Changed type of arguments for mysql_server_init() to make code more portable. libmysqld/libmysqld.c: Cleanup merge/Makefile.am: Rename to use common prefix. merge/mrg_close.c: Rename to use common prefix. merge/mrg_create.c: Rename to use common prefix. merge/mrg_def.h: Rename to use common prefix. merge/mrg_delete.c: Rename to use common prefix. merge/mrg_extra.c: Rename to use common prefix. merge/mrg_info.c: Rename to use common prefix. merge/mrg_locking.c: Rename to use common prefix. merge/mrg_open.c: Rename to use common prefix. merge/mrg_panic.c: Rename to use common prefix. merge/mrg_rrnd.c: Rename to use common prefix. merge/mrg_rsame.c: Rename to use common prefix. merge/mrg_static.c: Rename to use common prefix. merge/mrg_update.c: Rename to use common prefix. myisam/myisamlog.c: Use new convert_dirname myisammrg/Makefile.am: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_close.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_create.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_def.h: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_delete.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_extra.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_info.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_locking.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_open.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_panic.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_queue.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_rfirst.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_rkey.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_rlast.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_rnext.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_rprev.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_rrnd.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_rsame.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_static.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_update.c: Renamed mymrgdef.h -> myrg_def.h myisammrg/myrg_write.c: Renamed mymrgdef.h -> myrg_def.h mysql-test/include/master-slave.inc: Use short filenames for sockets (portability problem on Mac OS X) mysql-test/mysql-test-run.sh: cleanup mysql-test/r/auto_increment.result: Cleanup of tests for embedded version mysql-test/r/func_system.result: Cleanup of tests for embedded version mysql-test/r/isam.result: Cleanup of tests for embedded version mysql-test/r/lock.result: Cleanup of tests for embedded version mysql-test/r/show_check.result: Cleanup of tests for embedded version mysql-test/t/auto_increment.test: Cleanup of tests for embedded version mysql-test/t/backup.test: Cleanup of tests for embedded version mysql-test/t/count_distinct2-master.opt: Cleanup of tests for embedded version mysql-test/t/count_distinct2.test: Cleanup of tests for embedded version mysql-test/t/create.test: Cleanup of tests for embedded version mysql-test/t/flush.test: Cleanup of tests for embedded version mysql-test/t/func_system.test: Cleanup of tests for embedded version mysql-test/t/isam.test: Cleanup of tests for embedded version mysql-test/t/kill.test: Cleanup of tests for embedded version mysql-test/t/lock.test: Cleanup of tests for embedded version mysql-test/t/order_fill_sortbuf-master.opt: Cleanup of tests for embedded version mysql-test/t/rpl000015.test: Use short filenames for sockets (portability problem on Mac OS X) mysql-test/t/rpl000016.test: Use short filenames for sockets (portability problem on Mac OS X) mysql-test/t/rpl000017.test: Use short filenames for sockets (portability problem on Mac OS X) mysql-test/t/rpl000018.test: Use short filenames for sockets (portability problem on Mac OS X) mysql-test/t/show_check.test: Move ISAM specific tests to isam.test mysql-test/t/status.test: Cleanup of tests for embedded version mysql-test/t/tablelock.test: Cleanup mysys/Makefile.am: Removed not used mf_pack2.c mysys/charset.c: new convert_dirname mysys/default.c: new convert_dirname mysys/mf_dirname.c: Changed convert_dirname() to be more general mysys/mf_format.c: Changed bit flags to fn_format() to defines. Added handling of relative filenames BitKeeper/etc/ignore: Added libmysqld/examples/test-gdbinit scripts/mysql_explain_log to the ignore list mysys/mf_pack.c: new convert_dirname mysys/mf_tempfile.c: new convert_dirname scripts/Makefile.am: Adde mysql_explain_log scripts/mysql_config.sh: Added support of --libmysqld-libs sql/Makefile.am: Fix to use 'innodb_system_libs' sql/ha_innobase.cc: Make InnoDB startup/shutdown silent in embedded version sql/ha_isam.cc: Added handling of HAVE_ISAM sql/ha_isammrg.cc: Added handling of HAVE_ISAM sql/ha_myisam.cc: Handle relative paths; Needed to support BACKUP TABLE in embedded version sql/ha_myisammrg.cc: Rename of filenames sql/handler.cc: Added handling of HAVE_ISAM sql/item_func.cc: Fix for ecc (Intel Compiler) sql/mysql_priv.h: Added global variable 'mysql_embedded' sql/mysqld.cc: Use HAVE_ISAM sql/sql_parse.cc: Use new convert_dirname sql/sql_select.cc: Fix for ecc (Intel Compiler) sql/sql_table.cc: Added handling of relative filenames strings/Makefile.am: Don't compile both assembler and C functions on x86 strings/bchange.c: cleanup
2001-10-08 03:58:07 +02:00
n
1
unlock tables;
Cleanup after last merge client/mysqltest.c: Don't write error message to log if there is more than one possible error message include/mysqld_error.h: Made error messages more general libmysqld/Makefile.am: md5 is now in mysys mysql-test/include/have_isam.inc: Update to new result format mysql-test/include/not_embedded.inc: Update to new result format mysql-test/mysql-test-run.sh: Update to new result format mysql-test/r/auto_increment.result: Update to new result format mysql-test/r/count_distinct2.result: Update to new result format mysql-test/r/create.result: Update to new result format mysql-test/r/func_system.result: Update to new result format mysql-test/r/isam.result: Update to new result format mysql-test/r/lock.result: Update to new result format mysql-test/r/lock_multi.result: Update to new result format mysql-test/r/rename.result: Update to new result format mysql-test/r/rpl000001.result: Fix wrong test mysql-test/r/tablelock.result: Update to new result format mysql-test/t/rename.test: Update to new result format sql/share/czech/errmsg.txt: Made error messages more general sql/share/danish/errmsg.txt: Made error messages more general sql/share/dutch/errmsg.txt: Made error messages more general sql/share/english/errmsg.txt: Made error messages more general sql/share/estonian/errmsg.txt: Made error messages more general sql/share/french/errmsg.txt: Made error messages more general sql/share/german/errmsg.txt: Made error messages more general sql/share/greek/errmsg.txt: Made error messages more general sql/share/hungarian/errmsg.txt: Made error messages more general sql/share/italian/errmsg.txt: Made error messages more general sql/share/japanese/errmsg.txt: Made error messages more general sql/share/korean/errmsg.txt: Made error messages more general sql/share/norwegian-ny/errmsg.txt: Made error messages more general sql/share/norwegian/errmsg.txt: Made error messages more general sql/share/polish/errmsg.txt: Made error messages more general sql/share/portuguese/errmsg.txt: Made error messages more general sql/share/romanian/errmsg.txt: Made error messages more general sql/share/russian/errmsg.txt: Made error messages more general sql/share/slovak/errmsg.txt: Made error messages more general sql/share/spanish/errmsg.txt: Made error messages more general sql/share/swedish/errmsg.txt: Made error messages more general sql/share/ukrainian/errmsg.txt: Made error messages more general sql/sql_lex.cc: We can't remove lex->thd because sql_yacc uses it. sql/sql_lex.h: We can't remove lex->thd because sql_yacc uses it. sql/sql_yacc.yy: Cleanup support-files/mysql.spec.sh: Create MySQL-embedded rpm tools/mysqlmanager.c: Fix bug in merge
2001-10-08 06:24:04 +02:00
drop table t1;
create table t1 (a int, b int);
create table t2 (c int, d int);
insert into t1 values(1,1);
insert into t1 values(2,2);
insert into t2 values(1,2);
lock table t1 read;
update t1,t2 set c=a where b=d;
select c from t2;
c
2
Backport of: ------------------------------------------------------------ revno: 2476.784.3 committer: davi@moksha.local timestamp: Tue 2007-10-02 21:27:31 -0300 message: Bug#25858 Some DROP TABLE under LOCK TABLES can cause deadlocks When a client (connection) holds a lock on a table and attempts to drop (obtain a exclusive lock) on a second table that is already held by a second client and the second client then attempts to drop the table that is held by the first client, leads to a circular wait deadlock. This scenario is very similar to trying to drop (or rename) a table while holding read locks and are correctly forbidden. The solution is to allow a drop table operation to continue only if the table being dropped is write (exclusively) locked, or if the table is temporary, or if the client is not holding any locks. Using this scheme prevents the creation of a circular chain in which each client is waiting for one table that the next client in the chain is holding. This is incompatible change, as can be seen by number of tests cases that needed to be fixed, but is consistent with respect to behavior of the different scenarios in which the circular wait might happen. mysql-test/r/drop.result: Test case result for Bug#25858 mysql-test/r/group_by.result: Fix test case result wrt drop table under lock tables -- unlock tables before dropping table. mysql-test/r/insert_notembedded.result: Fix test case result wrt drop table under lock tables -- unlock tables before dropping table mysql-test/r/lock.result: Fix test case result wrt drop table under lock tables -- unlock tables before dropping table. mysql-test/r/lock_multi.result: Fix test case result wrt drop table under lock tables -- unlock tables before dropping table. mysql-test/r/myisam.result: Fix test case result wrt drop table under lock tables -- unlock tables before dropping table. mysql-test/r/view.result: Fix test case result wrt drop table under lock tables -- unlock tables before dropping table. mysql-test/t/drop.test: Add test case for Bug#25858 mysql-test/t/group_by.test: Fix test case: unlock tables in preparation for a drop table. In some circumstances, dropping tables while holding locks leads to a deadlock. mysql-test/t/insert_notembedded.test: Fix test case: unlock tables in preparation for a drop table. In some circumstances, dropping tables while holding locks leads to a deadlock. mysql-test/t/lock.test: Fix test case: unlock tables in preparation for a drop table. In some circumstances, dropping tables while holding locks leads to a deadlock. mysql-test/t/lock_multi.test: Fix test case: unlock tables in preparation for a drop table. In some circumstances, dropping tables while holding locks leads to a deadlock. mysql-test/t/myisam.test: Fix test case: unlock tables in preparation for a drop table. In some circumstances, dropping tables while holding locks leads to a deadlock. mysql-test/t/query_cache_notembedded.test: Fix test case: unlock tables in preparation for a drop table. In some circumstances, dropping tables while holding locks leads to a deadlock. mysql-test/t/view.test: Fix test case: unlock tables in preparation for a drop table. In some circumstances, dropping tables while holding locks leads to a deadlock. sql/lock.cc: When trying to obtain a name lock under lock tables, ensure that the table is properly exclusively locked and fail otherwise.
2009-11-20 20:51:12 +01:00
unlock tables;
drop table t1;
drop table t2;
create table t1 (a int);
create table t2 (a int);
lock table t1 write, t2 write;
insert t1 select * from t2;
drop table t2;
Added SQLSTATE to client/server protocol bmove_allign -> bmove_align Added OLAP function ROLLUP Split mysql_fix_privilege_tables to a script and a .sql data file Added new (MEMROOT*) functions to avoid calling current_thd() when creating some common objects. Added table_alias_charset, for easier --lower-case-table-name handling Better SQL_MODE handling (Setting complex options also sets sub options) New (faster) assembler string functions for x86 BitKeeper/etc/ignore: added libmysqld/sql_state.c client/mysql.cc: Added SQLSTATE to error messages Added new function put_error() to be able to clean up some old code. client/mysqltest.c: Write ERROR SQLSTATE for all errors dbug/dbug.c: Portability fixes include/m_string.h: Rename bmove_allign as bmove_align include/mysql.h: Added SQLSTATE (for embedded version) include/mysql_com.h: Send correct SQLSTATE for the error to the client libmysql/libmysql.c: Changed default error state to HY000 Applied code cleanup patch libmysqld/Makefile.am: Added sql_state.cc libmysqld/libmysqld.c: Added sqlstate mysql-test/r/analyse.result: Updated results mysql-test/r/ansi.result: Updated results mysql-test/r/auto_increment.result: Updated results mysql-test/r/bdb-deadlock.result: Updated results mysql-test/r/bdb.result: Updated results mysql-test/r/comments.result: Updated results mysql-test/r/create.result: Updated results mysql-test/r/ctype_collate.result: Updated results mysql-test/r/delayed.result: Updated results mysql-test/r/delete.result: Updated results mysql-test/r/derived.result: Updated results mysql-test/r/distinct.result: Updated results mysql-test/r/drop.result: Updated results mysql-test/r/err000001.result: Updated results mysql-test/r/explain.result: Updated results mysql-test/r/flush.result: Updated results mysql-test/r/fulltext.result: Updated results mysql-test/r/func_gconcat.result: Updated results mysql-test/r/func_system.result: Updated results mysql-test/r/grant_cache.result: Updated results mysql-test/r/group_by.result: Updated results mysql-test/r/handler.result: Updated results mysql-test/r/heap.result: Updated results mysql-test/r/heap_btree.result: Updated results mysql-test/r/heap_hash.result: Updated results mysql-test/r/innodb.result: Updated results mysql-test/r/innodb_handler.result: Updated results mysql-test/r/insert_select.result: Updated results mysql-test/r/insert_update.result: Updated results mysql-test/r/join.result: Updated results mysql-test/r/join_outer.result: Updated results mysql-test/r/key.result: Updated results mysql-test/r/lock.result: Updated results mysql-test/r/lock_multi.result: Updated results mysql-test/r/merge.result: Updated results mysql-test/r/multi_update.result: Updated results mysql-test/r/myisam.result: Updated results mysql-test/r/null.result: Updated results mysql-test/r/olap.result: Updated results mysql-test/r/order_by.result: Updated results mysql-test/r/packet.result: Updated results mysql-test/r/query_cache.result: Updated results mysql-test/r/row.result: Updated results mysql-test/r/rpl000001.result: Updated results mysql-test/r/rpl000009.result: Updated results mysql-test/r/rpl_empty_master_crash.result: Updated results mysql-test/r/rpl_log.result: Updated results mysql-test/r/rpl_replicate_do.result: Updated results mysql-test/r/rpl_rotate_logs.result: Updated results mysql-test/r/select.result: Updated results mysql-test/r/select_safe.result: Updated results mysql-test/r/show_check.result: Updated results mysql-test/r/sql_mode.result: Updated results mysql-test/r/subselect.result: Updated results mysql-test/r/temp_table.result: Updated results mysql-test/r/truncate.result: Updated results mysql-test/r/type_blob.result: Updated results mysql-test/r/type_decimal.result: Updated results mysql-test/r/type_float.result: Updated results mysql-test/r/type_ranges.result: Updated results mysql-test/r/union.result: Updated results mysql-test/r/update.result: Updated results mysql-test/r/user_var.result: Updated results mysql-test/r/varbinary.result: Updated results mysql-test/r/variables.result: Updated results mysql-test/t/ansi.test: Test of sql_mode mysql-test/t/derived.test: Updated results mysql-test/t/func_system.test: Make this independen of the MySQL server name mysql-test/t/lowercase_table.test: Cleanup mysql-test/t/olap.test: A lot of new tests mysql-test/t/sql_mode.test: More test for sql_mode mysql-test/t/subselect.test: Added a few new tests (to find a bug in the item_ref code) scripts/Makefile.am: Added mysql_fix_privilege_tables.sql scripts/mysql_fix_privilege_tables.sh: Totally new script. This bascily just pipes mysql_fix_privilege_tables.sql through 'mysql' to 'mysqld' sql/Makefile.am: Added sql_state.cc sql/item.cc: Extended Item_field::eq() to be able to better match GROUP BY fields on the command line. Needed for ROLLUP sql/item.h: Added function to be able to avoid calling current_thd() when doing new Item. sql/item_sum.cc: Moved copy_or_same() and some reset() functions from item_sum.h Needed to be able to access thd->mem_root. sql/item_sum.h: Moved some functions to item_sum.cc Added make_unique() for ROLLUP sql/item_uniq.h: Fixed return value sql/mysql_priv.h: Updated MODE flags sql/mysqld.cc: Added ANSI as it's own mode Moved charset_info variables here Cleaned up handler_count handling (for NT) Added table_alias_charset, for easier --lower-case-table-name handling sql/net_serv.cc: New comment sql/protocol.cc: Send SQLSTATE to client sql/set_var.cc: Better SQL_MODE handling (Setting complex options also sets sub options) sql/set_var.h: Better SQL_MODE handling sql/sql_base.cc: Make alias depend on --lower-case-table-names Make find_item_in_list also check database name sql/sql_cache.cc: Indentation cleanup sql/sql_list.h: Added safety assert Addes support of alloc without current_thd() sql/sql_prepare.cc: Update after prototype change sql/sql_select.cc: Added ROLLUP sql/sql_select.h: structures for rollup sql/sql_show.cc: Easier SQL_MODE handling sql/sql_string.cc: Move CHARSET_INFO to mysqld (to be together with all other global variables) sql/sql_string.h: Added function to be able to avoid calling current_thd() when doing new Item. sql/sql_table.cc: Simpler --lower-case-table-name handling sql/sql_union.cc: Update after prototype change sql/sql_yacc.yy: ROLLUP sql/unireg.h: bmove_allign ->bmove_align strings/Makefile.am: Fix to be able to compile str_test.c strings/ctype.c: Removed empty lines strings/str_test.c: Added test of bmove_align strings/strings-x86.s: Faster bmove_align, bmove_upp and strmake strings/strings.asm: move_allg
2003-06-04 17:28:51 +02:00
ERROR 42S02: Table 'test.t2' doesn't exist
drop table t1;
Fixed compiler and valgrind warnings Added missing DBUG_xxx_RETURN statements Fixed some usage of not initialized variables (as found by valgrind) Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called. This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names() This will allow Tomas to continue with his work to use namelocks to syncronize things. Note: valgrind still produces a lot of warnings about using not initialized code and shows memory loss errors when running the ndb tests BitKeeper/etc/ignore: added mysql-test/r/*.log client/mysqltest.c: Change type of variables to get rid of compiler warnings More debugging Fix memory leak mysql-test/mysql-test-run.sh: Collect warnings about missing DBUG_RETURN statements mysql-test/r/lock_multi.result: Add test of new code mysql-test/r/ndb_condition_pushdown.result: Drop used tables before test mysql-test/t/lock_multi.test: Add test of new code mysql-test/t/ndb_condition_pushdown.test: Drop used tables before test mysql-test/valgrind.supp: Ignore 'safe' warnings from libz (when used with archive) sql/event.cc: More comments Simplify code Fixed memory leak found by valgrind sql/ha_archive.cc: Remove compiler warnings (Wrong handlerton structure and signed/unsigned comparison) sql/ha_berkeley.cc: Fixed compiler warning sql/ha_blackhole.cc: Fixed compiler warning sql/ha_federated.cc: Fixed compiler warning sql/ha_heap.cc: Fixed compiler warning sql/ha_myisam.cc: Fixed compiler warning sql/ha_myisammrg.cc: Fixed compiler warning sql/ha_ndbcluster.cc: Fixed compiler warnings sql/ha_partition.cc: Fixed compiler warning Fixed error noticed by valgrind in ha_partition::rnd_init() sql/handler.cc: Fixed compiler warning sql/handler.h: Fixed compiler warning sql/item.cc: Fixed compiler warning sql/item_xmlfunc.cc: Fixed warning from valgrind when calling memcpy with wrong address sql/lock.cc: More debugging sql/log.cc: Fixed compiler warning Indentation fixes sql/log.h: Fixed compiler warning sql/mysql_priv.h: Changed prototype for 'drop_locked_tables' sql/opt_range.cc: Indentation fix sql/password.c: Removed compiler warnings sql/set_var.cc: Fixed compiler warning sql/slave.cc: Fixed compiler warning sql/sp_head.cc: Fixed compiler warning sql/sql_acl.cc: Fixed compiler warning sql/sql_analyse.cc: Added missing DBUG_RETURN statements sql/sql_base.cc: Removed de-reference of not initialized pointer More comments drop_locked_tables() changed to not delete tables used for name locking Fixed compiler warnings sql/sql_delete.cc: Fixed usage of not initialized variable (deleted could be referenced in some not common error conditions) sql/sql_parse.cc: Added missing DBUG_VOID_RETURN Simplify code sql/sql_partition.cc: Fixed usage of wrong variable (noticed by valgrind) sql/sql_plugin.cc: Removed compiler warning sql/sql_show.cc: Removed compiler warning sql/sql_table.cc: Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called. This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names() This will allow Tomas to continue with his work to use namelocks to syncronize things. Fixed wrong test of 'table_type' (path_length could otherwise be accessed uninitialized) Remove compile warnings about not initialized variables. sql/sql_yacc.yy: Ensure that no_write_to_binlog is properly initialized (Was accessed uninitialized by partition code) sql/table.cc: Removed valgrind warnings (not fatal) Removed compiler warnings sql/tztime.cc: Removed valgrind warning storage/ndb/include/ndbapi/NdbIndexStat.hpp: Removed compiler warning
2006-03-29 13:27:36 +02:00
create table t1 (a int);
create table t2 (a int);
lock table t1 write, t2 write, t1 as t1_2 write, t2 as t2_2 write;
insert t1 select * from t2;
Fixed compiler and valgrind warnings Added missing DBUG_xxx_RETURN statements Fixed some usage of not initialized variables (as found by valgrind) Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called. This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names() This will allow Tomas to continue with his work to use namelocks to syncronize things. Note: valgrind still produces a lot of warnings about using not initialized code and shows memory loss errors when running the ndb tests BitKeeper/etc/ignore: added mysql-test/r/*.log client/mysqltest.c: Change type of variables to get rid of compiler warnings More debugging Fix memory leak mysql-test/mysql-test-run.sh: Collect warnings about missing DBUG_RETURN statements mysql-test/r/lock_multi.result: Add test of new code mysql-test/r/ndb_condition_pushdown.result: Drop used tables before test mysql-test/t/lock_multi.test: Add test of new code mysql-test/t/ndb_condition_pushdown.test: Drop used tables before test mysql-test/valgrind.supp: Ignore 'safe' warnings from libz (when used with archive) sql/event.cc: More comments Simplify code Fixed memory leak found by valgrind sql/ha_archive.cc: Remove compiler warnings (Wrong handlerton structure and signed/unsigned comparison) sql/ha_berkeley.cc: Fixed compiler warning sql/ha_blackhole.cc: Fixed compiler warning sql/ha_federated.cc: Fixed compiler warning sql/ha_heap.cc: Fixed compiler warning sql/ha_myisam.cc: Fixed compiler warning sql/ha_myisammrg.cc: Fixed compiler warning sql/ha_ndbcluster.cc: Fixed compiler warnings sql/ha_partition.cc: Fixed compiler warning Fixed error noticed by valgrind in ha_partition::rnd_init() sql/handler.cc: Fixed compiler warning sql/handler.h: Fixed compiler warning sql/item.cc: Fixed compiler warning sql/item_xmlfunc.cc: Fixed warning from valgrind when calling memcpy with wrong address sql/lock.cc: More debugging sql/log.cc: Fixed compiler warning Indentation fixes sql/log.h: Fixed compiler warning sql/mysql_priv.h: Changed prototype for 'drop_locked_tables' sql/opt_range.cc: Indentation fix sql/password.c: Removed compiler warnings sql/set_var.cc: Fixed compiler warning sql/slave.cc: Fixed compiler warning sql/sp_head.cc: Fixed compiler warning sql/sql_acl.cc: Fixed compiler warning sql/sql_analyse.cc: Added missing DBUG_RETURN statements sql/sql_base.cc: Removed de-reference of not initialized pointer More comments drop_locked_tables() changed to not delete tables used for name locking Fixed compiler warnings sql/sql_delete.cc: Fixed usage of not initialized variable (deleted could be referenced in some not common error conditions) sql/sql_parse.cc: Added missing DBUG_VOID_RETURN Simplify code sql/sql_partition.cc: Fixed usage of wrong variable (noticed by valgrind) sql/sql_plugin.cc: Removed compiler warning sql/sql_show.cc: Removed compiler warning sql/sql_table.cc: Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called. This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names() This will allow Tomas to continue with his work to use namelocks to syncronize things. Fixed wrong test of 'table_type' (path_length could otherwise be accessed uninitialized) Remove compile warnings about not initialized variables. sql/sql_yacc.yy: Ensure that no_write_to_binlog is properly initialized (Was accessed uninitialized by partition code) sql/table.cc: Removed valgrind warnings (not fatal) Removed compiler warnings sql/tztime.cc: Removed valgrind warning storage/ndb/include/ndbapi/NdbIndexStat.hpp: Removed compiler warning
2006-03-29 13:27:36 +02:00
drop table t2;
ERROR 42S02: Table 'test.t2' doesn't exist
drop table t1;
End of 4.1 tests
create table t1(a int);
lock tables t1 write;
show columns from t1;
Field Type Null Key Default Extra
a int(11) YES NULL
unlock tables;
drop table t1;
USE mysql;
LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
FLUSH TABLES;
USE mysql;
SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;
OPTIMIZE TABLES columns_priv, db, host, user;
Table Op Msg_type Msg_text
mysql.columns_priv optimize status OK
mysql.db optimize status OK
mysql.host optimize status OK
mysql.user optimize status OK
UNLOCK TABLES;
Select_priv
N
USE test;
use test;
Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. The stress test suite revealed some deadlocks. Some were related to the new condition variable (COND_global_read_lock) and some were general problems with the global read lock. It is now necessary to signal COND_global_read_lock whenever COND_refresh is signalled. We need to wait for the release of a global read lock if one is set before every operation that requires a write lock. But we must not wait if we have locked tables by LOCK TABLES. After setting a global read lock a thread waits until all write locks are released. mysql-test/r/lock_multi.result: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Added test results. mysql-test/t/lock_multi.test: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Added tests for possible deadlocks that did not occur with the stress test suite. mysys/thr_lock.c: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Added a protection against an infinite loop that occurs with the test case for Bug #20662. sql/lock.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Signal COND_global_read_lock whenever COND_refresh is signalled by using the new function broadcast_refresh(). Added the definition of a new function that signals COND_global_read_lock whenever COND_refresh is signalled. sql/mysql_priv.h: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Added a declaration for a new function that signals COND_global_read_lock whenever COND_refresh is signalled. sql/sql_base.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Signal COND_global_read_lock whenever COND_refresh is signalled by using the new function broadcast_refresh(). sql/sql_handler.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Signal COND_global_read_lock whenever COND_refresh is signalled by using the new function broadcast_refresh(). sql/sql_insert.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Removed global read lock handling from inside of INSERT DELAYED. It is handled on a higher level now. sql/sql_parse.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Wait for the release of a global read lock if one is set before every operation that requires a write lock. But don't wait if locked tables exist already. sql/sql_table.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Removed global read lock handling from inside of CREATE TABLE. It is handled on a higher level now. Signal COND_global_read_lock whenever COND_refresh is signalled by using the new function broadcast_refresh().
2006-06-26 19:14:35 +02:00
CREATE TABLE t1 (c1 int);
LOCK TABLE t1 WRITE;
FLUSH TABLES WITH READ LOCK;
Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. The stress test suite revealed some deadlocks. Some were related to the new condition variable (COND_global_read_lock) and some were general problems with the global read lock. It is now necessary to signal COND_global_read_lock whenever COND_refresh is signalled. We need to wait for the release of a global read lock if one is set before every operation that requires a write lock. But we must not wait if we have locked tables by LOCK TABLES. After setting a global read lock a thread waits until all write locks are released. mysql-test/r/lock_multi.result: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Added test results. mysql-test/t/lock_multi.test: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Added tests for possible deadlocks that did not occur with the stress test suite. mysys/thr_lock.c: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Added a protection against an infinite loop that occurs with the test case for Bug #20662. sql/lock.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Signal COND_global_read_lock whenever COND_refresh is signalled by using the new function broadcast_refresh(). Added the definition of a new function that signals COND_global_read_lock whenever COND_refresh is signalled. sql/mysql_priv.h: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Added a declaration for a new function that signals COND_global_read_lock whenever COND_refresh is signalled. sql/sql_base.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Signal COND_global_read_lock whenever COND_refresh is signalled by using the new function broadcast_refresh(). sql/sql_handler.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Signal COND_global_read_lock whenever COND_refresh is signalled by using the new function broadcast_refresh(). sql/sql_insert.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Removed global read lock handling from inside of INSERT DELAYED. It is handled on a higher level now. sql/sql_parse.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Wait for the release of a global read lock if one is set before every operation that requires a write lock. But don't wait if locked tables exist already. sql/sql_table.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Removed global read lock handling from inside of CREATE TABLE. It is handled on a higher level now. Signal COND_global_read_lock whenever COND_refresh is signalled by using the new function broadcast_refresh().
2006-06-26 19:14:35 +02:00
CREATE TABLE t2 (c1 int);
UNLOCK TABLES;
UNLOCK TABLES;
DROP TABLE t1, t2;
CREATE TABLE t1 (c1 int);
LOCK TABLE t1 WRITE;
FLUSH TABLES WITH READ LOCK;
Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. The stress test suite revealed some deadlocks. Some were related to the new condition variable (COND_global_read_lock) and some were general problems with the global read lock. It is now necessary to signal COND_global_read_lock whenever COND_refresh is signalled. We need to wait for the release of a global read lock if one is set before every operation that requires a write lock. But we must not wait if we have locked tables by LOCK TABLES. After setting a global read lock a thread waits until all write locks are released. mysql-test/r/lock_multi.result: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Added test results. mysql-test/t/lock_multi.test: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Added tests for possible deadlocks that did not occur with the stress test suite. mysys/thr_lock.c: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Added a protection against an infinite loop that occurs with the test case for Bug #20662. sql/lock.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Signal COND_global_read_lock whenever COND_refresh is signalled by using the new function broadcast_refresh(). Added the definition of a new function that signals COND_global_read_lock whenever COND_refresh is signalled. sql/mysql_priv.h: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Added a declaration for a new function that signals COND_global_read_lock whenever COND_refresh is signalled. sql/sql_base.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Signal COND_global_read_lock whenever COND_refresh is signalled by using the new function broadcast_refresh(). sql/sql_handler.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Signal COND_global_read_lock whenever COND_refresh is signalled by using the new function broadcast_refresh(). sql/sql_insert.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Removed global read lock handling from inside of INSERT DELAYED. It is handled on a higher level now. sql/sql_parse.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Wait for the release of a global read lock if one is set before every operation that requires a write lock. But don't wait if locked tables exist already. sql/sql_table.cc: Bug#16986 - Deadlock condition with MyISAM tables Addendum fixes after changing the condition variable for the global read lock. Removed global read lock handling from inside of CREATE TABLE. It is handled on a higher level now. Signal COND_global_read_lock whenever COND_refresh is signalled by using the new function broadcast_refresh().
2006-06-26 19:14:35 +02:00
CREATE TABLE t2 AS SELECT * FROM t1;
ERROR HY000: Table 't2' was not locked with LOCK TABLES
UNLOCK TABLES;
UNLOCK TABLES;
DROP TABLE t1;
CREATE DATABASE mysqltest_1;
FLUSH TABLES WITH READ LOCK;
DROP DATABASE mysqltest_1;
DROP DATABASE mysqltest_1;
ERROR HY000: Can't execute the query because you have a conflicting read lock
UNLOCK TABLES;
DROP DATABASE mysqltest_1;
ERROR HY000: Can't drop database 'mysqltest_1'; database doesn't exist
create table t1 (f1 int(12) unsigned not null auto_increment, primary key(f1)) engine=innodb;
lock tables t1 write;
alter table t1 auto_increment=0;
alter table t1 auto_increment=0;
unlock tables;
drop table t1;
create table t1 (a int);
create table t2 like t1;
# con1
lock tables t1 write;
# con2
flush tables with read lock;
# con5
# global read lock is taken
# con3
select * from t2 for update;
# waiting for release of read lock
# con4
# would hang and later cause a deadlock
flush tables t2;
# clean up
unlock tables;
unlock tables;
a
drop table t1,t2;
#
# Lightweight version:
# Ensure that the wait for a GRL is done before opening tables.
#
create table t1 (a int);
create table t2 like t1;
#
# UPDATE
#
# default
flush tables with read lock;
# con1
update t2 set a = 1;
# default
# statement is waiting for release of read lock
# con2
flush table t2;
# default
unlock tables;
# con1
#
# LOCK TABLES .. WRITE
#
# default
flush tables with read lock;
# con1
lock tables t2 write;
# default
# statement is waiting for release of read lock
# con2
flush table t2;
# default
unlock tables;
# con1
unlock tables;
drop table t1,t2;
End of 5.0 tests
create table t1 (i int);
lock table t1 read;
update t1 set i= 10;
select * from t1;
kill query ID;
i
ERROR 70100: Query execution was interrupted
unlock tables;
drop table t1;
drop table if exists t1;
create table t1 (a int) ENGINE=MEMORY;
--> client 2
handler t1 open;
ERROR HY000: Table storage engine for 't1' doesn't have this option
--> client 1
drop table t1;
Bug#32395 Alter table under a impending global read lock causes a server crash The problem is that some DDL statements (ALTER TABLE, CREATE TRIGGER, FLUSH TABLES, ...) when under LOCK TABLES need to momentarily drop the lock, reopen the table and grab the write lock again (using reopen_tables). When grabbing the lock again, reopen_tables doesn't pass a flag to mysql_lock_tables in order to ignore the impending global read lock, which causes a assertion because LOCK_open is being hold. Also dropping the lock must not signal to any threads that the table has been relinquished (related to the locking/flushing protocol). The solution is to correct the way the table is reopenned and the locks grabbed. When reopening the table and under LOCK TABLES, the table version should be set to 0 so other threads have to wait for the table. When grabbing the lock, any other flush should be ignored because it's theoretically a atomic operation. The chosen solution also fixes a potential discrepancy between binlog and GRL (global read lock) because table placeholders were being ignored, now a FLUSH TABLES WITH READ LOCK will properly for table with open placeholders. It's also important to mention that this patch doesn't fix a potential deadlock if one uses two GRLs under LOCK TABLES concurrently. mysql-test/r/lock_multi.result: Add test case result for Bug#32395 mysql-test/r/trigger_notembedded.result: Add test case result for Bug#32395 mysql-test/t/lock_multi.test: Add test case for Bug#32395 mysql-test/t/trigger_notembedded.test: Enable test case for Bug#32395 sql/ha_ndbcluster.cc: Update close_cached_tables usage. sql/ha_ndbcluster_binlog.cc: Update close_cached_tables usage. sql/mysql_priv.h: Update close_cache_tables prototype. sql/set_var.cc: Update close_cached_tables usage and set flag to wait for tables with placeholders. This is one of the places where a GRL can be obtained. sql/sql_base.cc: Preserve old version for write locked tables and ignore pending flushes and update close_cache_tables to take into account name locked tables. sql/sql_parse.cc: Update close_cached_tables usage and pass flag so that name locked tables are waited for. sql/sql_table.cc: Protect the table against a impending GRL if under LOCK TABLES.
2007-12-12 22:44:14 +01:00
drop table if exists t1;
create table t1 (i int);
connection: default
lock tables t1 write;
connection: flush
flush tables with read lock;;
connection: default
alter table t1 add column j int;
connection: insert
insert into t1 values (1,2);;
connection: default
unlock tables;
connection: flush
select * from t1;
i j
unlock tables;
select * from t1;
i j
1 2
drop table t1;
drop table if exists t1;
create table t1 (i int);
connection: default
lock tables t1 write;
connection: flush
flush tables with read lock;;
connection: default
flush tables;
unlock tables;
drop table t1;
drop table if exists t1,t2;
create table t1 (a int);
flush status;
lock tables t1 read;
insert into t1 values(1);;
unlock tables;
drop table t1;
select @tlwa < @tlwb;
@tlwa < @tlwb
1
End of 5.1 tests