Merge 10.6 into 10.11

This commit is contained in:
Marko Mäkelä 2025-11-28 12:44:34 +02:00
commit c331d530b7
11 changed files with 97 additions and 14 deletions

View file

@ -1236,7 +1236,7 @@ static void backup_file_op_fail(uint32_t space_id, int type,
msg("DDL tracking : create %" PRIu32 " \"%.*s\"",
space_id, int(len), name);
fail = !check_if_skip_table(spacename.c_str());
if (!opt_no_lock && fail &&
if (fail && !opt_no_lock &&
check_if_fts_table(spacename.c_str())) {
/* Ignore the FTS internal table because InnoDB does
create intermediate table and their associative FTS
@ -1263,6 +1263,11 @@ static void backup_file_op_fail(uint32_t space_id, int type,
break;
case FILE_DELETE:
fail = !check_if_skip_table(spacename.c_str())
/* Ignore the FTS internal table because InnoDB may
drop intermediate table and their associative FTS
internal table as a part of inplace rollback operation.
backup_set_alter_copy_lock() downgrades the
MDL_BACKUP_DDL before inplace phase of alter */
&& !check_if_fts_table(spacename.c_str());
msg("DDL tracking : delete %" PRIu32 " \"%.*s\"",
space_id, int(len), name);
@ -5853,6 +5858,8 @@ void CorruptedPages::backup_fix_ddl(ds_ctxt *ds_data, ds_ctxt *ds_meta)
node, 0, dest_name.c_str(),
wf_write_through, *this);
}
DBUG_MARIABACKUP_EVENT("after_backup_fix_ddl", {});
}

View file

@ -791,7 +791,7 @@ SELECT 'AB' RLIKE 'A# this is a comment\nB';
1
SET default_regex_flags=DEFAULT;
SELECT 'Aq' RLIKE 'A\\q';
ERROR 42000: Regex error 'unrecognized character follows \ at offset 2'
ERROR 42000: Regex error 'unrecognized character follows \ at offset 3'
SET default_regex_flags='EXTRA';
SELECT 'A' RLIKE 'B';
'A' RLIKE 'B'

View file

@ -381,6 +381,8 @@ SELECT 'AB' RLIKE 'A B';
SELECT 'AB' RLIKE 'A# this is a comment\nB';
SET default_regex_flags=DEFAULT;
# pcre2 versions differ in the reported error offset for invalid escapes
--replace_regex /offset 2/offset 3/
--error ER_REGEXP_ERROR
SELECT 'Aq' RLIKE 'A\\q';

View file

@ -371,7 +371,7 @@ insert into t1 values ('85984',GeomFromText('MULTIPOLYGON(((-115.006363
# Expected results are 115.2970604672862 and 36.23335610879993, but IA64 returns
# slightly different values due to fused multiply-add instructions.
--replace_result 115.29706047613604 115.2970604672862 36.23335611157958 36.23335610879993
--replace_regex /115.2970604[67]\d+/115.2970604672862/ /36.233356111579\d+/36.23335610879993/
select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
t1 where object_id=85998;

View file

@ -45,4 +45,13 @@ REPAIR LOCAL TABLE t1 USE_FRM;
REPAIR LOCAL TABLE t1;
DROP TABLE t1;
SET max_session_mem_used=default;
#
# MDEV-38005 Assertion `(yyvsp[-3].simple_string) < (yyvsp[-1].simple_string)' failed
#
SET max_session_mem_used=1;
Warnings:
Warning 1292 Truncated incorrect max_session_mem_used value: '1'
CREATE TABLE t SELECT 1000000000000000000000000000000000000000000000000000000000000000000000000000000001 AS c;
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement
SET max_session_mem_used=default;
# End of 10.6 tests

View file

@ -82,4 +82,12 @@ REPAIR LOCAL TABLE t1;
DROP TABLE t1;
SET max_session_mem_used=default;
--echo #
--echo # MDEV-38005 Assertion `(yyvsp[-3].simple_string) < (yyvsp[-1].simple_string)' failed
--echo #
SET max_session_mem_used=1;
--error ER_OPTION_PREVENTS_STATEMENT
CREATE TABLE t SELECT 1000000000000000000000000000000000000000000000000000000000000000000000000000000001 AS c;
SET max_session_mem_used=default;
--echo # End of 10.6 tests

View file

@ -375,15 +375,15 @@ insert into t1 values ('85984',ST_GeomFromText('MULTIPOLYGON(((-115.006363
36.248666,-115.263639 36.247466,-115.263839 36.252766,-115.261439
36.252666,-115.261439 36.247366,-115.247239 36.247066)))'));
# Expected result is 115.31877315203187, but IA64 returns 115.31877315203188
# due to fused multiply-add instructions.
--replace_result 115.29706047613604 115.2970604672862 36.23335611157958 36.23335610879993
# Expected results are 115.2970604672862 and 36.23335610879993, but IA64 returns
# slightly different values due to fused multiply-add instructions.
--replace_regex /115.2970604[67]\d+/115.2970604672862/ /36.233356111579\d+/36.23335610879993/
select object_id, ST_geometrytype(geo), ST_ISSIMPLE(GEO), ST_ASTEXT(ST_centroid(geo)) from
t1 where object_id=85998;
# Expected result is 36.3310176346905, but IA64 returns 36.3310176346904
# Expected result is 36.34725218253213, but IA64 returns 36.34725217627852
# due to fused multiply-add instructions.
--replace_result 114.86854470090232 114.86854472054372 36.34725217627852 36.34725218253213
--replace_result 36.34725217627852 36.34725218253213 -114.86854470090232 -114.86854472054372
select object_id, ST_geometrytype(geo), ST_ISSIMPLE(GEO), ST_ASTEXT(ST_centroid(geo)) from
t1 where object_id=85984;

View file

@ -368,15 +368,15 @@ insert into t1 values ('85984',ST_GeomFromText('MULTIPOLYGON(((-115.006363
36.248666,-115.263639 36.247466,-115.263839 36.252766,-115.261439
36.252666,-115.261439 36.247366,-115.247239 36.247066)))'));
# Expected result is 115.31877315203187, but IA64 returns 115.31877315203188
# due to fused multiply-add instructions.
--replace_result 115.29706047613604 115.2970604672862 36.23335611157958 36.23335610879993
# Expected results are 115.2970604672862 and 36.23335610879993, but IA64 returns
# slightly different values due to fused multiply-add instructions.
--replace_regex /115.2970604[67]\d+/115.2970604672862/ /36.233356111579\d+/36.23335610879993/
select object_id, ST_geometrytype(geo), ST_ISSIMPLE(GEO), ST_ASTEXT(ST_centroid(geo)) from
t1 where object_id=85998;
# Expected result is 36.3310176346905, but IA64 returns 36.3310176346904
# Expected result is 36.34725218253213, but IA64 returns 36.34725217627852
# due to fused multiply-add instructions.
--replace_result 114.86854470090232 114.86854472054372 36.34725217627852 36.34725218253213
--replace_result 36.34725217627852 36.34725218253213 -114.86854470090232 -114.86854472054372
select object_id, ST_geometrytype(geo), ST_ISSIMPLE(GEO), ST_ASTEXT(ST_centroid(geo)) from
t1 where object_id=85984;

