Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
1b3770ac
Commit
1b3770ac
authored
Dec 18, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.3 into 10.4
parents
b5763ecd
75e7e0b9
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
461 additions
and
20 deletions
+461
-20
mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir,debug.rdiff
...uite/galera/r/galera_sst_mariabackup_data_dir,debug.rdiff
+116
-0
mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir.result
...est/suite/galera/r/galera_sst_mariabackup_data_dir.result
+290
-0
mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.cnf
...l-test/suite/galera/t/galera_sst_mariabackup_data_dir.cnf
+17
-0
mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.test
...-test/suite/galera/t/galera_sst_mariabackup_data_dir.test
+23
-0
storage/innobase/fil/fil0crypt.cc
storage/innobase/fil/fil0crypt.cc
+15
-20
No files found.
mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir,debug.rdiff
0 → 100644
View file @
1b3770ac
--- r/galera_sst_mariabackup_data_dir.result 2018-12-12 13:59:56.525554689 +0100
+++ r/galera_sst_mariabackup_data_dir.reject 2018-12-12 14:33:50.868181956 +0100
@@ -286,5 +286,113 @@
DROP TABLE t1;
COMMIT;
SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+connection node_2;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+connection node_2;
+SET wsrep_sync_wait = 0;
+Killing server ...
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
+COMMIT;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
+Starting server ...
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+COMMIT;
+connection node_1;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+ROLLBACK;
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
+COUNT(*) = 2
+1
+SELECT COUNT(*) = 35 FROM t1;
+COUNT(*) = 35
+1
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
+SET AUTOCOMMIT=ON;
+connection node_1;
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
+COUNT(*) = 2
+1
+SELECT COUNT(*) = 35 FROM t1;
+COUNT(*) = 35
+1
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
disconnect node_2;
disconnect node_1;
mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir.result
0 → 100644
View file @
1b3770ac
This diff is collapsed.
Click to expand it.
mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.cnf
0 → 100644
View file @
1b3770ac
!include ../galera_2nodes.cnf
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
wsrep_debug=ON
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
[mysqld.2]
innodb_data_home_dir=@ENV.MYSQL_TMP_DIR/data_dir_test
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
[sst]
transferfmt=@ENV.MTR_GALERA_TFMT
streamfmt=xbstream
mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.test
0 → 100644
View file @
1b3770ac
--
source
include
/
big_test
.
inc
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_mariabackup
.
inc
# Save original auto_increment_offset values.
--
let
$node_1
=
node_1
--
let
$node_2
=
node_2
--
source
include
/
auto_increment_offset_save
.
inc
--
source
suite
/
galera
/
include
/
galera_st_shutdown_slave
.
inc
--
source
suite
/
galera
/
include
/
galera_st_clean_slave
.
inc
--
source
suite
/
galera
/
include
/
galera_st_kill_slave
.
inc
--
source
suite
/
galera
/
include
/
galera_st_kill_slave_ddl
.
inc
# Restore original auto_increment_offset values.
--
source
include
/
auto_increment_offset_restore
.
inc
--
source
include
/
galera_end
.
inc
# cleanup temporary database files:
--
remove_files_wildcard
$MYSQL_TMP_DIR
/
data_dir_test
*
storage/innobase/fil/fil0crypt.cc
View file @
1b3770ac
...
...
@@ -2545,10 +2545,8 @@ fil_space_verify_crypt_checksum(const byte* page, const page_size_t& page_size)
/* If stored checksum matches one of the calculated checksums
page is not corrupted. */
srv_checksum_algorithm_t
algorithm
=
srv_checksum_algorithm_t
(
srv_checksum_algorithm
);
switch
(
algorithm
)
{
switch
(
srv_checksum_algorithm_t
(
srv_checksum_algorithm
)
)
{
case
SRV_CHECKSUM_ALGORITHM_STRICT_CRC32
:
if
(
page_size
.
is_compressed
())
{
return
checksum
==
page_zip_calc_checksum
(
...
...
@@ -2557,33 +2555,30 @@ fil_space_verify_crypt_checksum(const byte* page, const page_size_t& page_size)
}
return
checksum
==
buf_calc_page_crc32
(
page
);
case
SRV_CHECKSUM_ALGORITHM_STRICT_INNODB
:
if
(
page_size
.
is_compressed
())
{
return
checksum
==
page_zip_calc_checksum
(
page
,
page_size
.
physical
(),
SRV_CHECKSUM_ALGORITHM_INNODB
);
}
return
checksum
==
buf_calc_page_new_checksum
(
page
);
case
SRV_CHECKSUM_ALGORITHM_STRICT_NONE
:
return
checksum
==
BUF_NO_CHECKSUM_MAGIC
;
/* Starting with MariaDB 10.1.25, 10.2.7, 10.3.1,
due to MDEV-12114, fil_crypt_calculate_checksum()
is only using CRC32 for the encrypted pages.
Due to this, we must treat "strict_none" as "none". */
case
SRV_CHECKSUM_ALGORITHM_NONE
:
return
true
;
case
SRV_CHECKSUM_ALGORITHM_STRICT_INNODB
:
/* Starting with MariaDB 10.1.25, 10.2.7, 10.3.1,
due to MDEV-12114, fil_crypt_calculate_checksum()
is only using CRC32 for the encrypted pages.
Due to this, we must treat "strict_innodb" as "innodb". */
case
SRV_CHECKSUM_ALGORITHM_INNODB
:
case
SRV_CHECKSUM_ALGORITHM_CRC32
:
if
(
checksum
==
BUF_NO_CHECKSUM_MAGIC
)
{
return
true
;
}
if
(
page_size
.
is_compressed
())
{
if
(
checksum
==
page_zip_calc_checksum
(
page
,
page_size
.
physical
(),
algorithm
))
{
return
true
;
}
algorithm
=
algorithm
==
SRV_CHECKSUM_ALGORITHM_INNODB
?
SRV_CHECKSUM_ALGORITHM_CRC32
:
SRV_CHECKSUM_ALGORITHM_INNODB
;
return
checksum
==
page_zip_calc_checksum
(
page
,
page_size
.
physical
(),
algorithm
);
page
,
page_size
.
physical
(),
SRV_CHECKSUM_ALGORITHM_CRC32
)
||
checksum
==
page_zip_calc_checksum
(
page
,
page_size
.
physical
(),
SRV_CHECKSUM_ALGORITHM_INNODB
);
}
return
checksum
==
buf_calc_page_crc32
(
page
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment