1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge branch '10.5' into '10.6'

This commit is contained in:
Julius Goryavsky
2024-12-03 13:08:12 +01:00
38 changed files with 620 additions and 159 deletions

View File

@@ -10,8 +10,6 @@
#
##############################################################################
galera_as_slave_ctas : MDEV-28378 timeout
galera_sequences : MDEV-32561 WSREP FSM failure: no such a transition REPLICATING -> COMMITTED
galera_concurrent_ctas : MDEV-32779 galera_concurrent_ctas: assertion in the galera::ReplicatorSMM::finish_cert()
galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
galera_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()

View File

@@ -3,6 +3,7 @@ connection node_1;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_1;
SET DEBUG_SYNC = 'wsrep_create_table_as_select WAIT_FOR continue';
CREATE table t1 as SELECT SLEEP(0.1);;
@@ -17,14 +18,30 @@ connection node_1b;
SET SESSION debug_sync = 'now WAIT_FOR sync.wsrep_apply_cb_reached';
# Signal first CTAS to continue and wait until CTAS has executed
SET DEBUG_SYNC= 'now SIGNAL continue';
connection node_2b;
# Wait first CTAS to replicate
SELECT * FROM t1;
SLEEP(0.2)
0
connection node_1b;
SET GLOBAL debug_dbug= '';
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
connection node_2a;
connection node_1b;
SET DEBUG_SYNC= 'RESET';
connection node_2;
SELECT * FROM t1;
SLEEP(0.2)
0
connection node_1;
SELECT * FROM t1;
SLEEP(0.2)
0
DROP TABLE t1;
disconnect node_1a;
disconnect node_1b;
disconnect node_2a;
disconnect node_2b;
disconnect node_2;
disconnect node_1;
# End of test

View File

@@ -35,3 +35,10 @@ SELECT VARIABLE_VALUE LIKE '%gmcast.segment = 3%' FROM INFORMATION_SCHEMA.GLOBAL
VARIABLE_VALUE LIKE '%gmcast.segment = 3%'
1
DROP TABLE t1;
connection node_1;
call mtr.add_suppression("WSREP: read_completion_condition.*");
call mtr.add_suppression("WSREP: read_handler.*");
disconnect node_3;
disconnect node_4;
disconnect node_2;
disconnect node_1;

View File

@@ -0,0 +1,4 @@
[binlogoff]
[binlogon]
log-bin

View File

@@ -9,6 +9,7 @@
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_1
#
@@ -48,6 +49,14 @@ SET SESSION debug_sync = 'now WAIT_FOR sync.wsrep_apply_cb_reached';
SET DEBUG_SYNC= 'now SIGNAL continue';
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'Creating table CREATE table t1 as SELECT SLEEP(0.1)'
--source include/wait_condition.inc
--connection node_2b
--echo # Wait first CTAS to replicate
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
--source include/wait_condition.inc
SELECT * FROM t1;
--connection node_1b
#
# Release second CTAS and cleanup
#
@@ -74,12 +83,18 @@ SET DEBUG_SYNC= 'RESET';
#
--connection node_2
--reap
SELECT * FROM t1;
--connection node_1
--error 0,ER_TABLE_EXISTS_ERROR,ER_QUERY_INTERRUPTED
--error 0,ER_QUERY_INTERRUPTED,ER_LOCK_DEADLOCK
--reap
SELECT * FROM t1;
DROP TABLE t1;
--disconnect node_1a
--disconnect node_1b
--disconnect node_2a
--disconnect node_2b
--source include/galera_end.inc
--echo # End of test

View File

@@ -40,3 +40,12 @@ SELECT COUNT(*) AS EXPECT_1 FROM t1;
SELECT VARIABLE_VALUE LIKE '%gmcast.segment = 3%' FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options';
DROP TABLE t1;
--connection node_1
call mtr.add_suppression("WSREP: read_completion_condition.*");
call mtr.add_suppression("WSREP: read_handler.*");
--disconnect node_3
--disconnect node_4
--source include/galera_end.inc

