summaryrefslogtreecommitdiff
path: root/mysql-test/include
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.1 into 10.2Marko Mäkelä2020-09-012-0/+6
|\ | | | | | | This also fixes MDEV-20464.
| * MDEV-23600 Division by 0 in row_search_with_covering_prefixMarko Mäkelä2020-09-012-0/+6
| | | | | | | | | | | | | | The InnoDB index fields store bytes, not characters. Remove some unnecessary conversions from characters to bytes. This also fixes MDEV-20422 and the wrong-result bug MDEV-12486.
* | MDEV-23511 shutdown_server 10 times out, causing server kill at shutdownAndrei Elkin2020-08-214-5/+5
| | | | | | | | | | | | | | | | | | | | | | Shutdown of mtr tests may be too impatient, esp on CI environment where 10 seconds of `arg` of `shutdown_server arg` may not be enough for the clean shutdown to complete. This is fixed to remove explicit non-zero timeout argument to `shutdown_server` from all mtr tests. mysqltest computes 60 seconds default value for the timeout for the argless `shutdown_server` command. This policy is additionally ensured with a compile time assert.
* | Merge 10.1 into 10.2Marko Mäkelä2020-06-061-1/+1
|\ \ | |/
| * MDEV-22715: SIGSEGV in radixsort_for_str_ptr and in native_compare/my_qsort2 ↵Varun Gupta2020-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | (optimized builds) For DECIMAL[(M[,D])] datatype max_sort_length was not being honoured which was leading to buffer overflow while making the sort key. The fix to this problem would be to create sort keys for decimals with atmost max_sort_key bytes Important: The minimum value of max_sort_length has been raised to 8 (previously was 4), so fixed size datatypes like DOUBLE and BIGINIT are not truncated for lower values of max_sort_length.
* | MDEV-21599 - plugins.server_audit fails sporadically in buildbotSergey Vojtovich2020-04-101-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed a couple of race conditions in the test case to ensure stable order of events. Also removed all sleeps. Test execution time is down from 18s to 0.15s. On disconnect audit event is triggered after control is returned to mysqltest client. Which means mysqltest may issue more commands concurrently before disconnect is actually logged. Similar problem happens with regular query execution: an event is triggered after control is returner to the client. Which may end up with unstable order of events in different connections. Delayed insert rows are enqueued separately and can either be combined into single event or go as separate events. Reduced number of inserted rows to 1 to stabilize result. Also backported 2b3f6ab from 10.5.
* | MDEV-21360 restore debud_dbug through a session variable instead of '-d,..'bb-10.2-MDEV-21360Alice Sherepa2020-03-231-5/+4
| |
* | MDEV-21360 debug_dbug pre-test value restoration issuesAlice Sherepa2020-01-151-2/+2
| |
* | Merge 10.1 into 10.2Marko Mäkelä2019-12-231-1/+1
|\ \ | |/
| * MDEV-20959: binlog.binlog_parallel_replication_marks_row fails in buildbot ↵Sujatha2019-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with wrong result Problem: ======= Test "binlog.binlog_parallel_replication_marks_row" fails sporadically due to result length mismatch. Analysis: ========= Test generates a binary log and it looks for certain words within the binary log file and prints them. For example word like "GTID,BEGIN,COMMIT ...". Binary log output contains base64 encoded characters. Occasionally the encoded characters match with the above words and results in test failure. +XwoFWxMBAAAALgAAAGEDAAAAAB8AAAAAAAEABHRlc3QAAnQxAAIDAwACFGTIDQ== +AAAAAAAAAAAEEwQADQgICAoKCgGTIDw9 Fix: === Improve the regular expression to match exact words.
* | Merge 10.1 into 10.2Marko Mäkelä2019-10-115-120/+21
|\ \ | |/
| * MDEV-20804 Speed up main.index_merge_innodbMarko Mäkelä2019-10-115-120/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test main.index_merge_innodb is taking very much time, especially on later versions (10.2 and 10.3). Some of this could be attributed to the use of INSERT...SELECT, which is time-consumingly creating explicit record locks in InnoDB for the locking read in the SELECT part. In 10.3 and later, some slowness can be attributed to MDEV-12288, which makes the InnoDB purge thread spend time to reset transaction identifiers in the inserted records. If we prevent purge from running before all tables are dropped, the test seems to be 10% faster on an unoptimized debug build on 10.5. (A proper fix would be to implement MDEV-515 and stop writing row-level undo log records for inserts into an empty table or partition.) At the same time, it should not hurt to make main.index_merge_myisam to use the sequence engine. Not only could it be a little faster, but the test would be slightly more readable.
* | Backporting 273d8eb12c40a6dcd05a8148bdfba3f1fd96e764 Proper fix for ↵Varun Gupta2019-09-231-0/+1
| | | | | | | | disabling warnings in read_statistics_for_table()
* | Updated mtr files to support different compiled in optionsMonty2019-09-0111-8/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows one to run the test suite even if any of the following options are changed: - character-set-server - collation-server - join-cache-level - log-basename - max-allowed-packet - optimizer-switch - query-cache-size and query-cache-type - skip-name-resolve - table-definition-cache - table-open-cache - Some innodb options etc Changes: - Don't print out the value of system variables as one can't depend on them to being constants. - Don't set global variables to 'default' as the default may not be the same as the test was started with if there was an additional option file. Instead save original value and reset it at end of test. - Test that depends on the latin1 character set should include default_charset.inc or set the character set to latin1 - Test that depends on the original optimizer switch, should include default_optimizer_switch.inc - Test that depends on the value of a specific system variable should set it in the test (like optimizer_use_condition_selectivity) - Split subselect3.test into subselect3.test and subselect3.inc to make it easier to set and reset system variables. - Added .opt files for test that required specfic options that could be changed by external configuration files. - Fixed result files in rockdsb & tokudb that had not been updated for a while.
* | Fixed issues found by valgrindMonty2019-08-121-1/+1
| | | | | | | | | | | | | | | | | | - mysqltest didn't free read_command_buf - wait_for_slave_param did write different things to the log if valgrind was used. - Table open cache should not write the initial variable value as it can depend on the configuration or if valgrind is used - A variable in GetResult was used uninitalized
* | Merge 10.1 into 10.2Marko Mäkelä2019-07-251-1/+8
|\ \ | |/
| * MDEV-20091 DROP TEMPORARY table is logged despite no CREATE was loggedSujatha2019-07-251-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-5589 commit set up a policy to skip DROP TEMPORARY TABLE binary logging in case the target table has not been "CREATEed" in binlog (no CREATE Query-log-event was logged into the binary log). It turns out that 1. the rule did not cover non-existing table DROPped with IF-EXISTS clause. The logged-create knowledge for the non-existing one does not even need MDEV-5589 patch, and 2. connection close disobeys it to trigger automatic DROP-IF-EXISTS binlogging. Either 1 or 2 or even both is/are also responsible for unexpected binlog records observed in MDEV-17863, actually rendering a referred @@global.read_only irrelevant as far as the described stored procedure definition *and* the ROW binlog-format are concerned.
* | MDEV-18565: Galera mtr-suite fails if galera library is not installedJulius Goryavsky2019-07-174-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, running mtr with an incorrect (for example, new or obsolete) version of wsrep_provider (for example, with the 26 version of libgalera_smm.so) leads to the failure of tests in several suites with vague error diagnostics. As for the galera_3nodes suite, the mtr also does not effectively check all the prerequisites after merge with MDEV-18426 fixes. For example, tests that using mariabackup do not check for presence of ss and socat/nc. This is due to improper handling of relative paths in mtr scripts. In addition, some tests in different suites can be run without setting the environment variables such as MTR_GALERA_TFMT, XBSTREAM, and so on. To eliminate all these issues, this patch makes the following changes: 1. Added auxiliary wsrep_mtr_check utility (which located in the mysql-test/lib/My/SafeProcess subdirectory), which compares the versions of the wsrep API that used by the server and by the wsrep provider library, and it does this comparison safely, without accessing the API if the versions do not match. 2. All checks related to the presence of mariabackup and utilities that necessary for its operation transferred from the local directories of different mtr suites (from the suite.pm files) to the main suite.pm file. This not only reduces the amount of code and eliminates duplication of identical code fragments, but also avoids problems due to the inability of mtr to consider relative paths to include files when checking skip combinations. 3. Setting the values of auxiliary environment variables that are necessary for Galera, SST scripts and mariabackup (to work properly) is moved to the main mysql-test-run.pl script, so as not to duplicate this code in different suites, and to avoid partial corrections of the same errors for different suites (while other suites remain uncorrected). 4. Fixed duplication of the have_file_key_management.inc and have_filekeymanagement.inc files between different suites, these checks are also transferred to the top level. 5. Added garbd presence check and garbd path variable. https://jira.mariadb.org/browse/MDEV-18565
* | MDEV-19746: Galera test failures because of wsrep_slave_threads identificationJan Lindström2019-07-152-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that tests select INFORMATION_SCHEMA.PROCESSLIST processes from user system user and empty state. Thus, there is not clear state for slave threads. Changes: - Added new status variables that store current amount of applier threads (wsrep_applier_thread_count) and rollbacker threads (wsrep_rollbacker_thread_count). This will make clear how many slave threads of certain type there is. - Added THD state "wsrep applier idle" when applier slave thread is waiting for work. This makes finding slave/applier threads easier. - Added force-restart option for mtr to always restart servers between tests to avoid race on start of the test - Added wait_condition_with_debug to wait until the passed statement returns true, or the operation times out. If operation times out, the additional error statement will be executed Changes to be committed: new file: mysql-test/include/force_restart.inc new file: mysql-test/include/wait_condition_with_debug.inc modified: mysql-test/mysql-test-run.pl modified: mysql-test/suite/galera/disabled.def modified: mysql-test/suite/galera/r/MW-336.result modified: mysql-test/suite/galera/r/galera_kill_applier.result modified: mysql-test/suite/galera/r/galera_var_slave_threads.result new file: mysql-test/suite/galera/t/MW-336.cnf modified: mysql-test/suite/galera/t/MW-336.test modified: mysql-test/suite/galera/t/galera_kill_applier.test modified: mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test modified: mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test modified: mysql-test/suite/galera/t/galera_var_slave_threads.test modified: mysql-test/suite/wsrep/disabled.def modified: mysql-test/suite/wsrep/r/variables.result modified: mysql-test/suite/wsrep/t/variables.test modified: sql/mysqld.cc modified: sql/wsrep_mysqld.cc modified: sql/wsrep_mysqld.h modified: sql/wsrep_thd.cc modified: sql/wsrep_var.cc
* | Merge 10.1 into 10.2Marko Mäkelä2019-05-138-8/+8
|\ \ | |/
| * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-118-8/+8
| |\
| | * Update FSF AddressVicențiu Ciorbaru2019-05-118-8/+8
| | | | | | | | | | | | * Update wrong zip-code
* | | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-05-041-0/+6
|\ \ \ | |/ /
| * | MDEV-13335 UTF8 escape wildcard LIKE match has different behavior in ↵Alexander Barkov2019-04-281-0/+6
| | | | | | | | | | | | | | | | | | different collations The fix for MDEV-17064 addressed this problem. Adding tests only.
* | | Merge 10.1 into 10.2Marko Mäkelä2019-04-045-2/+24
|\ \ \ | |/ /
| * | index_merge_innodb did sometimes give wrong resultsMonty2019-04-045-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | Fixed by adding more rows to a table Other things: - Speed up index_merge tests 20% by adding begin/commit around loops that generated rows.
* | | MDEV-18836: Adjust a suppressionMarko Mäkelä2019-04-031-1/+1
| | | | | | | | | | | | | | | Normally, InnoDB will create temporary table names of the form #sql-ibNNNN, and with innodb_safe_truncate=OFF, #sql-ibNNNN-MMMM.
* | | Merge 10.1 into 10.2Marko Mäkelä2019-03-271-1/+1
|\ \ \ | |/ /
| * | Merge 10.0 into 10.1Marko Mäkelä2019-03-271-1/+1
| |\ \
| | * \ Merge 5.5 into 10.0bb-10.0-mergeMarko Mäkelä2019-03-261-1/+1
| | |\ \ | | | |/
| | | * Fix for MDEV-18276, typo in error message + all other occurrences of referingChris Calender2019-03-231-1/+1
| | | |
| | * | MDEV-12023 Assertion failure sym_node->table != NULL on startupMarko Mäkelä2018-10-302-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | row_drop_table_for_mysql(): Avoid accessing non-existing dictionary tables. dict_create_or_check_foreign_constraint_tables(): Add debug instrumentation for creating and dropping a table before the creation of any non-core dictionary tables. trx_purge_add_update_undo_to_history(): Adjust a debug assertion, so that it will not fail due to the test instrumentation.
| * | | MDEV-18426: Most of the mtr tests in the galera_3nodes suite failJulius Goryavsky2019-02-122-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the mtr tests in the galera_3nodes suite fail for a variety of reasons with a variety of errors. This patch fixes several substantial flaws in the galera_3nodes suite tests and in the mtr framework service files, adapting the tests from galera_3nodes for the current version of MariaDB. This patch also synchronizes some galera_3nodes-related files with the latest changes made for MDEV-17835 (v2 patch) and for MDEV-18379 in other branches (10.2 and 10.3). Closes #1161
* | | | Revert a part of commit 676f43da3a1951e4e41d1cdb08d2c6c7833cb26eMarko Mäkelä2019-03-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do want to ignore InnoDB's internal #sql-ib*.ibd at shutdown, because those tables will be dropped on the next startup. Failure to filter out these table names occasionally causes some unwanted output for tests that restart InnoDB soon after dropping or truncating tables, for example innodb.recovery_shutdown.
* | | | SSL test fixesSergei Golubchik2019-03-011-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix CRL tests to work * regenerate certificates to be at least 2048 bit (fixes buster and rhel8 in buildbot) * update generate-ssl-cert.sh to generate crl files * make all SSL tests to use certificates generated in generate-ssl-cert.sh, remove unused certificates Backport from 10.4 9c60535f8676
* | | | revert the check changes made in 8f5ea83ff109827748d2f9f5025ed6c6bb91fd80Oleksandr Byelkin2019-02-081-1/+0
| | | | | | | | | | | | | | | | and in fef9013d43b734ca062d7f9a2e1e320aa512d9d8
* | | | MDEV-18426: Most of the mtr tests in the galera_3nodes suite failJulius Goryavsky2019-02-063-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the mtr tests in the galera_3nodes suite fail for a variety of reasons with a variety of errors. Some tests simply need to add the missing "connection" lines to the result files, but many of them fail due to substantial errors that require reworking test files. This patch adds the missing "connection" lines to the result files and fixes several substantial flaws in the galera_3nodes suite tests and in the mtr framework service files, adapting the tests from galera_3nodes for the current version of MariaDB. https://jira.mariadb.org/browse/MDEV-18426
* | | | cleanup: don't ---replace_regex /#sql-.*/#sql-temporary/Sergei Golubchik2019-02-051-1/+0
| | | | | | | | | | | | | | | | no longer needed
* | | | Merge 10.1 into 10.2Marko Mäkelä2018-12-171-2/+2
|\ \ \ \ | |/ / /
| * | | MDEV-18021: Galera test galera_sst_mariabackup_table_options fails if ↵Jan Lindström2018-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AES_CTR is not available Problem is that if you use bundled yassl AES_CTR is not supported. There is a way to detect that but as we really want to keep this test enabled did not add skip for missing support. Changed method to AES_CBC as there is no need to use AES_CTR.
* | | | Merge remote-tracking branch 'origin/10.1' into 10.2Jan Lindström2018-11-212-0/+18
|\ \ \ \ | |/ / /
| * | | MDEV-17771: Add Galera ist and sst tests using mariabackupJan Lindström2018-11-212-0/+18
| | | | | | | | | | | | | | | | Add test case for encrypted and page compressed tables.
* | | | MDEV-17507 Make MTR tests work for builds without Aria for temporary tablesElena Stepanova2018-11-201-0/+4
| | | | | | | | | | | | | | | | Skip tests which expectedly fail when Aria is not used for temporary tables
* | | | Merge 10.1 into 10.2Marko Mäkelä2018-11-062-0/+18
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2018-10-302-0/+18
| |\ \ \ | | |/ /
| | * | MDEV-12547: InnoDB FULLTEXT index has too strict ↵Thirunarayanan Balathandayuthapani2018-10-162-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | innodb_ft_result_cache_limit max limit - Backported the MYSQL_SYSVAR_SIZE_T to 10.0 - The parameter innodb_ft_result_cache_limit was only 32 bits wide also on 64-bit systems. Make it size_t, so that it will be 64 bits on 64-bit systems. - Added a test case that show how innodb_ft_result_cache_limit variables behaves in 32bit and 64 bit system.
* | | | Follow-up to MDEV-13407 innodb.drop_table_background failed in buildbot with ↵Marko Mäkelä2018-09-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Tablespace for table exists" This is a backport of commit 88aff5f471d3d9ae8ecc2f909bcf5bd0ddd6aa7c. The InnoDB background DROP TABLE queue is something that we should really remove, but are unable to until we remove dict_operation_lock so that DDL and DML operations can be combined in a single transaction. Because the queue is not persistent, it is not crash-safe. We should in some way ensure that the deferred-dropped tables will be dropped after server restart. The existence of two separate transactions complicates the error handling of CREATE TABLE...SELECT. We should really not break locks in DROP TABLE. Our solution to these problems is to rename the table to a temporary name, and to drop such-named tables on InnoDB startup. Also, the queue will use table IDs instead of names from now on. check-testcase.test: Ignore #sql-ib*.ibd files, because tables may enter the background DROP TABLE queue shortly before the test finishes. innodb.drop_table_background: Test CREATE...SELECT and the creation of tables whose file name starts with #sql-ib. innodb.alter_crash: Adjust the recovery, now that the #sql-ib tables will be dropped on InnoDB startup. row_mysql_drop_garbage_tables(): New function, to drop all #sql-ib tables on InnoDB startup. row_drop_table_for_mysql_in_background(): Remove an unnecessary and misplaced call to log_buffer_flush_to_disk(). (The call should have been after the transaction commit. We do not care about flushing the redo log here, because the table would be dropped again at server startup.) Remove the entry from the list after the table no longer exists. If server shutdown has been initiated, empty the list without actually dropping any tables. They will be dropped again on startup. row_drop_table_for_mysql(): Do not call lock_remove_all_on_table(). Instead, if locks exist, defer the DROP TABLE until they do not exist. If the table name does not start with #sql-ib, rename it to that prefix before adding it to the background DROP TABLE queue.
* | | | MyRocks: post-merge fixes part #5: make rocksdb.rocksdb_checksums test passSergei Petrunia2018-08-291-2/+14
| | | |
* | | | Merge 10.1 into 10.2Marko Mäkelä2018-08-021-0/+15
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into bb-10.1-merge-sanjaOleksandr Byelkin2018-07-251-0/+15
| |\ \ \ | | |/ /