1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge branch '10.6' into '10.11'

This commit is contained in:
Julius Goryavsky
2024-09-02 03:42:02 +02:00
51 changed files with 680 additions and 137 deletions

View File

@ -0,0 +1,38 @@
SET SESSION wsrep_osu_method=RSU;
SET autocommit=0;
CREATE TABLE t (c INT) ENGINE=INNODB PARTITION BY KEY(c) PARTITIONS 2;
INSERT INTO t VALUES (1);
INSERT INTO t SELECT 1 ;
COMMIT;
SELECT * FROM t;
c
1
1
DROP TABLE t;
SET autocommit=1;
SET SESSION wsrep_osu_method=RSU;
CREATE TABLE t (c INT) ENGINE=INNODB PARTITION BY KEY(c) PARTITIONS 2;
INSERT INTO t SELECT 1 ;
SELECT * FROM t;
c
1
DROP TABLE t;
SET autocommit=1;
SET SESSION wsrep_osu_method=RSU;
CREATE TABLE t (c INT) ENGINE=MYISAM PARTITION BY KEY(c) PARTITIONS 2;
INSERT INTO t SELECT 1 ;
ERROR 42000: This version of MariaDB doesn't yet support 'RSU on this table engine'
SELECT * FROM t;
c
DROP TABLE t;
SET SESSION wsrep_osu_method=RSU;
SET autocommit=0;
CREATE TABLE t (c INT) ENGINE=MYISAM PARTITION BY KEY(c) PARTITIONS 2;
INSERT INTO t VALUES (1);
INSERT INTO t SELECT 1 ;
ERROR 42000: This version of MariaDB doesn't yet support 'RSU on this table engine'
COMMIT;
SELECT * FROM t;
c
1
DROP TABLE t;

View File

@ -0,0 +1,9 @@
!include ../my.cnf
[mysqld.1]
wsrep-on=ON
binlog-format=ROW
innodb-flush-log-at-trx-commit=1
wsrep-cluster-address=gcomm://
wsrep-provider=@ENV.WSREP_PROVIDER
innodb-autoinc-lock-mode=2

View File

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

View File

@ -0,0 +1,49 @@
--source include/have_wsrep.inc
--source include/have_innodb.inc
--source include/have_wsrep_provider.inc
--source include/have_partition.inc
#
# MDEV-33997: Assertion `((WSREP_PROVIDER_EXISTS_ && this->variables.wsrep_on) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()' failed in int THD::binlog_write_row(TABLE*, bool, const uchar*)
#
SET SESSION wsrep_osu_method=RSU;
SET autocommit=0;
CREATE TABLE t (c INT) ENGINE=INNODB PARTITION BY KEY(c) PARTITIONS 2;
INSERT INTO t VALUES (1);
INSERT INTO t SELECT 1 ;
COMMIT;
SELECT * FROM t;
DROP TABLE t;
#
# MDEV-27296 : Assertion `((thd && (WSREP_PROVIDER_EXISTS_ && thd->variables.wsrep_on)) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()' failed
# Second test case
#
SET autocommit=1;
SET SESSION wsrep_osu_method=RSU;
CREATE TABLE t (c INT) ENGINE=INNODB PARTITION BY KEY(c) PARTITIONS 2;
INSERT INTO t SELECT 1 ;
SELECT * FROM t;
DROP TABLE t;
#
# We should not allow RSU for MyISAM
#
SET autocommit=1;
SET SESSION wsrep_osu_method=RSU;
CREATE TABLE t (c INT) ENGINE=MYISAM PARTITION BY KEY(c) PARTITIONS 2;
--error ER_NOT_SUPPORTED_YET
INSERT INTO t SELECT 1 ;
SELECT * FROM t;
DROP TABLE t;
SET SESSION wsrep_osu_method=RSU;
SET autocommit=0;
CREATE TABLE t (c INT) ENGINE=MYISAM PARTITION BY KEY(c) PARTITIONS 2;
INSERT INTO t VALUES (1);
--error ER_NOT_SUPPORTED_YET
INSERT INTO t SELECT 1 ;
COMMIT;
SELECT * FROM t;
DROP TABLE t;

View File

@ -18,7 +18,7 @@
--perl
use strict;
my $wsrep_start_position = `grep 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
my $wsrep_start_position = `grep -a 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
chomp($wsrep_start_position);
die if $wsrep_start_position eq '';
open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/galera_wsrep_start_position.inc") or die;