View File

@@ -1,3 +1,6 @@
#
# MDEV-35507 and MDEV-35522
#
install plugin ed25519 soname 'auth_ed25519';
install plugin server_audit soname 'server_audit';
set global server_audit_file_path='server_audit.log';
@@ -6,17 +9,25 @@ set global server_audit_logging=on;
# unsafe to log passwords (pwd-123)
CREATE USER u1 IDENTIFIED BY 'pwd_123';
create user u2 IDENTIFIED VIA ed25519 USING PASSWORD('pwd_123');
CREATE OR REPLACE USER u1 IDENTIFIED BY 'pwd_123';
SET PASSWORD FOR u1 = PASSWORD('pwd_123');
ALTER USER u1 IDENTIFIED BY 'pwd_123';
ALTER USER if exists u1 IDENTIFIED BY 'pwd_123';
SET STATEMENT max_statement_time=10 FOR ALTER USER u1 IDENTIFIED BY 'pwd_123';
alter user u2 identified VIA ed25519 USING password('pwd_123');
GRANT ALL ON test TO u1 IDENTIFIED BY "pwd_123";
GRANT ALL ON test TO u1 identified VIA ed25519 as password('pwd_123') or ed25519 using password('pwd_123');
CREATE SERVER s1 FOREIGN DATA WRAPPER mariadb OPTIONS ( PASSWORD "pwd_123");
CREATE OR REPLACE SERVER s1 FOREIGN DATA WRAPPER mariadb OPTIONS ( PASSWORD "pwd_123");
CREATE OR REPLACE SERVER s1 FOREIGN DATA WRAPPER mariadb OPTIONS ( PASSWORD "pwd_123");
# pattern should not be found
NOT FOUND /pwd_123/ in server_audit.log
# pattern should not be found
# cleaunup
DROP SERVER s1;
DROP USER u1;
DROP USER u2;
set global server_audit_logging=off;
UNINSTALL PLUGIN ed25519;
UNINSTALL PLUGIN server_audit;
# end of 10.5 tests

View File

