summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.4' into 10.5mariadb-10.5.20bb-10.5-releaseOleksandr Byelkin2023-05-053-1/+40
|\
| * MDEV-31194: Server crash or assertion failure with join_cache_level=4mariadb-10.4.29Sergei Petrunia2023-05-053-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem, introduced in patch for MDEV-26301: When check_join_cache_usage() decides not to use join buffer, it must adjust the access method accordingly. For BNL-H joins this means switching from pseudo-"ref access"(with index=MAX_KEY) to some other access method. Failing to do this will cause assertions down the line when code that is not aware of BNL-H will try to initialize index use for ref access with index=MAX_KEY. The fix is to follow the regular code path to disable the join buffer for the join_tab ("goto no_join_cache") instead of just returning from check_join_cache_usage().
* | Merge branch '10.4' into 10.5Oleksandr Byelkin2023-05-047-4/+118
|\ \ | |/
| * MDEV-31189 Server crash or assertion failure in upon 2nd execution of PS ↵Oleksandr Byelkin2023-05-043-4/+45
| | | | | | | | | | | | | | with views and HAVING Do not try to decide merge/materialize for derived if it was already decided (even if it is a view).
| * MDEV-31057 rocksdb does not compile with gcc-13Sergei Golubchik2023-05-041-0/+5
| | | | | | | | | | | | RocksDB (in a submodule) has to include <cstdint> to use uint64_t but it doesn't. Until the submodule is upgraded, let's replace problematic types with something that's available
| * MDEV-31164 default current_timestamp() not working when used INSERT ON ↵Sergei Golubchik2023-05-043-0/+68
| | | | | | | | | | | | | | | | DUPLICATE KEY in some cases select_insert::store_values() must reset has_value_set bitmap before every row, just like mysql_insert() does. because ON DUPLICATE KEY UPDATE and triggers modify it
* | Merge branch '10.4' into 10.5Oleksandr Byelkin2023-05-0410-217/+382
|\ \ | |/
| * MDEV-31181 Server crash in subselect_uniquesubquery_engine::print upon ↵Oleksandr Byelkin2023-05-043-0/+43
| | | | | | | | | | | | EXPLAIN EXTENDED DELETE Temporary fix to avoid the server crash.
| * Fix of selectivity test to behave correctly with embedded and view protocols.Oleksandr Byelkin2023-05-047-217/+335
| |
* | Merge branch '10.4' into 10.5Oleksandr Byelkin2023-05-037-45/+1161
|\ \ | |/
| * MDEV-26301: Split optimization refills: Optimizer Trace coverageSergei Petrunia2023-05-034-13/+245
| | | | | | | | Add Optimizer Trace printouts.
| * MDEV-26301 Split optimization refills temporary table too many timesIgor Babaev2023-05-035-32/+910
| | | | | | | | | | | | | | | | This patch optimizes the number of refills for the lateral derived table to which a materialized derived table subject to split optimization is is converted. This optimized number of refills is now considered as the expected number of refills of the materialized derived table when searching for the best possible splitting of the table.
* | Merge branch '10.4' into 10.5Oleksandr Byelkin2023-05-031-2/+6
|\ \ | |/
| * MDEV-29621 part 2 of post-merge fixes in galeraAndrei2023-05-031-1/+1
| | | | | | | | | | (part 1 is in the previous commit) to [ pass ] galera.MDEV-18832, galera.MDEV-27862
| * Protect a new condition (by Andrei)Oleksandr Byelkin2023-05-031-1/+5
| |
* | Fix test after merge (by Thiru)Oleksandr Byelkin2023-05-032-2/+2
| |
* | Merge branch '10.4' into 10.5Oleksandr Byelkin2023-05-021-0/+0
|\ \ | |/
| * Merge branch '10.3' into 10.4Oleksandr Byelkin2023-05-021-0/+0
| |\
| | * New CC 3.1mariadb-10.3.39bb-10.3-release10.3Oleksandr Byelkin2023-05-021-0/+0
| | |
* | | Merge branch 'bb-10.4-release' into bb-10.5-releaseOleksandr Byelkin2023-05-027-6/+72
|\ \ \ | |/ /
| * | Merge branch '10.4' into bb-10.4-releaseOleksandr Byelkin2023-05-027-6/+72
| |\ \
| | * | wsrep-lib external submodule updatebb-10.4-MDEV-30838-v2-galeraJulius Goryavsky2023-05-021-0/+0
| | | |
| | * | MDEV-30838 Assertion `m_thd == _current_thd()'Daniele Sciascia2023-05-024-4/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Update wsrep-lib which contains fix for the assertion - Fix error handling for appending fragment to streaming log, make sure tables are closed after rollback. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
| | * | MDEV-30414 sporadic failures with galera var retry autocommitsara2023-05-022-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | changed tast case 2 to be deterministic Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
* | | | MDEV-29621 manual merge from 10.4 -> 10.5Andrei2023-05-023-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | 1. log_event.cc stuff should go into log_event_server.cc 2. the test's wait condition is textually different in 10.5, fixed. 3. pre-exec 'optimistic' global var value is correct for 10.5 indeed.
* | | | Merge branch 'bb-10.4-release' into bb-10.5-releaseOleksandr Byelkin2023-05-0272-473/+1108
|\ \ \ \ | |/ / /
| * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2023-05-0238-268/+624
| |\ \ \ | | |/ / | |/| / | | |/
| | * MDEV-29621: Replica stopped by locks on sequenceAndrei2023-04-278-13/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using binlog_row_image=FULL with sequence table inserts, a replica can deadlock because it treats full inserts in a sequence as DDL statements by getting an exclusive lock on the sequence table. It has been observed that with parallel replication, this exclusive lock on the sequence table can lead to a deadlock where one transaction has the exclusive lock and is waiting on a prior transaction to commit, whereas this prior transaction is waiting on the MDL lock. This fix for this is on the master side, to raise FL_DDL flag on the GTID of a full binlog_row_image write of a sequence table. This forces the slave to execute the statement serially so a deadlock cannot happen. A test verifies the deadlock also to prove it happen on the OLD (pre-fixes) slave. OLD (buggy master) -replication-> NEW (fixed slave) is provided. As the pre-fixes master's full row-image may represent both SELECT NEXT VALUE and INSERT, the parallel slave pessimistically waits for the prior transaction to have committed before to take on the critical part of the second (like INSERT in the test) event execution. The waiting exploits a parallel slave's retry mechanism which is controlled by `@@global.slave_transaction_retries`. Note that in order to avoid any persistent 'Deadlock found' 2013 error in OLD -> NEW, `slave_transaction_retries` may need to be set to a higher than the default value. START-SLAVE is an effective work-around if this still happens.
| | * New CCOleksandr Byelkin2023-04-261-0/+0
| | |
| | * Merge branch 'merge-zlib' into 10.3bb-10.3-sergSergei Golubchik2023-04-2028-252/+333
| | |\
| | | * 1.2.13Sergei Golubchik2023-04-2092-968/+674
| | | |
| * | | MDEV-31153 New methods Schema::make_item_func_* for REPLACE, SUBSTRING, TRIMAlexander Barkov2023-04-297-74/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding virtual methods to class Schema: make_item_func_replace() make_item_func_substr() make_item_func_trim() This is a non-functional preparatory change for MDEV-27744.
| * | | Adding "const" qualifiers to a few trivial Lex_input_string methodsAlexander Barkov2023-04-292-23/+23
| | | |
| * | | MDEV-30221: Move environmental macros to before master-slavebb-10.4-MDEV-30221Angelique2023-04-289-14/+14
| | | | | | | | | | | | | | | | The fix was introduced, along with re-ordering to do other macros that check test environment capabilities before master/slave is set up.
| * | | MDEV-31067: selectivity_from_histogram >1.0 for a DOUBLE_PREC_HB histogrambb-10.4-mdev31067-variant2Sergei Petrunia2023-04-285-53/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Variant #2. When Histogram::point_selectivity() sees that the point value of interest falls into one bucket, it tries to guess whether the bucket has many different (unpopular) values or a few popular values. (The number of rows is fixed, as it's a Height-balanced histogram). The basis for this guess is the "width" of the value range the bucket covers. Buckets covering wider value ranges are assumed to contain values with proportionally lower frequencies. This is just a [brave] guesswork. For a very narrow bucket, it may produce an estimate that's larger than total #rows in the bucket or even in the whole table. Remove the guesswork and replace it with basic logic: return either the per-table average selectivity of col=const, or selectivity of one bucket, whichever is lower.
| * | | MDEV-22756 SQL Error (1364): Field 'DB_ROW_HASH_1' doesn't have a default valueSergei Golubchik2023-04-283-1/+14
| | | | | | | | | | | | | | | | exclude generated columns from the "has default value" check
| * | | MDEV-31113 Server crashes in store_length / ↵bb-10.4-mdev-31113Oleg Smirnov2023-04-283-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Type_handler_string_result::make_sort_key with DISTINCT and group function Fix-up for commit 476b24d084e7e717310155bb986eb086d3c1e1a6 Author: Monty Date: Thu Feb 16 14:19:33 2023 +0200 MDEV-20057 Distinct SUM on CROSS JOIN and grouped returns wrong result which misses initializing of sorder->suffix_length. In this commit the initialization is implemented by passing MY_ZEROFILL flag to the allocation of SORT_FIELD elements
| * | | MDEV-31129 build failure with RocksDB, incompatible pointer to integer ↵Sergei Golubchik2023-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | conversion FreeBSD 13.2
| * | | return accidentally removed in 45d4f6b97b4811b1b7783dcd19526be1dbb196dc commentbb-10.4-MDEV-30889Oleksandr Byelkin2023-04-271-0/+6
| | | |
| * | | MDEV-30889: 3 - Item_in_optimizer leakOleksandr Byelkin2023-04-265-24/+33
| | | | | | | | | | | | | | | | Keep Item_in_optimizer cache always (but only once) in statement memory.
| * | | MDEV-30889: 2 - Allocation in TABLE_SHARE::init_from_sql_statement_stringOleksandr Byelkin2023-04-261-15/+0
| | | | | | | | | | | | | | | | | | | | Fix leack in TABLE_SHARE::init_from_sql_statement_string by removing uneeded switching arenas.
| * | | MDEV-30889: 1 - Allocation in Item_subselect::mark_as_dependentOleksandr Byelkin2023-04-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fix leack in Item_subselect::mark_as_dependent (allocation of temporary list in statement memory inctroduced in f4d552104364fe195237f39862d91f657c7a34cb )
* | | | Merge branch 'merge-perfschema-5.7' into 10.5Oleksandr Byelkin2023-04-28274-274/+274
|\ \ \ \
| * | | | 5.7.42 (only copyright year in all files changed)Oleksandr Byelkin2023-04-28275-275/+275
| | | | |
* | | | | Merge 10.4 into 10.5Marko Mäkelä2023-04-2724-50/+533
|\ \ \ \ \ | | |/ / / | |/| | |
| * | | | MDEV-30218 update test resultSergei Golubchik2023-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | followup for d1a46c68cd4
| * | | | MDEV-11356 Option skip-core-file does not workSergei Golubchik2023-04-265-14/+9
| | | | | | | | | | | | | | | | | | | | | | | | | remove ancient hard-coded treatment of --core-file. This enables normal my_getopt behavior for the already existing sysvar
| * | | | MDEV-30620 Trying to lock uninitialized LOCK_parallel_entryAndrei2023-04-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error was seen by a number of mtr tests being caused by overdue initialization of rpl_parallel::LOCK_parallel_entry. Specifically, SHOW-SLAVE-STATUS might find in rpl_parallel::workers_idle() a gtid domain hash entry already inserted whose mutex had not done mysql_mutex_init(). Fixed with swapping the mutex init and the its entry's stack insertion. Tested with a generous number of `mtr --repeat` of a few of the reported to fail tests, incl rpl.parallel_backup.
| * | | | MDEV-31121: ANALYZE statement produces 0 for all timings in embedded serverSergei Petrunia2023-04-253-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | 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-243-6/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>