MariaDB 10.6.15 release

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEF39AEP5WyjM2MAMF8WVvJMdM0dgFAmTaWBgACgkQ8WVvJMdM
 0djmdhAAg5mO0fFFSA2dQNdl0uZx+7QpA9PJFzJzSq4MXja/JY1lUomQ8mDoI8U1
 rbiSM/SDQf2YH/UZhMjuzwP5WLhXwOctLlORxWQiBfxfAHWOwFAGs4vHwrBj/THx
 z4Ex2d5dHW36yVblJaXsl8E8l9MEaPP2i5KN6l9aUMM6DGteckiIiWuwaz9oALWd
 6RWet7zKVK6abt6yo1zDbj9lXBzzjw4rC5LnJG1c10Y4FS9TR+EqU4jfmXMXRJMg
 IatwdtCafpYwmaXQja5nglF9ziby3Up2zfbnROzYjHnbKHLkPehiDQLSuDBk6opf
 EW1/JOr9Is0pRlL/d/8ls7R2s3g7q57TwEhL90WV3qzARhLf3B363IQMdx7iM46u
 kBWGeEvEC8XEAyAYJj2DlkwMimmHCPhBQpf5nzkMNp/WEkdFEDB5r40ZnJV0qS4L
 dMu8gZWf9gBNsLK2+ktV9otQ/EMtgafqHOdXJfyia1XQBCl3NSVvJkcw3X4TM2R7
 NClpy7dQY4ZxFykBahaLQJmu7wKh0naEz4jRy782FKcteqpNycASbgPmn3gXvofl
 wc3Sgd9oQR5i6uGYNJt3eEo/fv/tqt6kv1jL9+ZCs7CGlfbOc10lwpLna7CpjQD0
 u3xD5yBKgblbjB1L9zyQF++KKKLyHEdFDPjZa33hmcq9U9dKleE=
 =awyr
 -----END PGP SIGNATURE-----

Merge mariadb-10.6.15 into 10.6
This commit is contained in:
Marko Mäkelä 2023-08-15 11:03:00 +03:00
commit fc78b25337
9 changed files with 98 additions and 14 deletions

View File

@ -0,0 +1,13 @@
# include/no_valgrind_without_big.inc
#
# If we are running with Valgrind ($VALGRIND_TEST <> 0) than the resource
# consumption (storage space needed, runtime ...) will be extreme.
# Therefore we require that the option "--big-test" is also set.
#
if ($VALGRIND_TEST) {
if (!$BIG_TEST)
{
--skip Need "--big-test" when running with Valgrind
}
}

View File

@ -6256,3 +6256,19 @@ length(concat(t1.f,t2.f))
DROP TABLE t;
set @@optimizer_switch=@org_optimizer_switch;
set @@join_buffer_size=@org_join_buffer_size;
#
# MDEV-31348 Assertion `last_key_entry >= end_pos' failed in
# virtual bool JOIN_CACHE_HASHED::put_record()
#
SET JOIN_buffer_size=1;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '1'
SET SESSION JOIN_cache_level=4;
SET SESSION optimizer_switch='optimize_JOIN_buffer_size=OFF';
SELECT * FROM information_schema.statistics JOIN information_schema.COLUMNS USING (table_name,column_name);
ERROR HY001: Could not create a join buffer. Please check and adjust the value of the variables 'JOIN_BUFFER_SIZE (128)' and 'JOIN_BUFFER_SPACE_LIMIT (2097152)'
SET JOIN_buffer_size=16384;
SELECT * FROM information_schema.statistics JOIN information_schema.COLUMNS USING (table_name,column_name);
#
# End of 10.4 tests
#

View File

@ -4230,3 +4230,22 @@ SELECT length(concat(t1.f,t2.f)) FROM t t1, t t2;
DROP TABLE t;
set @@optimizer_switch=@org_optimizer_switch;
set @@join_buffer_size=@org_join_buffer_size;
--echo #
--echo # MDEV-31348 Assertion `last_key_entry >= end_pos' failed in
--echo # virtual bool JOIN_CACHE_HASHED::put_record()
--echo #
SET JOIN_buffer_size=1;
SET SESSION JOIN_cache_level=4;
SET SESSION optimizer_switch='optimize_JOIN_buffer_size=OFF';
--error ER_OUTOFMEMORY
SELECT * FROM information_schema.statistics JOIN information_schema.COLUMNS USING (table_name,column_name);
SET JOIN_buffer_size=16384;
--disable_result_log
SELECT * FROM information_schema.statistics JOIN information_schema.COLUMNS USING (table_name,column_name);
--enable_result_log
--echo #
--echo # End of 10.4 tests
--echo #

View File

@ -2,8 +2,11 @@
# Tests that should be in join_cache but cannot be run with ASAN
--source include/have_64bit.inc
# Disable asan it asan builds crashes when trying to allocate too much memory
--source include/not_asan.inc
--source include/not_msan.inc
# Valgrind is useful here, but very slow as lots of memory is allocated
--source include/no_valgrind_without_big.inc
--source include/have_innodb.inc
--echo #

