summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.10' into 10.11Oleksandr Byelkin2022-11-0389-1063/+4224
|\
| * Merge branch '10.9' into 10.10mariadb-10.10.2Oleksandr Byelkin2022-11-0389-1063/+4194
| |\
| | * Merge branch '10.8' into 10.9mariadb-10.9.4Oleksandr Byelkin2022-11-031-0/+0
| | |\
| | | * Merge branch '10.7' into 10.8mariadb-10.8.6Oleksandr Byelkin2022-11-032-2/+5
| | | |\
| | | | * Merge branch '10.6' into 10.7mariadb-10.7.7Oleksandr Byelkin2022-11-031-0/+0
| | | | |\
| | | | | * update colunmstoremariadb-10.6.11Sergei Golubchik2022-11-031-0/+0
| | | | | |
| | * | | | Merge branch '10.8' into 10.9Oleksandr Byelkin2022-11-0289-1063/+4194
| | |\ \ \ \
| | | * \ \ \ Merge branch '10.7' into 10.8Oleksandr Byelkin2022-11-022-2/+5
| | | |\ \ \ \ | | | | |/ / / | | | |/| / / | | | | |/ /
| | | | * | Merge branch '10.6' into 10.7Oleksandr Byelkin2022-11-0289-1063/+4154
| | | | |\ \
| | | | | * | update colunmstoreSergei Golubchik2022-11-021-0/+0
| | | | | |/
| | | * | | Merge branch '10.7' into 10.8Oleksandr Byelkin2022-11-0287-1061/+4189
| | | |\ \ \
| | | | * \ \ Merge branch '10.6' into 10.7Oleksandr Byelkin2022-11-0287-1061/+4149
| | | | |\ \ \ | | | | | |/ / | | | | |/| / | | | | | |/
| | | | | * Merge branch '10.5' into 10.6Oleksandr Byelkin2022-11-0277-1062/+4090
| | | | | |\
| | | | | | * Merge branch '10.4' into 10.5mariadb-10.5.18Oleksandr Byelkin2022-11-0211-5/+117
| | | | | | |\
| | | | | | | * Merge branch '10.3' into 10.4mariadb-10.4.27Oleksandr Byelkin2022-11-028-1/+89
| | | | | | | |\
| | | | | | | | * MDEV-29926: ASAN heap-use-after-free in Explain_query::~Explain_querymariadb-10.3.37Oleksandr Byelkin2022-11-028-1/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that EXPLAIN object allocated on runtime arena.
| | | | | | | * | MDEV-29924 Assertion `(((nr) % (1LL << 24)) % (int) log_10_int[6 - dec]) == ↵Sergei Golubchik2022-11-013-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0' failed in my_time_packed_to_binary on SELECT when using TIME field when assigning the cached item to the Item_cache for the first time make sure to use Item_cache::setup(), not Item_cache::store(). Because the former copies the metadata (and allocates memory, in case of Item_cache_row), and Item_cache::decimal must be set for comparisons to work correctly.
| | | | | | * | | columnstore 5.6.8-1Sergei Golubchik2022-10-261-0/+0
| | | | | | | | |
| | | | | | * | | Merge branch '10.4' into 10.5Oleksandr Byelkin2022-10-2656-1053/+2235
| | | | | | |\ \ \ | | | | | | | |/ /
| | | | | | | * | Merge branch '10.3' into 10.4Oleksandr Byelkin2022-10-2623-833/+177
| | | | | | | |\ \ | | | | | | | | |/
| | | | | | | | * Add skipped changes to oracle mode parser.Oleksandr Byelkin2022-10-261-3/+9
| | | | | | | | |
| | | | | | | | * MDEV-29578 Fix CONNECT build warningsAndrew Hutchings2022-10-262-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a couple of build warnings that fire with CONNECT engine.
| | | | | | | | * Rocksdb: Add initial OpenBSD supportBrad Smith2022-10-262-7/+7
| | | | | | | | |
| | | | | | | | * MDEV-26161 crash in Gis_point::calculate_haversineAlexey Botchkov2022-10-265-13/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More checks for bad geometry data added.
| | | | | | | | * MDEV-26161 crash in Gis_point::calculate_haversineSergei Golubchik2022-10-254-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | return an error on invalid gis data
| | | | | | | | * cleanup: put casts in a separate statementSergei Golubchik2022-10-251-20/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove useless if()
| | | | | | | | * MDEV-29490 Renaming internally used client API to avoid name conflictsLawrin Novitsky2022-10-259-775/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with C/C. The patch introduces mariadb_capi_rename.h which is included into mysql.h. The hew header contains macro definitions for the names being renamed. In versions 10.6+(i.e. where sql service exists) the renaming condition in the mariadb_capi_rename.h should be added with && !defined(MYSQL_DYNAMIC_PLUGIN) and look like The patch also contains removal of mysql.h from the api check. Disabling false_duper-6543 test for embedded. ha_federated.so uses C API. C API functions are being renamed in the server, but not renamed in embedded, since embedded server library should have proper C API, as expected by programs using it. Thus the same ha_federated.so cannot work both for server and embedded server library. As all federated tests are already disabled for embedded, federated isn't supposed to work for embedded anyway, and thus the test is being disabled.
| | | | | | | | * MDEV-29811 server advertises ssl even if it's unusable.Vladislav Vaintroub2022-10-254-9/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Abort startup, if SSL setup fails. Also, for the server always check that certificate matches private key (even if ssl_cert is not set, OpenSSL will try to use default one)
| | | | | | | * | MDEV-29640 FederatedX does not properly handle pushdown in case of ↵Oleg Smirnov2022-10-265-9/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | difference in local and remote table names FederatedX table may refer to a table with a different name on the remote server: test> CREATE TABLE t2 (...) ENGINE="FEDERATEDX" CONNECTION="mysql://user:pass@192.168.1.111:9308/federatedx/t1"; test> select * from t2 where ...; This could cause an issue with federated_pushdown=1, because FederatedX pushes the query (or derived table's) text to the remote server. The remote server will try to read from table t2 (while it should read from t1). Solution: do not allow pushing down queries with tables that have different db_name.table name on the local and remote server. This patch also fixes: MDEV-29863 Server crashes in federatedx_txn::acquire after select from the FederatedX table with partitions Solution: disallow pushdown when partitioned FederatedX tables are used.
| | | | | | | * | MDEV-28846 Poor performance when rowid filter contains no elementsIgor Babaev2022-10-2521-170/+1797
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | | | | | * | MDEV-28545 MyISAM reorganize partition corrupt older table formatAlexander Barkov2022-10-256-2/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ALTER related code cannot do at the same time both: - modify partitions - change column data types Explicit changing of a column data type together with a partition change is prohibited by the parter, so this is not allowed and returns a syntax error: ALTER TABLE t MODIFY ts BIGINT, DROP PARTITION p1; This fix additionally disables implicit data type upgrade (e.g. from "MariaDB 5.3 TIME" to "MySQL 5.6 TIME", or the other way around according to the current mysql56_temporal_format) in case of an ALTER modifying partitions, e.g.: ALTER TABLE t DROP PARTITION p1; In such commands now only the partition change happens, while the data types stay unchanged. One can additionally run: ALTER TABLE t FORCE; either before or after the ALTER modifying partitions to upgrade data types according to mysql56_temporal_format.
| | | | | | | * | Additional fixesJan Lindström2022-10-254-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * galera_many_rows : reduce the time used * wsrep_thd.cc : remove incorrect assertion * disabled.def : disable failing test cases
| | | | | | * | | MDEV-28822 Table from older version requires table rebuild when adding ↵Alexander Barkov2022-10-263-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | column to table with multi-column index This problem was earlier fixed in 10.4 by the patch for MDEV-29481. Adding MTR tests only.
| | | | | | * | | MDEV-25616 XA PREPARE event group is not binlogged when..Brandon Nesterenko2022-10-258-6/+1709
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the only query of the XA transaction is on a non-transactional table errors out: XA BEGIN 'x'; --error ER_DUP_ENTRY INSERT INTO t1 VALUES (1),(1); XA END 'x'; XA PREPARE 'x'; The binlogging pattern is correctly started as expected with the errored-out Query or its ROW format events, but there is no empty XA_prepare_log_event group. The following XA COMMIT 'x'; therefore should not be logged either, but it does. The bug is fixed with proper maintaining of a read-write binlog hton property and use it to enforce correct binlogging decisions. Specifically in the bug description case XA COMMIT won't be binlogged in both when given in the same connection and externally after disconnect. The same continue to apply to an empty XA that do not change any data in all transactional engines involved.
* | | | | | | | | Merge branch '10.10' into 10.11Oleksandr Byelkin2022-11-02180-2615/+5670
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / /
| * | | | | | | | Merge branch '10.9' into 10.10Oleksandr Byelkin2022-11-01179-2596/+5648
| |\ \ \ \ \ \ \ \ | | |/ / / / / / /
| | * | | | | | | Merge branch '10.8' into 10.9Oleksandr Byelkin2022-11-01178-2589/+5643
| | |\ \ \ \ \ \ \ | | | |/ / / / / /
| | | * | | | | | Merge 10.7 into 10.8Marko Mäkelä2022-11-01176-2584/+5631
| | | |\ \ \ \ \ \ | | | | |/ / / / /
| | | | * | | | | fix results after mergeOleksandr Byelkin2022-10-311-1/+1
| | | | | | | | |
| | | | * | | | | Revert "MDEV-27233 Server hangs when using --init-file which loads Spider ↵Nayuta Yanagisawa2022-10-319-64/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and creates a Spider table" This reverts commit c160a115b8b6dcd54bb3daf1a751ee9c68b7ee47.
| | | | * | | | | Merge branch '10.6' into 10.7Oleksandr Byelkin2022-10-29141-585/+2878
| | | | |\ \ \ \ \ | | | | | |/ / / /
| | | | | * | | | followup: fix ASAN failure of main.having_cond_pushdown --psSergei Golubchik2022-10-292-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | also call top_level_transform() recursively for (a OR b) AND (c OR d)
| | | | | * | | | followup: fix ASAN failure of main.opt_tvc --psSergei Golubchik2022-10-291-9/+4
| | | | | | | | |
| | | | | * | | | MDEV-29895 prepared view crash server (unit.conc_view)Sergei Golubchik2022-10-296-9/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it's incorrect to use change_item_tree() to replace arguments of top-level AND/OR, because they (arguments) are stored in a List, so a pointer to an argument is in the list_node, and individual list_node's of top-level AND/OR can be deleted in Item_cond::build_equal_items(). In that case rollback_item_tree_changes() will modify the deleted object. Luckily, it's not needed to use change_item_tree() for top-level AND/OR, because the whole top-level item is copied and preserved in prep_where and prep_on, and restored from there. So, just don't.
| | | | | * | | | MDEV-28709 unexpected X lock on Supremum in READ COMMITTEDVlad Lesin2022-10-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Post-push fix. The flag of transaction which indicates that it's necessary to forbid gap lock inheritance after XA PREPARE could be inverted if lock_release_on_prepare_try() is invoked several times. The fix is to toggle it on lock_release_on_prepare() exit.
| | | | | * | | | Disable perfschema.mdl_func on WindowsMarko Mäkelä2022-10-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test fails extremely often on a Windows builder, and nobody seems to be interested in fixing it.
| | | | | * | | | MDEV-29886 Assertion !index->table->is_temporary() failed in CHECK TABLEMarko Mäkelä2022-10-264-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ha_innobase::check(): Do not enable READ UNCOMMITTED isolation level for temporary tables, because it would report index count mismatch for secondary indexes. row_check_index(): Ignore EXTENDED for temporary tables, because the tables are private to the current connection and there will be no purge of committed transaction history.
| | | | | * | | | MDEV-29883 Deadlock between InnoDB statistics update and BLOB insertMarko Mäkelä2022-10-263-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test innodb.innodb-wl5522-debug would occasionally hang (especially when run with ./mtr --rr) due to a deadlock between btr_store_big_rec_extern_fields() and dict_stats_analyze_index(). The two threads would acquire the clustered index root page latch and the tablespace latch in the opposite order. The deadlock was possible because dict_stats_analyze_index() was holding the index latch in shared mode and an index root page latch, while waiting for the tablespace latch. If a stronger dict_index_t::lock had been held by dict_stats_analyze_index(), any operations that free or allocate index pages would have been blocked. In each caller of fseg_n_reserved_pages() except ibuf_init_at_db_start() which is a special case for ibuf.index at database startup, we must hold an index latch that prevents concurrent allocation or freeing of index pages. Any operation that allocates or free pages that belong to an index tree must first acquire an index latch in Update or Exclusive mode, and while holding that, acquire an index root page latch in Update or Exclusive mode. dict_index_t::clear(): Also acquire an index latch. Otherwise, the test innodb.insert_into_empty could hang. btr_get_size_and_reserved(): Assert that a strong enough index latch is being held. Only acquire a shared fil_space_t::latch; we are only reading, not modifying any data. dict_stats_update_transient_for_index(), dict_stats_analyze_index(): Acquire a strong enough index latch. Only acquire a shared fil_space_t::latch. These operations had followed the same order of acquiring latches in every InnoDB version since the very beginning (commit c533308a158795f91247e9fe3c7304fa5e7d2b3c). The calls for acquiring tablespace latch had previously been moved in commit 87839258f86196dfca1d3af2a947e570e13eeb94 and commit 1e9c922fa726b22f4522f2a4de0fcb6595404086. The hang was introduced in commit 2e814d4702d71a04388386a9f591d14a35980bfe which imported mysql/mysql-server@ac74632293bea967b352d1b472abedeeaa921b98 which failed to strengthen the locking requirements of the function btr_get_size().
| | | | | * | | | MDEV-29869 mtr failure: innodb.deadlock_wait_thr_raceVlad Lesin2022-10-268-42/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. The merge aeccbbd926e759a5c3b9818d9948a35918404478 has overwritten lock0lock.cc, and the changes of MDEV-29622 and MDEV-29635 were partially lost, this commit restores the changes. 2. innodb.deadlock_wait_thr_race test: The following hang was found during testing. There is deadlock_report_before_lock_releasing sync point in Deadlock::report(), which is waiting for sel_cont signal under lock_sys_t lock. The signal must be issued after "UPDATE t SET b = 100" rollback, and that rollback is executing undo record, which is blocked on dict_sys latch request. dict_sys is locked by the thread of statistics update(dict_stats_save()), and during that update lock_sys lock is requested, and can't be acquired as Deadlock::report() holds it. We have to disable statistics update to make the test stable. But even if statistics update is disabled, and transaction with consistent snapshot is started at the very beginning of the test to prevent purging, the purge can still be invoked for system tables, and it tries to open system table by id, what causes dict_sys.freeze() call and dict_sys latching. What, in combination with lock_sys::xx_lock() causes the same deadlock as described above. We need to disable purging globally for the test as well. All the above is applicable to innodb.deadlock_wait_lock_race test also.
| | | | | * | | | MDEV-29662 Replace same values in 'IN' list with an equalityOleg Smirnov2022-10-268-4/+484
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If all elements in the list of 'IN' or 'NOT IN' clause are equal and there are no NULLs then clause - "a IN (e1,..,en)" can be converted to "a = e1" - "a NOT IN (e1,..,en)" can be converted to "a <> e1". This means an object of Item_func_in can be replaced with an object of Item_func_eq for IN (e1,..,en) clause and Item_func_ne for NOT IN (e1,...,en). Such a replacement allows the optimizer to choose a better execution plan