summaryrefslogtreecommitdiff
path: root/mysql-test/t/lock.test
Commit message (Collapse)AuthorAgeFilesLines
* Fixed deadlock with LOCK TABLES and ALTER TABLEMonty2020-05-231-0/+14
| | | | | | | | | | | | | | | | | | | | | | MDEV-21398 Deadlock (server hang) or assertion failure in Diagnostics_area::set_error_status upon ALTER under lock This failure could only happen if one locked the same table multiple times and then did an ALTER TABLE on the table. Major change is to change all instances of table->m_needs_reopen= true; to table->mark_table_for_reopen(); The main fix for the problem was to ensure that we mark all instances of the table in the locked_table_list and when we reopen the tables, we first close all tables before reopening and locking them. Other things: - Don't call thd->locked_tables_list.reopen_tables if there are no tables marked for reopen. (performance)
* Merge 10.1 into 10.2Marko Mäkelä2018-11-061-2/+2
|\
| * MDEV-15890 Strange error message if you try to FLUSH TABLES <view> after ↵Alexey Botchkov2018-11-031-2/+2
| | | | | | | | | | | | | | LOCK TABLES <view>. LOCK view WRITE shouldn't block FLUSH view. So we set the view's mdl_request type to it's tables.
* | Merge branch '10.1' into 10.2Sergei Golubchik2018-06-211-1/+1
|\ \ | |/
| * mysqltest: Allow HANDLER READ in --ps-protocol testsSergei Golubchik2018-06-111-1/+1
| | | | | | | | adjust tests
* | MDEV-15769: Assertion `!is_set() || (m_status == DA_OK_BULK && ↵Sergei Petrunia2018-04-071-0/+21
| | | | | | | | | | | | | | | | | | | | | | is_bulk_op())' failed Adjust the fix for MDEV-15472: In close_cached_tables(), locked_tables_list.reopen_tables(...) call might be made when a previous call to some function has already returned error. In this scenario, the function should return 0, even if reopen_tables(...) call has succeeded.
* | MDEV-5535: Cannot reopen temporary tableNirbhay Choubey2016-06-101-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysqld maintains a list of TABLE objects for all temporary tables created within a session in THD. Here each table is represented by a TABLE object. A query referencing a particular temporary table for more than once, however, failed with ER_CANT_REOPEN_TABLE error because a TABLE_SHARE was allocate together with the TABLE, so temporary tables always had only one TABLE per TABLE_SHARE. This patch lift this restriction by separating TABLE and TABLE_SHARE objects and storing TABLE_SHAREs for temporary tables in a list in THD, and TABLEs in a list within their respective TABLE_SHAREs.
* | MDEV-6720 - enable connection log in mysqltest by defaultSergey Vojtovich2016-03-311-5/+0
|/
* merge with 5.3Sergei Golubchik2011-10-191-0/+24
|\ | | | | | | | | | | | | | | | | | | | | | | | | sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
| * Fixed lock sorting and lock check issues with thr_lock that caused warnings ↵Michael Widenius2011-06-061-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when running test suite. Safety check that could cause core dump when doing create table with virtual column. mysql-test/mysql-test-run.pl: Show also warnings from thr_lock (which starts with just Warning, not Warning:) mysql-test/r/lock.result: Added test that showed not relevant warning when using table locks. mysql-test/t/lock.test: Added test that showed not relevant warning when using table locks. mysys/thr_lock.c: Fixed sorting of locks. (Old sort code didn't handle case where TL_WRITE_CONCURRENT_INSERT must be sorted before TL_WRITE) Added more information to check_locks warning output. Fixed wrong testing of multiple different write locks for same table. sql/item_cmpfunc.cc: Safety check that could cause core dump when doing create table with virtual column.
* | lots of post-merge changesSergei Golubchik2011-04-251-0/+2
| |
* | Implement new type-of-operation-aware metadata locks.Dmitry Lenev2010-02-011-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a wait-for graph based deadlock detector to the MDL subsystem. Fixes bug #46272 "MySQL 5.4.4, new MDL: unnecessary deadlock" and bug #37346 "innodb does not detect deadlock between update and alter table". The first bug manifested itself as an unwarranted abort of a transaction with ER_LOCK_DEADLOCK error by a concurrent ALTER statement, when this transaction tried to repeat use of a table, which it has already used in a similar fashion before ALTER started. The second bug showed up as a deadlock between table-level locks and InnoDB row locks, which was "detected" only after innodb_lock_wait_timeout timeout. A transaction would start using the table and modify a few rows. Then ALTER TABLE would come in, and start copying rows into a temporary table. Eventually it would stumble on the modified records and get blocked on a row lock. The first transaction would try to do more updates, and get blocked on thr_lock.c lock. This situation of circular wait would only get resolved by a timeout. Both these bugs stemmed from inadequate solutions to the problem of deadlocks occurring between different locking subsystems. In the first case we tried to avoid deadlocks between metadata locking and table-level locking subsystems, when upgrading shared metadata lock to exclusive one. Transactions holding the shared lock on the table and waiting for some table-level lock used to be aborted too aggressively. We also allowed ALTER TABLE to start in presence of transactions that modify the subject table. ALTER TABLE acquires TL_WRITE_ALLOW_READ lock at start, and that block all writes against the table (naturally, we don't want any writes to be lost when switching the old and the new table). TL_WRITE_ALLOW_READ lock, in turn, would block the started transaction on thr_lock.c lock, should they do more updates. This, again, lead to the need to abort such transactions. The second bug occurred simply because we didn't have any mechanism to detect deadlocks between the table-level locks in thr_lock.c and row-level locks in InnoDB, other than innodb_lock_wait_timeout. This patch solves both these problems by moving lock conflicts which are causing these deadlocks into the metadata locking subsystem, thus making it possible to avoid or detect such deadlocks inside MDL. To do this we introduce new type-of-operation-aware metadata locks, which allow MDL subsystem to know not only the fact that transaction has used or is going to use some object but also what kind of operation it has carried out or going to carry out on the object. This, along with the addition of a special kind of upgradable metadata lock, allows ALTER TABLE to wait until all transactions which has updated the table to go away. This solves the second issue. Another special type of upgradable metadata lock is acquired by LOCK TABLE WRITE. This second lock type allows to solve the first issue, since abortion of table-level locks in event of DDL under LOCK TABLES becomes also unnecessary. Below follows the list of incompatible changes introduced by this patch: - From now on, ALTER TABLE and CREATE/DROP TRIGGER SQL (i.e. those statements that acquire TL_WRITE_ALLOW_READ lock) wait for all transactions which has *updated* the table to complete. - From now on, LOCK TABLES ... WRITE, REPAIR/OPTIMIZE TABLE (i.e. all statements which acquire TL_WRITE table-level lock) wait for all transaction which *updated or read* from the table to complete. As a consequence, innodb_table_locks=0 option no longer applies to LOCK TABLES ... WRITE. - DROP DATABASE, DROP TABLE, RENAME TABLE no longer abort statements or transactions which use tables being dropped or renamed, and instead wait for these transactions to complete. - Since LOCK TABLES WRITE now takes a special metadata lock, not compatible with with reads or writes against the subject table and transaction-wide, thr_lock.c deadlock avoidance algorithm that used to ensure absence of deadlocks between LOCK TABLES WRITE and other statements is no longer sufficient, even for MyISAM. The wait-for graph based deadlock detector of MDL subsystem may sometimes be necessary and is involved. This may lead to ER_LOCK_DEADLOCK error produced for multi-statement transactions even if these only use MyISAM: session 1: session 2: begin; update t1 ... lock table t2 write, t1 write; -- gets a lock on t2, blocks on t1 update t2 ... (ER_LOCK_DEADLOCK) - Finally, support of LOW_PRIORITY option for LOCK TABLES ... WRITE was abandoned. LOCK TABLE ... LOW_PRIORITY WRITE from now on has the same priority as the usual LOCK TABLE ... WRITE. SELECT HIGH PRIORITY no longer trumps LOCK TABLE ... WRITE in the wait queue. - We do not take upgradable metadata locks on implicitly locked tables. So if one has, say, a view v1 that uses table t1, and issues: LOCK TABLE v1 WRITE; FLUSH TABLE t1; -- (or just 'FLUSH TABLES'), an error is produced. In order to be able to perform DDL on a table under LOCK TABLES, the table must be locked explicitly in the LOCK TABLES list. mysql-test/include/handler.inc: Adjusted test case to trigger an execution path on which bug 41110 "crash with handler command when used concurrently with alter table" and bug 41112 "crash in mysql_ha_close_table/get_lock_data with alter table" were originally discovered. Left old test case which no longer triggers this execution path for the sake of coverage. Added test coverage for HANDLER SQL statements and type-aware metadata locks. Added a test for the global shared lock and HANDLER SQL. Updated tests to take into account that the old simple deadlock detection heuristics was replaced with a graph-based deadlock detector. mysql-test/r/debug_sync.result: Updated results (see debug_sync.test). mysql-test/r/handler_innodb.result: Updated results (see handler.inc test). mysql-test/r/handler_myisam.result: Updated results (see handler.inc test). mysql-test/r/innodb-lock.result: Updated results (see innodb-lock.test). mysql-test/r/innodb_mysql_lock.result: Updated results (see innodb_mysql_lock.test). mysql-test/r/lock.result: Updated results (see lock.test). mysql-test/r/lock_multi.result: Updated results (see lock_multi.test). mysql-test/r/lock_sync.result: Updated results (see lock_sync.test). mysql-test/r/mdl_sync.result: Updated results (see mdl_sync.test). mysql-test/r/sp-threads.result: SHOW PROCESSLIST output has changed due to the fact that waiting for LOCK TABLES WRITE now happens within metadata locking subsystem. mysql-test/r/truncate_coverage.result: Updated results (see truncate_coverage.test). mysql-test/suite/funcs_1/datadict/processlist_val.inc: SELECT FROM I_S.PROCESSLIST output has changed due to fact that waiting for LOCK TABLES WRITE now happens within metadata locking subsystem. mysql-test/suite/funcs_1/r/processlist_val_no_prot.result: SELECT FROM I_S.PROCESSLIST output has changed due to fact that waiting for LOCK TABLES WRITE now happens within metadata locking subsystem. mysql-test/suite/rpl/t/rpl_sp.test: Updated to a new SHOW PROCESSLIST state name. mysql-test/t/debug_sync.test: Use LOCK TABLES READ instead of LOCK TABLES WRITE as the latter no longer allows to trigger execution path involving waiting on thr_lock.c lock and therefore reaching debug sync-point covered by this test. mysql-test/t/innodb-lock.test: Adjusted test case to the fact that innodb_table_locks=0 option is no longer supported, since LOCK TABLES WRITE handles all its conflicts within MDL subsystem. mysql-test/t/innodb_mysql_lock.test: Added test for bug #37346 "innodb does not detect deadlock between update and alter table". mysql-test/t/lock.test: Added test coverage which checks the fact that we no longer support DDL under LOCK TABLES on tables which were locked implicitly. Adjusted existing test cases accordingly. mysql-test/t/lock_multi.test: Added test for bug #46272 "MySQL 5.4.4, new MDL: unnecessary deadlock". Adjusted other test cases to take into account the fact that waiting for LOCK TABLES ... WRITE now happens within MDL subsystem. mysql-test/t/lock_sync.test: Since LOCK TABLES ... WRITE now takes SNRW metadata lock for tables locked explicitly we have to implicitly lock InnoDB tables (through view) to trigger the table-level lock conflict between TL_WRITE and TL_WRITE_ALLOW_WRITE. mysql-test/t/mdl_sync.test: Added basic test coverage for type-of-operation-aware metadata locks. Also covered with tests some use cases involving HANDLER statements in which a deadlock could arise. Adjusted existing tests to take type-of-operation-aware MDL into account. mysql-test/t/multi_update.test: Update to a new SHOW PROCESSLIST state name. mysql-test/t/truncate_coverage.test: Adjusted test case after making LOCK TABLES WRITE to wait until transactions that use the table to be locked are completed. Updated to the changed name of DEBUG_SYNC point. sql/handler.cc: Global read lock functionality has been moved into a class. sql/lock.cc: Global read lock functionality has been moved into a class. Updated code to use the new MDL API. sql/mdl.cc: Introduced new type-of-operation aware metadata locks. To do this: - Changed MDL_lock to use one list for waiting requests and one list for granted requests. For each list, added a bitmap that holds information what lock types a list contains. Added a helper class MDL_lock::List to manipulate with granted and waited lists while keeping the bitmaps in sync with list contents. - Changed lock-compatibility functions to use bitmaps that define compatibility. - Introduced a graph based deadlock detector inspired by waiting_threads.c from Maria implementation. - Now that we have a deadlock detector, and no longer have a global lock to protect individual lock objects, but rather use an rw lock per object, removed redundant code for upgrade, and the global read lock. Changed the MDL API to no longer require the caller to acquire the global intention exclusive lock by means of a separate method. Removed a few more methods that became redundant. - Removed deadlock detection heuristic, it has been made obsolete by the deadlock detector. - With operation-type-aware metadata locks, MDL subsystem has become aware of potential conflicts between DDL and open transactions. This made it possible to remove calls to mysql_abort_transactions_with_shared_lock() from acquisition paths for exclusive lock and lock upgrade. Now we can simply wait for these transactions to complete without fear of deadlock. Function mysql_lock_abort() has also become unnecessary for all conflicting cases except when a DDL conflicts with a connection that has an open HANDLER. sql/mdl.h: Introduced new type-of-operation aware metadata locks. Introduced a graph based deadlock detector and supporting methods. Added comments. God rid of redundant API calls. Renamed m_lt_or_ha_sentinel to m_trans_sentinel, since now it guards the global read lock as well as LOCK TABLES and HANDLER locks. sql/mysql_priv.h: Moved the global read lock functionality into a class. Added MYSQL_OPEN_FORCE_SHARED_MDL flag which forces open_tables() to take MDL_SHARED on tables instead of metadata locks specified in the parser. We use this to allow PREPARE run concurrently in presence of LOCK TABLES ... WRITE. Added signature for find_table_for_mdl_ugprade(). sql/set_var.cc: Global read lock functionality has been moved into a class. sql/sp_head.cc: When creating TABLE_LIST elements for prelocking or system tables set the type of request for metadata lock according to the operation that will be performed on the table. sql/sql_base.cc: - Updated code to use the new MDL API. - In order to avoid locks starvation we take upgradable locks all at once. As result implicitly locked tables no longer get an upgradable lock. Consequently DDL and FLUSH TABLES for such tables is prohibited. find_write_locked_table() was replaced by find_table_for_mdl_upgrade() function. open_table() was adjusted to return TABLE instance with upgradable ticket when necessary. - We no longer wait for all locks on OT_WAIT back off action -- only on the lock that caused the wait conflict. Moreover, now we distinguish cases when we have to wait due to conflict in MDL and old version of table in TDC. - Upate mysql_notify_threads_having_share_locks() to only abort thr_lock.c waits of threads that have open HANDLERs, since lock conflicts with only these threads now can lead to deadlocks not detectable by the MDL deadlock detector. - Remove mysql_abort_transactions_with_shared_locks() which is no longer needed. sql/sql_class.cc: Global read lock functionality has been moved into a class. Re-arranged code in THD::cleanup() to simplify assert. sql/sql_class.h: Introduced class to incapsulate global read lock functionality. Now sentinel in MDL subsystem guards the global read lock as well as LOCK TABLES and HANDLER locks. Adjusted code accordingly. sql/sql_db.cc: Global read lock functionality has been moved into a class. sql/sql_delete.cc: We no longer acquire upgradable metadata locks on tables which are locked by LOCK TABLES implicitly. As result TRUNCATE TABLE is no longer allowed for such tables. Updated code to use the new MDL API. sql/sql_handler.cc: Inform MDL_context about presence of open HANDLERs. Since HANLDERs break MDL protocol by acquiring table-level lock while holding only S metadata lock on a table MDL subsystem should take special care about such contexts (Now this is the only case when mysql_lock_abort() is used). sql/sql_parse.cc: Global read lock functionality has been moved into a class. Do not take upgradable metadata locks when opening tables for CREATE TABLE SELECT as it is not necessary and limits concurrency. When initializing TABLE_LIST objects before adding them to the table list set the type of request for metadata lock according to the operation that will be performed on the table. We no longer acquire upgradable metadata locks on tables which are locked by LOCK TABLES implicitly. As result FLUSH TABLES is no longer allowed for such tables. sql/sql_prepare.cc: Use MYSQL_OPEN_FORCE_SHARED_MDL flag when opening tables during PREPARE. This allows PREPARE to run concurrently in presence of LOCK TABLES ... WRITE. sql/sql_rename.cc: Global read lock functionality has been moved into a class. sql/sql_show.cc: Updated code to use the new MDL API. sql/sql_table.cc: Global read lock functionality has been moved into a class. We no longer acquire upgradable metadata locks on tables which are locked by LOCK TABLES implicitly. As result DROP TABLE is no longer allowed for such tables. Updated code to use the new MDL API. sql/sql_trigger.cc: Global read lock functionality has been moved into a class. We no longer acquire upgradable metadata locks on tables which are locked by LOCK TABLES implicitly. As result CREATE/DROP TRIGGER is no longer allowed for such tables. Updated code to use the new MDL API. sql/sql_view.cc: Global read lock functionality has been moved into a class. Fixed results of wrong merge that led to misuse of GLR API. CREATE VIEW statement is not a commit statement. sql/table.cc: When resetting TABLE_LIST objects for PS or SP re-execution set the type of request for metadata lock according to the operation that will be performed on the table. Do the same in auxiliary function initializing metadata lock requests in a table list. sql/table.h: When initializing TABLE_LIST objects set the type of request for metadata lock according to the operation that will be performed on the table. sql/transaction.cc: Global read lock functionality has been moved into a class.
* | Bug #43685 Lock table affects other non-related tablesJon Olav Hauglid2010-01-151-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that FLUSH TABLE <table_list> would block, waiting for all tables with old versions to be removed from the table definition cache, rather than waiting for only the tables in <table_list>. This could happen if FLUSH TABLE was used in combination with LOCK TABLES. With the new MDL code, this problem is no longer repeatable. Regression test case added to lock.test. This commit contains no code changes.
* | Fix for bug #48538 "Assertion in thr_lock() on LOAD DATA CONCURRENTJon Olav Hauglid2010-01-081-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INFILE". Attempts to execute an INSERT statement for a MEMORY table which invoked a trigger or called a stored function which tried to perform LOW_PRIORITY update on the table being inserted into, resulted in debug servers aborting due to an assertion failure. On non-debug servers such INSERTs failed with "Can't update table t1 in stored function/trigger because it is already used by statement which invoked this stored function/trigger" as expected. The problem was that in the above scenario TL_WRITE_CONCURRENT_INSERT is converted to TL_WRITE inside the thr_lock() function since the MEMORY engine does not support concurrent inserts. This triggered an assertion which assumed that for the same table, one thread always requests locks with higher thr_lock_type value first. When TL_WRITE_CONCURRENT_INSERT is upgraded to TL_WRITE after the locks have been sorted, this is no longer true. In this case, TL_WRITE was requested after acquiring a TL_WRITE_LOW_PRIORITY lock on the table, triggering the assert. This fix solves the problem by adjusting this assert to take this scenario into account. An alternative approach to change handler::store_locks() methods for all engines which do not support concurrent inserts in such way that TL_WRITE_CONCURRENT_INSERT is upgraded to TL_WRITE there instead, was considered too intrusive. Commit on behalf of Dmitry Lenev. mysql-test/r/lock.result: Added simplified test for bug #48538 "Assertion in thr_lock() on LOAD DATA CONCURRENT INFILE". mysql-test/t/lock.test: Added simplified test for bug #48538 "Assertion in thr_lock() on LOAD DATA CONCURRENT INFILE". mysys/thr_lock.c: Adjusted assertion to account for situation when TL_WRITE_CONCURRENT_INSERT is converted to TL_WRITE inside of the thr_lock() function because the engine of the table being locked does not support concurrent inserts. This scenario breaks assumption that for the same table one thread always requests locks with higher thr_lock_type value first, since TL_WRITE on the table (converted from TL_WRITE_CONCURRENT_INSERT) can be requested after acquiring a TL_WRITE_LOW_PRIORITY lock on the table. Note that it is still safe to grant a new lock without extra checks and waiting in such situation since TL_WRITE has the same compatibility rules as TL_WRITE_LOW_PRIORITY (their only difference is priority).
* | Backport of revno: 2617.68.9Jon Olav Hauglid2009-12-081-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug #43272 HANDLER SQL command does not work under LOCK TABLES HANDLER commands are now explicitly disallowed in LOCK TABLES mode. Before, HANDLER OPEN gave the misleading error message: "Table x was not locked with LOCK TABLES". This patch changes HANDLER OPEN/READ/CLOSE to give ER_LOCK_OR_ACTIVE_TRANSACTION "Can't execute the given command because you have active locked tables or an active transaction" in LOCK TABLES mode. Test case added to lock.test.
* | Backport of revno: 2617.56.21Jon Olav Hauglid2009-12-081-0/+32
| | | | | | | | | | | | | | | | | | Bug #45066 FLUSH TABLES WITH READ LOCK deadlocks against LOCK TABLE Test coverage for combinations of LOCK TABLE READ / WRITE and FLUSH TABLES / FLUSH TABLES WITH READ LOCK added to lock.test. LOCK and FLUSH are executed sequentially from one connection.
* | Backport of:Konstantin Osipov2009-12-081-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ---------------------------------------------------------- revno: 2617.69.2 committer: Konstantin Osipov <kostja@sun.com> branch nick: 5.4-azalea-bugfixing timestamp: Mon 2009-08-03 19:26:04 +0400 message: A fix and a test case for Bug#45035 "Altering table under LOCK TABLES results in "Error 1213 Deadlock found...". If a user had a table locked with LOCK TABLES for READ and for WRITE in the same connection, ALTER TABLE could fail. Root cause analysis: If a connection issues LOCK TABLE t1 write, t1 a read, t1 b read; the new LOCK TABLES code in 6.0 (part of WL 3726) will create the following list of TABLE_LIST objects (thd->locked_tables_list->m_locked_tables): {"t1" "b" tl_read_no_insert}, {"t1" "a" tl_read_no_insert}, {"t1" "t1" tl_write } Later on, when we try to ALTER table t1, mysql_alter_table() closes all TABLE instances and releases its thr_lock locks, keeping only an exclusive metadata lock on t1. But when ALTER is finished, Locked_table_list::reopen_tables() tries to restore the original list of open and locked tables. Before this patch, it used to do so one by one: Open t1 b, get TL_READ_NO_INSERT lock, Open t1 a, get TL_READ_NO_INSERT lock Open t1, try to get TL_WRITE lock, deadlock. The cause of the deadlock is that thr_lock.c doesn't resolve the situation when the read list only consists of locks taken by the same thread, followed by this very thread trying to take a WRITE lock. Indeed, since thr_lock_multi always gets a sorted list of locks, WRITE locks always precede READ locks in the list to lock. Don't try to fix thr_lock.c deficiency, keep this code simple. Instead, try to take all thr_lock locks at once in ::reopen_tables(). mysql-test/r/lock.result: Update results: test case for Bug#45035. mysql-test/t/lock.test: Add a test case for Bug#45035. sql/sql_base.cc: Take all thr_lock locks at once in Locked_tables_list::reopen_tables(). sql/sql_class.h: Add a helper array to store tables for mysql_lock_tables() in reopen_tables(). sql/sql_table.cc: Update unlink_all_closed_tables() to the new signature.
* | Backport of revno ## 2617.31.1, 2617.31.3, 2617.31.4, 2617.31.5,Konstantin Osipov2009-12-051-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2617.31.12, 2617.31.15, 2617.31.15, 2617.31.16, 2617.43.1 - initial changeset that introduced the fix for Bug#989 and follow up fixes for all test suite failures introduced in the initial changeset. ------------------------------------------------------------ revno: 2617.31.1 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: 4284-6.0 timestamp: Fri 2009-03-06 19:17:00 -0300 message: Bug#989: If DROP TABLE while there's an active transaction, wrong binlog order WL#4284: Transactional DDL locking Currently the MySQL server does not keep metadata locks on schema objects for the duration of a transaction, thus failing to guarantee the integrity of the schema objects being used during the transaction and to protect then from concurrent DDL operations. This also poses a problem for replication as a DDL operation might be replicated even thought there are active transactions using the object being modified. The solution is to defer the release of metadata locks until a active transaction is either committed or rolled back. This prevents other statements from modifying the table for the entire duration of the transaction. This provides commitment ordering for guaranteeing serializability across multiple transactions. - Incompatible change: If MySQL's metadata locking system encounters a lock conflict, the usual schema is to use the try and back-off technique to avoid deadlocks -- this schema consists in releasing all locks and trying to acquire them all in one go. But in a transactional context this algorithm can't be utilized as its not possible to release locks acquired during the course of the transaction without breaking the transaction commitments. To avoid deadlocks in this case, the ER_LOCK_DEADLOCK will be returned if a lock conflict is encountered during a transaction. Let's consider an example: A transaction has two statements that modify table t1, then table t2, and then commits. The first statement of the transaction will acquire a shared metadata lock on table t1, and it will be kept utill COMMIT to ensure serializability. At the moment when the second statement attempts to acquire a shared metadata lock on t2, a concurrent ALTER or DROP statement might have locked t2 exclusively. The prescription of the current locking protocol is that the acquirer of the shared lock backs off -- gives up all his current locks and retries. This implies that the entire multi-statement transaction has to be rolled back. - Incompatible change: FLUSH commands such as FLUSH PRIVILEGES and FLUSH TABLES WITH READ LOCK won't cause locked tables to be implicitly unlocked anymore. mysql-test/extra/binlog_tests/drop_table.test: Add test case for Bug#989. mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test: Fix test case to reflect the fact that transactions now hold metadata locks for the duration of a transaction. mysql-test/include/mix1.inc: Fix test case to reflect the fact that transactions now hold metadata locks for the duration of a transaction. mysql-test/include/mix2.inc: Fix test case to reflect the fact that transactions now hold metadata locks for the duration of a transaction. mysql-test/r/flush_block_commit.result: Update test case result (WL#4284). mysql-test/r/flush_block_commit_notembedded.result: Update test case result (WL#4284). mysql-test/r/innodb.result: Update test case result (WL#4284). mysql-test/r/innodb_mysql.result: Update test case result (WL#4284). mysql-test/r/lock.result: Add test case result for an effect of WL#4284/Bug#989 (all locks should be released when a connection terminates). mysql-test/r/mix2_myisam.result: Update test case result (effects of WL#4284/Bug#989). mysql-test/r/not_embedded_server.result: Update test case result (effects of WL#4284/Bug#989). Add a test case for interaction of WL#4284 and FLUSH PRIVILEGES. mysql-test/r/partition_innodb_semi_consistent.result: Update test case result (effects of WL#4284/Bug#989). mysql-test/r/partition_sync.result: Temporarily disable the test case for Bug#43867, which will be fixed by a subsequent backport. mysql-test/r/ps.result: Add a test case for effect of PREPARE on transactional locks: we take a savepoint at beginning of PREAPRE and release it at the end. Thus PREPARE does not accumulate metadata locks (Bug#989/WL#4284). mysql-test/r/read_only_innodb.result: Update test case result (effects of WL#4284/Bug#989). mysql-test/suite/binlog/r/binlog_row_drop_tbl.result: Add a test case result (WL#4284/Bug#989). mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Update test case result (effects of WL#4284/Bug#989). mysql-test/suite/binlog/r/binlog_stm_drop_tbl.result: Add a test case result (WL#4284/Bug#989). mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Update test case result (effects of WL#4284/Bug#989). mysql-test/suite/binlog/r/binlog_unsafe.result: A side effect of Bug#989 -- slightly different table map ids. mysql-test/suite/binlog/t/binlog_row_drop_tbl.test: Add a test case for WL#4284/Bug#989. mysql-test/suite/binlog/t/binlog_stm_drop_tbl.test: Add a test case for WL#4284/Bug#989. mysql-test/suite/binlog/t/binlog_stm_row.test: Update to the new state name. This is actually a follow up to another patch for WL#4284, that changes Locked thread state to Table lock. mysql-test/suite/ndb/r/ndb_index_ordered.result: Remove result for disabled part of the test case. mysql-test/suite/ndb/t/disabled.def: Temporarily disable a test case (Bug#45621). mysql-test/suite/ndb/t/ndb_index_ordered.test: Disable a part of a test case (needs update to reflect semantics of Bug#989). mysql-test/suite/rpl/t/disabled.def: Disable tests made meaningless by transactional metadata locking. mysql-test/suite/sys_vars/r/autocommit_func.result: Add a commit (Bug#989). mysql-test/suite/sys_vars/t/autocommit_func.test: Add a commit (Bug#989). mysql-test/t/flush_block_commit.test: Fix test case to reflect the fact that transactions now hold metadata locks for the duration of a transaction. mysql-test/t/flush_block_commit_notembedded.test: Fix test case to reflect the fact that transactions now hold metadata locks for the duration of a transaction. Add a test case for transaction-scope locks and the global read lock (Bug#989/WL#4284). mysql-test/t/innodb.test: Fix test case to reflect the fact that transactions now hold metadata locks for the duration of a transaction (effects of Bug#989/WL#4284). mysql-test/t/lock.test: Add a test case for Bug#989/WL#4284. mysql-test/t/not_embedded_server.test: Add a test case for Bug#989/WL#4284. mysql-test/t/partition_innodb_semi_consistent.test: Replace TRUNCATE with DELETE, to not issue an implicit commit of a transaction, and not depend on metadata locks. mysql-test/t/partition_sync.test: Temporarily disable the test case for Bug#43867, which needs a fix to be backported from 6.0. mysql-test/t/ps.test: Add a test case for semantics of PREPARE and transaction-scope locks: metadata locks on tables used in PREPARE are enclosed into a temporary savepoint, taken at the beginning of PREPARE, and released at the end. Thus PREPARE does not effect what locks a transaction owns. mysql-test/t/read_only_innodb.test: Fix test case to reflect the fact that transactions now hold metadata locks for the duration of a transaction (Bug#989/WL#4284). Wait for the read_only statement to actually flush tables before sending other concurrent statements that depend on its state. mysql-test/t/xa.test: Fix test case to reflect the fact that transactions now hold metadata locks for the duration of a transaction (Bug#989/WL#4284). sql/ha_ndbcluster_binlog.cc: Backport bits of changes of ha_ndbcluster_binlog.cc from 6.0, to fix the failing binlog test suite with WL#4284. WL#4284 implementation does not work with 5.1 implementation of ndbcluster binlog index. sql/log_event.cc: Release metadata locks after issuing a commit. sql/mdl.cc: Style changes (WL#4284). sql/mysql_priv.h: Rename parameter to match the name used in the definition (WL#4284). sql/rpl_injector.cc: Release metadata locks on commit (WL#4284). sql/rpl_rli.cc: Remove assert made meaningless, metadata locks are released at the end of the transaction. sql/set_var.cc: Close tables and release locks if autocommit mode is set. sql/slave.cc: Release metadata locks after a rollback. sql/sql_acl.cc: Don't implicitly unlock locked tables. Issue a implicit commit at the end and unlock tables. sql/sql_base.cc: Defer the release of metadata locks when closing tables if not required to. Issue a deadlock error if the locking protocol requires that a transaction re-acquire its locks. Release metadata locks when closing tables for reopen. sql/sql_class.cc: Release metadata locks if the thread is killed. sql/sql_parse.cc: Release metadata locks after implicitly committing a active transaction, or after explicit commits or rollbacks. sql/sql_plugin.cc: Allocate MDL request on the stack as the use of the table is contained within the function. It will be removed from the context once close_thread_tables is called at the end of the function. sql/sql_prepare.cc: The problem is that the prepare phase of the CREATE TABLE statement takes a exclusive metadata lock lock and this can cause a self-deadlock the thread already holds a shared lock on the table being that should be created. The solution is to make the prepare phase take a shared metadata lock when preparing a CREATE TABLE statement. The execution of the statement will still acquire a exclusive lock, but won't cause any problem as it issues a implicit commit. After some discussions with stakeholders it has been decided that metadata locks acquired during a PREPARE statement must be released once the statement is prepared even if it is prepared within a multi statement transaction. sql/sql_servers.cc: Don't implicitly unlock locked tables. Issue a implicit commit at the end and unlock tables. sql/sql_table.cc: Close table and release metadata locks after a admin operation. sql/table.h: The problem is that the prepare phase of the CREATE TABLE statement takes a exclusive metadata lock lock and this can cause a self-deadlock the thread already holds a shared lock on the table being that should be created. The solution is to make the prepare phase take a shared metadata lock when preparing a CREATE TABLE statement. The execution of the statement will still acquire a exclusive lock, but won't cause any problem as it issues a implicit commit. sql/transaction.cc: Release metadata locks after the implicitly committed due to a new transaction being started. Also, release metadata locks acquired after a savepoint if the transaction is rolled back to the save point. The problem is that in some cases transaction-long metadata locks could be released before the transaction was committed. This could happen when a active transaction was ended by a "START TRANSACTION" or "BEGIN" statement, in which case the metadata locks would be released before the actual commit of the active transaction. The solution is to defer the release of metadata locks to after the transaction has been implicitly committed. No test case is provided as the effort to provide one is too disproportional to the size of the fix.
* | Backport of:Konstantin Osipov2009-12-021-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ---------------------------------------------------------- revno: 2630.4.35 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-3726 timestamp: Wed 2008-06-25 16:44:00 +0400 message: Fix a MyISAM-specific bug in the new implementation of LOCK TABLES (WL#3726). If more than one instance of a MyISAM table are open in the same connection, all of them must share the same status_param. Otherwise, unlock of a table may lead to lost records. See also comments in thr_lock.c. include/thr_lock.h: Declare thr_lock_merge_status(). mysql-test/r/lock.result: Update test results (WL#3726). mysql-test/t/lock.test: Add a test case for the situation when the same table is locked twice by LOCK TABLES, and only one instance is updated. mysys/thr_lock.c: Move the code that makes sure all status_params of the same table are shared into a separate function. sql/lock.cc: Make sure that status_param is shared when a table is reopened.
* | Backport of:Konstantin Osipov2009-12-021-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ---------------------------------------------------------- revno: 2630.10.1 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-lock-tables-tidyup timestamp: Wed 2008-06-11 15:49:58 +0400 message: WL#3726, review fixes. Now that we have metadata locks, we don't need to keep a crippled TABLE instance in the table cache to indicate that a table is locked. Remove all code that used this technique. Instead, rely on metadata locks and use the standard open_table() and close_thread_table() to manipulate with the table cache tables. Removes a list of functions that have become unused (see the comment for sql_base.cc for details). Under LOCK TABLES, keep a TABLE_LIST instance for each table that may be temporarily closed. For that, implement an own class for LOCK TABLES mode, Locked_tables_list. This is a pre-requisite patch for WL#4144. This is not exactly a backport: there is no new online ALTER table in Celosia, so the old alter table code was changed to work with the new table cache API. mysql-test/r/lock.result: Update results (WL#3726 post-review patch). mysql-test/r/trigger-compat.result: We take the table from the table cache now, thus no warning. mysql-test/suite/rpl/r/rpl_trigger.result: We take the table from the table cache now, thus no warning. mysql-test/t/lock.test: Additional tests for LOCK TABLES mode (previously not covered by the test suite (WL#3726). sql/field.h: Remove reopen_table(). sql/lock.cc: Remove an obsolete parameter of mysql_lock_remove(). It's not used anywhere now either. sql/mysql_priv.h: Add 4 new open_table() flags. Remove declarations of removed functions. sql/sp_head.cc: Rename thd->mdl_el_root to thd->locked_tables_root. sql/sql_acl.cc: Use the new implementation of unlock_locked_tables(). sql/sql_base.cc: Implement class Locked_tables_list. Implement close_all_tables_for_name(). Rewrite close_cached_tables() to use the new reopen_tables(). Remove reopen_table(), reopen_tables(), reopen_table_entry() (ex. open_unireg_entry()), close_data_files_and_leave_as_placeholders(), close_handle_and_leave_table_as_placeholder(), close_cached_table(), table_def_change_share(), reattach_merge(), reopen_name_locked_table(), unlink_open_table(). Move acquisition of a metadata lock into an own function - open_table_get_mdl_lock(). sql/sql_class.cc: Deploy class Locked_tables_list. sql/sql_class.h: Declare class Locked_tables_list. Keep one instance of this class in class THD. Rename mdl_el_root to locked_tables_root. sql/sql_db.cc: Update a comment. sql/sql_insert.cc: Use the plain open_table() to open a just created table in CREATE TABLE .. SELECT. sql/sql_parse.cc: Use thd->locked_tables_list to enter and leave LTM_LOCK_TABLES mode. sql/sql_partition.cc: Deploy the new method of working with partitioned table locks. sql/sql_servers.cc: Update to the new signature of unlock_locked_tables(). sql/sql_table.cc: In mysql_rm_table_part2(), the branch that removes a table under LOCK TABLES, make sure that the table being dropped is also removed from THD::locked_tables_list. Update ALTER TABLE and CREATE TABLE LIKE implementation to use open_table() and close_all_tables_for_name() instead of reopen_tables(). sql/sql_trigger.cc: Use the new locking way. sql/table.h: Add TABLE::pos_in_locked_tables, which is used only under LOCK TABLES.
* | Initial import of WL#3726 "DDL locking for all metadata objects".Konstantin Osipov2009-11-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of: ------------------------------------------------------------ revno: 2630.4.1 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Fri 2008-05-23 17:54:03 +0400 message: WL#3726 "DDL locking for all metadata objects". After review fixes in progress. ------------------------------------------------------------ This is the first patch in series. It transforms the metadata locking subsystem to use a dedicated module (mdl.h,cc). No significant changes in the locking protocol. The import passes the test suite with the exception of deprecated/removed 6.0 features, and MERGE tables. The latter are subject to a fix by WL#4144. Unfortunately, the original changeset comments got lost in a merge, thus this import has its own (largely insufficient) comments. This patch fixes Bug#25144 "replication / binlog with view breaks". Warning: this patch introduces an incompatible change: Under LOCK TABLES, it's no longer possible to FLUSH a table that was not locked for WRITE. Under LOCK TABLES, it's no longer possible to DROP a table or VIEW that was not locked for WRITE. ****** Backport of: ------------------------------------------------------------ revno: 2630.4.2 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Sat 2008-05-24 14:03:45 +0400 message: WL#3726 "DDL locking for all metadata objects". After review fixes in progress. ****** Backport of: ------------------------------------------------------------ revno: 2630.4.3 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Sat 2008-05-24 14:08:51 +0400 message: WL#3726 "DDL locking for all metadata objects" Fixed failing Windows builds by adding mdl.cc to the lists of files needed to build server/libmysqld on Windows. ****** Backport of: ------------------------------------------------------------ revno: 2630.4.4 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Sat 2008-05-24 21:57:58 +0400 message: WL#3726 "DDL locking for all metadata objects". Fix for assert failures in kill.test which occured when one tried to kill ALTER TABLE statement on merge table while it was waiting in wait_while_table_is_used() for other connections to close this table. These assert failures stemmed from the fact that cleanup code in this case assumed that temporary table representing new version of table was open with adding to THD::temporary_tables list while code which were opening this temporary table wasn't always fulfilling this. This patch changes code that opens new version of table to always do this linking in. It also streamlines cleanup process for cases when error occurs while we have new version of table open. ****** WL#3726 "DDL locking for all metadata objects" Add libmysqld/mdl.cc to .bzrignore. ****** Backport of: ------------------------------------------------------------ revno: 2630.4.6 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Sun 2008-05-25 00:33:22 +0400 message: WL#3726 "DDL locking for all metadata objects". Addition to the fix of assert failures in kill.test caused by changes for this worklog. Make sure we close the new table only once. .bzrignore: Add libmysqld/mdl.cc libmysqld/CMakeLists.txt: Added mdl.cc to the list of files needed for building of libmysqld. libmysqld/Makefile.am: Added files implementing new meta-data locking subsystem to the server. mysql-test/include/handler.inc: Use separate connection for waiting while threads performing DDL operations conflicting with open HANDLER tables reach blocked state. This is required because now we check and close tables open by HANDLER statements in this connection conflicting with DDL in another each time open_tables() is called and thus select from I_S which is used for waiting will unblock DDL operations if issued from connection with open HANDLERs. mysql-test/r/create.result: Adjusted test case after change in implementation of CREATE TABLE ... SELECT. We no longer have special check in open_table() which catches the case when we select from the table created. Instead we rely on unique_table() call which happens after opening and locking all tables. mysql-test/r/flush.result: FLUSH TABLES WITH READ LOCK can no longer happen under LOCK TABLES. Updated test accordingly. mysql-test/r/flush_table.result: Under LOCK TABLES we no longer allow to do FLUSH TABLES for tables locked for read. Updated test accordingly. mysql-test/r/handler_innodb.result: Use separate connection for waiting while threads performing DDL operations conflicting with open HANDLER tables reach blocked state. This is required because now we check and close tables open by HANDLER statements in this connection conflicting with DDL in another each time open_tables() is called and thus select from I_S which is used for waiting will unblock DDL operations if issued from connection with open HANDLERs. mysql-test/r/handler_myisam.result: Use separate connection for waiting while threads performing DDL operations conflicting with open HANDLER tables reach blocked state. This is required because now we check and close tables open by HANDLER statements in this connection conflicting with DDL in another each time open_tables() is called and thus select from I_S which is used for waiting will unblock DDL operations if issued from connection with open HANDLERs. mysql-test/r/information_schema.result: Additional test for WL#3726 "DDL locking for all metadata objects". Check that we use high-priority metadata lock requests when filling I_S tables. Rearrange tests to match 6.0 better (fewer merge conflicts). mysql-test/r/kill.result: Added tests checking that DDL and DML statements waiting for metadata locks can be interrupted by KILL command. mysql-test/r/lock.result: One no longer is allowed to do DROP VIEW under LOCK TABLES even if this view is locked by LOCK TABLES. The problem is that in such situation write locks on view are not mutually exclusive so upgrading metadata lock which is required for dropping of view will lead to deadlock. mysql-test/r/partition_column_prune.result: Update results (same results in 6.0), WL#3726 mysql-test/r/partition_pruning.result: Update results (same results in 6.0), WL#3726 mysql-test/r/ps_ddl.result: We no longer invalidate prepared CREATE TABLE ... SELECT statement if target table changes. This is OK since it is not strictly necessary. The first change is wrong, is caused by FLUSH TABLE now flushing all unused tables. This is a regression that Dmitri fixed in 6.0 in a follow up patch. mysql-test/r/sp.result: Under LOCK TABLES we no longer allow accessing views which were not explicitly locked. To access view we need to obtain metadata lock on it and doing this under LOCK TABLES may lead to deadlocks. mysql-test/r/view.result: One no longer is allowed to do DROP VIEW under LOCK TABLES even if this view is locked by LOCK TABLES. The problem is that in such situation even "write locks" on view are not mutually exclusive so upgrading metadata lock which is required for dropping of view will lead to deadlock mysql-test/r/view_grant.result: ALTER VIEW implementation was changed to open a view only after checking that user which does alter has appropriate privileges on it. This means that in case when user's privileges are insufficient for this we won't check that new view definer is the same as original one or user performing alter has SUPER privilege. Adjusted test case accordingly. mysql-test/r/view_multi.result: Added test case for bug#25144 "replication / binlog with view breaks". mysql-test/suite/rpl/t/disabled.def: Disable test for deprecated features (they don't work with new MDL). mysql-test/t/create.test: Adjusted test case after change in implementation of CREATE TABLE ... SELECT. We no longer have special check in open_table() which catches the case when we select from the table created. Instead we rely on unique_table() call which happens after opening and locking all tables. mysql-test/t/disabled.def: Disable merge.test, subject of WL#4144 mysql-test/t/flush.test: FLUSH TABLES WITH READ LOCK can no longer happen under LOCK TABLES. Updated test accordingly. mysql-test/t/flush_table.test: Under LOCK TABLES we no longer allow to do FLUSH TABLES for tables locked for read. Updated test accordingly. mysql-test/t/information_schema.test: Additional test for WL#3726 "DDL locking for all metadata objects". Check that we use high-priority metadata lock requests when filling I_S tables. Rearrange the results for easier merges with 6.0. mysql-test/t/kill.test: Added tests checking that DDL and DML statements waiting for metadata locks can be interrupted by KILL command. mysql-test/t/lock.test: One no longer is allowed to do DROP VIEW under LOCK TABLES even if this view is locked by LOCK TABLES. The problem is that in such situation write locks on view are not mutually exclusive so upgrading metadata lock which is required for dropping of view will lead to deadlock. mysql-test/t/lock_multi.test: Adjusted test case to the changes of status in various places caused by change in implementation FLUSH TABLES WITH READ LOCK, which is now takes global metadata lock before flushing tables and therefore waits on at these places. mysql-test/t/ps_ddl.test: We no longer invalidate prepared CREATE TABLE ... SELECT statement if target table changes. This is OK since it is not strictly necessary. The first change is wrong, is caused by FLUSH TABLE now flushing all unused tables. This is a regression that Dmitri fixed in 6.0 in a follow up patch. mysql-test/t/sp.test: Under LOCK TABLES we no longer allow accessing views which were not explicitly locked. To access view we need to obtain metadata lock on it and doing this under LOCK TABLES may lead to deadlocks. mysql-test/t/trigger_notembedded.test: Adjusted test case to the changes of status in various places caused by change in implementation FLUSH TABLES WITH READ LOCK, which is now takes global metadata lock before flushing tables and therefore waits on at these places. mysql-test/t/view.test: One no longer is allowed to do DROP VIEW under LOCK TABLES even if this view is locked by LOCK TABLES. The problem is that in such situation even "write locks" on view are not mutually exclusive so upgrading metadata lock which is required for dropping of view will lead to deadlock. mysql-test/t/view_grant.test: ALTER VIEW implementation was changed to open a view only after checking that user which does alter has appropriate privileges on it. This means that in case when user's privileges are insufficient for this we won't check that new view definer is the same as original one or user performing alter has SUPER privilege. Adjusted test case accordingly. mysql-test/t/view_multi.test: Added test case for bug#25144 "replication / binlog with view breaks". sql/CMakeLists.txt: Added mdl.cc to the list of files needed for building of server. sql/Makefile.am: Added files implementing new meta-data locking subsystem to the server. sql/event_db_repository.cc: Allocate metadata lock requests objects (MDL_LOCK) on execution memory root in cases when TABLE_LIST objects is also allocated there or on stack. sql/ha_ndbcluster.cc: Adjusted code to work nicely with new metadata locking subsystem. close_cached_tables() no longer has wait_for_placeholder argument. Instead of relying on this parameter and related behavior FLUSH TABLES WITH READ LOCK now takes global shared metadata lock. sql/ha_ndbcluster_binlog.cc: Adjusted code to work with new metadata locking subsystem. close_cached_tables() no longer has wait_for_placeholder argument. Instead of relying on this parameter and related behavior FLUSH TABLES WITH READ LOCK now takes global shared metadata lock. sql/handler.cc: update_frm_version(): Directly update TABLE_SHARE::mysql_version member instead of going through all TABLE instances for this table (old code was a legacy from pre-table-definition-cache days). sql/lock.cc: Use new metadata locking subsystem. Threw away most of functions related to name locking as now one is supposed to use metadata locking API instead. In lock_global_read_lock() and unlock_global_read_lock() in order to avoid problems with global read lock sneaking in at the moment when we perform FLUSH TABLES or ALTER TABLE under LOCK TABLES and when tables being reopened are protected only by metadata locks we also have to take global shared meta data lock. sql/log_event.cc: Adjusted code to work with new metadata locking subsystem. For tables open by slave thread for applying RBR events allocate memory for lock request object in the same chunk of memory as TABLE_LIST objects for them. In order to ensure that we keep these objects around until tables are open always close tables before calling Relay_log_info::clear_tables_to_lock(). Use new auxiliary Relay_log_info::slave_close_thread_tables() method to enforce this. sql/log_event_old.cc: Adjusted code to work with new metadata locking subsystem. Since for tables open by slave thread for applying RBR events memory for lock request object is allocated in the same chunk of memory as TABLE_LIST objects for them we have to ensure that we keep these objects around until tables are open. To ensure this we always close tables before calling Relay_log_info::clear_tables_to_lock(). To enfore this we use new auxiliary Relay_log_info::slave_close_thread_tables() method. sql/mdl.cc: Implemented new metadata locking subsystem and API described in WL3726 "DDL locking for all metadata objects". sql/mdl.h: Implemented new metadata locking subsystem and API described in WL3726 "DDL locking for all metadata objects". sql/mysql_priv.h: - close_thread_tables()/close_tables_for_reopen() now has one more argument which indicates that metadata locks should be released but not removed from the context in order to be used later in mdl_wait_for_locks() and tdc_wait_for_old_version(). - close_cached_table() routine is no longer public. - Thread waiting in wait_while_table_is_used() can be now killed so this function returns boolean to make caller aware of such situation. - We no longer have table cache as separate entity instead used and unused TABLE instances are linked to TABLE_SHARE objects in table definition cache. - Now third argument of open_table() is also used for requesting table repair or auto-discovery of table's new definition. So its type was changed from bool to enum. - Added tdc_open_view() function for opening view by getting its definition from disk (and table cache in future). - reopen_name_locked_table() no longer needs "link_in" argument as now we have exclusive metadata locks instead of dummy TABLE instances when this function is called. - find_locked_table() now takes head of list of TABLE instances instead of always scanning through THD::open_tables list. Also added find_write_locked_table() auxiliary. - reopen_tables(), close_cached_tables() no longer have mark_share_as_old and wait_for_placeholder arguments. Instead of relying on this parameters and related behavior FLUSH TABLES WITH READ LOCK now takes global shared metadata lock. - We no longer need drop_locked_tables() and abort_locked_tables(). - mysql_ha_rm_tables() now always assume that LOCK_open is not acquired by caller. - Added notify_thread_having_shared_lock() callback invoked by metadata locking subsystem when acquiring an exclusive lock, for each thread that has a conflicting shared metadata lock. - Introduced expel_table_from_cache() as replacement for remove_table_from_cache() (the main difference is that this new function assumes that caller follows metadata locking protocol and never waits). - Threw away most of functions related to name locking. One should use new metadata locking subsystem and API instead. sql/mysqld.cc: Got rid of call initializing/deinitializing table cache since now it is embedded into table definition cache. Added calls for initializing/ deinitializing metadata locking subsystem. sql/rpl_rli.cc: Introduced auxiliary Relay_log_info::slave_close_thread_tables() method which is used for enforcing that we always close tables open for RBR before deallocating TABLE_LIST elements and MDL_LOCK objects for them. sql/rpl_rli.h: Introduced auxiliary Relay_log_info::slave_close_thread_tables() method which is used for enforcing that we always close tables open for RBR before deallocating TABLE_LIST elements and MDL_LOCK objects for them. sql/set_var.cc: close_cached_tables() no longer has wait_for_placeholder argument. Instead of relying on this parameter and related behavior FLUSH TABLES WITH READ LOCK now takes global shared metadata lock. sql/sp_head.cc: For tables added to the statement's table list by prelocking algorithm we allocate these objects either on the same memory as corresponding table list elements or on THD::locked_tables_root (if we are building table list for LOCK TABLES). sql/sql_acl.cc: Allocate metadata lock requests objects (MDL_LOCK) on execution memory root in cases when we use stack TABLE_LIST objects to open tables. Got rid of redundant code by using unlock_locked_tables() function. sql/sql_base.cc: Changed code to use new MDL subsystem. Got rid of separate table cache. Now used and unused TABLE instances are linked to the TABLE_SHAREs in table definition cache. check_unused(): Adjusted code to the fact that we no longer have separate table cache. Removed dead code. table_def_free(): Free TABLE instances referenced from TABLE_SHARE objects before destroying table definition cache. get_table_share(): Added assert which ensures that noone will be able to access table (and its share) without acquiring some kind of metadata lock first. close_handle_and_leave_table_as_lock(): Adjusted code to the fact that TABLE instances now are linked to list in TABLE_SHARE. list_open_tables(): Changed this function to use table definition cache instead of table cache. free_cache_entry(): Unlink freed TABLE elements from the list of all TABLE instances for the table in TABLE_SHARE. kill_delayed_thread_for_table(): Added auxiliary for killing delayed insert threads for particular table. close_cached_tables(): Got rid of wait_for_refresh argument as we now rely on global shared metadata lock to prevent FLUSH WITH READ LOCK sneaking in when we are reopening tables. Heavily reworked this function to use new MDL code and not to rely on separate table cache entity. close_open_tables(): We no longer have separate table cache. close_thread_tables(): Release metadata locks after closing all tables. Added skip_mdl argument which allows us not to remove metadata lock requests from the context in case when we are going to use this requests later in mdl_wait_for_locks() and tdc_wait_for_old_versions(). close_thread_table()/close_table_for_reopen(): Since we no longer have separate table cache and all TABLE instances are linked to TABLE_SHARE objects in table definition cache we have to link/unlink TABLE object to/from appropriate lists in the share. name_lock_locked_table(): Moved redundant code to find_write_locked_table() function and adjusted code to the fact that wait_while_table_is_used() can now return with an error if our thread is killed. reopen_table_entry(): We no longer need "link_in" argument as with MDL we no longer call this function with dummy TABLE object pre-allocated and added to the THD::open_tables. Also now we add newly-open TABLE instance to the list of share's used TABLE instances. table_cache_insert_placeholder(): Got rid of name-locking legacy. lock_table_name_if_not_cached(): Moved to sql_table.cc the only place where it is used. It was also reimplemented using new MDL API. open_table(): - Reworked this function to use new MDL subsystem. - Changed code to deal with table definition cache directly instead of going through separate table cache. - Now third argument is also used for requesting table repair or auto-discovery of table's new definition. So its type was changed from bool to enum. find_locked_table()/find_write_locked_table(): Accept head of list of TABLE objects as first argument and use this list instead of always searching in THD::open_tables list. Also added auxiliary for finding write-locked locked tables. reopen_table(): Adjusted function to work with new MDL subsystem and to properly manuipulate with lists of used/unused TABLE instaces in TABLE_SHARE. reopen_tables(): Removed mark_share_as_old parameter. Instead of relying on it and related behavior FLUSH TABLES WITH READ LOCK now takes global shared metadata lock. Changed code after removing separate table cache. drop_locked_tables()/abort_locked_tables(): Got rid of functions which are no longer needed. unlock_locked_tables(): Moved this function from sql_parse.cc and changed it to release memory which was used for allocating metadata lock requests for tables open and locked by LOCK TABLES. tdc_open_view(): Intoduced function for opening a view by getting its definition from disk (and table cache in future). reopen_table_entry(): Introduced function for opening table definitions while holding exclusive metatadata lock on it. open_unireg_entry(): Got rid of this function. Most of its functionality is relocated to open_table() and open_table_fini() functions, and some of it to reopen_table_entry() and tdc_open_view(). Also code resposible for auto-repair and auto-discovery of tables was moved to separate function. open_table_entry_fini(): Introduced function which contains common actions which finalize process of TABLE object creation. auto_repair_table(): Moved code responsible for auto-repair of table being opened here. handle_failed_open_table_attempt() Moved code responsible for handling failing attempt to open table to one place (retry due to lock conflict/old version, auto-discovery and repair). open_tables(): - Flush open HANDLER tables if they have old version of if there is conflicting metadata lock against them (before this moment we had this code in open_table()). - When we open view which should be processed via derived table on the second execution of prepared statement or stored routine we still should call open_table() for it in order to obtain metadata lock on it and prepare its security context. - In cases when we discover that some special handling of failure to open table is needed call handle_failed_open_table_attempt() which handles all such scenarios. open_ltable(): Handling of various special scenarios of failure to open a table was moved to separate handle_failed_open_table_attempt() function. remove_db_from_cache(): Removed this function as it is no longer used. notify_thread_having_shared_lock(): Added callback which is invoked by MDL subsystem when acquiring an exclusive lock, for each thread that has a conflicting shared metadata lock. expel_table_from_cache(): Introduced function for removing unused TABLE instances. Unlike remove_table_from_cache() it relies on caller following MDL protocol and having appropriate locks when calling it and thus does not do any waiting if table is still in use. tdc_wait_for_old_version(): Added function which allows open_tables() to wait in cases when we discover that we should back-off due to presence of old version of table. abort_and_upgrade_lock(): Use new MDL calls. mysql_wait_completed_table(): Got rid of unused function. open_system_tables_for_read/for_update()/performance_schema_table(): Allocate MDL_LOCK objects on execution memory root in cases when TABLE_LIST objects for corresponding tables is allocated on stack. close_performance_schema_table(): Release metadata locks after closing tables. ****** Use I_P_List for free/used tables list in the table share. sql/sql_binlog.cc: Use Relay_log_info::slave_close_thread_tables() method to enforce that we always close tables open for RBR before deallocating TABLE_LIST elements and MDL_LOCK objects for them. sql/sql_class.cc: Added meta-data locking contexts as part of Open_tables_state context. Also introduced THD::locked_tables_root memory root which is to be used for allocating MDL_LOCK objects for tables in LOCK TABLES statement (end of lifetime for such objects is UNLOCK TABLES so we can't use statement or execution root for them). sql/sql_class.h: Added meta-data locking contexts as part of Open_tables_state context. Also introduced THD::locked_tables_root memory root which is to be used for allocating MDL_LOCK objects for tables in LOCK TABLES statement (end of lifetime for such objects is UNLOCK TABLES so we can't use statement or execution root for them). Note: handler_mdl_context and locked_tables_root and mdl_el_root will be removed by subsequent patches. sql/sql_db.cc: mysql_rm_db() does not really need to call remove_db_from_cache() as it drops each table in the database using mysql_rm_table_part2(), which performs all necessary operations on table (definition) cache. sql/sql_delete.cc: Use the new metadata locking API for TRUNCATE. sql/sql_handler.cc: Changed HANDLER implementation to use new metadata locking subsystem. Note that MDL_LOCK objects for HANDLER tables are allocated in the same chunk of heap memory as TABLE_LIST object for those tables. sql/sql_insert.cc: mysql_insert(): find_locked_table() now takes head of list of TABLE object as its argument instead of always scanning through THD::open_tables list. handle_delayed_insert(): Allocate metadata lock request object for table open by delayed insert thread on execution memroot. create_table_from_items(): We no longer allocate dummy TABLE objects for tables being created if they don't exist. As consequence reopen_name_locked_table() no longer has link_in argument. open_table() now has one more argument which is not relevant for temporary tables. sql/sql_parse.cc: - Moved unlock_locked_tables() routine to sql_base.cc and made available it in other files. Got rid of some redundant code by using this function. - Replaced boolean TABLE_LIST::create member with enum open_table_type member. - Use special memory root for allocating MDL_LOCK objects for tables open and locked by LOCK TABLES (these object should live till UNLOCK TABLES so we can't allocate them on statement nor execution memory root). Also properly set metadata lock upgradability attribure for those tables. - Under LOCK TABLES it is no longer allowed to flush tables which are not write-locked as this breaks metadata locking protocol and thus potentially might lead to deadlock. - Added auxiliary adjust_mdl_locks_upgradability() function. sql/sql_partition.cc: Adjusted code to the fact that reopen_tables() no longer has "mark_share_as_old" argument. Got rid of comments which are no longer true. sql/sql_plist.h: Added I_P_List template class for parametrized intrusive doubly linked lists and I_P_List_iterator for corresponding iterator. Unlike for I_List<> list elements of such list can participate in several lists. Unlike List<> such lists are doubly-linked and intrusive. sql/sql_plugin.cc: Allocate metadata lock requests objects (MDL_LOCK) on execution memory root in cases when we use stack TABLE_LIST objects to open tables. sql/sql_prepare.cc: Replaced boolean TABLE_LIST::create member with enum open_table_type member. This allows easily handle situation in which instead of opening the table we want only to take exclusive metadata lock on it. sql/sql_rename.cc: Use new metadata locking subsystem in implementation of RENAME TABLE. sql/sql_servers.cc: Allocate metadata lock requests objects (MDL_LOCK) on execution memory root in cases when we use stack TABLE_LIST objects to open tables. Got rid of redundant code by using unlock_locked_tables() function. sql/sql_show.cc: Acquire shared metadata lock when we are getting information for I_S table directly from TABLE_SHARE without doing full-blown table open. We use high priority lock request in this situation in order to avoid deadlocks. Also allocate metadata lock requests objects (MDL_LOCK) on execution memory root in cases when TABLE_LIST objects are also allocated there sql/sql_table.cc: mysql_rm_table(): Removed comment which is no longer relevant. mysql_rm_table_part2(): Now caller of mysql_ha_rm_tables() should not own LOCK_open. Adjusted code to use new metadata locking subsystem instead of name-locks. lock_table_name_if_not_cached(): Moved this function from sql_base.cc to this file and reimplemented it using metadata locking API. mysql_create_table(): Adjusted code to use new MDL API. wait_while_table_is_used(): Changed function to use new MDL subsystem. Made thread waiting in it killable (this also led to introduction of return value so caller can distinguish successful executions from situations when waiting was aborted). close_cached_tables(): Thread waiting in this function is killable now. As result it has return value for distinguishing between succes and failure. Got rid of redundant boradcast_refresh() call. prepare_for_repair(): Use MDL subsystem instead of name-locks. mysql_admin_table(): mysql_ha_rm_tables() now always assumes that caller doesn't own LOCK_open. mysql_repair_table(): We should mark all elements of table list as requiring upgradable metadata locks. mysql_create_table_like(): Use new MDL subsystem instead of name-locks. create_temporary_tables(): We don't need to obtain metadata locks when creating temporary table. mysql_fast_or_online_alter_table(): Thread waiting in wait_while_table_is_used() is now killable. mysql_alter_table(): Adjusted code to work with new MDL subsystem and to the fact that threads waiting in what_while_table_is_used() and close_cached_table() are now killable. sql/sql_test.cc: We no longer have separate table cache. TABLE instances are now associated with/linked to TABLE_SHARE objects in table definition cache. sql/sql_trigger.cc: Adjusted code to work with new metadata locking subsystem. Also reopen_tables() no longer has mark_share_as_old argument (Instead of relying on this parameter and related behavior FLUSH TABLES WITH READ LOCK now takes global shared metadata lock). sql/sql_udf.cc: Allocate metadata lock requests objects (MDL_LOCK) on execution memory root in cases when we use stack TABLE_LIST objects to open tables. sql/sql_update.cc: Adjusted code to work with new meta-data locking subsystem. sql/sql_view.cc: Added proper meta-data locking to implementations of CREATE/ALTER/DROP VIEW statements. Now we obtain exclusive meta-data lock on a view before creating/ changing/dropping it. This ensures that all concurrent statements that use this view will finish before our statement will proceed and therefore we will get correct order of statements in the binary log. Also ensure that TABLE_LIST::mdl_upgradable attribute is properly propagated for underlying tables of view. sql/table.cc: Added auxiliary alloc_mdl_locks() function for allocating metadata lock request objects for all elements of table list. sql/table.h: TABLE_SHARE: Got rid of unused members. Introduced members for storing lists of used and unused TABLE objects for this share. TABLE: Added members for linking TABLE objects into per-share lists of used and unused TABLE instances. Added member for holding pointer to metadata lock for this table. TABLE_LIST: Replaced boolean TABLE_LIST::create member with enum open_table_type member. This allows easily handle situation in which instead of opening the table we want only to take exclusive meta-data lock on it (we need this in order to handle ALTER VIEW and CREATE VIEW statements). Introduced new mdl_upgradable member for marking elements of table list for which we need to take upgradable shared metadata lock instead of plain shared metadata lock. Added pointer for holding pointer to MDL_LOCK for the table. Added auxiliary alloc_mdl_locks() function for allocating metadata lock requests objects for all elements of table list. Added auxiliary set_all_mdl_upgradable() function for marking all elements in table list as requiring upgradable metadata locks. storage/myisammrg/ha_myisammrg.cc: Allocate MDL_LOCK objects for underlying tables of MERGE table. To be reworked once Ingo pushes his patch for WL4144.
* | Backport of:Konstantin Osipov2009-11-201-0/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------ 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.
* Bug#39843 DELETE requires write access to table in subquery in where clauseKristofer Pettersson2009-03-051-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An unnecessarily restrictive lock were taken on sub-SELECTs during DELETE. During parsing, a global structure is reused for sub-SELECTs and the attribute keeping track of lock options were not reset properly. This patch introduces a new attribute to keep track on the syntactical lock option elements found in a sub-SELECT and then sets the lock options accordingly. Now the sub-SELECTs will try to acquire a READ lock if possible instead of a WRITE lock as inherited from the outer DELETE statement. mysql-test/r/lock.result: Added test case for bug39843 mysql-test/t/lock.test: Added test case for bug39843 sql/sql_lex.cc: * Reset member variable lock_option on each new query. sql/sql_lex.h: * Introduced new member variable 'lock_option' which is keeping track of the syntactical lock option of a (sub-)select query. sql/sql_parse.cc: * Wrote comments to functions. sql/sql_yacc.yy: * Introduced an attribute to keep track of syntactical lock options in sub-selects. * Made sure that the default value TL_READ_DEFAULT is at the begining of each subselect-rule.
* Add a test case for Bug#5719 "impossible to lock VIEW".unknown2007-08-021-0/+65
| | | | | | | | | | It has been possible to lock a view in 5.1 for some time. mysql-test/r/lock.result: Update results (Bug#5719) mysql-test/t/lock.test: Add a test case for Bug#5719 "impossible to lock VIEW"
* BUG#9953: CONVERT_TZ requires mysql.time_zone_name to be lockedunknown2007-03-091-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that some facilities (like CONVERT_TZ() function or server HELP statement) may require implicit access to some tables in 'mysql' database. This access was done by ordinary means of adding such tables to the list of tables the query is going to open. However, if we issued LOCK TABLES before that, we would get "table was not locked" error trying to open such implicit tables. The solution is to treat certain tables as MySQL system tables, like we already do for mysql.proc. Such tables may be opened for reading at any moment regardless of any locks in effect. The cost of this is that system table may be locked for writing only together with other system tables, it is disallowed to lock system tables for writing and have any other lock on any other table. After this patch the following tables are treated as MySQL system tables: mysql.help_category mysql.help_keyword mysql.help_relation mysql.help_topic mysql.proc (it already was) mysql.time_zone mysql.time_zone_leap_second mysql.time_zone_name mysql.time_zone_transition mysql.time_zone_transition_type These tables are now opened with open_system_tables_for_read() and closed with close_system_tables(), or one table may be opened with open_system_table_for_update() and closed with close_thread_tables() (the latter is used for mysql.proc table, which is updated as part of normal MySQL server operation). These functions may be used when some tables were opened and locked already. NOTE: online update of time zone tables is not possible during replication, because there's no time zone cache flush neither on LOCK TABLES, nor on FLUSH TABLES, so the master may serve stale time zone data from cache, while on slave updated data will be loaded from the time zone tables. mysql-test/r/help.result: Update result. mysql-test/r/lock.result: Update result. mysql-test/r/sp-error.result: Update result. mysql-test/r/timezone2.result: Add result for bug#9953: CONVERT_TZ requires mysql.time_zone_name to be locked. mysql-test/r/view.result: Update result: use table t3 rather than utilize MySQL system table. mysql-test/t/help.test: Test that we can use HELP even under LOCK TABLES. mysql-test/t/lock.test: Test LOCK TABLE on system tables. mysql-test/t/timezone2.test: Add test case for bug#9953: CONVERT_TZ requires mysql.time_zone_name to be locked. mysql-test/t/view.test: Update test: use table t3 rather that utilize MySQL system table. sql/handler.h: Fix comment for 'count' parameter of check_if_locking_is_allowed(). Add 'current' and 'system_count' parameters. sql/item_create.cc: We no longer have LEX::add_time_zone_tables_to_query_tables(). sql/item_timefunc.cc: We no longer have LEX::time_zone_tables_used, so Item_func_convert_tz::fix_fields() became the same as base Item_date_func::fix_fields(). my_tz_find() no longer takes table list, but takes THD pointer now. sql/item_timefunc.h: Remove dead field and method. sql/lock.cc: Pass values for 'current' and 'system_count' to check_if_locking_is_allowed(). sql/log_event.cc: We no longer have my_tz_find_with_opening_tz_tables(), its functions is performed by my_tz_find(). sql/mysql_priv.h: Add functions to work with MySQL system tables. sql/set_var.cc: my_tz_find() no longer takes table list, but takes THD pointer now. sql/sp.cc: Remove close_proc_table(). Use close_system_tables() instead. Use open_system_tables_for_read() and open_system_table_for_update(). sql/sp.h: Remove close_proc_table() declaration. sql/sql_base.cc: Add implementation of open_system_tables_for_read(), close_system_tables(), open_system_table_for_update(). sql/sql_help.cc: Operate on MySQL system tables mysql.help_* with open_system_tables_for_read() and close_system_tables() to allow the usage of HELP statement under LOCK TABLES. sql/sql_lex.cc: Remove LEX::time_zone_tables_used and LEX::add_time_zone_tables_to_query_tables() which are no longer used. sql/sql_lex.h: Remove LEX::time_zone_tables_used and LEX::add_time_zone_tables_to_query_tables() which are no longer used. sql/sql_parse.cc: Remove references to LEX::time_zone_tables_used and my_tz_check_n_skip_implicit_tables() which are no longer used. sql/sql_show.cc: Use close_system_tables() instead of removed close_proc_table(). sql/sql_view.cc: LEX::time_zone_tables_used is no longer there. sql/sql_yacc.yy: LEX::add_time_zone_tables_to_query_tables() is no longer there. sql/table.cc: Add more tables that should be treated as MySQL system tables. sql/share/errmsg.txt: Change the error message, as now we allow write-locking of several system tables if not mixed with ordinary tables. sql/tztime.cc: Do not add time zone tables to the list of query tables in tz_init_table_list(). Remove fake_time_zone_tables_list and my_tz_get_tables_list(). In my_tz_init(), open mysql.time_zone_leap_second with simple_open_n_lock_tables(), but pass time zone name to my_tz_find(), which will open and close time zone tables as necessary. In tz_load_from_open_tables() do not call table->use_all_columns(), as this was already done in open_system_tables_for_read(). my_tz_find() takes THD pointer instead of table list, and calls open_system_tables_for_read() and close_system_tables() as necessary. Remove my_tz_find_with_opening_tz_tables(). sql/tztime.h: Remove declarations of my_tz_get_table_list(), my_tz_find_with_opening_tz_tables(), fake_time_zone_tables_list, definition of my_tz_check_n_skip_implicit_tables(). Update prototype for my_tz_find(). storage/csv/ha_tina.cc: Add new parameters to check_if_locking_is_allowed(). storage/csv/ha_tina.h: Add new parameters to check_if_locking_is_allowed(). storage/myisam/ha_myisam.cc: Add new parameters to check_if_locking_is_allowed(). In this function we count system tables. If there are system tables, but there are also non-system tables, we report an error. storage/myisam/ha_myisam.h: Add new parameters to check_if_locking_is_allowed().
* Add a test case for Bug#18884 "lock table + global read lock = crash"unknown2006-07-081-0/+15
| | | | | | | | | | (the bug itself is not repeatable any more). mysql-test/r/lock.result: Update test results (Bug#18884) mysql-test/t/lock.test: Add a test case for Bug#18884 "lock table + global read lock = crash"
* Merge mysql.com:/home/mydev/mysql-4.1-bug5390unknown2006-02-061-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/mydev/mysql-5.0-bug5390 mysql-test/r/lock.result: Auto merged mysql-test/t/lock.test: Auto merged sql/lock.cc: BUG#5390 - problems with merge tables Manual merge sql/table.h: BUG#5390 - problems with merge tables Manual merge
| * Merge mysql.com:/home/mydev/mysql-4.0-bug5390unknown2006-01-231-0/+18
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/mydev/mysql-4.1-bug5390 sql/table.h: Auto merged mysql-test/r/lock.result: BUG#5390 - problems with merge tables Manual merge from 4.0. mysql-test/t/lock.test: BUG#5390 - problems with merge tables Manual merge from 4.0. sql/lock.cc: BUG#5390 - problems with merge tables Manual merge from 4.0.
| | * BUG#5390 - problems with merge tablesunknown2006-01-231-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After-fix optimizations proposed and finally implemented by Monty. mysql-test/r/lock.result: BUG#5390 - problems with merge tables After-fix optimizations proposed and finally implemented by Monty. Additional test results. mysql-test/t/lock.test: BUG#5390 - problems with merge tables After-fix optimizations proposed and finally implemented by Monty. Additional tests. sql/lock.cc: BUG#5390 - problems with merge tables After-fix optimizations proposed and finally implemented by Monty. get_lock_data() gets a flag for storing the lock positions in the new TABLE elements. mysql_lock_remove() can now remove a lock faster and more precisely as it has needed info in TABLE now. mysql_unlock_read_tables() and mysql_lock_merge() must now adjust the new elements of TABLE when modifying locks. mysql_lock_have_duplicate() can now work faster on the existing lock as the positions in the lock arrays are known for each table. get_lock_data() assigns the new TABLE elements on request of the new flag. sql/table.h: BUG#5390 - problems with merge tables After-fix optimizations proposed and finally implemented by Monty. Additional elements of TABLE.
* | | Merge mysql.com:/home/my/mysql-4.1unknown2005-07-281-0/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.0 BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-ctype_cp932.test: Auto merged BitKeeper/deleted/.del-isam.test~834fb0ee8196c445: Auto merged include/thr_lock.h: Auto merged mysql-test/t/alias.test: Auto merged mysql-test/t/alter_table.test: Auto merged mysql-test/t/archive.test: Auto merged mysql-test/t/backup.test: Auto merged mysql-test/t/bool.test: Auto merged mysql-test/t/connect.test: Auto merged mysql-test/t/count_distinct2.test: Auto merged mysql-test/t/create.test: Auto merged mysql-test/t/ctype_many.test: Auto merged mysql-test/t/ctype_ucs_binlog.test: Auto merged mysql-test/t/date_formats.test: Auto merged mysql-test/t/delayed.test: Auto merged mysql-test/t/derived.test: Auto merged mysql-test/t/distinct.test: Auto merged mysql-test/t/drop.test: Auto merged mysql-test/t/endspace.test: Auto merged mysql-test/t/flush.test: Auto merged mysql-test/t/fulltext.test: Auto merged mysql-test/t/fulltext_order_by.test: Auto merged mysql-test/t/func_compress.test: Auto merged mysql-test/t/func_concat.test: Auto merged mysql-test/t/func_date_add.test: Auto merged mysql-test/t/func_equal.test: Auto merged mysql-test/t/func_if.test: Auto merged mysql-test/t/func_sapdb.test: Auto merged mysql-test/t/func_set.test: Auto merged mysql-test/t/func_str.test: Auto merged mysql-test/t/gis-rtree.test: Auto merged mysql-test/t/gis.test: Auto merged mysql-test/t/grant.test: Auto merged mysql-test/t/grant2.test: Auto merged mysql-test/t/grant_cache.test: Auto merged mysql-test/t/heap.test: Auto merged mysql-test/t/heap_btree.test: Auto merged mysql-test/t/heap_hash.test: Auto merged mysql-test/t/init_connect.test: Auto merged mysql-test/t/insert_select.test: Auto merged mysql-test/t/insert_update.test: Auto merged mysql-test/t/key.test: Auto merged mysql-test/t/keywords.test: Auto merged mysql-test/t/limit.test: Auto merged mysql-test/t/lock.test: Auto merged mysql-test/t/lowercase_table.test: Auto merged mysql-test/t/lowercase_table3.test: Auto merged mysql-test/t/merge.test: Auto merged mysql-test/t/mix_innodb_myisam_binlog.test: Auto merged mysql-test/t/myisam.test: Auto merged mysql-test/t/mysqlbinlog2.test: Auto merged mysql-test/t/ndb_alter_table.test: Auto merged mysql-test/t/ndb_autodiscover.test: Auto merged mysql-test/t/ndb_charset.test: Auto merged mysql-test/t/ndb_grant.later: Auto merged mysql-test/t/ndb_index_ordered.test: Auto merged mysql-test/t/ndb_index_unique.test: Auto merged mysql-test/t/ndb_restore.test: Auto merged mysql-test/t/ndb_types.test: Auto merged mysql-test/t/ndb_update.test: Auto merged mysql-test/t/null.test: Auto merged mysql-test/t/null_key.test: Auto merged mysql-test/t/olap.test: Auto merged mysql-test/t/openssl_1.test: Auto merged mysql-test/t/order_by.test: Auto merged mysql-test/t/ps.test: Auto merged mysql-test/t/ps_1general.test: Auto merged mysql-test/t/ps_4heap.test: Auto merged mysql-test/t/ps_5merge.test: Auto merged mysql-test/t/query_cache.test: Auto merged mysql-test/t/replace.test: Auto merged mysql-test/t/row.test: Auto merged mysql-test/t/rpl000001.test: Auto merged mysql-test/t/rpl000015.test: Auto merged mysql-test/t/rpl000017.test: Auto merged mysql-test/t/rpl000018.test: Auto merged mysql-test/t/rpl_EE_error.test: Auto merged mysql-test/t/rpl_change_master.test: Auto merged mysql-test/t/rpl_charset.test: Auto merged mysql-test/t/rpl_create_database.test: Auto merged mysql-test/t/rpl_ddl.test: Auto merged mysql-test/t/rpl_deadlock.test: Auto merged mysql-test/t/rpl_empty_master_crash.test: Auto merged mysql-test/t/rpl_error_ignored_table.test: Auto merged mysql-test/t/rpl_flush_log_loop.test: Auto merged mysql-test/t/rpl_flush_tables.test: Auto merged mysql-test/t/rpl_get_lock.test: Auto merged mysql-test/t/rpl_heap.test: Auto merged mysql-test/t/rpl_loaddata.test: Auto merged mysql-test/t/rpl_loaddata_rule_m.test: Auto merged mysql-test/t/rpl_log.test: Auto merged mysql-test/t/rpl_log_pos.test: Auto merged mysql-test/t/rpl_max_relay_size.test: Auto merged mysql-test/t/rpl_multi_query.test: Auto merged mysql-test/t/rpl_openssl.test: Auto merged mysql-test/t/rpl_redirect.test: Auto merged mysql-test/t/rpl_relayrotate.test: Auto merged mysql-test/t/rpl_replicate_do.test: Auto merged mysql-test/t/rpl_reset_slave.test: Auto merged mysql-test/t/rpl_server_id2.test: Auto merged mysql-test/t/rpl_temporary.test: Auto merged mysql-test/t/rpl_timezone.test: Auto merged mysql-test/t/rpl_user_variables.test: Auto merged mysql-test/t/show_check.test: Auto merged mysql-test/t/subselect.test: Auto merged mysql-test/t/symlink.test: Auto merged mysql-test/t/synchronization.test: Auto merged mysql-test/t/system_mysql_db.test: Auto merged mysql-test/t/system_mysql_db_fix.test: Auto merged mysql-test/t/temp_table.test: Auto merged mysql-test/t/timezone2.test: Auto merged mysql-test/t/timezone_grant.test: Auto merged mysql-test/t/type_float.test: Auto merged mysql-test/t/type_ranges.test: Auto merged mysql-test/t/type_timestamp.test: Auto merged mysql-test/t/union.test: Auto merged mysql-test/t/update.test: Auto merged mysql-test/t/user_var-binlog.test: Auto merged mysql-test/t/warnings.test: Auto merged mysys/thr_lock.c: Auto merged sql/slave.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_select.cc: Auto merged support-files/mysql.spec.sh: Auto merged BitKeeper/deleted/.del-rpl_trunc_binlog.test~961b1f6ac73d37c8: Simple merge mysql-test/r/ps_grant.result: Simple merge mysql-test/t/analyse.test: Simple merge mysql-test/t/auto_increment.test: Simple merge mysql-test/t/bdb.test: Simple merge mysql-test/t/bigint.test: Simple merge mysql-test/t/case.test: Simple merge mysql-test/t/cast.test: Simple merge mysql-test/t/check.test: Simple merge mysql-test/t/count_distinct.test: Simple merge mysql-test/t/ctype_latin1_de.test: Simple merge mysql-test/t/ctype_uca.test: Simple merge mysql-test/t/ctype_ucs.test: Simple merge mysql-test/t/ctype_utf8.test: Simple merge mysql-test/t/delete.test: Simple merge mysql-test/t/flush_block_commit.test: Simple merge mysql-test/t/func_default.test: Simple merge mysql-test/t/func_gconcat.test: Simple merge mysql-test/t/func_group.test: Aligned code with 4.1 mysql-test/t/func_in.test: Simple merge mysql-test/t/func_math.test: Simple merge mysql-test/t/func_misc.test: Simple merge mysql-test/t/func_test.test: Simple merge mysql-test/t/func_time.test: Simple merge mysql-test/t/group_by.test: Simple merge mysql-test/t/having.test: Simple merge mysql-test/t/innodb.test: Simple merge mysql-test/t/insert.test: Simple merge mysql-test/t/join_outer.test: Simple merge mysql-test/t/kill.test: Simple merge mysql-test/t/loaddata.test: Simple merge mysql-test/t/lock_multi.test: Simple merge mysql-test/t/multi_update.test: Simple merge mysql-test/t/mysqlbinlog.test: Simple merge mysql-test/t/mysqldump.test: Aligned code with 4.1 mysql-test/t/mysqltest.test: Simple merge mysql-test/t/ndb_basic.test: Simple merge mysql-test/t/ndb_cache.test: Simple merge mysql-test/t/ndb_subquery.test: Simple merge mysql-test/t/ps_grant.test: Simple merge mysql-test/t/range.test: Simple merge mysql-test/t/rpl_drop_temp.test: Simple merge mysql-test/t/rpl_loaddata_rule_s.test: Simple merge mysql-test/t/rpl_loaddatalocal.test: Simple merge mysql-test/t/rpl_rotate_logs.test: Simple merge mysql-test/t/rpl_until.test: Simple merge mysql-test/t/rpl_variables.test: Simple merge mysql-test/t/select.test: Simple merge mysql-test/t/sql_mode.test: Simple merge mysql-test/t/type_blob.test: Simple merge mysql-test/t/type_decimal.test: Simple merge mysql-test/t/user_var.test: Simple merge mysql-test/t/variables.test: Simple merge sql/lock.cc: Simple optimization sql/mysql_priv.h: Simple merge sql/sql_table.cc: Simple merge sql/table.cc: Simple merge sql/unireg.cc: Simple merge
| * | Added end marker for tests to make future merges easierunknown2005-07-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql-test/t/alias.test: Added end marker for test to make future merges easier mysql-test/t/alter_table.test: Added end marker for test to make future merges easier mysql-test/t/analyse.test: Added end marker for test to make future merges easier mysql-test/t/analyze.test: Added end marker for test to make future merges easier Fixed length of comment lines mysql-test/t/ansi.test: Added end marker for test to make future merges easier mysql-test/t/archive.test: Added end marker for test to make future merges easier mysql-test/t/auto_increment.test: Added end marker for test to make future merges easier mysql-test/t/backup.test: Added end marker for test to make future merges easier mysql-test/t/bdb-alter-table-1.test: Added end marker for test to make future merges easier mysql-test/t/bdb-alter-table-2.test: Added end marker for test to make future merges easier mysql-test/t/bdb-crash.test: Added end marker for test to make future merges easier mysql-test/t/bdb-deadlock.test: Added end marker for test to make future merges easier mysql-test/t/bdb-deadlock.tminus: Added end marker for test to make future merges easier mysql-test/t/bdb.test: Added end marker for test to make future merges easier mysql-test/t/bdb_cache.test: Added end marker for test to make future merges easier mysql-test/t/bench_count_distinct.test: Added end marker for test to make future merges easier mysql-test/t/bigint.test: Added end marker for test to make future merges easier mysql-test/t/binary.test: Added end marker for test to make future merges easier mysql-test/t/blackhole.test: Added end marker for test to make future merges easier mysql-test/t/bool.test: Added end marker for test to make future merges easier mysql-test/t/bulk_replace.test: Added end marker for test to make future merges easier mysql-test/t/case.test: Added end marker for test to make future merges easier mysql-test/t/cast.test: Added end marker for test to make future merges easier mysql-test/t/check.test: Added end marker for test to make future merges easier mysql-test/t/comments.test: Added end marker for test to make future merges easier mysql-test/t/compare.test: Added end marker for test to make future merges easier mysql-test/t/connect.test: Added end marker for test to make future merges easier mysql-test/t/consistent_snapshot.test: Added end marker for test to make future merges easier mysql-test/t/constraints.test: Added end marker for test to make future merges easier mysql-test/t/count_distinct.test: Added end marker for test to make future merges easier mysql-test/t/count_distinct2.test: Added end marker for test to make future merges easier mysql-test/t/count_distinct3.test: Added end marker for test to make future merges easier mysql-test/t/create.test: Added end marker for test to make future merges easier mysql-test/t/create_select_tmp.test: Added end marker for test to make future merges easier mysql-test/t/csv.test: Added end marker for test to make future merges easier mysql-test/t/ctype_big5.test: Added end marker for test to make future merges easier mysql-test/t/ctype_collate.test: Added end marker for test to make future merges easier mysql-test/t/ctype_cp1250_ch.test: Added end marker for test to make future merges easier mysql-test/t/ctype_cp1251.test: Added end marker for test to make future merges easier mysql-test/t/ctype_cp932.test: Added end marker for test to make future merges easier mysql-test/t/ctype_create.test: Added end marker for test to make future merges easier mysql-test/t/ctype_gbk.test: Added end marker for test to make future merges easier mysql-test/t/ctype_latin1.test: Added end marker for test to make future merges easier mysql-test/t/ctype_latin1_de.test: Added end marker for test to make future merges easier mysql-test/t/ctype_latin2.test: Added end marker for test to make future merges easier mysql-test/t/ctype_many.test: Added end marker for test to make future merges easier mysql-test/t/ctype_mb.test: Added end marker for test to make future merges easier mysql-test/t/ctype_recoding.test: Added end marker for test to make future merges easier mysql-test/t/ctype_sjis.test: Added end marker for test to make future merges easier mysql-test/t/ctype_tis620.test: Added end marker for test to make future merges easier mysql-test/t/ctype_uca.test: Added end marker for test to make future merges easier mysql-test/t/ctype_ucs.test: Added end marker for test to make future merges easier mysql-test/t/ctype_ucs_binlog.test: Added end marker for test to make future merges easier mysql-test/t/ctype_ujis.test: Added end marker for test to make future merges easier mysql-test/t/ctype_utf8.test: Added end marker for test to make future merges easier mysql-test/t/date_formats.test: Added end marker for test to make future merges easier mysql-test/t/delayed.test: Added end marker for test to make future merges easier mysql-test/t/delete.test: Added end marker for test to make future merges easier mysql-test/t/derived.test: Added end marker for test to make future merges easier mysql-test/t/dirty_close.test: Added end marker for test to make future merges easier mysql-test/t/distinct.test: Added end marker for test to make future merges easier mysql-test/t/drop.test: Added end marker for test to make future merges easier mysql-test/t/drop_temp_table.test: Added end marker for test to make future merges easier mysql-test/t/empty_table.test: Added end marker for test to make future merges easier mysql-test/t/endspace.test: Added end marker for test to make future merges easier mysql-test/t/errors.test: Added end marker for test to make future merges easier mysql-test/t/exampledb.test: Added end marker for test to make future merges easier mysql-test/t/explain.test: Added end marker for test to make future merges easier mysql-test/t/flush.test: Added end marker for test to make future merges easier mysql-test/t/flush_block_commit.test: Added end marker for test to make future merges easier mysql-test/t/flush_table.test: Added end marker for test to make future merges easier mysql-test/t/foreign_key.test: Added end marker for test to make future merges easier mysql-test/t/fulltext.test: Added end marker for test to make future merges easier mysql-test/t/fulltext2.test: Added end marker for test to make future merges easier mysql-test/t/fulltext_cache.test: Added end marker for test to make future merges easier mysql-test/t/fulltext_distinct.test: Added end marker for test to make future merges easier mysql-test/t/fulltext_left_join.test: Added end marker for test to make future merges easier mysql-test/t/fulltext_multi.test: Added end marker for test to make future merges easier mysql-test/t/fulltext_order_by.test: Added end marker for test to make future merges easier mysql-test/t/fulltext_update.test: Added end marker for test to make future merges easier mysql-test/t/fulltext_var.test: Added end marker for test to make future merges easier mysql-test/t/func_compress.test: Added end marker for test to make future merges easier mysql-test/t/func_concat.test: Added end marker for test to make future merges easier mysql-test/t/func_crypt.test: Added end marker for test to make future merges easier mysql-test/t/func_date_add.test: Added end marker for test to make future merges easier mysql-test/t/func_default.test: Added end marker for test to make future merges easier mysql-test/t/func_des_encrypt.test: Added end marker for test to make future merges easier mysql-test/t/func_encrypt.test: Added end marker for test to make future merges easier mysql-test/t/func_encrypt_nossl.test: Added end marker for test to make future merges easier mysql-test/t/func_equal.test: Added end marker for test to make future merges easier mysql-test/t/func_gconcat.test: Added end marker for test to make future merges easier mysql-test/t/func_group.test: Added end marker for test to make future merges easier mysql-test/t/func_if.test: Added end marker for test to make future merges easier mysql-test/t/func_in.test: Added end marker for test to make future merges easier mysql-test/t/func_isnull.test: Added end marker for test to make future merges easier mysql-test/t/func_like.test: Added end marker for test to make future merges easier mysql-test/t/func_math.test: Added end marker for test to make future merges easier mysql-test/t/func_misc.test: Added end marker for test to make future merges easier mysql-test/t/func_op.test: Added end marker for test to make future merges easier mysql-test/t/func_regexp.test: Added end marker for test to make future merges easier mysql-test/t/func_sapdb.test: Added end marker for test to make future merges easier mysql-test/t/func_set.test: Added end marker for test to make future merges easier mysql-test/t/func_str.test: Added end marker for test to make future merges easier mysql-test/t/func_system.test: Added end marker for test to make future merges easier mysql-test/t/func_test.test: Added end marker for test to make future merges easier mysql-test/t/func_time.test: Added end marker for test to make future merges easier mysql-test/t/func_timestamp.test: Added end marker for test to make future merges easier mysql-test/t/gcc296.test: Added end marker for test to make future merges easier mysql-test/t/gis-rtree.test: Added end marker for test to make future merges easier mysql-test/t/gis.test: Added end marker for test to make future merges easier mysql-test/t/grant.test: Added end marker for test to make future merges easier mysql-test/t/grant2.test: Added end marker for test to make future merges easier mysql-test/t/grant_cache.test: Added end marker for test to make future merges easier mysql-test/t/group_by.test: Added end marker for test to make future merges easier mysql-test/t/handler.test: Added end marker for test to make future merges easier mysql-test/t/having.test: Added end marker for test to make future merges easier mysql-test/t/heap.test: Added end marker for test to make future merges easier mysql-test/t/heap_auto_increment.test: Added end marker for test to make future merges easier mysql-test/t/heap_btree.test: Added end marker for test to make future merges easier mysql-test/t/heap_hash.test: Added end marker for test to make future merges easier mysql-test/t/help.test: Added end marker for test to make future merges easier mysql-test/t/init_connect.test: Added end marker for test to make future merges easier mysql-test/t/init_file.test: Added end marker for test to make future merges easier mysql-test/t/innodb-deadlock.test: Added end marker for test to make future merges easier mysql-test/t/innodb-lock.test: Added end marker for test to make future merges easier mysql-test/t/innodb-replace.test: Added end marker for test to make future merges easier mysql-test/t/innodb.test: Added end marker for test to make future merges easier mysql-test/t/innodb_cache.test: Added end marker for test to make future merges easier mysql-test/t/innodb_handler.test: Added end marker for test to make future merges easier mysql-test/t/insert.test: Added end marker for test to make future merges easier mysql-test/t/insert_select-binlog.test: Added end marker for test to make future merges easier mysql-test/t/insert_select.test: Added end marker for test to make future merges easier mysql-test/t/insert_update.test: Added end marker for test to make future merges easier mysql-test/t/isam.test: Added end marker for test to make future merges easier mysql-test/t/join.test: Added end marker for test to make future merges easier mysql-test/t/join_crash.test: Added end marker for test to make future merges easier mysql-test/t/join_outer.test: Added end marker for test to make future merges easier mysql-test/t/key.test: Added end marker for test to make future merges easier mysql-test/t/key_cache.test: Added end marker for test to make future merges easier mysql-test/t/key_diff.test: Added end marker for test to make future merges easier mysql-test/t/key_primary.test: Added end marker for test to make future merges easier mysql-test/t/keywords.test: Added end marker for test to make future merges easier mysql-test/t/kill.test: Added end marker for test to make future merges easier mysql-test/t/limit.test: Added end marker for test to make future merges easier mysql-test/t/loaddata.test: Added end marker for test to make future merges easier mysql-test/t/lock.test: Added end marker for test to make future merges easier mysql-test/t/lock_multi.test: Added end marker for test to make future merges easier mysql-test/t/lock_tables_lost_commit.test: Added end marker for test to make future merges easier mysql-test/t/lowercase_table.test: Added end marker for test to make future merges easier mysql-test/t/lowercase_table2.test: Added end marker for test to make future merges easier mysql-test/t/lowercase_table3.test: Added end marker for test to make future merges easier mysql-test/t/lowercase_table_grant.test: Added end marker for test to make future merges easier mysql-test/t/lowercase_table_qcache.test: Added end marker for test to make future merges easier mysql-test/t/merge.test: Added end marker for test to make future merges easier mysql-test/t/metadata.test: Added end marker for test to make future merges easier mysql-test/t/mix_innodb_myisam_binlog.test: Added end marker for test to make future merges easier mysql-test/t/multi_statement.test: Added end marker for test to make future merges easier mysql-test/t/multi_update.test: Added end marker for test to make future merges easier mysql-test/t/myisam-blob.test: Added end marker for test to make future merges easier mysql-test/t/myisam.test: Added end marker for test to make future merges easier mysql-test/t/mysql_client_test.test: Added end marker for test to make future merges easier mysql-test/t/mysql_protocols.test: Added end marker for test to make future merges easier mysql-test/t/mysqlbinlog.test: Added end marker for test to make future merges easier mysql-test/t/mysqlbinlog2.test: Added end marker for test to make future merges easier mysql-test/t/mysqldump.test: Added end marker for test to make future merges easier mysql-test/t/mysqltest.test: Added end marker for test to make future merges easier mysql-test/t/ndb_alter_table.test: Added end marker for test to make future merges easier mysql-test/t/ndb_autodiscover.test: Added end marker for test to make future merges easier mysql-test/t/ndb_autodiscover2.test: Added end marker for test to make future merges easier mysql-test/t/ndb_basic.test: Added end marker for test to make future merges easier mysql-test/t/ndb_blob.test: Added end marker for test to make future merges easier mysql-test/t/ndb_cache.test: Added end marker for test to make future merges easier mysql-test/t/ndb_charset.test: Added end marker for test to make future merges easier mysql-test/t/ndb_config.test: Added end marker for test to make future merges easier mysql-test/t/ndb_database.test: Added end marker for test to make future merges easier mysql-test/t/ndb_grant.later: Added end marker for test to make future merges easier mysql-test/t/ndb_index.test: Added end marker for test to make future merges easier mysql-test/t/ndb_index_ordered.test: Added end marker for test to make future merges easier mysql-test/t/ndb_index_unique.test: Added end marker for test to make future merges easier mysql-test/t/ndb_insert.test: Added end marker for test to make future merges easier mysql-test/t/ndb_limit.test: Added end marker for test to make future merges easier mysql-test/t/ndb_lock.test: Added end marker for test to make future merges easier mysql-test/t/ndb_minmax.test: Added end marker for test to make future merges easier mysql-test/t/ndb_multi.test: Added end marker for test to make future merges easier mysql-test/t/ndb_replace.test: Added end marker for test to make future merges easier mysql-test/t/ndb_restore.test: Added end marker for test to make future merges easier mysql-test/t/ndb_subquery.test: Added end marker for test to make future merges easier mysql-test/t/ndb_transaction.test: Added end marker for test to make future merges easier mysql-test/t/ndb_truncate.test: Added end marker for test to make future merges easier mysql-test/t/ndb_types.test: Added end marker for test to make future merges easier mysql-test/t/ndb_update.test: Added end marker for test to make future merges easier mysql-test/t/negation_elimination.test: Added end marker for test to make future merges easier mysql-test/t/not_embedded_server.test: Added end marker for test to make future merges easier mysql-test/t/null.test: Added end marker for test to make future merges easier mysql-test/t/null_key.test: Added end marker for test to make future merges easier mysql-test/t/odbc.test: Added end marker for test to make future merges easier mysql-test/t/olap.test: Added end marker for test to make future merges easier mysql-test/t/openssl_1.test: Added end marker for test to make future merges easier mysql-test/t/order_by.test: Added end marker for test to make future merges easier mysql-test/t/order_fill_sortbuf.test: Added end marker for test to make future merges easier mysql-test/t/outfile.test: Added end marker for test to make future merges easier mysql-test/t/overflow.test: Added end marker for test to make future merges easier mysql-test/t/packet.test: Added end marker for test to make future merges easier mysql-test/t/preload.test: Added end marker for test to make future merges easier mysql-test/t/ps.test: Added end marker for test to make future merges easier mysql-test/t/ps_10nestset.test: Added end marker for test to make future merges easier mysql-test/t/ps_11bugs.test: Added end marker for test to make future merges easier mysql-test/t/ps_1general.test: Added end marker for test to make future merges easier mysql-test/t/ps_2myisam.test: Added end marker for test to make future merges easier mysql-test/t/ps_3innodb.test: Added end marker for test to make future merges easier mysql-test/t/ps_4heap.test: Added end marker for test to make future merges easier mysql-test/t/ps_5merge.test: Added end marker for test to make future merges easier mysql-test/t/ps_6bdb.test: Added end marker for test to make future merges easier mysql-test/t/ps_7ndb.test: Added end marker for test to make future merges easier mysql-test/t/ps_grant.test: Added end marker for test to make future merges easier mysql-test/t/query_cache.test: Added end marker for test to make future merges easier mysql-test/t/query_cache_merge.test: Added end marker for test to make future merges easier mysql-test/t/raid.test: Added end marker for test to make future merges easier mysql-test/t/range.test: Added end marker for test to make future merges easier mysql-test/t/rename.test: Added end marker for test to make future merges easier mysql-test/t/repair.test: Added end marker for test to make future merges easier mysql-test/t/replace.test: Added end marker for test to make future merges easier mysql-test/t/rollback.test: Added end marker for test to make future merges easier mysql-test/t/row.test: Added end marker for test to make future merges easier mysql-test/t/rpl000001.test: Added end marker for test to make future merges easier mysql-test/t/rpl000002.test: Added end marker for test to make future merges easier mysql-test/t/rpl000004.test: Added end marker for test to make future merges easier mysql-test/t/rpl000005.test: Added end marker for test to make future merges easier mysql-test/t/rpl000006.test: Added end marker for test to make future merges easier mysql-test/t/rpl000008.test: Added end marker for test to make future merges easier mysql-test/t/rpl000009.test: Added end marker for test to make future merges easier mysql-test/t/rpl000010.test: Added end marker for test to make future merges easier mysql-test/t/rpl000011.test: Added end marker for test to make future merges easier mysql-test/t/rpl000012.test: Added end marker for test to make future merges easier mysql-test/t/rpl000013.test: Added end marker for test to make future merges easier mysql-test/t/rpl000015.test: Added end marker for test to make future merges easier mysql-test/t/rpl000017.test: Added end marker for test to make future merges easier mysql-test/t/rpl000018.test: Added end marker for test to make future merges easier mysql-test/t/rpl_EE_error.test: Added end marker for test to make future merges easier mysql-test/t/rpl_alter.test: Added end marker for test to make future merges easier mysql-test/t/rpl_chain_temp_table.test: Added end marker for test to make future merges easier mysql-test/t/rpl_change_master.test: Added end marker for test to make future merges easier mysql-test/t/rpl_charset.test: Added end marker for test to make future merges easier mysql-test/t/rpl_commit_after_flush.test: Added end marker for test to make future merges easier mysql-test/t/rpl_create_database.test: Added end marker for test to make future merges easier mysql-test/t/rpl_ddl.test: Added end marker for test to make future merges easier mysql-test/t/rpl_deadlock.test: Added end marker for test to make future merges easier mysql-test/t/rpl_delete_all.test: Added end marker for test to make future merges easier mysql-test/t/rpl_do_grant.test: Added end marker for test to make future merges easier mysql-test/t/rpl_drop.test: Added end marker for test to make future merges easier mysql-test/t/rpl_drop_temp.test: Added end marker for test to make future merges easier mysql-test/t/rpl_empty_master_crash.test: Added end marker for test to make future merges easier mysql-test/t/rpl_error_ignored_table.test: Added end marker for test to make future merges easier mysql-test/t/rpl_failed_optimize.test: Added end marker for test to make future merges easier mysql-test/t/rpl_failsafe.test: Added end marker for test to make future merges easier mysql-test/t/rpl_flush_log_loop.test: Added end marker for test to make future merges easier mysql-test/t/rpl_flush_tables.test: Added end marker for test to make future merges easier mysql-test/t/rpl_free_items.test: Added end marker for test to make future merges easier mysql-test/t/rpl_get_lock.test: Added end marker for test to make future merges easier mysql-test/t/rpl_heap.test: Added end marker for test to make future merges easier mysql-test/t/rpl_ignore_grant.test: Added end marker for test to make future merges easier mysql-test/t/rpl_init_slave.test: Added end marker for test to make future merges easier mysql-test/t/rpl_innodb.test: Added end marker for test to make future merges easier mysql-test/t/rpl_insert_id.test: Added end marker for test to make future merges easier mysql-test/t/rpl_insert_ignore.test: Added end marker for test to make future merges easier mysql-test/t/rpl_loaddata.test: Added end marker for test to make future merges easier mysql-test/t/rpl_loaddata_rule_m.test: Added end marker for test to make future merges easier mysql-test/t/rpl_loaddata_rule_s.test: Added end marker for test to make future merges easier mysql-test/t/rpl_loaddatalocal.test: Added end marker for test to make future merges easier mysql-test/t/rpl_log.test: Added end marker for test to make future merges easier mysql-test/t/rpl_log_pos.test: Added end marker for test to make future merges easier mysql-test/t/rpl_many_optimize.test: Added end marker for test to make future merges easier mysql-test/t/rpl_master_pos_wait.test: Added end marker for test to make future merges easier mysql-test/t/rpl_max_relay_size.test: Added end marker for test to make future merges easier mysql-test/t/rpl_misc_functions.test: Added end marker for test to make future merges easier mysql-test/t/rpl_multi_delete.test: Added end marker for test to make future merges easier mysql-test/t/rpl_multi_delete2.test: Added end marker for test to make future merges easier mysql-test/t/rpl_multi_query.test: Added end marker for test to make future merges easier mysql-test/t/rpl_multi_update.test: Added end marker for test to make future merges easier mysql-test/t/rpl_multi_update2.test: Added end marker for test to make future merges easier mysql-test/t/rpl_multi_update3.test: Added end marker for test to make future merges easier mysql-test/t/rpl_mystery22.test: Added end marker for test to make future merges easier mysql-test/t/rpl_openssl.test: Added end marker for test to make future merges easier mysql-test/t/rpl_optimize.test: Added end marker for test to make future merges easier mysql-test/t/rpl_ps.test: Added end marker for test to make future merges easier mysql-test/t/rpl_redirect.test: Added end marker for test to make future merges easier mysql-test/t/rpl_relayrotate.test: Added end marker for test to make future merges easier mysql-test/t/rpl_relayspace.test: Added end marker for test to make future merges easier mysql-test/t/rpl_replicate_do.test: Added end marker for test to make future merges easier mysql-test/t/rpl_reset_slave.test: Added end marker for test to make future merges easier mysql-test/t/rpl_rewrite_db.test: Added end marker for test to make future merges easier mysql-test/t/rpl_rotate_logs.test: Added end marker for test to make future merges easier mysql-test/t/rpl_server_id1.test: Added end marker for test to make future merges easier mysql-test/t/rpl_server_id2.test: Added end marker for test to make future merges easier mysql-test/t/rpl_set_charset.test: Added end marker for test to make future merges easier mysql-test/t/rpl_skip_error.test: Added end marker for test to make future merges easier mysql-test/t/rpl_sporadic_master.test: Added end marker for test to make future merges easier mysql-test/t/rpl_start_stop_slave.test: Added end marker for test to make future merges easier mysql-test/t/rpl_temporary.test: Added end marker for test to make future merges easier mysql-test/t/rpl_timezone.test: Added end marker for test to make future merges easier mysql-test/t/rpl_trunc_binlog.test: Added end marker for test to make future merges easier mysql-test/t/rpl_until.test: Added end marker for test to make future merges easier mysql-test/t/rpl_user_variables.test: Added end marker for test to make future merges easier mysql-test/t/rpl_variables.test: Added end marker for test to make future merges easier mysql-test/t/select.test: Added end marker for test to make future merges easier mysql-test/t/select_found.test: Added end marker for test to make future merges easier mysql-test/t/select_safe.test: Added end marker for test to make future merges easier mysql-test/t/show_check.test: Added end marker for test to make future merges easier mysql-test/t/skip_name_resolve.test: Added end marker for test to make future merges easier mysql-test/t/sql_mode.test: Added end marker for test to make future merges easier mysql-test/t/status.test: Added end marker for test to make future merges easier mysql-test/t/subselect.test: Added end marker for test to make future merges easier mysql-test/t/subselect2.test: Added end marker for test to make future merges easier mysql-test/t/subselect_gis.test: Added end marker for test to make future merges easier mysql-test/t/subselect_innodb.test: Added end marker for test to make future merges easier mysql-test/t/symlink.test: Added end marker for test to make future merges easier mysql-test/t/synchronization.test: Added end marker for test to make future merges easier mysql-test/t/system_mysql_db.test: Added end marker for test to make future merges easier mysql-test/t/system_mysql_db_fix.test: Added end marker for test to make future merges easier mysql-test/t/system_mysql_db_refs.test: Added end marker for test to make future merges easier mysql-test/t/tablelock.test: Added end marker for test to make future merges easier mysql-test/t/temp_table.test: Added end marker for test to make future merges easier mysql-test/t/timezone.test: Added end marker for test to make future merges easier mysql-test/t/timezone2.test: Added end marker for test to make future merges easier mysql-test/t/timezone3.test: Added end marker for test to make future merges easier mysql-test/t/timezone_grant.test: Added end marker for test to make future merges easier mysql-test/t/truncate.test: Added end marker for test to make future merges easier mysql-test/t/type_blob.test: Added end marker for test to make future merges easier mysql-test/t/type_date.test: Added end marker for test to make future merges easier mysql-test/t/type_datetime.test: Added end marker for test to make future merges easier mysql-test/t/type_decimal.test: Added end marker for test to make future merges easier mysql-test/t/type_enum.test: Added end marker for test to make future merges easier mysql-test/t/type_float.test: Added end marker for test to make future merges easier mysql-test/t/type_nchar.test: Added end marker for test to make future merges easier mysql-test/t/type_ranges.test: Added end marker for test to make future merges easier mysql-test/t/type_set.test: Added end marker for test to make future merges easier mysql-test/t/type_time.test: Added end marker for test to make future merges easier mysql-test/t/type_timestamp.test: Added end marker for test to make future merges easier mysql-test/t/type_uint.test: Added end marker for test to make future merges easier mysql-test/t/type_year.test: Added end marker for test to make future merges easier mysql-test/t/union.test: Added end marker for test to make future merges easier mysql-test/t/update.test: Added end marker for test to make future merges easier mysql-test/t/user_var-binlog.test: Added end marker for test to make future merges easier mysql-test/t/user_var.test: Added end marker for test to make future merges easier mysql-test/t/varbinary.test: Added end marker for test to make future merges easier mysql-test/t/variables.test: Added end marker for test to make future merges easier mysql-test/t/warnings.test: Added end marker for test to make future merges easier
* | | Mergeunknown2005-05-241-0/+14
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql-test/r/lock.result: Auto merged mysql-test/r/rpl_log.result: Auto merged mysql-test/t/lock.test: Auto merged mysql-test/r/rpl_rotate_logs.result: SCCS merged sql/sql_parse.cc: SCCS merged sql/sql_repl.cc: SCCS merged
| * | Bug#7241 - Invalid response when DELETE .. USING and LOCK TABLES used.unknown2005-05-241-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only acquire necessary write lock for multi-delete mysql-test/r/lock.result: Test for Bug#7241 mysql-test/t/lock.test: Test for Bug#7241 sql/sql_parse.cc: Bug#7241 Don't acquire write lock on all tables. Make sure to set lock_type on real table_list
* | | Better approach for prelocking of tables for stored routines executionunknown2005-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and some SP-related cleanups. - We don't have separate stage for calculation of list of tables to be prelocked and doing implicit LOCK/UNLOCK any more. Instead we calculate this list at open_tables() and do implicit LOCK in lock_tables() (and UNLOCK in close_thread_tables()). Also now we support cases when same table (with same alias) is used several times in the same query in SP. - Cleaned up execution of SP. Moved all common code which handles LEX and does preparations before statement execution or complex expression evaluation to auxilary sp_lex_keeper class. Now all statements in SP (and corresponding instructions) that evaluate expression which can contain subquery have their own LEX. mysql-test/r/lock.result: Replaced wrong error code with the correct one after fixing bug in SP-locking. mysql-test/r/mysqldump.result: Added dropping of view which is used in test to its beginning. mysql-test/r/sp.result: Added tests for improved SP-locking. Temporarily disabled tests for SHOW PROCEDURE STATUS and alike (Until Monty will allow to open mysql.proc under LOCK TABLES without mentioning it in lock list). Replaced wrong results of test for bug #5240 with correct results after fixing bug in handling of cursors. mysql-test/t/lock.test: Replaced wrong error code with the correct one after fixing bug in SP-locking. mysql-test/t/mysqldump.test: Added dropping of view which is used in test to its beginning. mysql-test/t/sp.test: Added tests for improved SP-locking. Temporarily disabled tests for SHOW PROCEDURE STATUS and alike (Until Monty will allow to open mysql.proc under LOCK TABLES without mentioning it in lock list). Removed test for bug #1654 since we already test exactly this function in one of SP-locking tests. Removed comment about cursor's wrong behavior in test for bug #5240 after fixing bug which was its cause. sql/item_func.cc: Removed comment which is no longer true. sql/mysql_priv.h: Changed open_tables() signature. Now its 2nd parameter is in/out since it can add elements to table list. sql/sp.cc: sp_find_procedure(): Added one more parameter which enforces cache only lookup. sp_merge_hash(): Now uses its return value to indicate that first of two hashes changed as result of merge. sp_cache_routines(): This function caches all stored routines used in query now. sql/sp.h: - sp_find_procedure() now has one more parameter which enforces cache only lookup. - sp_merge_hash() now uses its return value to indicate that first of two hashes changed as result of merge. - sp_cache_routines() caches all stored routines now. So it does not need third argument any more. sql/sp_head.cc: sp_head::sp_head(): Added initialization of new m_spfuns and m_spprocs members. sp_head::execute(): Let us save/restore part of thread context which can be damaged by execution of instructions. sp_head::execute_function()/execute_procedure(): Now it is responsibility of caller to close tables used in subqueries which are passed as routine parameters. sp_head::restore_lex(): Let us accumulate information about routines used by this one in new m_spfuns, m_spprocs hashes. sp_lex_keeper::reset_lex_and_exec_core() Main method of new auxilary sp_lex_keeper class to which instructions delegate responsibility for handling LEX and preparations before executing statement or calculating complex expression. Since all instructions which calculate complex expression or execute command now use sp_lex_keeper they have to implement sp_instr::exec_core() method. Most of instruction specific logic has moved from sp_instr::execute() to this new method. Removed sp_instr_set_user_var class which is no longer used, because nowdays we allow execution of statements in stored functions and triggers. sp_merge_table_list() became sp_head::merge_table_list() method. It also treats sp_head::m_sptabs as multi-set of tables now. sp_hash_to_table_list() became sp_head::add_used_tables_to_table_list(). It takes into account that sp_head::m_sptabs is multi-set and allocates object into persistent arena of PS. Removed sp_merge_table_hash(), sp_open_and_lock_tables(), sp_unlock_tables(), sp_merge_routine_tables() methods since they are not used by new prelocking mechanism. Added sp_add_sp_tables_to_table_list() which serves for adding tables needed by routines used in query to the query table list for prelocking. sql/sp_head.h: class sp_head: - Added m_spfuns, m_spprocs members for storing names of routines used by this routine. - Added add_used_tables_to_table_list() method which allows to add tables needed by this routine to query's table list. - Converted sp_merge_table_list() to sp_head::merge_table_list() method. - Changed semantics of THD::m_sptabs. Now it is multi-set which contains only tables which are used by this routine and not routines that are called from this one. Removed sp_merge_routine_tables(), sp_merge_table_hash(), sp_open_and_lock_tables(), sp_unlock_tables() calls since they are not used for our prelocking list calculation. Added auxilary sp_lex_keeper class to which instructions delegate responsibility for handling LEX and preparations before executing statement or calculating complex expression. This class uses new sp_instr::exec_core() method which is responsible for executing instruction's core function after all preparations were made. All instructions which hold and calculate complex expression now have their own LEX (by aggregating sp_lex_keeper instance). sp_instr_stmt now uses sp_lex_keeper too. Removed sp_instr_set_user_var class which is no longer used, because nowdays we allow execution of statements in stored functions and triggers. sql/sp_rcontext.cc: Now sp_cursor holds pointer to sp_lex_keeper instead of LEX. sql/sp_rcontext.h: Now sp_cursor holds pointer to sp_lex_keeper instead of LEX. sql/sql_acl.cc: acl_init(), grant_init(): Now we use simple_open_n_lock_tables() instead of explicit calls to open_tables() and mysql_lock_tables(). sql/sql_base.cc: Implemented support for execution of statements in "prelocked" mode. When we have statement which uses stored routines explicitly or implicitly (via views or triggers) we have to open and lock all tables for these routines at the same time as tables for the main statement. In fact we have to do implicit LOCK TABLES at the begining of such statement and implict UNLOCK TABLES at its end. We call such mode "prelocked". When open_tables() is called for the statement tables which are needed for execution of routines used by it are added to its tables list (this process also caches all routines used). Implicit use of routines is discovered when we open view or table with trigger and apropriate tables are added to the table list at this moment. Statement which has such extra tables in its list (well actually any that uses functions) is marked as requiring prelocked mode for its execution. When lock_tables() sees such statement it will issue implicit LOCK TABLES for this extended table list instead of doing usual locking, it will also set THD::prelocked_mode to indicate that we are in prelocked mode. When open_tables()/lock_tables() are called for statement of stored routine (substatement), they notice that we are running in prelocked mode and use one of prelocked tables from those that are not used by upper levels of execution. close_thread_tables() for substatement won't really close tables used but will mark them as free for reuse instead. Finally when close_thread_tables() is called for the main statement it really unlocks and closes all tables used. Everything will work even if one uses such statement under real LOCK TABLES (we are simply not doing implicit LOCK/UNLOCK in this case). sql/sql_class.cc: Added initialization of THD::prelocked_mode member. sql/sql_class.h: - Added prelocked_mode_type enum and THD::prelocked_mode member which are used for indication whenever "prelocked mode" is on (i.e. that statement uses stored routines and is executed under implicit LOCK TABLES). - Removed THD::shortcut_make_view which is no longer needed. We use TABLE_LIST::prelocking_placeholder for the same purprose now. sql/sql_handler.cc: Changed open_tables() invocation. Now its 2nd parameter is in/out since it can add elements to table list. sql/sql_lex.cc: lex_start(): Added initialization of LEX::query_tables_own_last. Unused LEX::sptabs member was removed. st_lex::unlink_first_table()/link_first_table_back(): We should update LEX::query_tables_last properly if table list contains(ed) only one element. sql/sql_lex.h: LEX: - Removed sptabs member since it is no longer used. - Added query_tables_own_last member, which if non-0 indicates that statement requires prelocking (implicit LOCK TABLES) for its execution and points to last own element in query table list. If it is zero then this query does not need prelocking. - Added requires_prelocking(), mark_as_requiring_prelocking(), first_not_own_table() inline methods to incapsulate and simplify usage of this new member. sql/sql_parse.cc: dispatch_command(): To properly leave prelocked mode when needed we should call close_thread_tables() even if there are no open tables. mysql_execute_command(): - Removed part of function which were responsible for doing implicit LOCK TABLES before statement execution if statement used stored routines (and doing UNLOCK TABLES at the end). Now we do all this in open_tables()/lock_tables()/close_thread_tables() instead. - It is also sensible to reset errors before execution of statement which uses routines. - SQLCOM_DO, SQLCOM_SET_OPTION, SQLCOM_CALL We should always try to open tables because even if statement has empty table list, it can call routines using tables, which should be preopened before statement execution. - SQLCOM_CALL We should not look up routine called in mysql.proc, since it should be already cached by this moment by open_tables() call. - SQLCOM_LOCK_TABLES it is better to use simple_open_n_lock_tables() since we want to avoid materialization of derived tables for this command. sql/sql_prepare.cc: mysql_test_update(): Changed open_tables() invocations. Now its 2nd parameter is in/out since it can add elements to table list. check_prepared_statement(): Since now we cache all routines used by statement in open_tables() we don't need to do it explicitly. mysql_stmt_prepare(): Now we should call close_thread_tables() when THD::lex points to the LEX of statement which opened tables. reset_stmt_for_execute(): Commented why we are resetting all tables in table list. sql/sql_trigger.h: Table_triggers_list::process_triggers(): We should surpress sending of ok packet when we are calling trigger's routine, since now we allow statements in them. sql/sql_update.cc: Changed open_tables() invocations. Now its 2nd parameter is in/out since it can add elements to table list. sql/sql_view.cc: mysql_make_view(): - Removed handling of routines used in view. Instead we add tables which are needed for their execution to statement's table list in open_tables(). - Now we use TABLE_LIST::prelocking_placeholder instead of THD::shortcut_make_view for indicating that view is opened only to discover which tables and routines it uses (this happens when we build extended table list for prelocking). Also now we try to avoid to modify main LEX in this case (except of its table list). - Corrected small error we added tables to the table list of the main LEX without updating its query_tables_last member properly. sql/sql_yacc.yy: Now each expression which is used in SP statements and can contain subquery has its own LEX. This LEX is stored in corresponding sp_instr object and used along with Item tree for expression calculation. We don't need sp_instr_set_user_var() anymore since now we allow execution of statements in stored functions and triggers. sql/table.h: Added TABLE_LIST::prelocking_placeholder member for distinguishing elements of table list which does not belong to the statement itself and added there only for prelocking (as they are to be used by routines called by this statement). sql/tztime.cc: my_tz_init(): Now we use more simplier simple_open_n_lock_tables() call instead of open_tables()/lock_tables() pair.
* | | WL#2130: Table locking for stored FUNCTIONsunknown2005-02-081-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Collect all tables and SPs refered by a statement, and open all tables with an implicit LOCK TABLES. Do find things refered by triggers and views, we open them first (and then repeat this until nothing new is found), before doing the actual lock tables. mysql-test/r/information_schema.result: Updated result for WL#2130. mysql-test/r/lock.result: Updated result for WL#2130. mysql-test/r/sp-error.result: Updated result for WL#2130. mysql-test/r/sp.result: Updated result for WL#2130. mysql-test/r/view.result: Updated result for WL#2130. mysql-test/t/information_schema.test: Disabled one test case due to a bug involving LOCK TABLES, which shows up with WL#2130. mysql-test/t/lock.test: New error message with WL#2130. This change is under debate and might change in the future, but will do for now. mysql-test/t/sp-error.test: Updated for WL#2130. Some tests are voided when table access does work from functions. mysql-test/t/sp.test: Updated for WL#2130. mysql-test/t/view.test: Updated for WL#2130. sql/item_func.cc: We now have to set net.no_send_ok for functions too, with WL#2130. sql/share/errmsg.txt: Reused an error code since the old use was voided by WL#2130, but a new one was needed instead (similar, but more specific restriction). sql/sp.cc: Fixed error handling and collection of used tables for WL#2130. sql/sp.h: Fixed error handling and collection of used tables for WL#2130. sql/sp_head.cc: Added support functions for collecting and merging hash tables and lists of used tables from SPs and substatements, for WL#2130. sql/sp_head.h: Added support functions for collecting and merging hash tables and lists of used tables from SPs and substatements, for WL#2130. sql/sql_base.cc: Changed the way table->query_id is tested and set during with locked tables in effect. This makes some SP test cases work with WL#2130, but has a side effect on some error cases with explicit LOCK TABLES. It's still debated if this is the correct way, so it might change. sql/sql_class.h: Added flags for circumventing some interference between WL#2130 and mysql_make_view(). sql/sql_derived.cc: Added some missing initializations. (Potential bugs.) sql/sql_lex.cc: Clear the new hash tables for WL#2130. sql/sql_lex.h: Added hash tables for procedures and tables too (as for functions), for WL#2130. sql/sql_parse.cc: WL#2130: Make table accesses from stored functions work by adding an implicit LOCK TABLES around (most) executed statements. To do this, we have to go through a loop where we collect all SPs and tables in mysql_execute_statement. sql/sql_prepare.cc: Cache both functions and procedures for WL#2130. sql/sql_show.cc: Added some missing initializations. (Potential bugs.) sql/sql_view.cc: Shortcut mysql_make_view() if thd->shortcut_make_view is true during the pre-open phase for collecting tables in WL#2130. Otherwise, the similar mechanism here causes interference. sql/sql_yacc.yy: For WL#2130, added caching of procedures and disallowed LOCK/UNLOCK TABLES in SPs.
* | Merge with 4.0.18unknown2004-02-111-0/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union mysql-test/r/ctype_tis620.result-old: Merge rename: mysql-test/r/ctype_tis620.result -> mysql-test/r/ctype_tis620.result-old BUILD/compile-pentium-max: Auto merged BitKeeper/etc/config: Auto merged Build-tools/Bootstrap: Auto merged Build-tools/Do-compile: Auto merged configure.in: Auto merged mysql-test/t/ctype_tis620.test-old: Merge rename: mysql-test/t/ctype_tis620.test -> mysql-test/t/ctype_tis620.test-old Docs/Makefile.am: Auto merged client/mysqldump.c: Auto merged client/mysqltest.c: Auto merged include/my_global.h: Auto merged include/my_pthread.h: Auto merged include/my_sys.h: Auto merged include/myisam.h: Auto merged innobase/btr/btr0cur.c: Auto merged innobase/ibuf/ibuf0ibuf.c: Auto merged innobase/include/dict0dict.h: Auto merged innobase/include/srv0srv.h: Auto merged innobase/include/ut0mem.h: Auto merged innobase/log/log0log.c: Auto merged innobase/row/row0ins.c: Auto merged innobase/row/row0sel.c: Auto merged innobase/srv/srv0start.c: Auto merged innobase/ut/ut0mem.c: Auto merged myisam/mi_check.c: Auto merged myisam/mi_dynrec.c: Auto merged myisam/mi_key.c: Auto merged myisam/myisam_ftdump.c: Auto merged myisam/myisamdef.h: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/alter_table.result: Auto merged mysql-test/r/bdb.result: Auto merged mysql-test/r/bigint.result: Auto merged mysql-test/r/fulltext.result: Auto merged
| * Give error if locked table is used twice in query. This fixes strange error ↵unknown2004-02-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | message when doing LOCK TABLES t1 WRITE; INSERT TABLE t1 SELECT * from t1 (Bug #2296) client/mysqldump.c: Better help for flush-logs mysql-test/r/lock.result: Test for LOCK TABLES ; INSERT ... SELECT mysql-test/t/lock.test: Test for LOCK TABLES ; INSERT ... SELECT
* | WorkLog#1323unknown2003-12-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deprecate the use of TYPE=... Preferred syntax is ENGINE= include/mysqld_error.h: New warning for deprecated syntax sql/lex.h: Introduce ENGINE keyword Sort order of symbols sql/share/czech/errmsg.txt: New warning for deprecated syntax sql/share/danish/errmsg.txt: New warning for deprecated syntax sql/share/dutch/errmsg.txt: New warning for deprecated syntax sql/share/english/errmsg.txt: New warning for deprecated syntax sql/share/estonian/errmsg.txt: New warning for deprecated syntax sql/share/french/errmsg.txt: New warning for deprecated syntax sql/share/german/errmsg.txt: New warning for deprecated syntax sql/share/greek/errmsg.txt: New warning for deprecated syntax sql/share/hungarian/errmsg.txt: New warning for deprecated syntax sql/share/italian/errmsg.txt: New warning for deprecated syntax sql/share/japanese/errmsg.txt: New warning for deprecated syntax sql/share/korean/errmsg.txt: New warning for deprecated syntax sql/share/norwegian-ny/errmsg.txt: New warning for deprecated syntax sql/share/norwegian/errmsg.txt: New warning for deprecated syntax sql/share/polish/errmsg.txt: New warning for deprecated syntax sql/share/portuguese/errmsg.txt: New warning for deprecated syntax sql/share/romanian/errmsg.txt: New warning for deprecated syntax sql/share/russian/errmsg.txt: New warning for deprecated syntax sql/share/serbian/errmsg.txt: New warning for deprecated syntax sql/share/slovak/errmsg.txt: New warning for deprecated syntax sql/share/spanish/errmsg.txt: New warning for deprecated syntax sql/share/swedish/errmsg.txt: New warning for deprecated syntax sql/share/ukrainian/errmsg.txt: New warning for deprecated syntax sql/sql_show.cc: Change TYPE= with ENGINE= sql/sql_yacc.yy: Introduce ENGINE keyword, Deprecate TYPE= syntax, Introduce SHOW ENGINE syntax, Deprecate SHOW INNODB/BDB syntax. mysql-test/r/alias.result: Change occurances of TYPE= to ENGINE= mysql-test/r/alter_table.result: Change occurances of TYPE= to ENGINE= mysql-test/r/auto_increment.result: Change occurances of TYPE= to ENGINE= mysql-test/r/bdb-alter-table-1.result: Change occurances of TYPE= to ENGINE= mysql-test/r/bdb-crash.result: Change occurances of TYPE= to ENGINE= mysql-test/r/bdb-deadlock.result: Change occurances of TYPE= to ENGINE= mysql-test/r/bdb.result: Change occurances of TYPE= to ENGINE= mysql-test/r/bdb_cache.result: Change occurances of TYPE= to ENGINE= mysql-test/r/case.result: Change occurances of TYPE= to ENGINE= mysql-test/r/cast.result: Change occurances of TYPE= to ENGINE= mysql-test/r/constraints.result: Change occurances of TYPE= to ENGINE= mysql-test/r/create.result: Change occurances of TYPE= to ENGINE= mysql-test/r/ctype_collate.result: Change occurances of TYPE= to ENGINE= mysql-test/r/ctype_latin1_de.result: Change occurances of TYPE= to ENGINE= mysql-test/r/ctype_many.result: Change occurances of TYPE= to ENGINE= mysql-test/r/ctype_mb.result: Change occurances of TYPE= to ENGINE= mysql-test/r/ctype_recoding.result: Change occurances of TYPE= to ENGINE= mysql-test/r/ctype_ucs.result: Change occurances of TYPE= to ENGINE= mysql-test/r/delete.result: Change occurances of TYPE= to ENGINE= mysql-test/r/distinct.result: Change occurances of TYPE= to ENGINE= mysql-test/r/fulltext.result: Change occurances of TYPE= to ENGINE= mysql-test/r/fulltext2.result: Change occurances of TYPE= to ENGINE= mysql-test/r/fulltext_distinct.result: Change occurances of TYPE= to ENGINE= mysql-test/r/fulltext_left_join.result: Change occurances of TYPE= to ENGINE= mysql-test/r/func_compress.result: Change occurances of TYPE= to ENGINE= mysql-test/r/func_date_add.result: Change occurances of TYPE= to ENGINE= mysql-test/r/func_group.result: Change occurances of TYPE= to ENGINE= mysql-test/r/func_if.result: Change occurances of TYPE= to ENGINE= mysql-test/r/func_str.result: Change occurances of TYPE= to ENGINE= mysql-test/r/func_system.result: Change occurances of TYPE= to ENGINE= mysql-test/r/func_test.result: Change occurances of TYPE= to ENGINE= mysql-test/r/func_time.result: Change occurances of TYPE= to ENGINE= mysql-test/r/gis-rtree.result: Change occurances of TYPE= to ENGINE= mysql-test/r/group_by.result: Change occurances of TYPE= to ENGINE= mysql-test/r/handler.result: Change occurances of TYPE= to ENGINE= mysql-test/r/heap.result: Change occurances of TYPE= to ENGINE= mysql-test/r/heap_auto_increment.result: Change occurances of TYPE= to ENGINE= mysql-test/r/heap_btree.result: Change occurances of TYPE= to ENGINE= mysql-test/r/heap_hash.result: Change occurances of TYPE= to ENGINE= mysql-test/r/help.result: Change occurances of TYPE= to ENGINE= mysql-test/r/innodb-deadlock.result: Change occurances of TYPE= to ENGINE= mysql-test/r/innodb.result: Change occurances of TYPE= to ENGINE= mysql-test/r/innodb_cache.result: Change occurances of TYPE= to ENGINE= mysql-test/r/innodb_handler.result: Change occurances of TYPE= to ENGINE= mysql-test/r/insert_select.result: Change occurances of TYPE= to ENGINE= mysql-test/r/isam.result: Change occurances of TYPE= to ENGINE= mysql-test/r/join.result: Change occurances of TYPE= to ENGINE= mysql-test/r/join_crash.result: Change occurances of TYPE= to ENGINE= mysql-test/r/join_outer.result: Change occurances of TYPE= to ENGINE= mysql-test/r/key.result: Change occurances of TYPE= to ENGINE= mysql-test/r/lock.result: Change occurances of TYPE= to ENGINE= mysql-test/r/lock_tables_lost_commit.result: Change occurances of TYPE= to ENGINE= mysql-test/r/merge.result: Change occurances of TYPE= to ENGINE= mysql-test/r/mix_innodb_myisam_binlog.result: Change occurances of TYPE= to ENGINE= mysql-test/r/multi_update.result: Change occurances of TYPE= to ENGINE= mysql-test/r/myisam.result: Change occurances of TYPE= to ENGINE= mysql-test/r/null.result: Change occurances of TYPE= to ENGINE= mysql-test/r/null_key.result: Change occurances of TYPE= to ENGINE= mysql-test/r/order_by.result: Change occurances of TYPE= to ENGINE= mysql-test/r/query_cache.result: Change occurances of TYPE= to ENGINE= mysql-test/r/range.result: Change occurances of TYPE= to ENGINE= mysql-test/r/repair_part1.result: Change occurances of TYPE= to ENGINE= mysql-test/r/replace.result: Change occurances of TYPE= to ENGINE= mysql-test/r/rollback.result: Change occurances of TYPE= to ENGINE= mysql-test/r/rpl000006.result: Change occurances of TYPE= to ENGINE= mysql-test/r/rpl_flush_tables.result: Change occurances of TYPE= to ENGINE= mysql-test/r/rpl_insert_id.result: Change occurances of TYPE= to ENGINE= mysql-test/r/rpl_relayrotate.result: Change occurances of TYPE= to ENGINE= mysql-test/r/select.result: Change occurances of TYPE= to ENGINE= mysql-test/r/select_found.result: Change occurances of TYPE= to ENGINE= mysql-test/r/show_check.result: Change occurances of TYPE= to ENGINE= mysql-test/r/sql_mode.result: Change occurances of TYPE= to ENGINE= mysql-test/r/status.result: Change occurances of TYPE= to ENGINE= mysql-test/r/subselect.result: Change occurances of TYPE= to ENGINE= mysql-test/r/subselect2.result: Change occurances of TYPE= to ENGINE= mysql-test/r/subselect_innodb.result: Change occurances of TYPE= to ENGINE= mysql-test/r/symlink.result: Change occurances of TYPE= to ENGINE= mysql-test/r/temp_table.result: Change occurances of TYPE= to ENGINE= mysql-test/r/type_blob.result: Change occurances of TYPE= to ENGINE= mysql-test/r/type_datetime.result: Change occurances of TYPE= to ENGINE= mysql-test/r/type_enum.result: Change occurances of TYPE= to ENGINE= mysql-test/r/type_nchar.result: Change occurances of TYPE= to ENGINE= mysql-test/r/type_set.result: Change occurances of TYPE= to ENGINE= mysql-test/r/union.result: Change occurances of TYPE= to ENGINE= mysql-test/r/update.result: Change occurances of TYPE= to ENGINE= mysql-test/r/warnings.result: Change occurances of TYPE= to ENGINE= mysql-test/t/alias.test: Change occurances of TYPE= to ENGINE= mysql-test/t/alter_table.test: Change occurances of TYPE= to ENGINE= mysql-test/t/auto_increment.test: Change occurances of TYPE= to ENGINE= mysql-test/t/bdb-alter-table-1.test: Change occurances of TYPE= to ENGINE= mysql-test/t/bdb-crash.test: Change occurances of TYPE= to ENGINE= mysql-test/t/bdb-deadlock.test: Change occurances of TYPE= to ENGINE= mysql-test/t/bdb.test: Change occurances of TYPE= to ENGINE= mysql-test/t/bdb_cache.test: Change occurances of TYPE= to ENGINE= mysql-test/t/create.test: Change occurances of TYPE= to ENGINE= mysql-test/t/ctype_ucs.test: Change occurances of TYPE= to ENGINE= mysql-test/t/delete.test: Change occurances of TYPE= to ENGINE= mysql-test/t/distinct.test: Change occurances of TYPE= to ENGINE= mysql-test/t/fulltext.test: Change occurances of TYPE= to ENGINE= mysql-test/t/fulltext2.test: Change occurances of TYPE= to ENGINE= mysql-test/t/fulltext_distinct.test: Change occurances of TYPE= to ENGINE= mysql-test/t/fulltext_left_join.test: Change occurances of TYPE= to ENGINE= mysql-test/t/func_compress.test: Change occurances of TYPE= to ENGINE= mysql-test/t/func_date_add.test: Change occurances of TYPE= to ENGINE= mysql-test/t/func_group.test: Change occurances of TYPE= to ENGINE= mysql-test/t/func_if.test: Change occurances of TYPE= to ENGINE= mysql-test/t/func_str.test: Change occurances of TYPE= to ENGINE= mysql-test/t/func_test.test: Change occurances of TYPE= to ENGINE= mysql-test/t/func_time.test: Change occurances of TYPE= to ENGINE= mysql-test/t/gis-rtree.test: Change occurances of TYPE= to ENGINE= mysql-test/t/group_by.test: Change occurances of TYPE= to ENGINE= mysql-test/t/handler.test: Change occurances of TYPE= to ENGINE= mysql-test/t/heap.test: Change occurances of TYPE= to ENGINE= mysql-test/t/heap_auto_increment.test: Change occurances of TYPE= to ENGINE= mysql-test/t/heap_btree.test: Change occurances of TYPE= to ENGINE= mysql-test/t/heap_hash.test: Change occurances of TYPE= to ENGINE= mysql-test/t/help.test: Change occurances of TYPE= to ENGINE= mysql-test/t/innodb-deadlock.test: Change occurances of TYPE= to ENGINE= mysql-test/t/innodb.test: Change occurances of TYPE= to ENGINE= mysql-test/t/innodb_cache.test: Change occurances of TYPE= to ENGINE= mysql-test/t/innodb_handler.test: Change occurances of TYPE= to ENGINE= mysql-test/t/insert_select.test: Change occurances of TYPE= to ENGINE= mysql-test/t/isam.test: Change occurances of TYPE= to ENGINE= mysql-test/t/join.test: Change occurances of TYPE= to ENGINE= mysql-test/t/join_crash.test: Change occurances of TYPE= to ENGINE= mysql-test/t/join_outer.test: Change occurances of TYPE= to ENGINE= mysql-test/t/key.test: Change occurances of TYPE= to ENGINE= mysql-test/t/lock.test: Change occurances of TYPE= to ENGINE= mysql-test/t/lock_tables_lost_commit.test: Change occurances of TYPE= to ENGINE= mysql-test/t/merge.test: Change occurances of TYPE= to ENGINE= mysql-test/t/mix_innodb_myisam_binlog.test: Change occurances of TYPE= to ENGINE= mysql-test/t/multi_update.test: Change occurances of TYPE= to ENGINE= mysql-test/t/myisam.test: Change occurances of TYPE= to ENGINE= mysql-test/t/null.test: Change occurances of TYPE= to ENGINE= mysql-test/t/null_key.test: Change occurances of TYPE= to ENGINE= mysql-test/t/order_by.test: Change occurances of TYPE= to ENGINE= mysql-test/t/outfile.test: Change occurances of TYPE= to ENGINE= mysql-test/t/query_cache.test: Change occurances of TYPE= to ENGINE= mysql-test/t/query_cache_merge.test: Change occurances of TYPE= to ENGINE= mysql-test/t/range.test: Change occurances of TYPE= to ENGINE= mysql-test/t/repair_part1.test: Change occurances of TYPE= to ENGINE= mysql-test/t/replace.test: Change occurances of TYPE= to ENGINE= mysql-test/t/rollback.test: Change occurances of TYPE= to ENGINE= mysql-test/t/rpl000006.test: Change occurances of TYPE= to ENGINE= mysql-test/t/rpl_flush_tables.test: Change occurances of TYPE= to ENGINE= mysql-test/t/rpl_insert_id.test: Change occurances of TYPE= to ENGINE= mysql-test/t/rpl_relayrotate.test: Change occurances of TYPE= to ENGINE= mysql-test/t/select.test: Change occurances of TYPE= to ENGINE= mysql-test/t/select_found.test: Change occurances of TYPE= to ENGINE= mysql-test/t/show_check.test: Change occurances of TYPE= to ENGINE= mysql-test/t/sql_mode.test: Change occurances of TYPE= to ENGINE= mysql-test/t/status.test: Change occurances of TYPE= to ENGINE= mysql-test/t/subselect.test: Change occurances of TYPE= to ENGINE= mysql-test/t/subselect2.test: Change occurances of TYPE= to ENGINE= mysql-test/t/subselect_innodb.test: Change occurances of TYPE= to ENGINE= mysql-test/t/symlink.test: Change occurances of TYPE= to ENGINE= mysql-test/t/temp_table.test: Change occurances of TYPE= to ENGINE= mysql-test/t/type_datetime.test: Change occurances of TYPE= to ENGINE= mysql-test/t/type_set.test: Change occurances of TYPE= to ENGINE= mysql-test/t/union.test: Change occurances of TYPE= to ENGINE= mysql-test/t/update.test: Change occurances of TYPE= to ENGINE= mysql-test/t/warnings.test: Change occurances of TYPE= to ENGINE= New test for deprecated syntax
* | Changed mysql-test to print warnings for not existing table to DROP TABLEunknown2003-01-061-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaned up test; Removed wrong DROP TABLE commands and use standard table and database names. changed store_warning() -> push_warning_print() BitKeeper/deleted/.del-rpl000016-slave.opt~ef76f85ddcc13b87: Delete: mysql-test/t/rpl000016-slave.opt BitKeeper/deleted/.del-sel000001.test~9567c1646058cc: Delete: mysql-test/t/sel000001.test BitKeeper/deleted/.del-sel000002.test~9f500639572e18e1: Delete: mysql-test/t/sel000002.test BitKeeper/deleted/.del-sel000003.test~63a5512d18cd20a2: Delete: mysql-test/t/sel000003.test BitKeeper/deleted/.del-sel000001.result~383913ae4505ec86: Delete: mysql-test/r/sel000001.result BitKeeper/deleted/.del-sel000002.result~d1787e6fd5dbc1cc: Delete: mysql-test/r/sel000002.result BitKeeper/deleted/.del-sel000003.result~d7b657b1e3a286a7: Delete: mysql-test/r/sel000003.result BitKeeper/deleted/.del-sel000031.result~d49aeac63ad7db4d: Delete: mysql-test/r/sel000031.result BitKeeper/deleted/.del-sel000031.test~50a19a8e204e99bc: Delete: mysql-test/t/sel000031.test BitKeeper/deleted/.del-sel000032.result~6cb30e23cbca9fb0: Delete: mysql-test/r/sel000032.result BitKeeper/deleted/.del-sel000032.test~e32da7c3fc4b7ace: Delete: mysql-test/t/sel000032.test BitKeeper/deleted/.del-rpl000003.result~68d6ee00beaa011: Delete: mysql-test/r/rpl000003.result BitKeeper/deleted/.del-rpl000003.test~b7cfc4c5576fbafd: Delete: mysql-test/t/rpl000003.test client/mysql.cc: Don't yet print information about SQL help client/mysqltest.c: Added test options: --enable_warnings --disable_warnings --enable_info --disable_info configure.in: changed version number of shared libraries mysql-test/include/master-slave.inc: Don't write warnings on init mysql-test/r/backup.result: Updated results mysql-test/r/bdb.result: Updated results mysql-test/r/bigint.result: Updated results mysql-test/r/bool.result: Updated results mysql-test/r/create.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/flush.result: Updated results mysql-test/r/fulltext.result: Updated results mysql-test/r/fulltext_multi.result: Updated results mysql-test/r/fulltext_order_by.result: Updated results mysql-test/r/func_equal.result: Updated results mysql-test/r/func_in.result: Updated results mysql-test/r/func_set.result: Updated results mysql-test/r/gcc296.result: Updated results mysql-test/r/group_by.result: Updated results mysql-test/r/innodb-deadlock.result: Updated results mysql-test/r/innodb.result: Updated results mysql-test/r/innodb_cache.result: Updated results mysql-test/r/innodb_handler.result: Updated results mysql-test/r/insert.result: Updated results mysql-test/r/insert_select.result: Updated results mysql-test/r/isam.result: Updated results mysql-test/r/join_outer.result: Updated results mysql-test/r/key.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/null_key.result: Updated results mysql-test/r/odbc.result: Updated results mysql-test/r/olap.result: Updated results mysql-test/r/order_by.result: Updated results mysql-test/r/query_cache.result: Updated results mysql-test/r/rename.result: Updated results mysql-test/r/row.result: Updated results mysql-test/r/rpl000001.result: Updated results mysql-test/r/rpl000002.result: Updated results mysql-test/r/rpl000004.result: Updated results mysql-test/r/rpl000005.result: Updated results mysql-test/r/rpl000006.result: Updated results mysql-test/r/rpl000008.result: Updated results mysql-test/r/rpl000009.result: Updated results mysql-test/r/rpl000010.result: Updated results mysql-test/r/rpl000011.result: Updated results mysql-test/r/rpl000012.result: Updated results mysql-test/r/rpl000013.result: Updated results mysql-test/r/rpl_alter.result: Updated results mysql-test/r/rpl_empty_master_crash.result: Updated results mysql-test/r/rpl_redirect.result: Updated results mysql-test/r/rpl_replicate_do.result: Updated results mysql-test/r/rpl_rotate_logs.result: Updated results mysql-test/r/rpl_skip_error.result: Updated results mysql-test/r/rpl_temporary.result: Updated results mysql-test/r/select.result: Updated results mysql-test/r/subselect.result: Updated results mysql-test/r/temp_table.result: Updated results mysql-test/r/type_date.result: Updated results mysql-test/r/type_float.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/r/warnings.result: Updated results mysql-test/t/alias.test: Don't write warnings when initializing test mysql-test/t/alter_table.test: Don't write warnings when initializing test mysql-test/t/analyse.test: Don't write warnings when initializing test mysql-test/t/auto_increment.test: Don't write warnings when initializing test mysql-test/t/backup.test: Don't write warnings when initializing test mysql-test/t/bdb-alter-table-1.test: Don't write warnings when initializing test mysql-test/t/bdb-crash.test: Don't write warnings when initializing test mysql-test/t/bdb-deadlock.test: Don't write warnings when initializing test mysql-test/t/bdb.test: Don't write warnings when initializing test cleaned up test mysql-test/t/bdb_cache.test: Don't write warnings when initializing test mysql-test/t/bench_count_distinct.test: Don't write warnings when initializing test mysql-test/t/bigint.test: Don't write warnings when initializing test mysql-test/t/binary.test: Don't write warnings when initializing test mysql-test/t/bool.test: Don't write warnings when initializing test Changed to use standard table names mysql-test/t/bulk_replace.test: Don't write warnings when initializing test mysql-test/t/case.test: Don't write warnings when initializing test mysql-test/t/check.test: Don't write warnings when initializing test mysql-test/t/compare.test: Don't write warnings when initializing test mysql-test/t/connect.test: Removed empty line mysql-test/t/constraints.test: Don't write warnings when initializing test mysql-test/t/count_distinct.test: Don't write warnings when initializing test mysql-test/t/count_distinct2.test: Don't write warnings when initializing test mysql-test/t/create.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/ctype_latin1_de.test: Don't write warnings when initializing test mysql-test/t/ctype_many.test: Don't write warnings when initializing test mysql-test/t/delayed.test: Don't write warnings when initializing test mysql-test/t/delete.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/derived.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/dirty_close.test: Don't write warnings when initializing test mysql-test/t/distinct.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/drop.test: Don't write warnings when initializing test mysql-test/t/empty_table.test: Don't write warnings when initializing test mysql-test/t/err000001.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/explain.test: Don't write warnings when initializing test mysql-test/t/flush.test: Don't write warnings when initializing test mysql-test/t/foreign_key.test: Don't write warnings when initializing test mysql-test/t/fulltext.test: Don't write warnings when initializing test mysql-test/t/fulltext_cache.test: Don't write warnings when initializing test mysql-test/t/fulltext_distinct.test: Don't write warnings when initializing test mysql-test/t/fulltext_left_join.test: Don't write warnings when initializing test mysql-test/t/fulltext_multi.test: Don't write warnings when initializing test mysql-test/t/fulltext_order_by.test: Don't write warnings when initializing test mysql-test/t/fulltext_update.test: Don't write warnings when initializing test mysql-test/t/func_concat.test: Don't write warnings when initializing test mysql-test/t/func_date_add.test: Don't write warnings when initializing test mysql-test/t/func_encrypt.test: Don't write warnings when initializing test mysql-test/t/func_equal.test: Don't write warnings when initializing test mysql-test/t/func_group.test: Don't write warnings when initializing test mysql-test/t/func_if.test: Don't write warnings when initializing test mysql-test/t/func_in.test: Don't write warnings when initializing test mysql-test/t/func_isnull.test: Don't write warnings when initializing test mysql-test/t/func_like.test: Don't write warnings when initializing test mysql-test/t/func_regexp.test: Don't write warnings when initializing test mysql-test/t/func_set.test: Don't write warnings when initializing test Merged test with other tests mysql-test/t/func_str.test: Don't write warnings when initializing test mysql-test/t/func_time.test: Don't write warnings when initializing test mysql-test/t/func_timestamp.test: Don't write warnings when initializing test mysql-test/t/gcc296.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/grant_cache.test: Don't write warnings when initializing test mysql-test/t/group_by.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/handler.test: Don't write warnings when initializing test mysql-test/t/having.test: Don't write warnings when initializing test mysql-test/t/heap.test: Don't write warnings when initializing test mysql-test/t/heap_auto_increment.test: Don't write warnings when initializing test mysql-test/t/heap_btree.test: Don't write warnings when initializing test mysql-test/t/heap_hash.test: Don't write warnings when initializing test mysql-test/t/innodb-deadlock.test: Don't write warnings when initializing test mysql-test/t/innodb.test: Don't write warnings when initializing test mysql-test/t/innodb_cache.test: Don't write warnings when initializing test mysql-test/t/innodb_handler.test: Don't write warnings when initializing test mysql-test/t/ins000001.test: Don't write warnings when initializing test mysql-test/t/insert.test: Don't write warnings when initializing test cleaned up test. Changed to use standard database and table names mysql-test/t/insert_select.test: Don't write warnings when initializing test Changed to use standard table names mysql-test/t/insert_update.test: Don't write warnings when initializing test mysql-test/t/isam.test: Don't write warnings when initializing test cleaned up test mysql-test/t/join.test: Don't write warnings when initializing test mysql-test/t/join_crash.test: Don't write warnings when initializing test mysql-test/t/join_outer.test: Don't write warnings when initializing test mysql-test/t/key.test: Don't write warnings when initializing test mysql-test/t/key_diff.test: Don't write warnings when initializing test mysql-test/t/key_primary.test: Don't write warnings when initializing test mysql-test/t/keywords.test: Don't write warnings when initializing test mysql-test/t/kill.test: Don't write warnings when initializing test mysql-test/t/limit.test: Don't write warnings when initializing test mysql-test/t/lock.test: Don't write warnings when initializing test mysql-test/t/lock_multi.test: Don't write warnings when initializing test mysql-test/t/lowercase_table.test: Don't write warnings when initializing test mysql-test/t/merge.test: Don't write warnings when initializing test cleaned up test mysql-test/t/multi_update.test: Don't write warnings when initializing test mysql-test/t/myisam.test: Don't write warnings when initializing test mysql-test/t/null.test: Don't write warnings when initializing test mysql-test/t/null_key.test: Don't write warnings when initializing test mysql-test/t/odbc.test: Don't write warnings when initializing test mysql-test/t/olap.test: Don't write warnings when initializing test mysql-test/t/order_by.test: Don't write warnings when initializing test mysql-test/t/order_fill_sortbuf.test: Don't write warnings when initializing test mysql-test/t/query_cache.test: Don't write warnings when initializing test mysql-test/t/raid.test: Don't write warnings when initializing test mysql-test/t/range.test: Don't write warnings when initializing test mysql-test/t/rename.test: Don't write warnings when initializing test mysql-test/t/repair.test: Don't write warnings when initializing test mysql-test/t/replace.test: Don't write warnings when initializing test mysql-test/t/rollback.test: Don't write warnings when initializing test mysql-test/t/row.test: Don't write warnings when initializing test mysql-test/t/rpl000001.test: Don't write warnings when initializing test mysql-test/t/rpl000002.test: Don't write warnings when initializing test mysql-test/t/rpl000004.test: Don't write warnings when initializing test mysql-test/t/rpl000005.test: Don't write warnings when initializing test mysql-test/t/rpl000006.test: Don't write warnings when initializing test mysql-test/t/rpl000008-slave.opt: Don't write warnings when initializing test mysql-test/t/rpl000008.test: Don't write warnings when initializing test mysql-test/t/rpl000009-slave.opt: Don't write warnings when initializing test mysql-test/t/rpl000009.test: Don't write warnings when initializing test mysql-test/t/rpl000010.test: Don't write warnings when initializing test mysql-test/t/rpl000011.test: Don't write warnings when initializing test mysql-test/t/rpl000012.test: Don't write warnings when initializing test mysql-test/t/rpl000013.test: Don't write warnings when initializing test mysql-test/t/rpl000015.test: Don't write warnings when initializing test mysql-test/t/rpl000017.test: Don't write warnings when initializing test mysql-test/t/rpl000018.test: Don't write warnings when initializing test mysql-test/t/rpl_alter.test: Don't write warnings when initializing test mysql-test/t/rpl_empty_master_crash.test: Don't write warnings when initializing test mysql-test/t/rpl_redirect.test: Don't write warnings when initializing test mysql-test/t/rpl_replicate_do.test: Don't write warnings when initializing test mysql-test/t/rpl_rotate_logs.test: Don't write warnings when initializing test mysql-test/t/rpl_skip_error.test: Don't write warnings when initializing test mysql-test/t/rpl_temporary.test: Don't write warnings when initializing test mysql-test/t/sel000033.test: Don't write warnings when initializing test mysql-test/t/sel000100.test: Don't write warnings when initializing test mysql-test/t/select.test: Don't write warnings when initializing test mysql-test/t/select_found.test: Don't write warnings when initializing test mysql-test/t/select_safe.test: Don't write warnings when initializing test mysql-test/t/show_check.test: Don't write warnings when initializing test mysql-test/t/status.test: Don't write warnings when initializing test mysql-test/t/subselect.test: Don't write warnings when initializing test mysql-test/t/symlink.test: Don't write warnings when initializing test mysql-test/t/tablelock.test: Don't write warnings when initializing test mysql-test/t/temp_table.test: Don't write warnings when initializing test mysql-test/t/truncate.test: Don't write warnings when initializing test mysql-test/t/type_blob.test: Don't write warnings when initializing test mysql-test/t/type_date.test: Don't write warnings when initializing test mysql-test/t/type_datetime.test: Don't write warnings when initializing test mysql-test/t/type_decimal.test: Don't write warnings when initializing test mysql-test/t/type_enum.test: Don't write warnings when initializing test mysql-test/t/type_float.test: Don't write warnings when initializing test mysql-test/t/type_ranges.test: Don't write warnings when initializing test mysql-test/t/type_set.test: Don't write warnings when initializing test mysql-test/t/type_time.test: Don't write warnings when initializing test mysql-test/t/type_timestamp.test: Don't write warnings when initializing test mysql-test/t/type_uint.test: Don't write warnings when initializing test mysql-test/t/type_year.test: Don't write warnings when initializing test mysql-test/t/union.test: Don't write warnings when initializing test mysql-test/t/update.test: Don't write warnings when initializing test mysql-test/t/user_var.test: Don't write warnings when initializing test mysql-test/t/varbinary.test: Don't write warnings when initializing test mysql-test/t/variables.test: Don't write warnings when initializing test mysql-test/t/warnings.test: Don't write warnings when initializing test mysys/my_vsnprintf.c: Safety fix readline/terminal.c: Removed compiler warnings sql/ha_berkeley.cc: Indentation changes sql/mysql_priv.h: Change store_warning -> push_warning_printf sql/sql_db.cc: Change store_warning -> push_warning_printf sql/sql_error.cc: Change store_warning -> push_warning_printf sql/sql_table.cc: Change store_warning -> push_warning_printf
* Updated manual about embedded version.unknown2001-10-081-42/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Added timeouts to make lock test repeatableunknown2001-07-171-0/+4
| | | | | | | mysql-test/r/lock.result: Fixed wrong result for lock mysql-test/t/lock.test: Added timeouts to make test repeatable
* updated lock testunknown2001-07-131-0/+16
| | | | | | | mysql-test/r/lock.result: updated result mysql-test/t/lock.test: updated test
* test case for low priority updates race bugunknown2001-07-131-0/+22
| | | | | | | | | | not yet fixed mysql-test/r/lock.result: updated result mysql-test/t/lock.test: test case for low prior updates bug
* Added test for PTHREAD_YIELDunknown2001-04-181-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed test of default master parameter Don't lock locked tables in REPAIR Changed optimzation for SELECT * from table,table ORDER BY keypart LIMIT BitKeeper/deleted/.del-have_default_master.inc~a54c86e65a6c4af: Delete: mysql-test/include/have_default_master.inc BitKeeper/deleted/.del-have_default_master.require~1465255ffdaf82f: Delete: mysql-test/r/have_default_master.require Docs/manual.texi: Changelog for 3.23.38 acconfig.h: Added test for PTHREAD_YIELD acinclude.m4: Added test for PTHREAD_YIELD configure.in: Added test for PTHREAD_YIELD innobase/os/os0thread.c: Added test for PTHREAD_YIELD mysql-test/r/lock.result: Added test of lock bug mysql-test/t/lock.test: Added test of lock bug mysql-test/t/rpl000014.test: Removed test of default master parameter mysql-test/t/rpl000015.test: Removed test of default master parameter mysql-test/t/rpl000016.test: Removed test of default master parameter sql/ha_myisam.cc: Don't lock locked tables in REPAIR sql/sql_select.cc: Changed optimzation for SELECT * from table,table ORDER BY keypart LIMIT
* Fixed bug in lock tables introduced by shared locks.unknown2001-03-271-0/+23
New lock test Docs/manual.texi: Small update sql/sql_base.cc: Fixed bug in lock tables introduced by shared locks.