summaryrefslogtreecommitdiff
path: root/mysql-test
Commit message (Collapse)AuthorAgeFilesLines
* remove pcre, add support for bundled pcre2Sergei Golubchik2019-12-212-24/+0
|
* longer regex error messagesSergei Golubchik2019-12-212-5/+5
|
* MDEV-14024 PCRE2.Alexey Botchkov2019-12-217-25/+17
| | | | Related changes in the server code.
* MDEV-16678: Actually ignore #sql-ib tablesMarko Mäkelä2019-12-166-141/+209
| | | | | | | | | | | | | | | | Apparently, regular expression operations that remove entire lines of output do not work with list_files, and hence the adjustments in commit 1c282d4bc48326f8b5407d372a7053c940b67252 were ineffective. For cat_file (preceded by list_files_write_file) the replace_regex does work. For some reason, for suite/parts/inc/partition_crash_exchange.inc some file names will be lost when using list_files_write_file instead of list_files. We use a precise pattern match. dict_mem_create_temporary_tablename() is generating #sql-ib names followed by decimal digits only.
* Merge 10.4 into 10.5Marko Mäkelä2019-12-16169-971/+3304
|\
| * Merge 10.3 into 10.4Marko Mäkelä2019-12-1328-98/+1720
| |\ | | | | | | | | | | | | We disable the MDEV-21189 test galera.galera_partition because it times out.
| | * Merge 10.2 into 10.3Marko Mäkelä2019-12-1222-95/+1056
| | |\
| | | * MDEV-21255: Deadlock of parallel slave and mariabackup (with failed logVlad Lesin2019-12-123-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | copy thread) mariabackup hangs waiting until innodb redo log thread read log till certain LSN, and it waits under FTWRL. If there is redo log read error in the thread, it is finished, and main thread knows nothing about it, what leads to hanging. As it hangs under FTWRL, slave threads on server side can be blocked due to MDL lock conflict. The fix is to finish mariabackup with error message on innodb redo log read failure.
| | | * MDEV-19380: ASAN heap-use-after-free in Protocol::net_store_dataVarun Gupta2019-12-122-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue here is window function makes the passed string object to point to an area in a temporary table's record buffer. Then, the temporary table is freed, together with its record buffer. Then, Item_cache_str attempts to read this value. The fix is to call value_buff.copy(). This will make the value_buff to store its string in a buffer that it owns, which will not disappear unexpectedly.
| | | * Cleanup test sys_vars.innodb_buffer_pool_size_basicMarko Mäkelä2019-12-102-13/+2
| | | | | | | | | | | | | | | | | | | | When using huge pages, the innodb_buffer_pool_size cannot necessarily be restored. Simplify things by restarting the server.
| | | * MDEV-14482 - Cache line contention on ut_rnd_interval()Marko Mäkelä2019-12-102-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InnoDB RNG maintains global state, causing otherwise unnecessary bus traffic. Even worse, this is cross-mutex traffic. That is, different mutexes suffer from contention. Fixed delay of 4 was verified to give best throughput by OLTP update index and read-write benchmarks on Intel Broadwell (2/20/40) and ARM (1/46/46). This is a backport of ce0479006523bc72ed6abb703bd1f87ff256fd8a from MariaDB Server 10.3.
| | | * MDEV-21256: Replace the 64-bit LCG with a 32-bit Galois LFSRMarko Mäkelä2019-12-102-53/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should not need anywhere near 32 bits of entropy, so we might just limit ourselves to a 32-bit random number generator. Also, it might be cheaper to use exclusive-or, bit shifting and conditional jumps, instead of multiplication and addition. We use relaxed atomic operations on the global random number generator state in order in an attempt to silence any warnings about race conditions. There is an obvious race condition between the load and store in ut_rnd_gen(), but we do not think that it matters much that the state of the random number generator could 'stutter'. This change seems makes the 'uncompress_ops' nondeterministic in innodb_zip.cmp_per_index after the restart. It looks like there is an inherent race condition in the test, because the table could be opened for InnoDB statistics recalculation already before innodb_cmp_per_index_enabled was set. We might end up having uncompress_ops anywhere between 0 and 9, or perhaps even more. Let us remove that part of the test.
| | | * MDEV-18460: Server crashed in strmake / tdc_create_key / ↵Oleksandr Byelkin2019-12-102-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | THD::create_tmp_table_def_key When there is a WITH clause we postpone check for tables without database for later stages when tables in WITH will be defined. But we should not try to open such tables as temporary tables because temporary tables always belong to a some database.
| | | * MDEV-21189: Dropping partition with 'wsrep_OSU_method=RSU' and 'SESSION ↵Jan Lindström2019-12-094-0/+899
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sql_log_bin = 0' cases the galera node to hang Found two bugs (1) have_committing_connections was missing mutex unlock on one exit case. As this function is called on a loop it caused mutex lock when we already owned the mutex. This could cause hang. (2) wsrep_RSU_begin did set up error code when partition to be dropped could not be MDL-locked because of concurrent operations but wrong error code was propagated to upper layer causing error to be ignored. This could have also caused the hang.
| | | * MDEV-18463 Don't allow multiple table CONSTRAINTs with the same name.Alexey Botchkov2019-12-092-0/+50
| | | | | | | | | | | | | | | | Add necessary checks.
| | | * CONC-417 Windows clients using Schannel often encounter error ↵Vladislav Vaintroub2019-12-081-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | SEC_E_INVALID_TOKEN reenable ssl_8k_key on Windows, which was affected by this bug
| | | * CONC-447 ERROR 2026 (HY000): SSL connection error: Certificate signature ↵Vladislav Vaintroub2019-12-082-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | check failed Enable CRL checking on Windows. Enable certificate verification testing in client testing.
| | | * List of unstable tests for 10.2.30 releasemariadb-10.2.30Elena Stepanova2019-12-051-356/+97
| | | |
| | * | MDEV-20667 Server crash on pop_cursorAlexander Barkov2019-12-124-1/+590
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When backpatching a forward GOTO label, the old code erroneously used CURSOR/HANDLER difference between context frames "c" and "a" to tune a cpop/hpop command. So the cpop/hpop command later tried to pop all cursors/handlers declared between "a" and "c", but those between "b" and "c" were not cpushed/hpoped yet during the execution of "GOTO x". Fixing the code to use the difference between frames "b" and "a" only. BEGIN -- a ... GOTO x; -- b ... <<x>> -- c ... END -- d
| | * | MDEV-20900: IN predicate to IN subquery conversion causes performance regressionVarun Gupta2019-12-102-4/+80
| | | | | | | | | | | | | | | | | | | | Disable the IN predicate to IN subquery conversion when the types on the left and right hand side of the IN predicate are not of comparable type.
| * | | MDEV-20780 Fixes for failures on galera_sr_ddl_master (#1425)Daniele Sciascia2019-12-113-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test galera_sr_ddl_master would sometimes fail due to leftover streaming replication fragments. Rollbacker thread would attempt to open streaming_log table to remove the fragments, but would fail in check_stack_overrun(). Ultimately the check_stack_overrun() failure was caused by rollbacker missing to switch the victim's THD thread stack to rollbacker's thread stack. Also in this patch: - Remove duplicate functionality in rollbacker helper functions, and extract rollbacker fragment removal into function wsrep_remove_streaming_fragments() - Reuse open_for_write() in wsrep_schema::remove_fragments - Partially revert changes to galera_sr_ddl_master test from commit 44a11a7c085f4f5a4042100df0828d54d596103d. Removed unnecessary wait condition and isolation level setting
| * | | List of unstable tests for 10.4.11 releasemariadb-10.4.11Elena Stepanova2019-12-101-566/+322
| | | |
| * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-12-09138-295/+1263
| |\ \ \ | | |/ /
| | * | List of unstable tests for 10.3.21 releasemariadb-10.3.21Elena Stepanova2019-12-061-406/+128
| | | |
| | * | MDEV-21234 Server crashes in in setup_on_expr upon 3rd execution of SPAleksey Midenkov2019-12-052-0/+53
| | | | | | | | | | | | | | | | | | | | Versioned conditions in on_expr can not be rebuilt at optimization stage on non-conventional arena.
| | * | Merge pull request #1261 from robertbindar/mdev-17978Robert Bindar2019-12-052-0/+21
| | | | | | | | | | | | MDEV-17978 Server crash in SHOW CREATE SEQUENCE on a broken view
| | * | MDEV-21233 Assertion `m_extra_cache' failed in ha_partition::late_extra_cacheAleksey Midenkov2019-12-052-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Incorrect assertion of EXTRA_CACHE for HA_EXTRA_PREPARE_FOR_UPDATE. The latter is related to read cache, but must operate without it as a noop. Related to Bug#55458 and MDEV-20441.
| | * | MDEV-21172 Memory leak after failed ADD PRIMARY KEYMarko Mäkelä2019-12-055-22/+76
| | | |
| | * | Merge branch '10.2' into 10.3Oleksandr Byelkin2019-12-0412-34/+295
| | |\ \ | | | |/
| | | * MDEV-18497 : CTAS async replication from mariadb master crashes galera nodes ↵Jan Lindström2019-12-041-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#1410) In MariaDB 10.2 master could have been configured so that there is extra annotate events. When we peak next event type for CTAS we need to skip annotate events.
| | | * Galera test fix after merge.Oleksandr Byelkin2019-12-031-0/+8
| | | |
| | | * Merge branch '10.1' into 10.2Oleksandr Byelkin2019-12-0310-22/+260
| | | |\
| | | | * Merge branch '5.5' into 10.1Oleksandr Byelkin2019-12-032-22/+28
| | | | |\
| | | | | * Using `variables` instead of `values` in mysqld --help documentation would ↵Anel Husakovic2019-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | be more accurate
| | | | | * Update `stracer` description in `mtr`. `strace-client` is not usedAnel Husakovic2019-11-291-1/+1
| | | | | |
| | | | | * MDEV-15503: mtr fix --straceDaniel Black2019-11-291-21/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $glob_mysql_test_dir was the wrong directory for strace output as it was for in-tree builds only so failed for: * out of tree builds * --parallel; and * --mem strace output wasn't saved. strace-option never replaced existing arguments (so ammended documentation). strace-client didn't accept an argument as described. Replaced specification of client with this with 'stracer' to be consistent with --debugger option. For consistency with debugger options, --client-strace was added to execute the strace on the mysqltest. Example: Running one test $ ./mtr --strace --client-strace funcs_1.is_table_constraints Logging: ./mtr --strace --client-strace funcs_1.is_table_constraints vardir: /home/anel/mariadb/5.5/mysql-test/var Checking leftover processes... Removing old var directory... - WARNING: Using the 'mysql-test/var' symlink Creating var directory '/home/anel/mariadb/5.5/mysql-test/var'... Checking supported features... MariaDB Version 5.5.67-MariaDB-debug Installing system database... - SSL connections supported - binaries are debug compiled Collecting tests... ============================================================================== TEST RESULT TIME (ms) or COMMENT -------------------------------------------------------------------------- worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019 funcs_1.is_table_constraints [ pass ] 1270 -------------------------------------------------------------------------- The servers were restarted 0 times Spent 1.270 of 3 seconds executing testcases Completed: All 1 tests were successful $ find -L . -name \*strace -ls 653 56 -rw-r--r-- 1 anel anel 57147 Nov 29 15:08 ./var/log/mysqltest.strace 646 1768 -rw-r--r-- 1 anel anel 1809855 Nov 29 15:08 ./var/log/mysqld.1.strace Example: Running test in parallel $ mysql-test/mtr --strace --client-strace --mem --parallel=3 main.select Logging: /home/dan/software_projects/mariadb-server/mysql-test/mysql-test-run.pl --strace --client-strace --mem --parallel=3 main.select vardir: /home/dan/software_projects/build-mariadb-10.3/mysql-test/var Checking leftover processes... Removing old var directory... Creating var directory '/home/dan/software_projects/build-mariadb-10.3/mysql-test/var'... - symlinking 'var' to '/dev/shm/var_auto_0v2E' Checking supported features... MariaDB Version 5.5.67-MariaDB - SSL connections supported Collecting tests... Installing system database... ============================================================================== TEST WORKER RESULT TIME (ms) or COMMENT -------------------------------------------------------------------------- worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019 worker[3] - 'localhost:16040' was not free worker[2] Using MTR_BUILD_THREAD 301, with reserved ports 16020..16039 worker[3] Using MTR_BUILD_THREAD 303, with reserved ports 16060..16079 main.select w1 [ pass ] 7310 -------------------------------------------------------------------------- The servers were restarted 0 times Spent 7.310 of 11 seconds executing testcases Completed: All 1 tests were successful. $ find mysql-test/var/ -name \*strace -ls 5213766 1212 -rw-r--r-- 1 dan dan 1237817 May 20 16:47 mysql-test/var/1/log/mysqltest.strace 5214733 13016 -rw-r--r-- 1 dan dan 13328335 May 20 16:47 mysql-test/var/1/log/mysqld.1.strace $ mysql-test/mtr --strace --client-strace --strace-option='-e' --strace-option='trace=openat' --mem --parallel=3 main.select ... $ find mysql-test/var/ -name \*strace -ls 5220790 8 -rw-r--r-- 1 dan dan 6291 May 20 17:02 mysql-test/var/3/log/mysqltest.strace 5224140 308 -rw-r--r-- 1 dan dan 314356 May 20 17:02 mysql-test/var/3/log/mysqld.1.strace $ more mysql-test/var/3/mysqltest.strace 1692 openat(AT_FDCWD, "/home/dan/software_projects/mariadb-server/libmysql/.libs/tls/x86_64/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 1692 openat(AT_FDCWD, "/home/dan/software_projects/mariadb-server/libmysql/.libs/tls/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOE NT (No such file or directory) Closes #600
| | | | * | MDEV-19572 async slave node fails to apply MyISAM only writes (#1418)seppo2019-11-263-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem happens when MariaDB master replicates writes for only non InnoDB tables (e.g. writes to MyISAM table(s)). Async slave node, in Galera cluster, can apply these writes successfully, but it will, in the end, write gtid position in mysql.gtid_slave_pos table. mysql.gtid_slave_pos table is InnoDB engine, and this write makes innodb handlerton part of the replicated "transaction". Note that wsrep patch identifies that write to gtid_slave_pos should not be replicated and skips appending wsrep keys for these writes. However, as InnoDB was present in the transaction, and there are replication events (for MyISAM table) in transaction cache, but there are no appended keys, wsrep raises an error, and this makes the söave thread to stop. The fix is simply to not treat it as an error if async slave tries to replicate a write set with binlog events, but no keys. We just skip wsrep replication and return successfully. This commit contains also a mtr test which forces mysql.gtid_slave_pos table isto be of InnoDB engine, and executes MyISAM only write through asyn replication. There is additional fix for declaring IO and background slave threads as non wsrep. These threads should not write anything for wsrep replication, and this is just a safeguard to make sure nothing leaks into cluster from these slave threads.
| | | | * | Remove excessive sleep from test.Jan Lindström2019-11-181-1/+1
| | | | | |
| | | | * | MDEV-18497 CTAS async replication from mariadb master crashes galera nodes ↵seppo2019-11-183-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#1410) This PR contains a mtr test for reproducing a failure with replicating create table as select statement (CTAS) through asynchronous mariadb replication to mariadb galera cluster. The problem happens when CTAS replication contains both create table statement followed by row events for populating the table. In such situation, the galera node operating as mariadb replication slave, will first replicate only the create table part into the cluster, and then perform another replication containing both the create table and row events. This will lead all other nodes to fail for duplicate table create attempt, and crash due to this failure. PR contains also a fix, which identifies the situation when CTAS has been replicated, and makes further scan in async replication stream to see if there are following row events. The slave node will replicate either single TOI in case the CTAS table is empty, or if CTAS table contains rows, then single bundled write set with create table and row events is replicated to galera cluster. This fix should keep master server's GTID's for CTAS replication in sync with GTID's in galera cluster.
| | | | * | MDEV-21044: Wrong result when using a smaller size for sort bufferVarun Gupta2019-11-182-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that the sort buffers can store atleast one sort key. This is needed to make sure that all merge buffers are read else with no sort keys some merge buffers are skipped because the code makes a conclusion there is no data to be read.
| | | * | | MDEV-21198 : Galera test failure on galera_var_notify_cmdJan Lindström2019-12-032-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | Add proper wsrep sync wait.
| | * | | | Merge remote-tracking branch 'origin/bb-10.3-release' into 10.3Oleksandr Byelkin2019-12-042-0/+17
| | |\ \ \ \
| | | * | | | MDEV-21147 Assertion `marked_for_read()' upon UPDATE on versioned table via viewAleksey Midenkov2019-12-042-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unit prepare prematurely fixed field which must be fixed via setup_conds() to correctly update table->covering_keys. Call vers_setup_conds() directly instead, because actually everything else is not needed.
| | * | | | | Merge branch 'bb-10.3-release' into 10.3Oleksandr Byelkin2019-12-044-0/+38
| | |\ \ \ \ \
| | | * | | | | MDEV-21147 Assertion `marked_for_read()' upon UPDATE on versioned table via viewAleksey Midenkov2019-12-032-0/+9
| | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unit prepare prematurely fixed field which must be fixed via setup_conds() to correctly update table->covering_keys. Call vers_setup_conds() directly instead, because actually everything else is not needed.
| | | * | | | MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONEDAleksey Midenkov2019-12-032-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wrong assertion condition. SYSTEM_TIME_ALL indicates that vers_setup_conds() is done. In case FOR SYSTEM_TIME ALL is specified in command the assertion passes but not checks anything.
| | * | | | | Re-record sql_sequence.rebuild with sorted_resultVicențiu Ciorbaru2019-12-032-110/+112
| | | | | | |
| | * | | | | Update versioning.alter after typo fixVicențiu Ciorbaru2019-12-031-2/+2
| | | | | | |
| | * | | | | Merge remote-tracking branch 10.2 into 10.3Jan Lindström2019-12-0297-200/+665
| | |\ \ \ \ \ | | | | |/ / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mysql-test/suite/galera/t/galera_binlog_event_max_size_max-master.opt mysql-test/suite/innodb/r/innodb-mdev-7513.result mysql-test/suite/innodb/t/innodb-mdev-7513.test mysql-test/suite/wsrep/disabled.def storage/innobase/ibuf/ibuf0ibuf.cc
| | | * | | | MDEV-21182: Galera test failure on MW-284Jan Lindström2019-11-3079-177/+504
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | galera_2nodes.cnf did not contain wsrep_on=1 on correct places. Fixed restart options to use correct configuration.