View File

@ -8972,3 +8972,15 @@ select @counter;
5
drop function f1;
drop table t1,t2;
#
# MDEV-31877: ASAN errors in Exec_time_tracker::get_cycles with innodb slow log verbosity
#
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,2);
SET @tmp=@@log_slow_verbosity;
SET SESSION log_slow_verbosity= 'innodb';
BEGIN NOT ATOMIC DECLARE r ROW TYPE OF t1 DEFAULT (SELECT * FROM t1); SELECT r.a; END $
r.a
1
SET SESSION log_slow_verbosity= @tmp;
DROP TABLE t1;

View File

@ -10573,3 +10573,19 @@ select f1(col1) from t2 order by col2 desc limit 5;
select @counter;
drop function f1;
drop table t1,t2;
--echo #
--echo # MDEV-31877: ASAN errors in Exec_time_tracker::get_cycles with innodb slow log verbosity
--echo #
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,2);
SET @tmp=@@log_slow_verbosity;
SET SESSION log_slow_verbosity= 'innodb';
--delimiter $
BEGIN NOT ATOMIC DECLARE r ROW TYPE OF t1 DEFAULT (SELECT * FROM t1); SELECT r.a; END $
--delimiter ;
SET SESSION log_slow_verbosity= @tmp;
# Cleanup
DROP TABLE t1;

View File

@ -3807,7 +3807,6 @@ int
sp_instr_set::exec_core(THD *thd, uint *nextp)
{
int res= get_rcontext(thd)->set_variable(thd, m_offset, &m_value);
delete_explain_query(thd->lex);
*nextp = m_ip+1;
return res;
}
@ -3849,7 +3848,6 @@ sp_instr_set_row_field::exec_core(THD *thd, uint *nextp)
int res= get_rcontext(thd)->set_variable_row_field(thd, m_offset,
m_field_offset,
&m_value);
delete_explain_query(thd->lex);
*nextp= m_ip + 1;
return res;
}
@ -3897,7 +3895,6 @@ sp_instr_set_row_field_by_name::exec_core(THD *thd, uint *nextp)
int res= get_rcontext(thd)->set_variable_row_field_by_name(thd, m_offset,
m_field_name,
&m_value);
delete_explain_query(thd->lex);
*nextp= m_ip + 1;
return res;
}

View File

@ -800,6 +800,18 @@ size_t JOIN_CACHE::get_min_join_buffer_size()
}
size_t JOIN_CACHE::calc_avg_record_length()
{
size_t len= 0;
for (JOIN_TAB *tab= start_tab; tab != join_tab;
tab= next_linear_tab(join, tab, WITHOUT_BUSH_ROOTS))
{
len+= tab->get_used_fieldlength();
}
len+= get_record_max_affix_length();
return len;
}
/*
Get the maximum possible size of the cache join buffer
@ -822,9 +834,9 @@ size_t JOIN_CACHE::get_min_join_buffer_size()
'max_buff_size' in order to use it directly at the next
invocations of the function.
RETURN VALUE
The maximum possible size of the join buffer of this cache
avg_record_length is also updated if optimize_buff_size != 0
*/
size_t JOIN_CACHE::get_max_join_buffer_size(bool optimize_buff_size,
@ -839,19 +851,13 @@ size_t JOIN_CACHE::get_max_join_buffer_size(bool optimize_buff_size,
return max_buff_size= limit_sz;
size_t max_sz;
size_t len= 0;
size_t len;
double max_records, partial_join_cardinality=
(join_tab-1)->get_partial_join_cardinality();
/* Expected join buffer space used for one record */
size_t space_per_record;
for (JOIN_TAB *tab= start_tab; tab != join_tab;
tab= next_linear_tab(join, tab, WITHOUT_BUSH_ROOTS))
{
len+= tab->get_used_fieldlength();
}
len+= get_record_max_affix_length();
avg_record_length= len;
len= avg_record_length= calc_avg_record_length();
len+= get_max_key_addon_space_per_record() + avg_aux_buffer_incr;
space_per_record= len;
@ -2794,7 +2800,6 @@ bool JOIN_CACHE_BKAH::save_explain_data(EXPLAIN_BKA_TYPE *explain)
int JOIN_CACHE_HASHED::init(bool for_explain)
{
TABLE_REF *ref= &join_tab->ref;
DBUG_ENTER("JOIN_CACHE_HASHED::init");
hash_table= 0;
@ -2881,6 +2886,8 @@ int JOIN_CACHE_HASHED::init_hash_table()
hash_table= 0;
key_entries= 0;
avg_record_length= calc_avg_record_length();
/* Calculate the minimal possible value of size_of_key_ofs greater than 1 */
uint max_size_of_key_ofs= MY_MAX(2, get_size_of_rec_offset());
for (size_of_key_ofs= 2;

View File

@ -130,6 +130,7 @@ protected:
case 4: int4store(ptr, (uint32) ofs); return;
}
}
size_t calc_avg_record_length();
/*
The maximum total length of the fields stored for a record in the cache.