summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into 10.5Marko Mäkelä2022-12-1317-22/+381
|\
| * Merge 10.3 into 10.4Marko Mäkelä2022-12-1312-15/+369
| |\
| | * MDEV-29144 ER_TABLE_SCHEMA_MISMATCH or crash on DISCARD/IMPORTMarko Mäkelä2022-12-092-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql_discard_or_import_tablespace(): On successful ALTER TABLE...DISCARD TABLESPACE, evict the table handle from the table definition cache, so that ha_innobase::close() will be invoked, like InnoDB expects to be the case. This will avoid an assertion failure ut_a(table->get_ref_count() == 0) during IMPORT TABLESPACE. ha_innobase::open(): Do not issue any ER_TABLESPACE_DISCARDED warning. Member functions for DML will do that. ha_innobase::truncate(), ha_innobase::check_if_supported_inplace_alter(): Issue ER_TABLESPACE_DISCARDED warnings, to compensate for the removal of the warning in ha_innobase::open(). row_quiesce_write_indexes(): Only write information about committed indexes. The ALTER TABLE t NOWAIT ADD INDEX(c) in the nondeterministic test case will most of the time fail due to a metadata lock (MDL) timeout and leave behind an uncommitted index. Reviewed by: Sergei Golubchik
| | * Add a global suppression for O_DIRECT failuresMarko Mäkelä2022-11-291-6/+0
| | | | | | | | | | | | Fixes up commit b8ad6fbd95830b61d282abc1167300fff261be7e
| | * Fixed warning from innodb.create_isl_with_direct if have_symlink is disabledbb-10.3-montyMonty2022-11-291-6/+5
| | |
| | * MDEV-29977 Memory leak in row_log_table_apply_updateThirunarayanan Balathandayuthapani2022-11-152-4/+37
| | | | | | | | | | | | | | | | | | - InnoDB fails to free the persistent cursor for the clustered index when InnoDB replays the update operation on the table that is being rebuilt.
| | * MDEV-27882 Innodb - recognise MySQL-8.0 innodb flags and give a specific ↵Daniel Black2022-11-116-8/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | error message Per fsp0types.h, SDI is on tablespace flags position 14 where MariaDB stores its pagesize. Flag at position 13, also in MariaDB pagesize flags, is a MySQL encryption flag. These are checked only if fsp_flags_is_valid fails, so valid MariaDB pages sizes don't become errors. The error message "Cannot reset LSNs in table" was rather specific and not always true to replaced with more generic error. ALTER TABLE tbl IMPORT TABLESPACE now reports Unsupported on MySQL tablespace (rather than index corrupted) along with a server error message. MySQL innodb Errors are with with UNSUPPORTED rather than CORRUPTED to avoid user anxiety. Reviewer: Marko Mäkelä
| | * MDEV-10087 mysqld_update()/mysql_delete() continues execution even after ↵Vlad Lesin2022-11-092-0/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subquery with JOIN gets error from storage engine The issue is that record_should_be_deleted() returns true in mysql_delete() even if sub-select with join gets error from storage engine when DELETE FROM ... WHERE ... IN (SELECT ...) statement is executed. The same is true for mysql_update() where select->skip_record() returns true even if sub-select with join gets error from storage engine. In the test case if sub-select is chosen as deadlock victim the whole transaction is rolled back during sub-select execution, but mysql_delete()/mysql_update() continues transaction execution and invokes table->delete_row() as record_should_be_deleted() wrongly returns true in mysql_delete() and table->update_row() as select->skip_record(thd) wrongly returns 1 for mysql_update(). record_should_be_deleted() wrogly returns true because thd->is_error() returns false SQL_SELECT::skip_record() invoked from record_should_be_deleted(). It's supposed that THD error should be set in rr_handle_error() called from rr_sequential() during sub-select JOIN::exec_inner() execution. But rr_handle_error() does not set THD error because READ_RECORD::print_error is not set in JOIN_TAB::read_record. READ_RECORD::print_error should be initialized in init_read_record()/init_read_record_idx(). But make_join_readinfo() does not invoke init_read_record()/init_read_record_idx() for JOIN_TAB::read_record. The fix is to set JOIN_TAB::read_record.print_error in make_join_readinfo(), i.e. in the same place where JOIN_TAB::read_record.table is set. Reviewed by Sergey Petrunya.
| * | MDEV-27670 Assertion `(cs->state & 0x20000) == 0' failed in ↵Alexander Barkov2022-11-222-0/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | my_strnncollsp_nchars_generic_8bit Also fixes: MDEV-27768 MDEV-25440: Assertion `(cs->state & 0x20000) == 0' failed in my_strnncollsp_nchars_generic_8bit The "strnncollsp_nchars" virtual function pointer for tis620_thai_nopad_ci was incorrectly initialized to a generic function my_strnncollsp_nchars_generic_8bit(), which crashed on assert. Implementing a tis620 specific function version.
* | | Merge 10.4 into 10.5Jan Lindström2022-11-302-0/+128
| | |
* | | MDEV-24412: Disable the test on ./mtr --embeddedMarko Mäkelä2022-11-301-0/+2
| | |
* | | MDEV-24412: Create a separate testMarko Mäkelä2022-11-304-45/+135
| | | | | | | | | | | | | | | | | | | | | Some builders in our CI, most notably FreeBSD and IBM AIX, do not support sparse files. Also, Microsoft Windows requires special means for creating sparse files. Since these platforms do not run ./mtr --big-test, we will for now simply move the test to a separate file that requires that option.
* | | MDEV-24412 InnoDB: Upgrade after a crash is not supportedMarko Mäkelä2022-11-282-1/+45
| | | | | | | | | | | | | | | | | | recv_log_recover_10_4(): Widen the operand of bitwise and to 64 bits, so that the upgrade check will work when the redo log record is located more than 4 gigabytes from the start of the first file.
* | | MDEV-30106 InnoDB fails to validate the change buffer on startupMarko Mäkelä2022-11-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ibuf_init_at_db_start(): Validate the change buffer root page. A later version may stop creating a change buffer, and this validation check will prevent a downgrade from such later versions. ibuf_max_size_update(): If the change buffer was not loaded, do nothing. dict_boot(): Merge the local variable "error" to "err". Ignore failures of ibuf_init_at_db_start() if innodb_force_recovery>=4.
* | | MDEV-28822 Table from older version requires table rebuild when adding ↵Alexander Barkov2022-10-262-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | column to table with multi-column index This problem was earlier fixed in 10.4 by the patch for MDEV-29481. Adding MTR tests only.
* | | Merge 10.4 into 10.5Marko Mäkelä2022-10-252-0/+72
|\ \ \ | |/ /
| * | MDEV-29481 mariadb-upgrade prints confusing statementAlexander Barkov2022-10-222-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a new version of the patch instead of the reverted: MDEV-28727 ALTER TABLE ALGORITHM=NOCOPY does not work after upgrade Ignore the difference in key packing flags HA_BINARY_PACK_KEY and HA_PACK_KEY during ALTER to allow ALGORITHM=INSTANT and ALGORITHM=NOCOPY in more cases. If for some reasons (e.g. due to a bug fix such as MDEV-20704) these cumulative (over all segments) flags in KEY::flags are different for the old and new table inside compare_keys_but_name(), the difference in HA_BINARY_PACK_KEY and HA_PACK_KEY in KEY::flags is not really important: MyISAM and Aria can handle such cases well: per-segment flags are stored in MYI and MAI files anyway and they are read during ha_myisam::open() ha_maria::open() time. So indexes get opened with correct per-segment flags that were calculated during the table CREATE time, no matter what the old (CREATE time) and new (ALTER TIME) per-index compression flags are, and no matter if they are equal or not. All other engine ignore key compression flags, so this change is safe for other engines as well.
* | | MDEV-28709 unexpected X lock on Supremum in READ COMMITTEDVlad Lesin2022-10-252-0/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lock is created during page splitting after moving records and locks(lock_move_rec_list_(start|end)()) to the new page, and inheriting the locks to the supremum of left page from the successor of the infimum on right page. There is no need in such inheritance for READ COMMITTED isolation level and not-gap locks, so the fix is to add the corresponding condition in gap lock inheritance function. One more fix is to forbid gap lock inheritance if XA was prepared. Use the most significant bit of trx_t::n_ref to indicate that gap lock inheritance is forbidden. This fix is based on mysql/mysql-server@b063e52a8367dc9d5ed418e7f6d96400867e9f43
* | | Merge 10.4 into 10.5Marko Mäkelä2022-10-122-2/+7
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2022-10-112-2/+7
| |\ \ | | |/
| | * MDEV-29742 heap number overflowMarko Mäkelä2022-10-102-2/+7
| | | | | | | | | | | | | | | | | | | | | A previous fix in commit efd8af535a4fa4aa3dd89a325340b6eb648e1bc8 failed to cover ALTER TABLE. PageBulk::isSpaceAvailable(): Check for record heap number overflow.
* | | MemorySanitizer: Disable tests that time outMarko Mäkelä2022-10-061-0/+2
| | |
* | | MDEV-29710: Disable some slow tests on ValgrindMarko Mäkelä2022-10-061-0/+1
| | |
* | | Merge 10.4 into 10.5Marko Mäkelä2022-10-0618-2/+69
|\ \ \ | |/ /
| * | MDEV-29710: Skip some more tests on ValgrindMarko Mäkelä2022-10-0512-0/+12
| | |
| * | Merge 10.3 into 10.4Marko Mäkelä2022-10-058-0/+59
| |\ \ | | |/
| | * MDEV-29710: Valgrind tests massively fail due to silently killing server on ↵Marko Mäkelä2022-10-055-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | shutdown timeout Let us disable Valgrind on tests that would fail because a server shutdown or a STOP SLAVE command would take longer, causing the test harness to forcibly and silently kill the server due to an exceeded timeout.
| | * MDEV-29710: Disable innodb.table_flags under ValgrindMarko Mäkelä2022-10-051-0/+6
| | |
| | * MDEV-29666 InnoDB fails to purge secondary index records when indexed ↵Marko Mäkelä2022-10-052-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | virtual columns exist row_purge_get_partial(): Replaces trx_undo_rec_get_partial_row(). Also copy the purge_node_t::ref to the purge_node_t::row. In this way, the clustered index key fields will always be available, even if thanks to commit d384ead0f024995787b1f29bc672c33b0d3d40a8 (MDEV-14799) they would no longer be repeated in the remaining part of the undo log record.
* | | Merge 10.4 into 10.5Marko Mäkelä2022-09-268-78/+50
|\ \ \ | |/ /
| * | Fix build without either ENABLED_DEBUG_SYNC or DBUG_OFFMarko Mäkelä2022-09-234-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are separate flags DBUG_OFF for disabling the DBUG facility and ENABLED_DEBUG_SYNC for enabling the DEBUG_SYNC facility. Let us allow debug builds without DEBUG_SYNC. Note: For CMAKE_BUILD_TYPE=Debug, CMakeLists.txt will continue to define ENABLED_DEBUG_SYNC.
| * | Merge 10.3 into 10.4Marko Mäkelä2022-09-232-70/+41
| |\ \ | | |/
| | * MDEV-29600 Memory leak in row_log_table_apply_update()Marko Mäkelä2022-09-222-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | row_log_table_apply_update(): Free the pcur.old_rec_buf before returning. It may be allocated by btr_pcur_store_position() inside btr_blob_log_check_t::check() and btr_store_big_rec_extern_fields(). This memory leak was introduced in commit 2e814d4702d71a04388386a9f591d14a35980bfe (MariaDB Server 10.2.2) via mysql/mysql-server@ce0a1e85e24e48b8171f767b44330da635a6ea0a (MySQL 5.7.5).
| | * Cleanup: Remove redundant output from a testMarko Mäkelä2022-09-222-68/+0
| | |
| * | MDEV-29613 Improve WITH_DBUG_TRACE=OFFMarko Mäkelä2022-09-234-24/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 28325b08633372cc343dfcbc41fe252020cf6e6e a compile-time option was introduced to disable the macros DBUG_ENTER and DBUG_RETURN or DBUG_VOID_RETURN. The parameter name WITH_DBUG_TRACE would hint that it also covers DBUG_PRINT statements. Let us do that: WITH_DBUG_TRACE=OFF shall disable DBUG_PRINT() as well. A few InnoDB recovery tests used to check that some output from DBUG_PRINT("ib_log", ...) is present. We can live without those checks. Reviewed by: Vladislav Vaintroub
* | | Merge 10.4 into 10.5Marko Mäkelä2022-09-202-0/+13
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2022-09-202-0/+13
| |\ \ | | |/
| | * MDEV-29479 I_S.INNODB_SYS_TABLESPACES doesn't have temporary tablespace ↵Thirunarayanan Balathandayuthapani2022-09-142-0/+13
| | | | | | | | | | | | | | | | | | | | | information - innodb_sys_tablespaces view in information schema displays temporary tablespace information too.
* | | MDEV-29559 Recovery of INSERT_HEAP_DYNAMIC into secondary index failsMarko Mäkelä2022-09-192-42/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | log_phys_t::apply(): When parsing an INSERT_HEAP_DYNAMIC record, allow ll==rlen to hold for the last part. A secondary index record may inherit all preceding bytes from the infimum pseudo-record. For INSERT_HEAP_REDUNDANT, some header bytes will always be present because the header will never be copied from the page infimum. We will tolerate ll==rlen also in that case to be consistent with the parsing of INSERT_HEAP_DYNAMIC.
* | | Merge remote-tracking branch 'origin/10.4' into 10.5Alexander Barkov2022-09-1491-534/+605
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2022-09-1397-580/+651
| |\ \ | | |/
| | * MDEV-23801 Assertion failed in btr_pcur_store_position()Marko Mäkelä2022-09-132-0/+73
| | | | | | | | | | | | | | | | | | | | | btr_lift_page_up(): If the leaf page only contains a hidden metadata record for MDEV-11369 instant ADD COLUMN, convert the table to the canonical format like we are supposed to do whenever the table becomes empty.
| | * MDEV-29446 Change SHOW CREATE TABLE to display default collationAlexander Barkov2022-09-1290-554/+554
| | |
| | * MDEV-29433 innodb.lock_delete_updated is unstableVlad Lesin2022-09-082-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use suspend thread syncpoint instead of include/wait_condition.inc to make sure DELETE created waiting lock before the next UPDATE begins locking. This is backport of commit 0fa4dd0747bb12479662952e7fe6ae2fffff737b from 10.6.
* | | Merge 10.4 into 10.5Marko Mäkelä2022-09-072-7/+2
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2022-09-072-7/+2
| |\ \ | | |/
| | * MDEV-13668 fixup: Remove test work-aroundsMarko Mäkelä2022-08-312-11/+4
| | |
* | | Merge 10.4 into 10.5Marko Mäkelä2022-08-303-4/+51
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2022-08-303-4/+51
| |\ \ | | |/
| | * MDEV-29409 Buffer overflow in my_wc_mb_filename() on RENAME TABLEMarko Mäkelä2022-08-302-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dict_table_rename_in_cache(), dict_table_get_highest_foreign_id(): Reserve sufficient space for the fkid[] buffer, and ensure that the fkid[] will be NUL-terminated. The fkid[] must accommodate both the database name (which is already encoded in my_charset_filename) and the constraint name (which must be converted to my_charset_filename) so that we can check if it is in the format databasename/tablename_ibfk_1 (all encoded in my_charset_filename).