summaryrefslogtreecommitdiff
path: root/mysql-test/t/innodb_mysql_sync.test
Commit message (Collapse)AuthorAgeFilesLines
* Create 'main' test directory and move 't' and 'r' thereMichael Widenius2018-03-291-750/+0
|
* MDEV-6720 - enable connection log in mysqltest by defaultSergey Vojtovich2016-03-311-47/+0
|
* after merge test case fixesSergei Golubchik2014-05-081-1/+2
|
* merge of "BUG# 13975227: ONLINE OPTIMIZE TABLE FOR INNODB TABLES"Sergei Golubchik2014-05-071-0/+199
| | | | | | | | | revno: 5820 committer: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com> branch nick: mysql-5.6-13975225 timestamp: Mon 2014-02-17 15:12:16 +0530 message: BUG# 13975227: ONLINE OPTIMIZE TABLE FOR INNODB TABLES
* fix innodb_mysql_sync test - update from 5.6Sergei Golubchik2013-07-101-14/+302
|
* rename debug variable to debug_dbug, to make test pass in release buildsSergei Golubchik2011-12-151-1/+1
| | | | | | (and to follow the naming conventons). keep old debug variable, but mark it as deprecated.
* Bug#11853126 RE-ENABLE CONCURRENT READS WHILE CREATINGJon Olav Hauglid2011-06-011-0/+27
| | | | | | | | | | | | SECONDARY INDEX IN INNODB This is a follow-up patch. This patch moves part of the new test coverage to a test file that is only run on debug builds since it used debug- only features and therefore broke the test case on release builds.
* Bug#11853126 RE-ENABLE CONCURRENT READS WHILE CREATINGJon Olav Hauglid2011-06-011-126/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SECONDARY INDEX IN INNODB The patches for Bug#11751388 and Bug#11784056 enabled concurrent reads while creating secondary indexes in InnoDB. However, they introduced a regression. This regression occured if ALTER TABLE failed after the index had been added, for example during the lock upgrade needed to update .FRM. If this happened, InnoDB and the server got out of sync with regards to which indexes actually existed. Therefore the patch for Bug#11815600 again disabled concurrent reads. This patch re-enables concurrent reads. The original regression is fixed by splitting the ADD INDEX operation into two parts. First the new index is created but not made active. This is done while concurrent reads are allowed. The second part of the operation makes the index active (or reverts the change). This is done after lock upgrade, which prevents the original regression. In order to implement this change, the patch changes the storage API for in-place index creation. handler::add_index() is split into two functions, handler_add_index() and handler::final_add_index(). The former for creating indexes without making them visible and the latter for commiting (i.e. making visible) new indexes or reverting the changes. Large parts of this patch were written by Marko Mäkelä. Test case added to innodb_mysql_lock.test.
* Bug#11815600 [ERROR] INNODB COULD NOT FIND INDEX PRIMARYJon Olav Hauglid2011-03-091-113/+114
| | | | | | | | | | | | | | | | | | | | | | | | | KEY NO 0 FOR TABLE IN ERROR LOG With the changes made by the patches for Bug#11751388 and Bug#11784056, concurrent reads are allowed while secondary indexes are created in InnoDB. This means that the metadata lock on the affected table is not upgraded to exclusive until the .FRM is updated at the end of ALTER TABLE processing. The problem was that if this lock upgrade failed for some reason (e.g. timeout), the index information in the server and inside InnoDB would be out of sync. This would happen since the add index operation already was committed inside InnoDB but the table metadata inside the server had not been updated yet. This patch fixes the problem by (for now) reverting the effects of the patches for Bug#11751388 and Bug#11784056. Concurrent reads will now again be blocked during creation of secondary indexes in InnoDB. Test case added to innodb_mysql_lock.test.
* Bug #42230 during add index, cannot do queries on storage enginesJon Olav Hauglid2011-01-261-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that implement add_index The problem was that ALTER TABLE blocked reads on an InnoDB table while adding a secondary index, even if this was not needed. It is only needed for the final step where the .frm file is updated. The reason queries were blocked, was that ALTER TABLE upgraded the metadata lock from MDL_SHARED_NO_WRITE (which blocks writes) to MDL_EXCLUSIVE (which blocks all accesses) before index creation. The way the server handles index creation, is that storage engines publish their capabilities to the server and the server determines which of the following three ways this can be handled: 1) build a new version of the table; 2) change the existing table but with exclusive metadata lock; 3) change the existing table but without metadata lock upgrade. For InnoDB and secondary index creation, option 3) should have been selected. However this failed for two reasons. First, InnoDB did not publish this capability properly. Second, the ALTER TABLE code failed to made proper use of the information supplied by the storage engine. A variable need_lock_for_indexes was set accordingly, but was not later used. This patch fixes this problem by only doing metadata lock upgrade before index creation/deletion if this variable has been set. This patch also changes some of the related terminology used in the code. Specifically the use of "fast" and "online" with respect to ALTER TABLE. "Fast" was used to indicate that an ALTER TABLE operation could be done without involving a temporary table. "Fast" has been renamed "in-place" to more accurately describe the behavior. "Online" meant that the operation could be done without taking a table lock. However, in the current implementation writes are always prohibited during ALTER TABLE and an exclusive metadata lock is held while updating the .frm, so ALTER TABLE is not completely online. This patch replaces "online" with "in-place", with additional comments indicating if concurrent reads are allowed during index creation/deletion or not. An important part of this update of terminology is renaming of the handler flags used by handlers to indicate if index creation/deletion can be done in-place and if concurrent reads are allowed. For example, the HA_ONLINE_ADD_INDEX_NO_WRITES flag has been renamed to HA_INPLACE_ADD_INDEX_NO_READ_WRITE, while HA_ONLINE_ADD_INDEX is now HA_INPLACE_ADD_INDEX_NO_WRITE. Note that this is a rename to clarify current behavior, the flag values have not changed and no flags have been removed or added. Test case added to innodb_mysql_sync.test.
* Bug #58933 Assertion `thd- >is_error()' fails on shutdown with ongoingJon Olav Hauglid2011-01-101-0/+41
| | | | | | | | | | | | | | | | OPTIMIZE TABLE OPTIMIZE TABLE for InnoDB tables is handled as recreate + analyze. The triggered assert checked that an error had been reported if either recreate or analyze failed. However the assert failed to take into account that they could have failed because OPTIMIZE TABLE had been victim of KILL QUERY, KILL CONNECTION or server shutdown. This patch adjusts the assert to take this possibility into account. The problem was only noticeable on debug versions of the server. Test case added to innodb_mysql_sync.test.
* Bug #53757 assert in mysql_truncate_by_deleteJon Olav Hauglid2010-06-251-0/+26
| | | | | | | | | | | The assert was triggered if a connection executing TRUNCATE on a InnoDB table was killed during open_tables. This bug was fixed in the scope of Bug #45643 "InnoDB does not support replication of TRUNCATE TABLE". This patch adds test coverage to innodb_mysql_sync.test.
* Bug #47459 Assertion in Diagnostics_area::set_eof_status on OPTIMIZE TABLEJon Olav Hauglid2010-04-151-0/+37
| | | | | | | | | | | | | | | This assertion could be triggered during execution of OPTIMIZE TABLE for InnoDB tables. As part of optimize for InnoDB tables, the table is recreated and then opened again. If the reopen failed for any reason, the assertion would be triggered. This could for example be caused by a concurrent DROP TABLE executed by a different connection. The reason for the assertion was that any failures during reopening were ignored. This patch fixes the problem by making sure that the result of reopening the table is checked and that any error messages are sent to the client. Test case added to innodb_mysql_sync.test.
* Backport of revno: 2599.169.2Jon Olav Hauglid2009-12-091-0/+48
Bug #42074 concurrent optimize table and alter table = Assertion failed: thd->is_error() This assertion could occur if OPTIMIZE TABLE was started on a InnoDB table and the table was altered to different storage engine after OPTIMIZE had started. This allowed OPTIMIZE to pass the initial checks for storage engine support, but fail once it reached "recreate+analyze" if this operation was not supported by the new storage engine. The bug had no consequences for non-debug builds of the server. In detail, the assertion was triggered when ha_analyze() returned HA_ADMIN_NOT_IMPLEMENTED. This led to a code path which included an assert checking for diagnostics area contents. Since this area had not been filled, the assertion was triggered. The diagnostics area is in this case only used to provide more detailed information about why optimize failed. The triggered code path sends this information to the client and clears the diagnostic area. This patch fixed the problem by adding an error message to the diagnostic area if ha_analyze() fails. This error message contains the error code returned by ha_analyze(). Test case added to innodb_mysql_sync.test.