1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Merge branch bb-10.2-release into bb-10.3-release

This commit is contained in:
Nikita Malyavin
2021-05-04 14:49:31 +03:00
88 changed files with 1696 additions and 469 deletions

View File

@@ -233,4 +233,76 @@ set debug_sync= "now WAIT_FOR got_no_such_table";
set global debug_dbug= @saved_dbug;
drop table t1;
set debug_sync=reset;
#
# MDEV-18546 ASAN heap-use-after-free
# in innobase_get_computed_value / row_purge
#
CREATE TABLE t1 (
pk INT AUTO_INCREMENT,
b BIT(15),
v BIT(15) AS (b) VIRTUAL,
PRIMARY KEY(pk),
UNIQUE(v)
) ENGINE=InnoDB;
INSERT IGNORE INTO t1 (b) VALUES
(NULL),(b'011'),(b'000110100'),
(b'01101101010'),(b'01111001001011'),(NULL);
SET GLOBAL innodb_debug_sync = "ib_clust_v_col_before_row_allocated "
"SIGNAL before_row_allocated "
"WAIT_FOR flush_unlock";
SET GLOBAL innodb_debug_sync = "ib_open_after_dict_open "
"SIGNAL purge_open "
"WAIT_FOR select_open";
set global debug_dbug= "d,ib_purge_virtual_index_callback";
connect purge_waiter,localhost,root;
SET debug_sync= "now WAIT_FOR before_row_allocated";
connection default;
REPLACE INTO t1 (pk, b) SELECT pk, b FROM t1;
connection purge_waiter;
connection default;
disconnect purge_waiter;
FLUSH TABLES;
SET GLOBAL innodb_debug_sync = reset;
SET debug_sync= "now SIGNAL flush_unlock WAIT_FOR purge_open";
SET GLOBAL innodb_debug_sync = reset;
SET debug_sync= "ib_open_after_dict_open SIGNAL select_open";
SELECT * FROM t1;
pk b v
1 NULL NULL
2  
3 4 4
4 j j
5 K K
6 NULL NULL
DROP TABLE t1;
SET debug_sync= reset;
set global debug_dbug= @old_dbug;
# MDEV-16962 Assertion '!error || !ot_ctx.can_recover_from_failed_open()'
# failed in open_purge_table upon concurrent ALTER and FLUSH
CREATE TABLE t1 (
pk SERIAL,
c VARCHAR(128),
d DATE,
vd DATE AS (d) VIRTUAL,
PRIMARY KEY(pk),
KEY(vd,c)
) ENGINE=InnoDB;
INSERT IGNORE INTO t1 (pk,c) VALUES (1,'foo');
set debug_sync="now WAIT_FOR purge";
connect con1,localhost,root,,test;
SET GLOBAL innodb_debug_sync="after_open_table_mdl_shared SIGNAL purge WAIT_FOR flush";
SET global debug_dbug="d,ib_purge_virtual_index_callback";
REPLACE INTO t1 (pk,c) VALUES (1,'bar');
connection default;
SET debug_sync="alter_table_before_rename_result_table WAIT_FOR flush";
ALTER TABLE t1 ADD FULLTEXT KEY(c), ALGORITHM=COPY;
connection con1;
SET debug_sync="after_flush_unlock SIGNAL flush ";
FLUSH TABLES;
disconnect con1;
connection default;
InnoDB 0 transactions not purged
DROP TABLE t1;
SET debug_sync= reset;
SET global debug_dbug=@old_dbug;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;