summaryrefslogtreecommitdiff
path: root/mysql-test/suite
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into 10.5Marko Mäkelä2019-11-273-3/+57
|\
| * MDEV-21148: Assertion index->n_core_fields + n_add >= index->n_fieldsMarko Mäkelä2019-11-263-3/+57
| | | | | | | | | | | | | | | | Revert part of commit 6cedb671e99038f1a10e0d8504f835aaabed9780 because it turns out to be theoretically impossible to parse a ROW_FORMAT=COMPACT or ROW_FORMAT=DYNAMIC metadata record where the variable-length fields in the PRIMARY KEY have been written as nonempty strings.
* | MDEV-21127 Assertion in key_text::key_text()Aleksey Midenkov2019-11-262-0/+19
| | | | | | | | Unsigned type while RHS expression could be less than 0.
* | Merge 10.4 into 10.5Aleksey Midenkov2019-11-2519-101/+436
|\ \ | |/
| * MDEV-20190 Instant operation fails when add column and collation change on ↵Marko Mäkelä2019-11-252-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | non-indexed column We must relax too strict debug assertions. For latin1_swedish_ci, mtype=DATA_CHAR or mtype=DATA_VARCHAR will be used instead of mtype=DATA_MYSQL or mtype=DATA_VARMYSQL. Likewise, some changes of dtype_get_charset_coll() do not affect the data type encoding, but only any indexes that are defined on the column. Charset::same_encoding(): Check whether two charset-collations have the same character set encoding. dict_col_t::same_encoding(): Check whether two character columns have the same character set encoding. dict_col_t::same_type(): Check whether two columns have a compatible data type encoding. dict_col_t::same_format(), dict_table_t::instant_column(): Do not compare mtype or the charset-collation of prtype directly. Rely on dict_col_t::same_type() instead. dtype_get_charset_coll(): Narrow the return type to uint16_t. This is a refined version of a fix that was developed by Thirunarayanan Balathandayuthapani.
| * Merge 10.3 into 10.4Aleksey Midenkov2019-11-254-0/+81
| |\
| | * MDEV-21049 Segfault in create federatedx table with empty hostnameAleksey Midenkov2019-11-222-0/+37
| | | | | | | | | | | | Use my_localhost instead of NULL for share->hostname.
| | * MDEV-18727 improve DML operation of System VersioningAleksey Midenkov2019-11-228-24/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-18957 UPDATE with LIMIT clause is wrong for versioned partitioned tables UPDATE, DELETE: replace linear search of current/historical records with vers_setup_conds(). Additional DML cases in view.test
| | * MDEV-21045 AddressSanitizer: use-after-poison in mem_heap_dup / ↵Eugene Kosov2019-11-212-0/+44
| | | | | | | | | | | | | | | | | | | | | row_log_table_get_pk_col row_log_table_get_pk_col(): read instant field value from instant alter table when it's required.
| * | MDEV-18727 improve DML operation of System Versioning (10.4)Aleksey Midenkov2019-11-258-24/+148
| | | | | | | | | | | | | | | | | | | | | UPDATE, DELETE: replace linear search of current/historical records with vers_setup_conds(). Additional DML cases in view.test
| * | MDEV-21096 async slave crash with gtid_log_pos table access (#1413)seppo2019-11-255-77/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original crash happened when async replication IO thread was updating mysql.gtid_slave_pos table. Operations on this table should remain node local, but it appears that protection (THD::wsrep_ignore_table flag) to prevent wsrep replication for this table mas missing for innodb write_row() and update_row(). It was somewhat difficult to reproduce the issue, because mtr seems to create the affected table mysql.gtid_log_pos as of Aria engine type, and Aria engine operations will not be replicated anyhow. It looks, though, that in release installation, mysql.gtid_slave_pos table is of InnoDB engine. It was possible to trigger somewhat related problem by running test galera.galera_as_slave_gtid with configuration: gtid_pos_auto_engines=InnoDB. However, this test mode, causes earlier crash when replication background thread creates aditional table: mysql.gtid_slave_pos_InnoDB, and this table create triggered wsrep TOI replication, which also failed for assertion. Actually, async replication IO and background threads should not replicate anything to cluster. This pull request contains new test galera.galera_as_slave_gtid_auto_engine, which basically just runs galera.galera_as_slave_gtid with configuration of gtid_pos_auto_engines=InnoDB. Test galera.galera_as_slave_gtid is also modified for better code reuse. Actual fix for MDEV-21096 is in storage/innobase/handler/ha_innodb.cc, where THD::wsrep_ignore_table flag is now honored before wsrep key population. There is additional fix in sql/service_wsrep.cc where async replication IO and background threads are marked as non-local. This fences these threads out of wsrep replication altogether. Note that this change, actually makes the use of THD::wsrep_ignore-table redundant. We may want to refactor THD::wsrep_ignore_table out in the future, if there is no other use case for it in sight.
* | | MDEV-19903 Setup default partitions for system versioningAleksey Midenkov2019-11-224-204/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement syntax like: create table t1 (x int) with system versioning partition by system_time; which will create 1 history partition and 1 current partition. Also it is possible to specify the number of history partitions: create table t1 (x int) with system versioning partition by system_time partitions 5; which will create 4 history partitions (and 1 current partition). Tests: partition.test cases are duplicated where it is appropriate for default partitions. partition_rotation.test cases are replaced by default partitions where possible.
* | | Fix MTR suppressions in inconsistency voting tests (#1412)Daniele Sciascia2019-11-229-4/+59
| | | | | | | | | | | | Message "WSREP: Failed to apply write set" has been turned into an error, but tests were not adjusted accordingly.
* | | Merge 10.4 into 10.5Marko Mäkelä2019-11-203-3/+36
|\ \ \ | |/ /
| * | MDEV-21088 Table cannot be loaded after instant ADD/DROP COLUMNMarko Mäkelä2019-11-203-3/+36
| | | | | | | | | | | | | | | | | | btr_cur_instant_init_low(): Accurately parse the metadata record header for ROW_FORMAT=DYNAMIC and ROW_FORMAT=COMPACT. CHAR columns used to be unnecessarily written as nonempty strings of bytes.
* | | MDEV-20729 Fix REFERENCES constraint in column definitionAleksey Midenkov2019-11-2013-10/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support of referential constraints directly in column defininions: create table t1 (id1 int primary key); create table t2 (id2 int references t1(id1)); Referenced field name can be omitted if equal to foreign field name: create table t1 (id int primary key); create table t2 (id int references t1); Until 10.5 this syntax was understood by the parser but was silently ignored. In case of generated columns this syntax is disabled at parser level by ER_PARSE_ERROR. Note that separate FOREIGN KEY clause for generated columns is disabled at storage engine level.
* | | MDEV-20480 Obsolete internal parser for FK in InnoDBAleksey Midenkov2019-11-205-25/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently InnoDB uses internal parser for adding foreign keys. Remove internal parser and use data parsed by SQL parser (sql_yacc) for adding foreign keys. - create_table_info_t::create_foreign_keys() replacement for dict_create_foreign_constraints_low(); - Pass constraint name via Foreign_key object. Temporary until MDEV-20865: - Pass alter_info as part of create_info.
* | | Merge 10.4 into 10.5Marko Mäkelä2019-11-192-9/+44
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2019-11-192-9/+44
| |\ \ | | |/
| | * Merge 10.2 into 10.3Marko Mäkelä2019-11-192-9/+35
| | |\
| | | * MDEV-21069 Crash on DROP TABLE if the data file is corruptedMarko Mäkelä2019-11-191-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buf_read_ibuf_merge_pages(): Discard any page numbers that are outside the current bounds of the tablespace, by invoking the function ibuf_delete_recs() that was introduced in MDEV-20934. This could avoid an infinite change buffer merge loop on innodb_fast_shutdown=0, because normally the change buffer merge would only be attempted if a page was successfully loaded into the buffer pool. dict_drop_index_tree(): Add the parameter trx_t*. To prevent the DROP TABLE crash, do not invoke btr_free_if_exists() if the entire .ibd file will be dropped. Thus, we will avoid a crash if the BTR_SEG_LEAF or BTR_SEG_TOP of the index is corrupted, and we will also avoid unnecessarily accessing the to-be-dropped tablespace via the buffer pool. In MariaDB 10.2, we disable the DROP TABLE fix if innodb_safe_truncate=0, because the backup-unsafe MySQL 5.7 WL#6501 form of TRUNCATE TABLE requires that the individual pages be freed inside the tablespace.
* | | | MDEV-20839 innodb-redo-badkey fails sporadicallyVladislav Vaintroub2019-11-151-0/+1
| | | |
* | | | MDEV-16264 Use threadpool for Innodb background work.Vladislav Vaintroub2019-11-155-141/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Almost all threads have gone - the "ticking" threads, that sleep a while then do some work) (srv_monitor_thread, srv_error_monitor_thread, srv_master_thread) were replaced with timers. Some timers are periodic, e.g the "master" timer. - The btr_defragment_thread is also replaced by a timer , which reschedules it self when current defragment "item" needs throttling - the buf_resize_thread and buf_dump_threads are substitutes with tasks Ditto with page cleaner workers. - purge workers threads are not tasks as well, and purge cleaner coordinator is a combination of a task and timer. - All AIO is outsourced to tpool, Innodb just calls thread_pool::submit_io() and provides the callback. - The srv_slot_t was removed, and innodb_debug_sync used in purge is currently not working, and needs reimplementation.
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-11-1411-70/+430
|\ \ \ \ | |/ / /
| * | | MDEV-20949: Merge 10.3 into 10.4Marko Mäkelä2019-11-1411-70/+430
| |\ \ \ | | |/ /
| | * | MDEV-20949: Merge 10.2 into 10.3Marko Mäkelä2019-11-147-73/+58
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | | | | | In the test innodb.instant_alter,4k we would be flagging an error for too large row size. That error was previously only being reported if the table was being rebuilt. Thus, this merge is fixing a small omission in MDEV-11369 (instant ADD COLUMN).
| | | * MDEV-20949 Stop issuing 'row size' error on DMLEugene Kosov2019-11-135-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move row size check to early CREATE/ALTER TABLE phase. Stop checking on table open. dict_index_add_to_cache(): remove parameter 'strict', stop checking row size dict_index_t::record_size_info_t: this is a result of row size check operation create_table_info_t::row_size_is_acceptable(): performs row size check. Issues error or warning. Writes first overflow field to InnoDB log. create_table_info_t::create_table(): add row size check dict_index_t::record_size_info(): this is a refactored version of dict_index_t::rec_potentially_too_big(). New version doesn't change global state of a program but return all interesting info. And it's callers who decide how to handle row size overflow. dict_index_t::rec_potentially_too_big(): removed
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-11-125-8/+122
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2019-11-125-8/+122
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2019-11-123-8/+8
| | |\ \ | | | |/
| | | * Merge 10.1 into 10.2Marko Mäkelä2019-11-122-4/+4
| | | |\
| | | | * MDEV-20953: binlog_encryption.rpl_corruption failed in buildbot due to wrong ↵Sujatha2019-11-122-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | error code Problem: ======== CURRENT_TEST: binlog_encryption.rpl_corruption mysqltest: In included file "./include/wait_for_slave_io_error.inc": ... At line 72: Slave stopped with wrong error code **** Slave stopped with wrong error code: 1743 (expected 1595,1913) **** Analysis: ======== The test emulates the corruption at the various stages of replication for example in binlog file, in network and in relay log etc. It verifies that all corruption cases are handled through appropriate error messages. The test cases which emulate network failure expect following errors. --ER_SLAVE_RELAY_LOG_WRITE_FAILURE (1595) --ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE (1743) Ideally test should expect error codes as 1595 and 1743. But the test actually waits on incorrect error code 1595,1913 Fix: === Added appropriate error code for 'ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE'. Replaced 1913 with 1743.
| | | * | rpl_semi_sync_gtid_reconnect results mergeAndrei Elkin2019-11-111-0/+12
| | | | |
| | * | | merge 10.2->10.3 with conflict resolutionsAndrei Elkin2019-11-112-0/+114
| | |\ \ \ | | | |/ /
| | | * | manual merge 10.1->10.2Andrei Elkin2019-11-112-0/+103
| | | |\ \ | | | | |/
| | | | * MDEV-19376 Repl_semi_sync_master::commit_trx assertion failure: ... || ↵Andrei Elkin2019-11-102-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | !m_active_tranxs->is_tranx_end_pos(trx_wait_binlog_name, trx_wait_binlog_pos) The assert indicates that the current transaction got caught uncleaned from the semisync master's cache when it is signaled to proceed upon its ack receive. The reason of missed cleanup turns out to be a flaw in the gtid connect mode. A submitted by connecting slave value of its last received event's binlog file *name* was adopted into {{Repl_semi_sync_master::m_reply_file_name}} as a part of semisync initialization. Notice that the initialization still refines the position part of the submitted last received event's binlog coordinates. The master side binlog filename:pos refinement is specific to the gtid connect mode for purpose of computing the latest binlog file to resume slave feeding from. Effectively in the gtid connect mode the computed resumption filename:pos may appear smaller in which case a new post-connect time committing transaction may be logged with its filename:pos also less than the submitted coordinates and that triggers the assert. Fixed with making the semisync initialization to use the refined filename:pos. It is guaranteed to be less than any new generated transaction's binlog:pos.
* | | | | MDEV-20854: ANALYZE for statements: not clear where the time is spentSergei Petrunia2019-11-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Count the "gap" time between table accesses and display it as r_other_time_ms in the "table" element. * The advantage of this approach is that it doesn't add any new my_timer_cycles() calls. * The disadvantage is that the definition of what is done during "other time" is not that clear: it includes checking the WHERE (for this table), constructing index lookup tuple (for the next table) writing to GROUP BY temporary table (as we dont account for that time separately [yet], etc)
* | | | | MDEV-17553 Enable setting start datetime for interval partitioned history of ↵Aleksey Midenkov2019-11-074-34/+424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | system versioned tables * Explicit STARTS syntax * SHOW CREATE * Default STARTS rounding depending on INTERVAL type * Warn when STARTS timestamp is later than query time * Fix uninitialized Lex->create_last_non_select_table under mysql_unpack_partition() Default STARTS rounding depending on INTERVAL type If STARTS clause is omitted, default one is assigned with value derived from query timestamp. The rounding is done on STARTS value depending on INTERVAL type: SECOND: no rounding is done; MINUTE: timestamp seconds is set to 0; HOUR: timestamp seconds and minutes are set to 0; DAY, WEEK, MONTH and YEAR: timestamp seconds, minutes and hours are set to 0 (the date of rotation is kept as current date).
* | | | | Merge 10.4 into 10.5Marko Mäkelä2019-11-077-31/+134
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A conflict between MDEV-19514 (b42294bc6409794bdbd2051b32fa079d81cea61d) and MDEV-20934 (d7a2401750bb29dfdb45929a536539b9f17b347f) was resolved. We will not invoke the function ibuf_delete_recs() from ibuf_merge_or_delete_for_page(). Instead, we will add that logic to the function ibuf_read_merge_pages().
| * | | | Merge 10.3 into 10.4mariadb-10.4.10Marko Mäkelä2019-11-072-0/+8
| |\ \ \ \ | | |/ / /
| | * | | MDEV-20934: Make the test more robustmariadb-10.3.20Marko Mäkelä2019-11-062-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to MDEV-12288, the slow shutdown in MariaDB 10.3 will include resetting the DB_TRX_ID for all inserted records. This might cause the 60-second shutdown_server timeout to be exceeded. Let us wait for the purge to complete before initiating slow shutdown.
| * | | | Merge 10.3 into 10.4Marko Mäkelä2019-11-067-30/+124
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.2 into 10.3Marko Mäkelä2019-11-066-31/+109
| | |\ \ \ | | | |/ /
| | | * | Merge 10.1 to 10.2Marko Mäkelä2019-11-064-30/+79
| | | |\ \ | | | | |/
| | | | * MDEV-20987 InnoDB fails to start when fts table has FK relationThirunarayanan Balathandayuthapani2019-11-062-30/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InnoDB: Assertion failure in file .../dict/dict0dict.cc line ... InnoDB: Failing assertion: table->can_be_evicted This fixes a regression that was caused by the fix of MDEV-20621 (commit a41d429765c7ddb528b9b438c68b25ff55d3bd55). MySQL 5.6 (and MariaDB 10.0) introduced eviction of tables from the InnoDB data dictionary cache. Tables that are connected to FOREIGN KEY constraints or FULLTEXT INDEX are exempt of the eviction. With the problematic change, a table that would already be exempt from eviction due to FOREIGN KEY would cause the problem if there also was a FULLTEXT INDEX defined on it. dict_load_table(): Only prevent eviction if table->can_be_evicted holds.
| | | | * MDEV-17896 Assertion `pfs->get_refcount() > 0' failedRobert Bindar2019-11-012-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunate DROP TEMPORARY..IF EXISTS on a regular table may allow subsequent CREATE TABLE statements to steal away the PFS_table_share instance from the dropped table.
| | | * | MDEV-20934 Infinite loop on innodb_fast_shutdown=0 with inconsistent change ↵Marko Mäkelä2019-11-062-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buffer Due to a data corruption bug that may have occurred a long time earlier (possibly involving physical backup and MySQL Bug #69122, which was addressed in commit f166ec71b78fdf7a08ba413509cf00ad9e003b3c) it seems possible that the InnoDB change buffer might end up containing entries, while no buffered changes exist according to the change buffer bitmap pages in the .ibd files. ibuf_delete_recs(): New function, to be invoked on slow shutdown only. Remove all buffered changes for a specific page. ibuf_merge_or_delete_for_page(): If the change buffer bitmap is clean and a slow shutdown is in progress, invoke ibuf_delete_recs(). We do not want to do that during normal operation, due to the additional overhead that is involved. The bitmap page should be consistent with the change buffer in the first place.
* | | | | Merge 10.4 into 10.5Oleksandr Byelkin2019-11-0745-126/+1771
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.3 into 10.4Marko Mäkelä2019-11-0143-126/+1731
| |\ \ \ \ | | |/ / /
| | * | | MDEV-20938 Double free of dict_foreign_t during instant ALTER TABLEThirunarayanan Balathandayuthapani2019-11-012-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | innobase_drop_foreign_try(): Don't evict and reload the dict_foreign_t during instant ALTER TABLE if the FOREIGN KEY constraint is being dropped. The MDEV-19630 fix (commit 07b1a26c33b28812a4fd8c814de0fe7d943bbd6b) was incomplete, because it did not cover a case where the FOREIGN KEY constraint is being dropped.