View file

@ -22,3 +22,21 @@ SELECT * FROM t1;
i
1
DROP TABLE t1;
#
# MDEV-38041 MariaBackup fails during rollback of
# inplace FTS alter table
#
CREATE TABLE t1(f1 int, f2 char(100), fulltext(f2)) ENGINE=InnoDB;
INSERT into t1 values(1, "MariaDB"), (1, "MySQL");
connect con2, localhost, root,,;
set lock_wait_timeout=1;
SET debug_sync='copy_data_between_tables_before_reset_backup_lock SIGNAL go WAIT_FOR after_backup_stage_block_ddl';
SET debug_sync='alter_table_after_temp_table_drop SIGNAL temp_table_dropped';
SET debug_sync='now WAIT_FOR after_backup_stage_start';ALTER TABLE test.t1 ADD PRIMARY KEY(f1), algorithm=COPY;|
connection default;
connection con2;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
SET debug_sync='RESET';
disconnect con2;
connection default;
DROP TABLE t1;

View file

@ -49,3 +49,42 @@ exec $XTRABACKUP --prepare --target-dir=$targetdir;
SELECT * FROM t1;
DROP TABLE t1;
rmdir $targetdir;
--echo #
--echo # MDEV-38041 MariaBackup fails during rollback of
--echo # inplace FTS alter table
--echo #
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
CREATE TABLE t1(f1 int, f2 char(100), fulltext(f2)) ENGINE=InnoDB;
INSERT into t1 values(1, "MariaDB"), (1, "MySQL");
connect con2, localhost, root,,;
set lock_wait_timeout=1;
SET debug_sync='copy_data_between_tables_before_reset_backup_lock SIGNAL go WAIT_FOR after_backup_stage_block_ddl';
SET debug_sync='alter_table_after_temp_table_drop SIGNAL temp_table_dropped';
DELIMITER |;
send SET debug_sync='now WAIT_FOR after_backup_stage_start';ALTER TABLE test.t1 ADD PRIMARY KEY(f1), algorithm=COPY;|
DELIMITER ;|
connection default;
# setup mariabackup events
let backup_fix_ddl=;
let after_backup_stage_start=SET debug_sync='now SIGNAL after_backup_stage_start WAIT_FOR go';
let after_backup_stage_block_commit=SET debug_sync='now SIGNAL after_backup_stage_block_ddl';
let after_backup_fix_ddl=SET debug_sync='now WAIT_FOR temp_table_dropped';
let $backup_log=$MYSQLTEST_VARDIR/tmp/backup.log;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events > $backup_log 2>&1;
--enable_result_log
connection con2;
--error ER_DUP_ENTRY
reap;
SET debug_sync='RESET';
disconnect con2;
connection default;
DROP TABLE t1;
rmdir $targetdir;

View file

@ -9103,7 +9103,7 @@ select_item:
}
| remember_name expr remember_end select_alias
{
DBUG_ASSERT($1 < $3);
DBUG_ASSERT($1 < $3 || thd->killed);
if (unlikely(add_item_to_list(thd, $2)))
MYSQL_YYABORT;