summaryrefslogtreecommitdiff
path: root/mysql-test/include
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.5 into 10.6Marko Mäkelä2023-04-251-0/+31
|\
| * Merge branch '10.4' into 10.5Oleksandr Byelkin2023-04-241-0/+31
| |\
| | * MDEV-28190 sql_mode makes MDEV-371 virtual column expressions nondeterministicAlexander Barkov2023-04-061-0/+31
| | | | | | | | | | | | | | | This problem was fixed earlier by MDEV-27653. Adding MTR tests only.
* | | Merge 10.5 into 10.6Marko Mäkelä2023-04-116-8/+109
|\ \ \ | |/ /
| * | Merge remote-tracking branch 'origin/10.4' into 10.5Alexander Barkov2023-04-051-0/+85
| |\ \ | | |/
| | * MDEV-30034 UNIQUE USING HASH accepts duplicate entries for tricky collationsAlexander Barkov2023-04-041-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Adding a new argument "flag" to MY_COLLATION_HANDLER::strnncollsp_nchars() and a flag MY_STRNNCOLLSP_NCHARS_EMULATE_TRIMMED_TRAILING_SPACES. The flag defines if strnncollsp_nchars() should emulate trailing spaces which were possibly trimmed earlier (e.g. in InnoDB CHAR compression). This is important for NOPAD collations. For example, with this input: - str1= 'a ' (Latin letter a followed by one space) - str2= 'a ' (Latin letter a followed by two spaces) - nchars= 3 if the flag is given, strnncollsp_nchars() will virtually restore one trailing space to str1 up to nchars (3) characters and compare two strings as equal: - str1= 'a ' (one extra trailing space emulated) - str2= 'a ' (as is) If the flag is not given, strnncollsp_nchars() does not add trailing virtual spaces, so in case of a NOPAD collation, str1 will be compared as less than str2 because it is shorter. - Field_string::cmp_prefix() now passes the new flag. Field_varstring::cmp_prefix() and Field_blob::cmp_prefix() do not pass the new flag. - The branch in cmp_whole_field() in storage/innobase/rem/rem0cmp.cc (which handles the CHAR data type) now also passed the new flag. - Fixing UCA collations to respect the new flag. Other collations are possibly also affected, however I had no success in making an SQL script demonstrating the problem. Other collations will be extended to respect this flags in a separate patch later. - Changing the meaning of the last parameter of Field::cmp_prefix() from "number of bytes" (internal length) to "number of characters" (user visible length). The code calling cmp_prefix() from handler.cc was wrong. After this change, the call in handler.cc became correct. The code calling cmp_prefix() from key_rec_cmp() in key.cc was adjusted according to this change. - Old strnncollsp_nchar() related tests in unittest/strings/strings-t.c now pass the new flag. A few new tests also were added, without the flag.
| * | Merge remote-tracking branch '10.4' into 10.5Oleksandr Byelkin2023-03-315-8/+24
| |\ \ | | |/
| | * MDEV-30539 EXPLAIN EXTENDED: no message with queries for DML statementsIgor Babaev2023-03-251-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | EXPLAIN EXTENDED for an UPDATE/DELETE/INSERT/REPLACE statement did not produce the warning containing the text representation of the query obtained after the optimization phase. Such warning was produced for SELECT statements, but not for DML statements. The patch fixes this defect of EXPLAIN EXTENDED for DML statements.
| | * MDEV-27912 Fixing inconsistency w.r.t. expect files in tests.Yuchen Pei2023-03-224-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtr uses group suffix, but some existing inc and test files use server_id for expect files. This patch aims to fix that. For spider: With this change we will not have to maintain a separate version of restart_mysqld.inc for spider, that duplicates code, just because spider tests use different names for expect files, and shutdown_mysqld requires magical names for them. With this change spider tests will also be able to use other features provided by restart_mysqld.inc without code duplication, like the parameter $restart_parameters (see e.g. the testcase mdev_29904.test in commit ef1161e5d4f). Tests run after this change: default, spider, rocksdb, galera, using the following command mtr --parallel=auto --force --max-test-fail=0 --skip-core-file mtr --suite spider,spider/*,spider/*/* \ --skip-test="spider/oracle.*|.*/t\..*" --parallel=auto --big-test \ --force --max-test-fail=0 --skip-core-file mtr --suite galera --parallel=auto mtr --suite rocksdb --parallel=auto
* | | ANALYZE FORMAT=JSON: Backport block-nl-join.r_unpack_time_ms from 11.0 +fix ↵Sergei Petrunia2023-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | MDEV-30830. Also fix it to work with hashed join (MDEV-30830). Reviewed by: Monty <monty@mariadb.org>
* | | Merge 10.5 into 10.6Marko Mäkelä2023-02-281-2/+2
|\ \ \ | |/ /
| * | Added detection of memory overwrite with multi_mallocbb-10.5-montyMonty2023-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch also fixes some bugs detected by valgrind after this patch: - Not enough copy_func elements was allocated by Create_tmp_table() which causes an memory overwrite in Create_tmp_table::add_fields() I added an ASSERT() to be able to detect this also without valgrind. The bug was that TMP_TABLE_PARAM::copy_fields was not correctly set when calling create_tmp_table(). - Aria::empty_bits is not allocated if there is no varchar/char/blob fields in the table. Fixed code to take this into account. This cannot cause any issues as this is just a memory access into other Aria memory and the content of the memory would not be used. - Aria::last_key_buff was not allocated big enough. This may have caused issues with rtrees and ma_extra(HA_EXTRA_REMEMBER_POS) as they would use the same memory area. - Aria and MyISAM didn't take extended key parts into account, which caused problems when copying rec_per_key from engine to sql level. - Mark asan builds with 'asan' in version strihng to detect these in not_valgrind_build.inc. This is needed to not have main.sp-no-valgrind fail with asan.
* | | Merge 10.5 into 10.6Marko Mäkelä2023-02-101-0/+18
|\ \ \ | |/ /
| * | Merge 10.4 into 10.5Marko Mäkelä2023-02-101-0/+18
| |\ \ | | |/
| | * MDEV-30556 UPPER() returns an empty string for U+0251 in Unicode-5.2.0+ ↵Alexander Barkov2023-02-031-0/+18
| | | | | | | | | | | | collations for utf8
* | | Merge branch '10.5' into 10.6Oleksandr Byelkin2023-01-312-1/+16
|\ \ \ | |/ /
| * | MDEV-30423 Deadlock on Replica during BACKUP STAGE BLOCK_COMMIT on XA ↵Andrei2023-01-232-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | transactions The user XA commit execution branch was caught not have been covered with MDEV-21953 fixes. The XA involved deadlock is resolved now to apply the former fixes pattern. Along the fixes the following changes have been implemented. - MDL lock attribute correction - dissociation of the externally completed XA from the current thread's xid_state in the error branches - cleanup_context() preseves the prepared XA - wait_for_prior_commit() is relocated to satisfy both the binlog ON (log-slave-updates and skip-log-bin) and OFF slave execution branches.
* | | Merge 10.5 into 10.6Marko Mäkelä2023-01-034-6/+73
|\ \ \ | |/ /
| * | Merge 10.4 into 10.5Marko Mäkelä2023-01-034-6/+73
| |\ \ | | |/
| | * Merge 10.3 into 10.4Marko Mäkelä2023-01-034-6/+73
| | |\
| | | * MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORYAleksey Midenkov2022-12-273-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. In case of system-versioned table add row_end into FTS_DOC_ID index in fts_create_common_tables() and innobase_create_key_defs(). fts_n_uniq() returns 1 or 2 depending on whether the table is system-versioned. After this patch recreate of FTS_DOC_ID index is required for existing system-versioned tables. If you see this message in error log or server warnings: "InnoDB: Table db/t1 contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MariaDB" use this command to fix the table: ALTER TABLE db.t1 FORCE; 2. Fix duplicate history for secondary unique index like it was done in MDEV-23644 for clustered index (932ec586aad). In case of existing history row which conflicts with currently inseted row we check in row_ins_scan_sec_index_for_duplicate() whether that row was inserted as part of current transaction. In that case we indicate with DB_FOREIGN_DUPLICATE_KEY that new history row is not needed and should be silently skipped. 3. Some parts of MDEV-21138 (7410ff436e9) reverted. Skipping of FTS_DOC_ID index for history rows made problems with purge system. Now this is fixed differently by p.2. 4. wait_all_purged.inc checks that we didn't affect non-history rows so they are deleted and purged correctly. Additional FTS fixes fts_init_get_doc_id(): exclude history rows from max_doc_id calculation. fts_init_get_doc_id() callback is used only for crash recovery. fts_add_doc_by_id(): set max value for row_end field. fts_read_stopword(): stopwords table can be system-versioned too. We now read stopwords only for current data. row_insert_for_mysql(): exclude history rows from doc_id validation. row_merge_read_clustered_index(): exclude history_rows from doc_id processing. fts_load_user_stopword(): for versioned table retrieve row_end field and skip history rows. For non-versioned table we retrieve 'value' field twice (just for uniformity). FTS tests for System Versioning now include maybe_versioning.inc which adds 3 combinations: 'vers' for debug build sets sysvers_force and sysvers_hide. sysvers_force makes every created table system-versioned, sysvers_hide hides WITH SYSTEM VERSIONING for SHOW CREATE. Note: basic.test, stopword.test and versioning.test do not require debug for 'vers' combination. This is controlled by $modify_create_table in maybe_versioning.inc and these tests run WITH SYSTEM VERSIONING explicitly which allows to test 'vers' combination on non-debug builds. 'vers_trx' like 'vers' sets sysvers_force_trx and sysvers_hide. That tests FTS with trx_id-based System Versioning. 'orig' works like before: no System Versioning is added, no debug is required. Upgrade/downgrade test for System Versioning is done by innodb_fts.versioning. It has 2 combinations: 'prepare' makes binaries in std_data (requires old server and OLD_BINDIR). It tests upgrade/downgrade against old server as well. 'upgrade' tests upgrade against binaries in std_data. Cleanups: Removed innodb-fts-stopword.test as it duplicates stopword.test
| | | * MDEV-25004 restart_bindir option to restart server from different locationAleksey Midenkov2022-12-271-3/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds new parameter $restart_bindir for restart_mysqld.inc. Example: let $restart_bindir= /home/midenok/src/mariadb/10.3b/build; --source include/restart_mysqld.inc It is good to return back original server before check_mysqld will be run at the test end: let $restart_bindir=; --source include/restart_mysqld.inc
* | | | Merge 10.5 into 10.6Marko Mäkelä2022-12-132-2/+6
|\ \ \ \ | |/ / /
| * | | Merge 10.4 into 10.5Marko Mäkelä2022-12-132-2/+6
| |\ \ \ | | |/ /
| | * | Merge 10.3 into 10.4Marko Mäkelä2022-12-132-2/+6
| | |\ \ | | | |/
| | | * Enable valgrind for replication testMonty2022-11-292-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The following tests are disabled when running --valgrding without --big: - rpl.rpl_ssl - rpl.rpl_semi_sync_event - All encryption test (which includes have_file_key_management.inc)
| | | * Merge branch 'bb-10.3-vp-MDEV-27691' into 10.3Oleksandr Byelkin2022-10-1438-29/+159
| | | |\
* | | | \ Merge 10.5 into 10.6Marko Mäkelä2022-11-081-12/+6
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.4 into 10.5Marko Mäkelä2022-11-081-12/+6
| |\ \ \ \ | | |/ / /
| | * | | Work around MDEV-24813 in main.rowid_filter_innodb_debugMarko Mäkelä2022-11-081-12/+6
| | | | | | | | | | | | | | | | | | | | Let us avoid excessive allocation of explicit record locks.
* | | | | Merge branch '10.5' into 10.6Oleksandr Byelkin2022-11-021-6/+3
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2022-10-261-6/+3
| |\ \ \ \ | | |/ / /
| | * | | MDEV-28846 Poor performance when rowid filter contains no elementsIgor Babaev2022-10-251-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a range rowid filter was used with an index ref access the cost of accessing the index entries for the records rejected by the filter was not taken into account. For a ref access by an index with big average number of records per key this led to poor execution plans if selectivity of the used filter was high. The patch resolves this problem. It also introduces a minor optimization that skips look-ups into a filter that turns out to be empty. With this patch the output of ANALYZE stmt reports the number of look-ups into used rowid filters. The patch also back-ports from 10.5 the code that properly sets the field TABLE::file::table for opened temporary tables. The test cases that were supposed to use rowid filters have been adjusted in order to use similar execution plans after this fix. Approved by Oleksandr Byelkin <sanja@mariadb.com>
| | * | | Merge branch 'bb-10.4-vp-MDEV-27691' into 10.4Oleksandr Byelkin2022-10-1438-29/+159
| | |\ \ \
| * | \ \ \ Merge branch 'bb-10.5-vp-MDEV-27691' into 10.5Oleksandr Byelkin2022-10-1438-29/+159
| |\ \ \ \ \
* | \ \ \ \ \ Merge branch 'bb-10.6-vp-MDEV-27691' into 10.6Oleksandr Byelkin2022-10-1538-29/+159
|\ \ \ \ \ \ \
| * \ \ \ \ \ \ Merge branch 'bb-10.5-all-builders' into bb-10.6-all-buildersLena Startseva2022-09-2738-29/+159
| |\ \ \ \ \ \ \ | | | |/ / / / / | | |/| | | | |
| | * | | | | | Merge branch 'bb-10.4-all-builders' into bb-10.5-all-buildersLena Startseva2022-09-2638-29/+159
| | |\ \ \ \ \ \ | | | | |_|/ / / | | | |/| | | |
| | | * | | | | Merge branch 'bb-10.3-all-builders' into bb-10.4-all-buildersLena Startseva2022-09-2338-29/+159
| | | |\ \ \ \ \ | | | | | |_|_|/ | | | | |/| | |
| | | | * | | | MDEV-27691: make working view-protocolLena Startseva2022-09-2338-29/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests with checking metadata or that cannot be run with the view-protocol are excluded from --view-protocol. For tests that do not allow the use of an additional connection, the util connection is disabled with "--disable_service_connection". Also cases with bugs for --view-protocol are disabled.
* | | | | | | | Merge 10.5 into 10.6Marko Mäkelä2022-10-063-1/+4
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | / / / | | |_|_|/ / / | |/| | | | |
| * | | | | | Merge 10.4 into 10.5Marko Mäkelä2022-10-063-1/+4
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | / / | | | |_|/ / | | |/| | |
| | * | | | Merge 10.3 into 10.4Marko Mäkelä2022-10-052-1/+2
| | |\ \ \ \ | | | | |_|/ | | | |/| |
| | | * | | MDEV-29710: Valgrind tests massively fail due to silently killing server on ↵Marko Mäkelä2022-10-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-27682: bundled wsrep_notify.sh causes mariadbd to freeze during startJulius Goryavsky2022-10-041-1/+0
| | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds automation that will reduce the possibility of user errors when customizing wsrep_notify.sh (in particular caused by user-specified parameters). Now all leading and trailing spaces are removed from the user-specified parameters and automatic port and host address substitution has been added to scripts, as well as automatic password substitution to the client command line, only if it is specified in the wsrep_notify.sh and not as empty strings. Also added support for automatic substitution of the all SSL-related parameters and improved parsing for ipv6 addresses (to allow "[...]" notation for ipv6 addresses). Also added a test to check if the wsrep notify script will works with SSL.
| | * | | Disable valgrind for test in main that takes > 200 secondsMonty2022-10-041-0/+2
| | | |/ | | |/| | | | | | | | | One can run these with --valgrind --big
* | | | Merge 10.5 into 10.6Marko Mäkelä2022-08-251-1/+1
|\ \ \ \ | |/ / /
| * | | Merge 10.4 into 10.5Marko Mäkelä2022-08-251-1/+1
| |\ \ \ | | |/ /
| | * | Merge 10.3 into 10.4Marko Mäkelä2022-08-251-1/+1
| | |\ \ | | | |/
| | | * update a global_suppressions() listSergei Golubchik2022-08-251-1/+1
| | | | | | | | | | | | | | | | followup for "remove invalid options from warning messages"