summaryrefslogtreecommitdiff
path: root/mysql-test
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-15777 Use inferred IS NOT NULL predicates in the range optimizer10.3-mdev15777Igor Babaev2019-08-307-27/+780
| | | | | | | This patch introduces the optimization that allows range optimizer to consider index range scans that are built employing NOT NULL predicates inferred from WHERE conditions and ON expressions. The patch adds a new optimizer switch not_null_range_scan.
* Merge 10.2 into 10.3Marko Mäkelä2019-05-293-3/+3
|\
| * MDEV-19541: Suppress an error also on WindowsMarko Mäkelä2019-05-293-3/+3
| |
* | Merge 10.2 into 10.3Marko Mäkelä2019-05-2953-143/+1430
|\ \ | |/
| * MDEV-19541: Avoid infinite loop of reading a corrupted pageMarko Mäkelä2019-05-294-10/+20
| | | | | | | | | | | | row_search_mvcc(): Duplicate the logic of btr_pcur_move_to_next() so that an infinite loop can be avoided when advancing to the next page fails due to a corrupted page.
| * Speed up buildbot by requiring --big-test for some slow testsMarko Mäkelä2019-05-2916-0/+33
| |
| * MDEV-19541: Add a forgotten test caseMarko Mäkelä2019-05-295-2/+75
| | | | | | | | | | Also, --skip-innodb-buffer-pool-load-at-startup to avoid a crash in buf_load() due to loading pages that we are corrupting intentionally.
| * MDEV-19587 innodb_force_recovery=5 crash on DROP SCHEMAMarko Mäkelä2019-05-282-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | At higher levels of innodb_force_recovery, the InnoDB transaction subsystem will not be set up at all. At slightly lower levels, recovered transactions will not be rolled back, and DDL operations could hang due to locks being held at all. Let us consistently refuse all writes if the predicate high_level_read_only holds. We failed to refuse DROP TABLE and DROP DATABASE. (Refusing DROP TABLE is a partial backport from MDEV-19570 in the 10.5 branch.)
| * Merge 10.1 into 10.2Marko Mäkelä2019-05-2814-22/+1163
| |\
| | * Merge 5.5 into 10.1Marko Mäkelä2019-05-285-0/+665
| | |\
| | | * MDEV-18479 Assertion `join->best_read < double(1.79769313486231570815e+308L)'Igor Babaev2019-05-272-0/+661
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | or server crashes in JOIN::fix_all_splittings_in_plan after EXPLAIN This patch resolves the problem of overflowing when performing calculations to estimate the cost of an evaluated query execution plan. The overflowing in a non-debug build could cause different kind of problems uncluding crashes of the server.
| | | * MDEV-18896 Crash in convert_join_subqueries_to_semijoins : CorrectionIgor Babaev2019-05-193-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch complements the original patch for MDEV-18896 that prevents conversions to semi-joins in tableless selects used in INSERT statements in post-5.5 versions of the server. The test case was corrected as well to ensure that potential conversion to jtbm semi-joins is also checked (the problem was that one of the preceeding testcases in subselect_sj.test did not restore the state of the optimizer switch leaving the 'materialization' in the state 'off' and so blocking this check). Noticed an inconsistency in the state of select_lex::table_list used in INSERT statements and left a comment about this.
| | * | MDEV-17948 Assertion `thd_killed(thd) || !m_active_tranxs ..Andrei Elkin2019-05-242-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simulation of a big-sized event in rpl.rpl_semi_sync_skip_repl did not clean up after itself so screw the last binlog event offset which could jump backwards. The test is refined to rotate a binlog file with simulation and use the next one for logics of the test incl master-slave synchonization.
| | * | MDEV-19258 RIGHT JOIN hangs in MariaDBIgor Babaev2019-05-233-3/+402
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch corrects the patch for the bug 10006. The latter incorrectly calculates the attribute TABLE_LIST::dep_tables for inner tables of outer joins that are to be converted into inner joins. As a result after the patch some valid join orders were not evaluated and the optimizer could choose an execution plan that was far from being optimal.
| | * | Stale files cause intermittent failure when ordering is unfortunateRobert Bindar2019-05-221-0/+4
| | | | | | | | | | | | | | | | | | | | Running trigger_null-8605 drop_bad_db_type tests in this order was failing due to unremoved temporary files created in trigger_null-8605
| | * | MDEV-17752: Plan changes from hash_index_merge to index_merge with new ↵Varun Gupta2019-05-213-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | optimizer defaults The code in best_access_path function, when it does not find a key suitable for ref access and join_cache_level is set to a value so that hash_join is possible we build a hash key. Later in the function we compare the cost of ref access with table scan (or index scan or quick selects). No need to do this when we have got the hash key.
| | * | MDEV-16021: galera mtr test galera_evs_suspect_timeout crashedJan Lindström2019-05-172-25/+44
| | | | | | | | | | | | | | | | | | | | Crash was timeout crash. Add correct waits for connections, wsrep sync waits and auto increment offset save and restore.
| | * | MDEV-13549: Timeout in wait_condition.inc for PROCESSLISTJan Lindström2019-05-173-29/+18
| | | | | | | | | | | | | | | | | | | | Use wsrep sync wait instead of unnecessary waits and correct slave setting.
| | * | MDEV-17061: Test failure on galera.galera_gcs_fc_limitJan Lindström2019-05-173-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary sleeps and fix wait_condition to use wsrep_flow_control_paused i.e. we wait until flow control pauses a transaction on master.
| * | | MDEV-19541 InnoDB crashes when trying to recover a corrupted pageThirunarayanan Balathandayuthapani2019-05-284-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | - Don't apply redo log for the corrupted page when innodb_force_recovery > 0. - Allow the table to be dropped when index root page is corrupted when innodb_force_recovery > 0.
| * | | Fixed monitor.test to handle statistics >= 10Monty2019-05-212-27/+21
| | | |
| * | | MDEV-17456 Malicious SUPER user can possibly change audit log configuration ↵Alexey Botchkov2019-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | without leaving traces. thread_pool_server_audit.result fixed.
| * | | MDEV-17456 Malicious SUPER user can possibly change audit log configuration ↵Alexey Botchkov2019-05-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | without leaving traces. Fix for the SET GLOBAL server_audit_loggin=on; added.
| * | | MDEV-16021: galera mtr test galera_evs_suspect_timeout crashedJan Lindström2019-05-172-25/+48
| | | | | | | | | | | | | | | | | | | | Crash was timeout crash. Add correct waits for connections, wsrep sync waits and auto increment offset save and restore.
| * | | MDEV-13549: Timeout in wait_condition.inc for PROCESSLISTJan Lindström2019-05-173-29/+18
| | | | | | | | | | | | | | | | | | | | Use wsrep sync wait instead of unnecessary waits and correct slave setting.
| * | | MDEV-17061: Test failure on galera.galera_gcs_fc_limitJan Lindström2019-05-173-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary sleeps and fix wait_condition to use wsrep_flow_control_paused i.e. we wait until flow control pauses a transaction on master.
* | | | Fixed wrong reset of join_cache_level in join_outer*testMonty2019-05-273-26/+29
| | | |
* | | | MDEV-18136 Server crashes in Item_func_dyncol_create::prepare_argumentsAleksey Midenkov2019-05-202-0/+33
| | | | | | | | | | | | | | | | [Closes tempesta-tech/mariadb#572]
* | | | MDEV-18512 using DATETIME(6) as row_start/row_end crashes serverEugene Kosov2019-05-202-0/+16
| | | | | | | | | | | | | | | | Disallow DATETIME for SYSTEM VERSIONING tables.
* | | | MDEV-19486 Server crashes in row_upd or row_upd_del_mark_clust_rec on ↵Eugene Kosov2019-05-202-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | REPLACE into a versioned table row_insert_for_mysql(): InnoDB sets values for row_start and row_end. And this function used to return those values to server in ha_innobase::write_row(). This buggy behavior was removed. Also, a piece of code in this function was reformatted. upd_node_t::make_versioned_helper(): Assert that the preallocated size of the update vector is not exceeded.
* | | | MDEV-16214: Incorrect plan taken by the optimizer , uses INDEX instead of ↵Varun Gupta2019-05-202-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ref access with ORDER BY The issue in this case is that we take in account the estimates from quick keys instead of rec_per_key. The estimates for quick keys are better than rec_per_key only if we have ref(const), so we need to check that all keyparts in the ref key are of the type ref(const).
* | | | update a test result, followup fae6539ef72Sergei Golubchik2019-05-181-3/+3
| | | |
* | | | Merge branch '10.2' into 10.3Sergei Golubchik2019-05-175-8/+122
|\ \ \ \ | |/ / /
| * | | restore the correct test resultSergei Golubchik2019-05-172-4/+4
| | | |
| * | | MDEV-13992 Implement JSON_MERGE_PATCH.Alexey Botchkov2019-05-173-4/+118
| | | | | | | | | | | | | | | | | | | | JSON_MERGE_PATCH implemented. Added JSON_MERGE_PRESERVE as a synonim for the JSON_MERGE.
* | | | MDEV-15458 Segfault in heap_scan() upon UPDATE after ADD SYSTEM VERSIONINGSergei Golubchik2019-05-178-9/+74
| | | | | | | | | | | | | | | | | | | | | | | | * Versioning tests support Closes #1043
* | | | MDEV-15408 Confusing error message upon ER_VERS_FIELD_WRONG_TYPE while ↵Eugene Kosov2019-05-172-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | omitting UNSIGNED in BIGINT Improve diagnostics. Try to guess what type user tried to type.
* | | | Merge 10.2 into 10.3Marko Mäkelä2019-05-167-0/+166
|\ \ \ \ | |/ / /
| * | | MDEV-19485: Add a test caseMarko Mäkelä2019-05-162-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug was introduced in MariaDB 10.4.0 by commit 0e5a4ac2532c64a545796c787354dc41d61d0e62 but it is good to have a regression test for this scenario in all applicable MariaDB versions. Cover the purge of an undo log record that was written before the completion of ADD SPATIAL INDEX.
| * | | Merge 10.1 into 10.2Marko Mäkelä2019-05-165-0/+133
| |\ \ \ | | |/ /
| | * | Fixed the case when statistics were not getting read becauseVarun Gupta2019-05-163-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | we had the statistics tables in the FROM list of the select. The statistics for tables are not read in such cases, so we need to check this case separately.
| | * | MDEV-19407: Assertion `field->table->stats_is_read' failed in is_eits_usableVarun Gupta2019-05-163-0/+58
| | | | | | | | | | | | | | | | | | | | Statistics were not read for a table when we had a CREATE TABLE query. Enforce reading statistics for commands CREATE TABLE, SET and DO.
| | * | MDEV-788 mysqlimport should support the ability to disable foreign keysRobert Bindar2019-05-152-0/+47
| | | |
* | | | MDEV-16872 Add CAST(expr AS FLOAT)Alexander Barkov2019-05-166-4/+123
| | | |
* | | | A cleanup for MDEV-19468 Hybrid type expressions return wrong format for FLOATAlexander Barkov2019-05-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing problems revealed by buildbot: - Fixing compilation failure on Windows - Recoding correct engines/iuds/r/insert_decimal.result
* | | | MDEV-19468 Hybrid type expressions return wrong format for FLOATAlexander Barkov2019-05-156-22/+96
| | | |
* | | | Merge 10.2 into 10.3Marko Mäkelä2019-05-147-7/+134
|\ \ \ \ | |/ / /
| * | | MDEV-19449 Got error 168 for valid TRUNCATE (temporary) TABLEMarko Mäkelä2019-05-142-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the test case. The parent commit, which cherry-picked the MDEV-17167 fix from 10.3 (commit bad2f1569da57c4a81cc84ec2f4a79924df9c8d6) fixed the bug.
| * | | MDEV-17167 - InnoDB: Failing assertion: table->get_ref_count() == 0 uponSergey Vojtovich2019-05-142-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | truncating a temporary table TRUNCATE expects only one TABLE instance (which is used by TRUNCATE itself) to be open. However this requirement wasn't enforced after "MDEV-5535: Cannot reopen temporary table". Fixed by closing unused table instances before performing TRUNCATE.
| * | | MDEV-19158: MariaDB 10.2.22 is writing duplicate entries into binary logSujatha2019-05-142-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======== We have a Master/Master Setup on two servers, but are only writing to one of those servers (so it is essentially Master/Slave) We upgraded from 10.1.* to 10.2.22 last week and starting with the upgrade, we are getting duplicate key errors on the slave. BINLOG=mixed. Analysis: ========= This issue happens with LOCK TABLES and binlog_format=MIXED combination. When an UNSAFE statement is encountered in 'MIXED' mode, it is logged in the form of 'ROW' format. For all the tables that are part of LOCK TABLES list their table maps are written into the binary log. For each table in the list a check is done to see if 'check_table_binlog_row_based_done' flag is set or not. If it is not set a check process is initiated to see if table qualifies for row based binary logging or not and 'check_table_binlog_row_based_done' is set. This flag will be cleared at the time of closing thread tables. But there can be special cases where the LOCK TABLES contains more number of tables but the unsafe query is actually using subset of tables from LOCK TABLES list. For example: LOCK TABLES locks t1,t2,t3 but the unsafe statement makes use of only two tables t1,t3. In this case the 'check_table_binlog_row_based_done' flag is enabled for table 't2' while writing table map, but 'close_thread_tables' function call will not reset this flag. Since the flag is not cleared for table 't2' even a safe statement which used t2 will be logged in the form of row based format. This leads to an assert on debug builds and causes duplicate entries in release builds. In release builds a statement is logged in the form of both ROW and STATEMENT format. This causes the slave to fail with duplicate key error. Fix: === During 'close_thread_tables' when LOCK TABLE modes are active "ha_reset" is done for all the tables which were part of current statement. As mentioned in the example 'ha_reset' is called for tables 't1' and 't3'. This will clear the 'check_table_binlog_row_based_done' flag. At this point add a check for the rest of the tables to see if 'check_table_binlog_row_based_done' is enabled or not. If enabled clear the flag.