summaryrefslogtreecommitdiff
path: root/mysql-test
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-31022: SIGSEGV in maria_create from create_internal_tmp_tablebb-11.0-MDEV-31022-variant4Sergei Petrunia2023-05-092-0/+52
| | | | | | | | | | | | | | | | | | | | | The code in create_internal_tmp_table() didn't take into account that now temporary (derived) tables may have multiple indexes: - one index due to duplicate removal = In this example created by conversion of big-IN(...) into subquery = this index might be converted into a "unique constraint" if the key length is too large. - one index added by derived_with_keys optimization. Make create_internal_tmp_table() handle multiple indexes. Before this patch, use of a unique constraint was indicated in TABLE_SHARE::uniques. This was ok as unique constraint was the only index in the table. Now it's no longer the case so TABLE_SHARE::uniques is removed and replaced with an in-memory-only flag HA_UNIQUE_HASH. This patch is based on Monty's patch. Co-Author: Monty <monty@mariadb.org>
* Removed temporary test file that should not have been pushedbb-11.0-montyMonty2023-05-032-110/+0
|
* Moved events tests from main to suite/eventsMonty2023-05-0334-2/+14
| | | | This makes it easier to run test on just events.
* Moved merge tests from main to suite/mergeMonty2023-05-0316-37/+36
| | | | | | | | This makes it easier to run test on just the MRG_MYISAM engine. Other things: - Renamed merge-big.test to flush_corruption.test as it does not have anything to do with merge tables.
* MDEV-30786 SIGFPE in cost_group_min_max on EXPMonty2023-05-032-0/+24
| | | | | | | | | The problem was that for merge tables without any underlaying tables the block size was 0, which the code could not handle. Fixed by ensuring that MERGE tables never have a block size of 0. Fixed also a wrong assumption of number of seeks needed to scan merge tables.
* MDEV-30812: Improve output cardinality estimates for hash joinMonty2023-05-0319-114/+257
| | | | | | | | | | | | | | Introduces @@optimizer_switch flag: hash_join_cardinality When this option is on, use EITS statistics to produce tighter bounds for hash join output cardinality. This patch is an extension / replacement to a similar patch in 10.6 New features: - optimizer_switch hash_join_cardinality is on by default - records_out is set to fanout when HASH is used - Fixed bug in is_eits_usable: The function did not work with views
* MDEV-30895 Assertion btr_cur->rtr_info->thr... in rtr_ins_enlarge_mbr()Marko Mäkelä2023-04-282-0/+88
| | | | | | | | | rtr_ins_enlarge_mbr(): Relax the assertion that was added in commit f27e9c894779a4c7ebe6446ba9aa408f1771c114 to cover also table-rebuilding DDL. We only need btr_cur->rtr_info->thr for acquiring R-tree locks, and the thread that is executing a DDL operation has exclusive access to the being-built index or the copy of the being-rebuilt table.
* Merge 10.11 into 11.0Marko Mäkelä2023-04-2716-20/+494
|\
| * Merge 10.10 into 10.11Marko Mäkelä2023-04-2716-20/+488
| |\
| | * Merge 10.9 into 10.10Marko Mäkelä2023-04-2716-28/+496
| | |\
| | | * Merge 10.8 into 10.9Marko Mäkelä2023-04-2716-28/+496
| | | |\
| | | | * Merge 10.6 into 10.8Marko Mäkelä2023-04-2716-28/+496
| | | | |\
| | | | | * Merge 10.5 into 10.6Marko Mäkelä2023-04-2716-28/+488
| | | | | |\
| | | | | | * Merge 10.4 into 10.5Marko Mäkelä2023-04-2717-30/+490
| | | | | | |\
| | | | | | | * MDEV-30218 update test resultSergei Golubchik2023-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | followup for d1a46c68cd4
| | | | | | | * MDEV-11356 Option skip-core-file does not workSergei Golubchik2023-04-263-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove ancient hard-coded treatment of --core-file. This enables normal my_getopt behavior for the already existing sysvar
| | | | | | | * MDEV-31121: ANALYZE statement produces 0 for all timings in embedded serverSergei Petrunia2023-04-252-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Timers require my_timer_init() call. It was made only in mysqld_main(). Call it also from init_embedded_server().
| | | | | | | * MDEV-30430: Enabling system versioning on tables without primary key breaks ↵Brandon Nesterenko2023-04-242-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | replication When replicating MDL events for a table that uses system versioning without primary keys, ensure that for data sets with duplicate records, the updates to these records with duplicates are enacted on the correct row. That is, there was a bug (reported in MDEV-30430) such that the function to find the row to update would stop after finding the first matching record. However, in the absence of primary keys, the version of the record is needed to compare the row to ensure we are updating the correct one. The fix, therefore, updates the record comparison functionality to use system version columns when there are no primary keys on the table. Reviewed By: ============ Andrei Elkin <andrei.elkin@mariadb.com>
| | | | | | | * MDEV-28798: Cosmetic Changes OnlyBrandon Nesterenko2023-04-241-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed trailing whitespaces
| | | | | | | * MDEV-28798: Previously Binlog Encrypted Master Segfaults on Binlog Dump with ↵Brandon Nesterenko2023-04-246-5/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using_Gtid=Slave_Pos Problem: ======== A master can segfault if it can't set up decryption for its binary log during a binlog dump with Using_Gtid=Slave_Pos. If slave connects using GTID mode, the master will call into log.cc::get_gtid_list_event(), which iterate through binlog events looking for a Gtid_list_log_event. On an encrypted binlog that the master cannot decrypt, the first event will be a START_ENCRYPTION_EVENT which will call into the following decryption branch if (fdle->start_decryption((Start_encryption_log_event*) ev)) errormsg= ‘Could not set up decryption for binlog.’; The event iteration however, does not stop in spite of this error. The master will try to read the next event, but segfault while trying to decrypt it because decryption failed to initialize. Solution: ======== Break the event iteration if decryption cannot be set up. Reviewed By: ============ Andrei Elkin <andrei.elkin@mariadb.com>
| | | | | | | * MDEV-31102 Crash when pushing condition into view defined as unionIgor Babaev2023-04-242-0/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug could manifest itself at the first execution of prepared statement created for queries using a materialized view defined as union. A crash could happen for sure if the query contained a condition pushable into the view and this condition was over the column defined via a complex string expression requiring implicit conversion from one charset to another for some of its sub-expressions. The bug could cause crashes when executing PS for some other queries whose optimization needed building clones for such expressions. This bug was introduced in the patch for MDEV-29988 where the class Item_direct_ref_to_item was added. The implementations of the virtual methods get_copy() and build_clone() were invalid for the class and this could cause crashes after the method build_clone() was called for expressions containing objects of the Item_direct_ref_to_item type. Approved by Sergei Golubchik <serg@mariadb.com>
* | | | | | | | Merge 10.11 into 11.0Marko Mäkelä2023-04-2667-149/+5191
|\ \ \ \ \ \ \ \ | |/ / / / / / /
| * | | | | | | Merge 10.10 into 10.11Marko Mäkelä2023-04-2658-149/+1933
| |\ \ \ \ \ \ \ | | |/ / / / / /
| | * | | | | | Merge 10.9 into 10.10Marko Mäkelä2023-04-2658-149/+1933
| | |\ \ \ \ \ \ | | | |/ / / / /
| | | * | | | | Merge 10.8 into 10.9Marko Mäkelä2023-04-2650-149/+1807
| | | |\ \ \ \ \ | | | | |/ / / /
| | | | * | | | Merge 10.6 into 10.8Marko Mäkelä2023-04-2635-99/+1480
| | | | |\ \ \ \ | | | | | |/ / /
| | | | | * | | MDEV-30804 addendum for 10.6+ branchesJulius Goryavsky2023-04-252-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This addition to MDEV-30804 is relevant for 10.6+, it excludes the mixed transaction section using both innodb and aria storage engines from the galera_var_replicate_aria_off test, since such transactions cannot be executed unless aria supports two-phase transaction commit. No additional tests are required as this commit fixes the mtr test itself.
| | | | | * | | Merge 10.5 into 10.6Marko Mäkelä2023-04-2533-92/+1474
| | | | | |\ \ \ | | | | | | |/ /
| | | | | | * | MDEV-31038: Parallel Replication Breaks if XA PREPARE Fails Updating Slave ↵Brandon Nesterenko2023-04-242-0/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GTID State If a replica failed to update the GTID slave state when committing an XA PREPARE, the replica would retry the transaction and get an out-of-order GTID error. This is because the commit phase of an XA PREPARE is bifurcated. That is, first, the prepare is handled by the relevant storage engines. Then second, the GTID slave state is updated as a separate autocommit transaction. If the second phase fails, and the transaction is retried, then the same transaction is attempted to be committed again, resulting in a GTID out-of-order error. This patch fixes this error by immediately stopping the slave and reporting the appropriate error. That is, there was logic to bypass the error when updating the GTID slave state table if the underlying error is allowed for retry on a parallel slave. This patch adds a parameter to disallow the error bypass, thereby forcing the error state to still happen. Reviewed By ============ Andrei Elkin <andrei.elkin@mariadb.com>
| | | | | | * | Merge branch '10.4' into 10.5Oleksandr Byelkin2023-04-2431-92/+1314
| | | | | | |\ \ | | | | | | | |/
| | | | | | | * MDEV-31085 Crash when processing multi-update using view with optimizer_trace onIgor Babaev2023-04-222-0/+375
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug caused server crash when processing a multi-update statement that used views if optimizer tracing was enabled. The bug was introduced in the patch for MDEV-30539 that could incorrectly detect the most top level selects of queries if views were used in them. Approved by Oleksandr Byelkin <sanja@mariadb.com>
| | | | | | | * MDEV-30968 mariadb-backup does not copy Aria logs if aria_log_dir_path is usedAlexander Barkov2023-04-214-0/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `mariadb-backup --backup` was fixed to fetch the value of the @@aria_log_dir_path server variable and copy aria_log* files from @@aria_log_dir_path directory to the backup directory. Absolute and relative (to --datadir) paths are supported. Before this change aria_log* files were copied to the backup only if they were in the default location in @@datadir. - `mariadb-backup --copy-back` now understands a new my.cnf and command line parameter --aria-log-dir-path. `mariadb-backup --copy-back` in the main loop in copy_back() (when copying back from the backup directory to --datadir) was fixed to ignore all aria_log* files. A new function copy_back_aria_logs() was added. It consists of a separate loop copying back aria_log* files from the backup directory to the directory specified in --aria-log-dir-path. Absolute and relative (to --datadir) paths are supported. If --aria-log-dir-path is not specified, aria_log* files are copied to --datadir by default. - The function is_absolute_path() was fixed to understand MTR style paths on Windows with forward slashes, e.g. --aria-log-dir-path=D:/Buildbot/amd64-windows/build/mysql-test/var/...
| | | | | | | * Merge branch '10.3' into 10.4Oleksandr Byelkin2023-04-217-92/+191
| | | | | | | |\
| | | | | | | | * MDEV-30818 invalid ssl prevents bootstrapSergei Golubchik2023-03-092-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in bootstrap the server reads stdin and does not listen to network. it won't use ssl anyway
| | | | | | | | * main.bootstrap test cleanupSergei Golubchik2023-03-092-55/+89
| | | | | | | | |
| | | | | | | | * Merge branch '10.3' into bb-10.3-releaseOleksandr Byelkin2023-02-065-36/+95
| | | | | | | | |\
| | | | | | | | | * MDEV-30475 Windows, mtr - Remove outdated instructions on how to install ↵Vladislav Vaintroub2023-01-261-30/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | post-mortem debugger Also, use standard C:\symbols location for OS debugging symbols cache, rather than own invention C:\cdb_symbols.
| | | | | | | | | * MDEV-30151 parse error 1=2 not between/inbb-10.3-bar-MDEV-30151Alexander Barkov2023-01-262-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the problem by adding a new rule booleat_test. This makes the grammar clearer and less conflicting. Additionally, fixing %prec in this grammar branch: - | boolean_test IS NULL_SYM %prec PREC_BELOW_NOT + | boolean_test IS NULL_SYM %prec IS to have consistently "%prec IS" in all grammar branches starting with "boolean_test IS ...". It's not clear why these three rules needed different %prec before the fix: - boolean_test IS TRUE - boolean_test IS UNKNOWN - boolean_test IS NULL
| | | | | | | | | * Revert "MDEV-30151 parse error 1=2 not between/in"Alexander Barkov2023-01-262-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit eba099184e1f6704894694ea41f97f216eae5f21. A different patch with less shift-reduce conflicts is coming.
| | | | | | | | | * MDEV-28616 Crash when using derived table over union with order by clausebb-10.3-igorIgor Babaev2023-01-252-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug manifested itself when the server processed a query containing a derived table over union whose ORDER BY clause included a subquery with unresolvable column reference. For such a query the server crashed when trying to resolve column references in the ORDER BY clause used by union. For any union with ORDER BY clause an extra SELECT_LEX structure is created and it is attached to SELECT_LEX_UNIT structure of the union via the field fake_select_lex. The outer context for fake_select_lex must be the same as for other selects of the union. If the union is used in the FROM list of a derived table then the outer context for fake_select_lex must be set to NULL in line with other selects of the union. It was not done and it caused a crash when searching for possible resolution of an unresolvable column reference occurred in a subquery used in the ORDER BY clause. Approved by Oleksandr Byelkin <sanja@mariadb.com>
| | | | | | | * | | MDEV-31025 Redundant table alter fails when fixed columnThirunarayanan Balathandayuthapani2023-04-192-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stored externally row_merge_buf_add(): Has strict assert that fixed length mismatch shouldn't happen while rebuilding the redundant row format table btr_index_rec_validate(): Fixed size column can be stored externally. So sum of inline stored length and external stored length of the column should be equal to total column length
| | | | | | | * | | MDEV-30955 Explicit locks released too early in rollback pathDaniele Sciascia2023-04-182-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assertion `thd->mdl_context.is_lock_owner()` fires when a client is disconnected, while transaction and and a table is opened through `HANDLER` interface. Reason for the assertion is that when a connection closes, its ongoing transaction is eventually rolled back in `Wsrep_client_state::bf_rollback()`. This method also releases explicit which are expected to survive beyond the transaction lifetime. This patch also removes calls to `mysql_ull_cleanup()`. User level locks are not supported in combination with Galera, making these calls unnecessary.
| | | | | | | * | | MDEV-30862 Assertion `mode_ == m_high_priority' failedDaniele Sciascia2023-04-182-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CREATE TABLE AS SELECT is not supported in combination with streaming replication.
| | | | | | | * | | MDEV-20773 Error from UPDATE when estimating selectivity of a rangeIgor Babaev2023-04-122-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug could affect multi-update statements as well as single-table update statements processed as multi-updates when the where condition contained a range condition over a non-indexed varchar column. The optimizer calculates selectivity of such range conditions using histograms. For each range the buckets containing endpoints of the the range are determined with a procedure that stores the values of the endpoints in the space of the record buffer where values of the columns are usually stored. For a range over a varchar column the value of a endpoint may exceed the size of the buffer and in such case the value is stored with truncation. This truncations cannot affect the result of the calculation of the range selectivity as the calculation employes only the beginning of the value string. However it can trigger generation of an unexpected error on this truncation if an update statement is processed. This patch prohibits truncation messages when selectivity of a range condition is calculated for a non-indexed column. Approved by Oleksandr Byelkin <sanja@mariadb.com>
| | | | | | | * | | MDEV-26175 : Assertion `! thd->in_sub_stmt' failed in bool ↵Jan Lindström2023-04-113-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trans_rollback_stmt(THD*) If we are inside stored function or trigger we should not commit or rollback current statement transaction. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
| | | | | | | * | | MDEV-28190 sql_mode makes MDEV-371 virtual column expressions nondeterministicAlexander Barkov2023-04-065-0/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This problem was fixed earlier by MDEV-27653. Adding MTR tests only.
| | | | | | | * | | MDEV-30072 Wrong ORDER BY for a partitioned prefix key + NOPADAlexander Barkov2023-04-062-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This problem was earlier fixed by MDEV-30034. Adding MTR tests only.
| | | | * | | | | | Merge 10.6 into 10.8Marko Mäkelä2023-04-2415-50/+327
| | | | |\ \ \ \ \ \ | | | | | |/ / / / /
| | | | | * | | | | MDEV-30996 insert.. select in presence of full text index freezes all other ↵Thirunarayanan Balathandayuthapani2023-04-246-12/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commits at commit time - This patch does the following: git revert --no-commit 673243c8938957ef1c01ffd3bfd35b5ae31ef484 git revert --no-commit 6c669b9586f72d6d760cc3956c1a0cb09ace2367 git revert --no-commit bacaf2d4f4c6d77a0b6c1ae4daddd19f81ef6fa3 git checkout HEAD mysql-test git revert --no-commit 1fd7d3a9adac50de37e40e92188077e3515de505 Above command reverts MDEV-29277, MDEV-25581, MDEV-29342. When binlog is enabled, trasaction takes a lot of time to do sync operation on innodb fts table. This leads to block of other transaction commit. To avoid this failure, remove the fulltext sync operation during transaction commit. So reverted MDEV-25581 related patches. We filed MDEV-31105 to avoid the memory consumption problem during fulltext sync operation.
| | | | | * | | | | Cleanup: MONITOR_EXISTING trx_undo_slots_used, trx_undo_slots_cachedMarko Mäkelä2023-04-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let us remove explicit updates of MONITOR_NUM_UNDO_SLOT_USED and MONITOR_NUM_UNDO_SLOT_CACHED, and let us compute the rough values from trx_sys.rseg_array[] on demand.