summaryrefslogtreecommitdiff
path: root/mysql-test/suite
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'bb-10.3-release' into bb-10.4-releaseSergei Golubchik2021-02-1254-157/+824
|\ | | | | | | | | Note, the fix for "MDEV-23328 Server hang due to Galera lock conflict resolution" was null-merged. 10.4 version of the fix is coming up separately
| * Merge branch '10.2' into 10.3Sergei Golubchik2021-02-0153-161/+780
| |\
| | * MDEV-24699: Added wait condition to make sure table t2 is replicated to node_1.Stepan Patryshev2021-01-281-0/+3
| | |
| | * Fix wsrep.variablesJan Lindström2021-01-261-1/+1
| | |
| | * MDEV-24509 : Warning: Memory not freed: 56 on SET @@global.wsrep_sst_authJan Lindström2021-01-262-9/+36
| | | | | | | | | | | | | | | It seems that memory is not freed when updated value is NULL or when wsrep is not initialized before shutdown.
| | * cleanup: remove slave background thread, use handle_manager thread insteadSergei Golubchik2021-01-241-11/+11
| | |
| | * reenable rpl_spec_variables.testAlice Sherepa2021-01-224-13/+59
| | |
| | * MDEV-23659 : Update Galera disabled.def fileJan Lindström2021-01-222-1/+13
| | | | | | | | | | | | | | | | | | Update * galera/disabled.def * galera_3_nodes/disabled.def
| | * MDEV-8134: The relay-log is not flushed after the slave-relay-log.999999 showedSujatha2021-01-212-0/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======== Auto purge of relaylogs stops when relay-log-file is 'slave-relay-log.999999' and slave_parallel_threads is enabled. Analysis: ========= The problem is that in Relay_log_info::inc_group_relay_log_pos() function, when two log names are compared via strcmp() function, it gives correct result, when log name sequence numbers are of same digits(6 digits), But when the number goes to 7 digits, a 999999 compares greater than 1000000, which is wrong, hence the bug. Fix: ==== Extract the numeric extension part of the file name, convert it into unsigned long and compare. Thanks to David Zhao for the contribution.
| | * MDEV-24403 Segfault on CREATE TABLE with explicit FTS_DOC_ID_INDEX by ↵Aleksey Midenkov2021-01-192-0/+21
| | | | | | | | | | | | | | | | | | multiple fields Ignore table->fts freed previously by create_table_info_t::create_table().
| | * MDEV-24491 db_name mismatch happens during virtual column computationThirunarayanan Balathandayuthapani2021-01-192-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Database name mismatch happens while opening the table for virtual column computation. Because table_name_parse() returns the length of database and table name before converting the filename to table name. This issue is caused by commit 8b0d4cff0760b0a35285c315d82c49631c108baf (MDEV-15855). Fix should be that table_name_parse() should return the length of database and table name after converting the filename to table name. Reviewed-by: Marko Mäkelä
| | * MDEV-24547 Update fails when online alter does rollback due to MDL time outThirunarayanan Balathandayuthapani2021-01-193-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When online alter rollbacks due to MDL time out, it doesn't mark the index online status as ONLINE_INDEX_ABORTED. Concurrent update fails to update the secondary index while building the entry. InnoDB should check the online status of the secondary index before building the secondary index entry. Reviewed-by: Marko Mäkelä
| | * MDEV-23851 BF-BF Conflict issue because of UK GAP lockssjaakola2021-01-182-0/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some DML operations on tables having unique secondary keys cause scanning in the secondary index, for instance to find potential unique key violations in the seconday index. This scanning may involve GAP locking in the index. As this locking happens also when applying replication events in high priority applier threads, there is a probabality for lock conflicts between two wsrep high priority threads. This PR avoids lock conflicts of high priority wsrep threads, which do secondary index scanning e.g. for duplicate key detection. The actual fix is the patch in sql_class.cc:thd_need_ordering_with(), where we allow relaxed GAP locking protocol between wsrep high priority threads. wsrep high priority threads (replication appliers, replayers and TOI processors) are ordered by the replication provider, and they will not need serializability support gained by secondary index GAP locks. PR contains also a mtr test, which exercises a scenario where two replication applier threads have a false positive conflict in GAP of unique secondary index. The conflicting local committing transaction has to replay, and the test verifies also that the replaying phase will not conflict with the latter repllication applier. Commit also contains new test scenario for galera.galera_UK_conflict.test, where replayer starts applying after a slave applier thread, with later seqno, has advanced to commit phase. The applier and replayer have false positive GAP lock conflict on secondary unique index, and replayer should ignore this. This test scenario caused crash with earlier version in this PR, and to fix this, the secondary index uniquenes checking has been relaxed even further. Now innodb trx_t structure has new member: bool wsrep_UK_scan, which is set to true, when high priority thread is performing unique secondary index scanning. The member trx_t::wsrep_UK_scan is defined inside WITH_WSREP directive, to make it possible to prepare a MariaDB build where this additional trx_t member is not present and is not used in the code base. trx->wsrep_UK_scan is set to true only for the duration of function call for: lock_rec_lock() trx->wsrep_UK_scan is used only in lock_rec_has_to_wait() function to relax the need to wait if wsrep_UK_scan is set and conflicting transaction is also high priority. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| | * MDEV-24432 : galera.galera_fk_cascade_delete_debug MTR failed: query 'reap' ↵Jan Lindström2021-01-154-33/+67
| | | | | | | | | | | | | | | | | | | | | failed: 1205: Lock wait timeout exceeded Add wait_conditions to verify correct database state before next operation.
| | * MDEV-24443 : galera.lp1376747-4 MTR fails: Result length mismatchJan Lindström2021-01-152-18/+25
| | | | | | | | | | | | Use debug_sync to force FTWRL to pause in correct state.
| | * MDEV-12908 binlog_encryption.binlog_xa_recover, binlog.binlog_xa_recover ↵Alice Sherepa2021-01-142-2/+2
| | | | | | | | | | | | failed in bb with extra checkpoint
| | * MDEV-24536 innodb_idle_flush_pct has no effectMarko Mäkelä2021-01-133-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | The parameter innodb_idle_flush_pct that was introduced in MariaDB Server 10.1.2 by MDEV-6932 has no effect ever since the InnoDB changes from MySQL 5.7.9 were applied in commit 2e814d4702d71a04388386a9f591d14a35980bfe. Let us declare the parameter as deprecated and having no effect.
| | * Fix innodb.innodb_mysqlMarko Mäkelä2021-01-131-1/+1
| | | | | | | | | | | | | | | It is unclear for how long the result has been broken, because ./mtr --big-test is not run regularly.
| | * MDEV-24208 SHOW RELAYLOG EVENTS command is not supported in the prepared ↵Dmitry Shulga2021-01-132-11/+0
| | | | | | | | | | | | | | | | | | | | | statement protocol yet Added sending of metadata in response to preparing request for the commands SQLCOM_SHOW_BINLOG_EVENTS, SQLCOM_SHOW_RELAYLOG_EVENTS
| | * MDEV-16341 Wrong length for USER columns in performance_schema tablesSergei Golubchik2021-01-112-22/+22
| | | | | | | | | | | | | | | use USERNAME_CHAR_LENGTH and HOSTNAME_LENGTH for perfschema USER and HOST columns
| | * MDEV-18428 Memory: If transactional=0 is specified in CREATE TABLE, it is ↵Sergei Golubchik2021-01-119-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not possible to ALTER TABLE * be strict in CREATE TABLE, just like in ALTER TABLE, because CREATE TABLE, just like ALTER TABLE, can be rolled back for any engine * but don't auto-convert warnings into errors for engine warnings (handler::create) - this matches ALTER TABLE behavior * and not when creating a default record, these errors are handled specially (and replaced with ER_INVALID_DEFAULT) * always issue a Note when a non-unique key is truncated, because it's not a Warning that can be converted to an Error. Before this commit it was a Note for blobs and a Warning for all other data types.
| | * don't do a warning for bad table options in replication slave threadSergei Golubchik2021-01-112-3/+7
| | | | | | | | | | | | otherwise ALTER TABLE can break replication
| | * MDEV-12161 Can't specify collation for virtual columnsSergei Golubchik2021-01-113-6/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sql standard (2016) allows <collate clause> in two places in the <column definition> - as a part of the <data type> or at the very end. Let's do that too. Side effect: in column/SP declaration `COLLATE cs_coll` automatically implies `CHARACTER SET cs` (unless charset was specified explicitly). See changes in sp-ucs2.result
| * | MDEV-21785: sequences used as default by other table not dumped in right ↵bb-10.3-MDEV-21785Oleksandr Byelkin2021-01-262-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | order by mysqldump Dump sequences first. This atch made to keep it small and to keep number of queries to the server the same. Order of tables in a dump can not be changed (except sequences first) because mysql_list_tables uses SHOW TABLES and I used SHOW FULL TABLES.
* | | Update galera.disabled.def filebb-10.4-MDEV-24704Jan Lindström2021-01-271-0/+4
| | |
* | | MDEV-24522 Assertion `inited==NONE' fails upon UPDATE on versioned table ↵Aleksey Midenkov2021-01-262-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with unique blob Cause: no table->update_handler cloned at the moment of vers_insert_history_row(). update_handler is needed because there can't be several inited indexes at once in the same handler. First index is inited by QUICK_RANGE_SELECT::reset(). Then when history row is inserted check_duplicate_long_entry_key() is done and it requires another index.
* | | MDEV-24653 fixup: Make the test deterministicMarko Mäkelä2021-01-251-0/+1
| | |
* | | Merge 10.3 into 10.4Marko Mäkelä2021-01-251-0/+1
|\ \ \ | |/ /
| * | MDEV-24653 fixup: Make the test deterministicMarko Mäkelä2021-01-251-0/+1
| | |
* | | instant_alter_debug: Cover everything with innodb_instant_alter_columnMarko Mäkelä2021-01-252-9/+9
| | |
* | | Merge 10.3 into 10.4Marko Mäkelä2021-01-256-86/+213
|\ \ \ | |/ /
| * | MDEV-24653 Assertion block->page.id.page_no() == index->page failed in ↵Marko Mäkelä2021-01-252-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | innobase_add_instant_try() We may end up with an empty leaf page (containing only an ADD COLUMN metadata record) that is not the root page. innobase_add_instant_try(): Disable an optimization for a non-canonical empty table that contains a metadata record somewhere else than in the root page. btr_pcur_store_position(): Tolerate a non-canonical empty table.
| * | MDEV-21153 Replica nodes crash due to indexed virtual columns and FK ↵bb-10.3-MDEV-21153sjaakola2021-01-192-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cascading delete Fix for MDEV-23033 fixes a problem in replication applying of transactions, which contain cascading foreign key delete for a table, which has indexed virtual column. This fix adds slave_fk_event_map flag for table, to mark when the prelocking is needed for applying of a transaction. See commit 608b0ee52ef3e854ce14a407e64e936adbbeba23 for more details. However, this fix is targeted for async replication only, Rows_log_event::do_apply_event() has condition to rule out galera replication from the fix domain, and use cases suffering from MDEV-23033 and related MDEV-21153 will fail in galera cluster. The fix in this commit removes the condition to rule out the setting of slave_fk_event_map flag from galera replication, and makes the fix in MDEV-23033 effective for galera replication as well. Finally, a mtr test for virtual column support has been added. galera.galera_virtual_column.test has as first test a scenario from MDEV-21153 Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| * | Merge 10.2 into 10.3Marko Mäkelä2021-01-192-0/+76
| |\ \ | | |/
| | * MDEV-21478 Inplace ALTER fails to report error when FTS_DOC_IDThirunarayanan Balathandayuthapani2021-01-112-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with wrong data type is added Inplace alter fails to report error when fts_doc_id column with wrong data type is added. prepare_inplace_alter_table_dict(): Should check whether the column is fts_doc_id. It should be of bigint type, should accept non null data type and it should be in capital letters.
| * | MDEV-17227 Server crash in TABLE_SHARE::init_from_sql_statement_string upon ↵Sergei Golubchik2021-01-122-13/+23
| | | | | | | | | | | | | | | | | | | | | | | | table discovery with non-existent database * failed init_from_binary_frm_image can clear share->db_plugin, don't use it on the error path * cleanup the test a bit
* | | MDEV-24463 : galera.galera_sst_mysqldump_with_key MTR failed: 'INSERT ↵bb-10.4-MDEV-24463Jan Lindström2021-01-221-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | failed: 1213: Deadlock found when trying to get lock We need to complete SST if both new and old start positions are not same as initial positions. If they are initial positions just set local uuid and seqno.
* | | MDEV-24596 : Assertion `state_ == s_exec || state_ == s_quitting' failed in ↵Jan Lindström2021-01-2110-15/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wsrep::client_state::disable_streaming There were multiple problems here * wsrep_trx_fragment_size should not be set when wsrep is disabled or provider is not loaded * wsrep_trx_fragment_unit should not be set when wsrep is disabled or provider is not loaded * wsrep_debug has no effect if wsrep is disabled or provider is not loaded * wsrep_start_position should not be set when wsrep is disabled or provider is not loaded any other value than default * wsrep_start_position should be changed only when we are joiner or initialized * wsrep_start_position should be allowed to set only a value that exits, thus we need to add error handling to wsrep_sst_complete
* | | MDEV-21153 Replica nodes crash due to indexed virtual columns and FK ↵sjaakola2021-01-202-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cascading delete Fix for MDEV-23033 fixes a problem in replication applying of transactions, which contain cascading foreign key delete for a table, which has indexed virtual column. This fix adds slave_fk_event_map flag for table, to mark when the prelocking is needed for applying of a transaction. See commit 608b0ee52ef3e854ce14a407e64e936adbbeba23 for more details. However, this fix is targeted for async replication only, Rows_log_event::do_apply_event() has condition to rule out galera replication from the fix domain, and use cases suffering from MDEV-23033 and related MDEV-21153 will fail in galera cluster. The fix in this commit removes the condition to rule out the setting of slave_fk_event_map flag from galera replication, and makes the fix in MDEV-23033 effective for galera replication as well. However, the above fix has caused regressions for some galera_sr suite tests, which run tests for streaming replication. This regression can be observed e.g. by: /mtr galera_sr.galera_sr_multirow_rollback --mysqld=--slave_run_triggers_for_rbr=yes These galera_sr suite tests were failing in last phase of replication applying, where actual transaction is already applied, and streaming replication related meta data needs to be updated in wsrep system tables. Opening the wsrep system tables failed for corrupt data in THD::lex:query_tables_list. The fix in this commit uses back query table list for the duration of fragment update operation. Finally, a mtr test for virtual column support has been added. galera.galera_virtual_column.test has as first test a scenario from MDEV-21153 new fix Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* | | MDEV-22285 : Assertion `xid_seqno > wsrep_seqno' failed in ↵Jan Lindström2021-01-142-12/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trx_rseg_update_wsrep_checkpoint on SET @@global.wsrep_start_position Actual assertion mentioned on MDEV seems to be already fixed but setting seqno to -2 will trigger a different assertion mysqld: /home/jan/mysql/10.4-bugs/wsrep-lib/src/server_state.cpp:702: void wsrep::server_state::sst_received(wsrep::client_service&, int): Assertion `state_ == s_joiner || state_ == s_initialized' failed. Fixed this by not allowing user to set seqno < -1 (-1 is special seqno meaning undefined and seqno is initialized to it). MariaDB releases 10.2 and 10.3 already do not allow to set seqno < -1.
* | | MDEV-18542 : galera_sr.galera-features#56: Test failure: signal 6; ↵Jan Lindström2021-01-133-12/+9
| | | | | | | | | | | | | | | | | | mysqltest: Can't connect to local MySQL server Make test faster
* | | MDEV-21523 : galera.MDEV-16509 MTR failed: timeout after 900 seconds: Can't ↵Jan Lindström2021-01-131-1/+1
| | | | | | | | | | | | | | | | | | connect to local MySQL server Test uses Galera debug sync.
* | | MDEV-24447 : galera.galera_toi_lock_shared MTR failed: WSREP: ALTER TABLE ↵Jan Lindström2021-01-122-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | isolation failure Add wait_condition so that INSERT is replicated before ALTER and ALTER is replicated before we try to INSERT with new number of columns.
* | | Merge 10.3 into 10.4Marko Mäkelä2021-01-1116-1/+997
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3 (except MDEV-17556)Marko Mäkelä2021-01-119-1/+825
| |\ \ | | |/ | | | | | | | | | | | | The fix of MDEV-17556 (commit e25623e78a3efde05e30070dc7362f8dc0d8c459 and commit 61a362c9493df63dc588fcb71409537ae56ab9c8) has been omitted due to conflicts and will have to be applied separately later.
| | * MDEV-24482: Added wait condition to make sure table t1 is replicated to node_2.Stepan Patryshev2021-01-041-0/+3
| | |
| | * MDEV-24465: Added wait condition to make sure table t1 is replicated to node_2.Stepan Patryshev2021-01-041-0/+3
| | |
| | * MDEV-24464: Added wait condition to make sure table t1 is replicated to node_2.Stepan Patryshev2021-01-041-0/+3
| | |
| | * MDEV-24447: Added wait condition to make sure table t1 is replicated to node_2.Stepan Patryshev2021-01-041-0/+3
| | |
| | * MDEV-24462: Added wait condition to make sure table t1 is replicated to node_2.Stepan Patryshev2021-01-041-0/+3
| | |