@@ -13,6 +13,10 @@ if (!$AUTH_ED25519_SO) {
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let SEARCH_FILE= $MYSQLD_DATADIR/server_audit.log;
--echo #
--echo # MDEV-35507 and MDEV-35522
--echo #
install plugin ed25519 soname 'auth_ed25519';
install plugin server_audit soname 'server_audit';
@@ -25,17 +29,24 @@ set global server_audit_logging=on;
CREATE USER u1 IDENTIFIED BY 'pwd_123';
create user u2 IDENTIFIED VIA ed25519 USING PASSWORD('pwd_123');
CREATE OR REPLACE USER u1 IDENTIFIED BY 'pwd_123';
SET PASSWORD FOR u1 = PASSWORD('pwd_123');
ALTER USER u1 IDENTIFIED BY 'pwd_123';
ALTER USER if exists u1 IDENTIFIED BY 'pwd_123';
SET STATEMENT max_statement_time=10 FOR ALTER USER u1 IDENTIFIED BY 'pwd_123';
alter user u2 identified VIA ed25519 USING password('pwd_123');
GRANT ALL ON test TO u1 IDENTIFIED BY "pwd_123";
GRANT ALL ON test TO u1 identified VIA ed25519 as password('pwd_123') or ed25519 using password('pwd_123');
CREATE SERVER s1 FOREIGN DATA WRAPPER mariadb OPTIONS ( PASSWORD "pwd_123");
CREATE OR REPLACE SERVER s1 FOREIGN DATA WRAPPER mariadb OPTIONS ( PASSWORD "pwd_123");
CREATE OR REPLACE SERVER s1 FOREIGN DATA WRAPPER mariadb OPTIONS ( PASSWORD "pwd_123");
--let SEARCH_PATTERN=pwd_123
--echo # pattern should not be found
--source include/search_pattern_in_file.inc
--echo # pattern should not be found
--echo # cleaunup
DROP SERVER s1;
DROP USER u1;
DROP USER u2;
set global server_audit_logging=off;
@@ -44,3 +55,5 @@ set global server_audit_logging=off;
UNINSTALL PLUGIN ed25519;
UNINSTALL PLUGIN server_audit;
--enable_warnings
--echo # end of 10.5 tests

View File

@@ -1,10 +0,0 @@
CREATE TABLE t1 (a INT, b INT, c INT, vc INT AS (c), UNIQUE(a), UNIQUE(b)) WITH SYSTEM VERSIONING;
INSERT IGNORE INTO t1 (a,b,c) VALUES (1,2,3);
SELECT a, b, c FROM t1 INTO OUTFILE '15330.data';
Warnings:
Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
LOAD DATA INFILE '15330.data' IGNORE INTO TABLE t1 (a,b,c);
Warnings:
Warning 1062 Duplicate entry '1' for key 'a'
LOAD DATA INFILE '15330.data' REPLACE INTO TABLE t1 (a,b,c);
DROP TABLE t1;

View File

@@ -61,3 +61,14 @@ connection con1;
replace into t1 values (1),(2);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
drop table t1;
#
# MDEV-15330 Server crash or assertion `table->insert_values' failure in write_record upon LOAD DATA
#
create table t1 (a int, b int, c int, vc int as (c), unique(a), unique(b)) with system versioning;
insert ignore into t1 (a,b,c) values (1,2,3);
select a, b, c into outfile '15330.data' from t1;
load data infile '15330.data' ignore into table t1 (a,b,c);
Warnings:
Warning 1062 Duplicate entry '1' for key 'a'
load data infile '15330.data' replace into table t1 (a,b,c);
drop table t1;

View File

@@ -1,18 +0,0 @@
#
# MDEV-15330 Server crash or assertion `table->insert_values' failure in write_record upon LOAD DATA
#
CREATE TABLE t1 (a INT, b INT, c INT, vc INT AS (c), UNIQUE(a), UNIQUE(b)) WITH SYSTEM VERSIONING;
INSERT IGNORE INTO t1 (a,b,c) VALUES (1,2,3);
--disable_cursor_protocol
--enable_prepare_warnings
--disable_ps2_protocol
SELECT a, b, c FROM t1 INTO OUTFILE '15330.data';
--disable_prepare_warnings
--enable_ps2_protocol
--enable_cursor_protocol
LOAD DATA INFILE '15330.data' IGNORE INTO TABLE t1 (a,b,c);
LOAD DATA INFILE '15330.data' REPLACE INTO TABLE t1 (a,b,c);
# Cleanup
DROP TABLE t1;

View File

@@ -77,4 +77,32 @@ replace into t1 values (1),(2);
drop table t1;
--echo #
--echo # MDEV-15330 Server crash or assertion `table->insert_values' failure in write_record upon LOAD DATA
--echo #
if ($default_engine == MEMORY)
{
--disable_query_log
set default_storage_engine= myisam;
--enable_query_log
}
create table t1 (a int, b int, c int, vc int as (c), unique(a), unique(b)) with system versioning;
insert ignore into t1 (a,b,c) values (1,2,3);
--disable_cursor_protocol
--disable_ps2_protocol
select a, b, c into outfile '15330.data' from t1;
--enable_ps2_protocol
--enable_cursor_protocol
load data infile '15330.data' ignore into table t1 (a,b,c);
load data infile '15330.data' replace into table t1 (a,b,c);
--let $datadir=`select @@datadir`
--remove_file $datadir/test/15330.data
# cleanup
drop table t1;
--disable_query_log
eval set default_storage_engine= $default_engine;
--enable_query_log
--source suite/versioning/common_finish.inc