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
3f7040fa
Commit
3f7040fa
authored
Dec 04, 2021
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.5 into 10.6
parents
e0e24b18
fa132551
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
188 additions
and
201 deletions
+188
-201
debian/mariadb-server-10.6.mysql-server.logrotate
debian/mariadb-server-10.6.mysql-server.logrotate
+2
-2
mysql-test/main/long_unique.result
mysql-test/main/long_unique.result
+2
-44
mysql-test/main/long_unique.test
mysql-test/main/long_unique.test
+5
-29
mysql-test/main/long_unique_big.result
mysql-test/main/long_unique_big.result
+38
-0
mysql-test/main/long_unique_big.test
mysql-test/main/long_unique_big.test
+26
-0
mysql-test/suite/galera/disabled.def
mysql-test/suite/galera/disabled.def
+2
-0
mysql-test/suite/galera/r/galera_as_slave_replay.result
mysql-test/suite/galera/r/galera_as_slave_replay.result
+3
-38
mysql-test/suite/galera/r/galera_bf_abort_at_after_statement.result
.../suite/galera/r/galera_bf_abort_at_after_statement.result
+2
-0
mysql-test/suite/galera/r/galera_kill_applier.result
mysql-test/suite/galera/r/galera_kill_applier.result
+8
-2
mysql-test/suite/galera/r/galera_unicode_pk.result
mysql-test/suite/galera/r/galera_unicode_pk.result
+1
-0
mysql-test/suite/galera/r/galera_update_limit.result
mysql-test/suite/galera/r/galera_update_limit.result
+2
-2
mysql-test/suite/galera/t/galera_as_slave_replay.cnf
mysql-test/suite/galera/t/galera_as_slave_replay.cnf
+2
-0
mysql-test/suite/galera/t/galera_as_slave_replay.test
mysql-test/suite/galera/t/galera_as_slave_replay.test
+4
-64
mysql-test/suite/galera/t/galera_bad_wsrep_new_cluster.cnf
mysql-test/suite/galera/t/galera_bad_wsrep_new_cluster.cnf
+7
-0
mysql-test/suite/galera/t/galera_bf_abort_at_after_statement.cnf
...est/suite/galera/t/galera_bf_abort_at_after_statement.cnf
+7
-0
mysql-test/suite/galera/t/galera_bf_abort_at_after_statement.test
...st/suite/galera/t/galera_bf_abort_at_after_statement.test
+12
-0
mysql-test/suite/galera/t/galera_kill_applier.cnf
mysql-test/suite/galera/t/galera_kill_applier.cnf
+7
-0
mysql-test/suite/galera/t/galera_kill_applier.test
mysql-test/suite/galera/t/galera_kill_applier.test
+9
-3
mysql-test/suite/galera/t/galera_sp_bf_abort.cnf
mysql-test/suite/galera/t/galera_sp_bf_abort.cnf
+7
-0
mysql-test/suite/galera/t/galera_unicode_pk.cnf
mysql-test/suite/galera/t/galera_unicode_pk.cnf
+7
-0
mysql-test/suite/galera/t/galera_unicode_pk.test
mysql-test/suite/galera/t/galera_unicode_pk.test
+11
-1
mysql-test/suite/galera/t/galera_update_limit.cnf
mysql-test/suite/galera/t/galera_update_limit.cnf
+7
-0
mysql-test/suite/galera/t/galera_update_limit.test
mysql-test/suite/galera/t/galera_update_limit.test
+2
-3
mysys/lf_alloc-pin.c
mysys/lf_alloc-pin.c
+3
-2
mysys/lf_hash.cc
mysys/lf_hash.cc
+9
-5
storage/innobase/include/mtr0types.h
storage/innobase/include/mtr0types.h
+1
-1
storage/innobase/log/log0log.cc
storage/innobase/log/log0log.cc
+1
-3
storage/innobase/srv/srv0start.cc
storage/innobase/srv/srv0start.cc
+1
-2
No files found.
debian/mariadb-server-10.6.mysql-server.logrotate
View file @
3f7040fa
...
...
@@ -11,8 +11,8 @@
sharedscripts
postrotate
test -x /usr/bin/mysqladmin || exit 0
if [ -f `my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"` ]; then
# If this fails, check debian.conf!
# check if server is running
if mysqladmin ping > /dev/null 2>&1; then
mysqladmin --defaults-file=/etc/mysql/debian.cnf --local flush-error-log \
flush-engine-log flush-general-log flush-slow-log
fi
...
...
mysql-test/main/long_unique.result
View file @
3f7040fa
...
...
@@ -3,7 +3,6 @@
#table containing single unique column
#table containing keys like unique(a,b,c,d) etc
#then table containing 2 blob unique etc
set @allowed_packet= @@max_allowed_packet;
#table with single long blob column;
create table t1(a blob unique );
insert into t1 values(1),(2),(3),(56),('sachin'),('maria'),(123456789034567891),(null),(null),(123456789034567890);
...
...
@@ -1226,44 +1225,6 @@ DB_ROW_HASH_1
33
44
drop table t1,t2;
#very long blob entry;
SET @@GLOBAL.max_allowed_packet=67108864;
connect 'newcon', localhost, root,,;
connection newcon;
show variables like 'max_allowed_packet';
Variable_name Value
max_allowed_packet 67108864
create table t1(a longblob unique, b longblob , c longblob , unique(b,c));
desc t1;
Field Type Null Key Default Extra
a longblob YES UNI NULL
b longblob YES MUL NULL
c longblob YES NULL
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` longblob DEFAULT NULL,
`b` longblob DEFAULT NULL,
`c` longblob DEFAULT NULL,
UNIQUE KEY `a` (`a`) USING HASH,
UNIQUE KEY `b` (`b`,`c`) USING HASH
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
t1 0 a 1 a A NULL NULL NULL YES HASH NO
t1 0 b 1 b A NULL NULL NULL YES HASH NO
t1 0 b 2 c A NULL NULL NULL YES HASH NO
insert into t1 values(concat(repeat('sachin',10000000),'1'),concat(repeat('sachin',10000000),'1'),
concat(repeat('sachin',10000000),'1'));
insert into t1 values(concat(repeat('sachin',10000000),'2'),concat(repeat('sachin',10000000),'2'),
concat(repeat('sachin',10000000),'1'));
insert into t1 values(concat(repeat('sachin',10000000),'2'),concat(repeat('sachin',10000000),'2'),
concat(repeat('sachin',10000000),'4'));
ERROR 23000: Duplicate entry 'sachinsachinsachinsachinsachinsachinsachinsachinsachinsachins...' for key 'a'
insert into t1 values(concat(repeat('sachin',10000000),'3'),concat(repeat('sachin',10000000),'1'),
concat(repeat('sachin',10000000),'1'));
ERROR 23000: Duplicate entry 'sachinsachinsachinsachinsachinsachinsachinsachinsachinsachins...' for key 'b'
drop table t1;
#long key unique with different key length
create table t1(a blob, unique(a(3000)));
desc t1;
...
...
@@ -1308,9 +1269,6 @@ t1 0 a 2 b A NULL NULL NULL YES HASH NO
t1 0 c 1 c A NULL 4500 NULL YES HASH NO
t1 0 c 2 d A NULL NULL NULL YES HASH NO
drop table t1;
disconnect newcon;
connection default;
SET @@GLOBAL.max_allowed_packet=4194304;
#ext bug
create table t1(a int primary key, b blob unique, c int, d blob , index(c));
show create table t1;
...
...
@@ -1478,6 +1436,7 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT t2.b FROM t1 JOIN t2 ON t1.d = t2.f WHERE t2.pk >= 20;
b
drop table t1,t2;
# End of 10.4 tests
#
# MDEV-21470 MyISAM start_bulk_insert doesn't work with long unique
#
...
...
@@ -1493,5 +1452,4 @@ DROP TABLE t1, t2;
#
CREATE TABLE t1 (pk INT, a TEXT NOT NULL DEFAULT '', PRIMARY KEY (pk), b INT AUTO_INCREMENT, UNIQUE(b), UNIQUE (a,b)) ENGINE=myisam;
ERROR HY000: AUTO_INCREMENT column `b` cannot be used in the UNIQUE index `a`
set @@GLOBAL.max_allowed_packet= @allowed_packet;
# End of 10.4 tests
# End of 10.5 tests
mysql-test/main/long_unique.test
View file @
3f7040fa
...
...
@@ -10,7 +10,7 @@ let datadir=`select @@datadir`;
--
echo
#table containing single unique column
--
echo
#table containing keys like unique(a,b,c,d) etc
--
echo
#then table containing 2 blob unique etc
set
@
allowed_packet
=
@@
max_allowed_packet
;
--
echo
#table with single long blob column;
create
table
t1
(
a
blob
unique
);
insert
into
t1
values
(
1
),(
2
),(
3
),(
56
),(
'sachin'
),(
'maria'
),(
123456789034567891
),(
null
),(
null
),(
123456789034567890
);
...
...
@@ -396,28 +396,6 @@ select DB_ROW_HASH_1 from t1,t2 where t1.DB_ROW_HASH_1 = t2.DB_ROW_HASH_2;
select
DB_ROW_HASH_1
from
t1
inner
join
t2
on
t1
.
a
=
t2
.
DB_ROW_HASH_2
;
drop
table
t1
,
t2
;
--
echo
#very long blob entry;
SET
@@
GLOBAL
.
max_allowed_packet
=
67108864
;
connect
(
'newcon'
,
localhost
,
root
,,);
--
connection
newcon
show
variables
like
'max_allowed_packet'
;
create
table
t1
(
a
longblob
unique
,
b
longblob
,
c
longblob
,
unique
(
b
,
c
));
desc
t1
;
show
create
table
t1
;
show
keys
from
t1
;
insert
into
t1
values
(
concat
(
repeat
(
'sachin'
,
10000000
),
'1'
),
concat
(
repeat
(
'sachin'
,
10000000
),
'1'
),
concat
(
repeat
(
'sachin'
,
10000000
),
'1'
));
insert
into
t1
values
(
concat
(
repeat
(
'sachin'
,
10000000
),
'2'
),
concat
(
repeat
(
'sachin'
,
10000000
),
'2'
),
concat
(
repeat
(
'sachin'
,
10000000
),
'1'
));
--
error
ER_DUP_ENTRY
insert
into
t1
values
(
concat
(
repeat
(
'sachin'
,
10000000
),
'2'
),
concat
(
repeat
(
'sachin'
,
10000000
),
'2'
),
concat
(
repeat
(
'sachin'
,
10000000
),
'4'
));
--
error
ER_DUP_ENTRY
insert
into
t1
values
(
concat
(
repeat
(
'sachin'
,
10000000
),
'3'
),
concat
(
repeat
(
'sachin'
,
10000000
),
'1'
),
concat
(
repeat
(
'sachin'
,
10000000
),
'1'
));
drop
table
t1
;
--
echo
#long key unique with different key length
create
table
t1
(
a
blob
,
unique
(
a
(
3000
)));
desc
t1
;
...
...
@@ -435,9 +413,7 @@ desc t1;
show
create
table
t1
;
show
keys
from
t1
;
drop
table
t1
;
disconnect
newcon
;
--
connection
default
SET
@@
GLOBAL
.
max_allowed_packet
=
4194304
;
--
echo
#ext bug
create
table
t1
(
a
int
primary
key
,
b
blob
unique
,
c
int
,
d
blob
,
index
(
c
));
show
create
table
t1
;
...
...
@@ -556,6 +532,8 @@ SELECT t2.b FROM t1 JOIN t2 ON t1.d = t2.f WHERE t2.pk >= 20;
SELECT
t2
.
b
FROM
t1
JOIN
t2
ON
t1
.
d
=
t2
.
f
WHERE
t2
.
pk
>=
20
;
drop
table
t1
,
t2
;
--
echo
# End of 10.4 tests
--
echo
#
--
echo
# MDEV-21470 MyISAM start_bulk_insert doesn't work with long unique
--
echo
#
...
...
@@ -573,6 +551,4 @@ DROP TABLE t1, t2;
--
error
ER_NO_AUTOINCREMENT_WITH_UNIQUE
CREATE
TABLE
t1
(
pk
INT
,
a
TEXT
NOT
NULL
DEFAULT
''
,
PRIMARY
KEY
(
pk
),
b
INT
AUTO_INCREMENT
,
UNIQUE
(
b
),
UNIQUE
(
a
,
b
))
ENGINE
=
myisam
;
# Cleanup
set
@@
GLOBAL
.
max_allowed_packet
=
@
allowed_packet
;
--
echo
# End of 10.4 tests
--
echo
# End of 10.5 tests
mysql-test/main/long_unique_big.result
0 → 100644
View file @
3f7040fa
set @allowed_packet= @@max_allowed_packet;
SET GLOBAL max_allowed_packet=67108864;
connect con1, localhost, root,,;
create table t1(a longblob unique, b longblob , c longblob , unique(b,c));
desc t1;
Field Type Null Key Default Extra
a longblob YES UNI NULL
b longblob YES MUL NULL
c longblob YES NULL
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` longblob DEFAULT NULL,
`b` longblob DEFAULT NULL,
`c` longblob DEFAULT NULL,
UNIQUE KEY `a` (`a`) USING HASH,
UNIQUE KEY `b` (`b`,`c`) USING HASH
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
t1 0 a 1 a A NULL NULL NULL YES HASH NO
t1 0 b 1 b A NULL NULL NULL YES HASH NO
t1 0 b 2 c A NULL NULL NULL YES HASH NO
insert into t1 values(concat(repeat('sachin',10000000),'1'),concat(repeat('sachin',10000000),'1'),
concat(repeat('sachin',10000000),'1'));
insert into t1 values(concat(repeat('sachin',10000000),'2'),concat(repeat('sachin',10000000),'2'),
concat(repeat('sachin',10000000),'1'));
insert into t1 values(concat(repeat('sachin',10000000),'2'),concat(repeat('sachin',10000000),'2'),
concat(repeat('sachin',10000000),'4'));
ERROR 23000: Duplicate entry 'sachinsachinsachinsachinsachinsachinsachinsachinsachinsachins...' for key 'a'
insert into t1 values(concat(repeat('sachin',10000000),'3'),concat(repeat('sachin',10000000),'1'),
concat(repeat('sachin',10000000),'1'));
ERROR 23000: Duplicate entry 'sachinsachinsachinsachinsachinsachinsachinsachinsachinsachins...' for key 'b'
drop table t1;
disconnect con1;
connection default;
set @@GLOBAL.max_allowed_packet= @allowed_packet;
# End of 10.4 tests
mysql-test/main/long_unique_big.test
0 → 100644
View file @
3f7040fa
# This test may run out of memory in some environments.
--
source
include
/
big_test
.
inc
set
@
allowed_packet
=
@@
max_allowed_packet
;
SET
GLOBAL
max_allowed_packet
=
67108864
;
connect
(
con1
,
localhost
,
root
,,);
create
table
t1
(
a
longblob
unique
,
b
longblob
,
c
longblob
,
unique
(
b
,
c
));
desc
t1
;
show
create
table
t1
;
show
keys
from
t1
;
insert
into
t1
values
(
concat
(
repeat
(
'sachin'
,
10000000
),
'1'
),
concat
(
repeat
(
'sachin'
,
10000000
),
'1'
),
concat
(
repeat
(
'sachin'
,
10000000
),
'1'
));
insert
into
t1
values
(
concat
(
repeat
(
'sachin'
,
10000000
),
'2'
),
concat
(
repeat
(
'sachin'
,
10000000
),
'2'
),
concat
(
repeat
(
'sachin'
,
10000000
),
'1'
));
--
error
ER_DUP_ENTRY
insert
into
t1
values
(
concat
(
repeat
(
'sachin'
,
10000000
),
'2'
),
concat
(
repeat
(
'sachin'
,
10000000
),
'2'
),
concat
(
repeat
(
'sachin'
,
10000000
),
'4'
));
--
error
ER_DUP_ENTRY
insert
into
t1
values
(
concat
(
repeat
(
'sachin'
,
10000000
),
'3'
),
concat
(
repeat
(
'sachin'
,
10000000
),
'1'
),
concat
(
repeat
(
'sachin'
,
10000000
),
'1'
));
drop
table
t1
;
disconnect
con1
;
connection
default
;
set
@@
GLOBAL
.
max_allowed_packet
=
@
allowed_packet
;
--
echo
# End of 10.4 tests
mysql-test/suite/galera/disabled.def
View file @
3f7040fa
...
...
@@ -45,3 +45,5 @@ partition : MDEV-19958 Galera test failure on galera.partition
pxc-421: wsrep_provider is read-only for security reasons
query_cache: MDEV-15805 Test failure on galera.query_cache
versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
galera_ssl_mode_server : Certificate CA mismatch
galera_bf_abort_at_after_statement : Unstable
mysql-test/suite/galera/r/galera_as_slave_replay.result
View file @
3f7040fa
...
...
@@ -60,44 +60,6 @@ f1 f2
2 b
3 c
SET DEBUG_SYNC = "RESET";
#
# test phase with real abort
#
connection node_3;
set binlog_format=ROW;
insert into t1 values (4, 'd');
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE t1 SET f2 = 'd' WHERE f1 = 3;
connection node_2a;
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
connection node_1;
UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3;
connection node_3;
COMMIT;
connection node_2a;
SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
connection node_2a;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
SET DEBUG_SYNC = "RESET";
connection node_2a;
set session wsrep_sync_wait=0;
SELECT * from test.t1;
f1 f2
1 a
2 b
3 e
4 d
connection node_1;
SELECT * from test.t1;
f1 f2
1 a
2 b
3 e
4 d
connection node_2a;
STOP SLAVE;
RESET SLAVE;
...
...
@@ -105,3 +67,6 @@ DROP TABLE t1;
connection node_3;
DROP TABLE t1;
RESET MASTER;
connection node_1;
disconnect node_2a;
disconnect node_3;
mysql-test/suite/galera/r/galera_bf_abort_at_after_statement.result
View file @
3f7040fa
...
...
@@ -4,6 +4,7 @@ connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY, val INT);
INSERT INTO t1 VALUES (1, 1);
connection node_2;
SET DEBUG_SYNC = 'RESET';
START TRANSACTION;
SET DEBUG_SYNC = 'wsrep_after_statement_enter SIGNAL blocked WAIT_FOR continue';
UPDATE t1 SET val=2 WHERE id=1;
...
...
@@ -18,4 +19,5 @@ ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
COMMIT;
SET DEBUG_SYNC = 'RESET';
connection node_1;
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;
mysql-test/suite/galera/r/galera_kill_applier.result
View file @
3f7040fa
connection node_2;
connection node_1;
connection node_2;
SELECT @@wsrep_slave_threads;
@@wsrep_slave_threads
1
SET GLOBAL wsrep_slave_threads=2;
Got one of the listed errors
Got one of the listed errors
Got one of the listed errors
Got one of the listed errors
SET GLOBAL wsrep_slave_threads=
1
;
SET GLOBAL wsrep_slave_threads=
DEFAULT
;
connection node_1;
create table t1(a int not null primary key) engine=innodb;
insert into t1 values (1);
insert into t1 values (2);
connection node_2;
set global wsrep_sync_wait=15;
# Wait until one of the appliers has exited
select count(*) from t1;
count(*)
2
SELECT @@wsrep_slave_threads;
@@wsrep_slave_threads
1
connection node_1;
drop table t1;
mysql-test/suite/galera/r/galera_unicode_pk.result
View file @
3f7040fa
connection node_2;
connection node_1;
connection node_1;
CREATE TABLE t1 (
f1 VARCHAR(255) PRIMARY KEY
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
...
...
mysql-test/suite/galera/r/galera_update_limit.result
View file @
3f7040fa
connection node_2;
connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER) Engine=InnoDB;
CREATE TABLE ten (f1 INTEGER
not null primary key
) Engine=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
CREATE TABLE t1 (f1 INTEGER
NOT NULL
PRIMARY KEY) Engine=InnoDB;
INSERT INTO t1 SELECT f1 FROM ten ORDER BY RAND();
connection node_2;
UPDATE IGNORE t1 SET f1 = FLOOR(1 + (RAND() * 10)) ORDER BY RAND() LIMIT 5;
...
...
mysql-test/suite/galera/t/galera_as_slave_replay.cnf
View file @
3f7040fa
...
...
@@ -5,7 +5,9 @@ binlog-format=row
[mysqld.1]
wsrep_restart_slave=1
wsrep-debug=1
[mysqld.2]
wsrep_restart_slave=1
wsrep-debug=1
mysql-test/suite/galera/t/galera_as_slave_replay.test
View file @
3f7040fa
...
...
@@ -131,70 +131,6 @@ set session wsrep_sync_wait=0;
SELECT
*
FROM
t1
;
SET
DEBUG_SYNC
=
"RESET"
;
#********************************************************************************
# test phase 2
#********************************************************************************
--
echo
#
--
echo
# test phase with real abort
--
echo
#
--
connection
node_3
set
binlog_format
=
ROW
;
insert
into
t1
values
(
4
,
'd'
);
SET
AUTOCOMMIT
=
ON
;
START
TRANSACTION
;
UPDATE
t1
SET
f2
=
'd'
WHERE
f1
=
3
;
--
connection
node_2a
# wait for the last insert to be replicated from master
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
4
FROM
test
.
t1
;
--
source
include
/
wait_condition
.
inc
# Block the commit
--
let
$galera_sync_point
=
commit_monitor_enter_sync
--
source
include
/
galera_set_sync_point
.
inc
# block applier
SET
GLOBAL
debug_dbug
=
"d,sync.wsrep_apply_cb"
;
# Inject a conflicting update from node 3
--
connection
node_1
UPDATE
test
.
t1
SET
f2
=
'e'
WHERE
f1
=
3
;
# send the update from master
--
connection
node_3
--
error
0
COMMIT
;
--
connection
node_2a
# release the applier
SET
GLOBAL
debug_dbug
=
""
;
SET
DEBUG_SYNC
=
"now SIGNAL signal.wsrep_apply_cb"
;
# Unblock the async slave commit
--
connection
node_2a
--
source
include
/
galera_clear_sync_point
.
inc
--
source
include
/
galera_signal_sync_point
.
inc
SET
DEBUG_SYNC
=
"RESET"
;
--
connection
node_2a
set
session
wsrep_sync_wait
=
0
;
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
test
.
t1
where
f2
=
'e'
--
source
include
/
wait_condition
.
inc
SELECT
*
from
test
.
t1
;
--
connection
node_1
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
test
.
t1
where
f2
=
'e'
--
source
include
/
wait_condition
.
inc
SELECT
*
from
test
.
t1
;
--
connection
node_2a
STOP
SLAVE
;
RESET
SLAVE
;
...
...
@@ -204,3 +140,7 @@ DROP TABLE t1;
--
connection
node_3
DROP
TABLE
t1
;
RESET
MASTER
;
--
connection
node_1
--
disconnect
node_2a
--
disconnect
node_3
mysql-test/suite/galera/t/galera_bad_wsrep_new_cluster.cnf
0 → 100644
View file @
3f7040fa
!include ../galera_2nodes.cnf
[mysqld.1]
wsrep-debug=1
[mysqld.2]
wsrep-debug=1
mysql-test/suite/galera/t/galera_bf_abort_at_after_statement.cnf
0 → 100644
View file @
3f7040fa
!include ../galera_2nodes.cnf
[mysqld.1]
wsrep-debug=1
[mysqld.2]
wsrep-debug=1
mysql-test/suite/galera/t/galera_bf_abort_at_after_statement.test
View file @
3f7040fa
...
...
@@ -8,10 +8,21 @@
--
source
include
/
have_debug_sync
.
inc
--
connection
node_1
# Mare sure both nodes are in the cluster
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
2
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
--
source
include
/
wait_condition
.
inc
CREATE
TABLE
t1
(
id
INT
PRIMARY
KEY
,
val
INT
);
INSERT
INTO
t1
VALUES
(
1
,
1
);
--
connection
node_2
SET
DEBUG_SYNC
=
'RESET'
;
# Mare sure that DLL has replicated and insert has replicated
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_NAME
=
't1'
--
source
include
/
wait_condition
.
inc
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
t1
--
source
include
/
wait_condition
.
inc
START
TRANSACTION
;
SET
DEBUG_SYNC
=
'wsrep_after_statement_enter SIGNAL blocked WAIT_FOR continue'
;
--
send
UPDATE
t1
SET
val
=
2
WHERE
id
=
1
...
...
@@ -34,4 +45,5 @@ COMMIT;
SET
DEBUG_SYNC
=
'RESET'
;
--
connection
node_1
SET
DEBUG_SYNC
=
'RESET'
;
DROP
TABLE
t1
;
mysql-test/suite/galera/t/galera_kill_applier.cnf
0 → 100644
View file @
3f7040fa
!include ../galera_2nodes.cnf
[mysqld.1]
wsrep-debug=1
[mysqld.2]
wsrep-debug=1
mysql-test/suite/galera/t/galera_kill_applier.test
View file @
3f7040fa
...
...
@@ -7,9 +7,10 @@
--
source
include
/
force_restart
.
inc
--
connection
node_2
SELECT
@@
wsrep_slave_threads
;
SET
GLOBAL
wsrep_slave_threads
=
2
;
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
>=
1
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
USER
=
'system user'
AND
STATE
=
'wsrep applier idle'
;
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
2
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
USER
=
'system user'
AND
STATE
=
'wsrep applier idle'
;
--
let
$wait_condition_on_error_output
=
SELECT
COUNT
(
*
),
2
as
EXPECTED_VALUE
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
USER
=
'system user'
AND
STATE
=
'wsrep applier idle'
;
show
processlist
--
source
include
/
wait_condition_with_debug
.
inc
...
...
@@ -31,7 +32,7 @@ SET GLOBAL wsrep_slave_threads=2;
--
eval
KILL
QUERY
$aborter_thread
--
enable_query_log
SET
GLOBAL
wsrep_slave_threads
=
1
;
SET
GLOBAL
wsrep_slave_threads
=
DEFAULT
;
--
connection
node_1
create
table
t1
(
a
int
not
null
primary
key
)
engine
=
innodb
;
...
...
@@ -39,8 +40,13 @@ insert into t1 values (1);
insert
into
t1
values
(
2
);
--
connection
node_2
set
global
wsrep_sync_wait
=
15
;
--
echo
# Wait until one of the appliers has exited
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
1
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_applier_thread_count'
;
--
let
$wait_condition_on_error_output
=
SELECT
COUNT
(
*
),
1
as
EXPECTED_VALUE
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
USER
=
'system user'
AND
STATE
=
'wsrep applier idle'
;
show
processlist
--
source
include
/
wait_condition_with_debug
.
inc
select
count
(
*
)
from
t1
;
SELECT
@@
wsrep_slave_threads
;
--
connection
node_1
drop
table
t1
;
mysql-test/suite/galera/t/galera_sp_bf_abort.cnf
0 → 100644
View file @
3f7040fa
!include ../galera_2nodes.cnf
[mysqld.1]
wsrep-debug=1
[mysqld.2]
wsrep-debug=1
mysql-test/suite/galera/t/galera_unicode_pk.cnf
0 → 100644
View file @
3f7040fa
!include ../galera_2nodes.cnf
[mysqld.1]
wsrep-debug=1
[mysqld.2]
wsrep-debug=1
mysql-test/suite/galera/t/galera_unicode_pk.test
View file @
3f7040fa
...
...
@@ -5,6 +5,11 @@
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
--
connection
node_1
# Mare sure both nodes are in the cluster
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
2
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
--
source
include
/
wait_condition
.
inc
CREATE
TABLE
t1
(
f1
VARCHAR
(
255
)
PRIMARY
KEY
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
...
...
@@ -12,7 +17,12 @@ CREATE TABLE t1 (
INSERT
INTO
t1
VALUES
(
'текст'
);
--
connection
node_2
--
source
include
/
wait_until_ready
.
inc
# Mare sure that DLL has replicated and insert has replicated
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_NAME
=
't1'
--
source
include
/
wait_condition
.
inc
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
t1
--
source
include
/
wait_condition
.
inc
SELECT
f1
=
'текст'
FROM
t1
;
#
...
...
mysql-test/suite/galera/t/galera_update_limit.cnf
0 → 100644
View file @
3f7040fa
!include ../galera_2nodes.cnf
[mysqld.1]
wsrep-debug=1
[mysqld.2]
wsrep-debug=1
mysql-test/suite/galera/t/galera_update_limit.test
View file @
3f7040fa
...
...
@@ -4,17 +4,16 @@
#
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
#
# With a PK
#
--
connection
node_1
CREATE
TABLE
ten
(
f1
INTEGER
)
Engine
=
InnoDB
;
CREATE
TABLE
ten
(
f1
INTEGER
not
null
primary
key
)
Engine
=
InnoDB
;
INSERT
INTO
ten
VALUES
(
1
),(
2
),(
3
),(
4
),(
5
),(
6
),(
7
),(
8
),(
9
),(
10
);
CREATE
TABLE
t1
(
f1
INTEGER
PRIMARY
KEY
)
Engine
=
InnoDB
;
CREATE
TABLE
t1
(
f1
INTEGER
NOT
NULL
PRIMARY
KEY
)
Engine
=
InnoDB
;
INSERT
INTO
t1
SELECT
f1
FROM
ten
ORDER
BY
RAND
();
--
connection
node_2
...
...
mysys/lf_alloc-pin.c
View file @
3f7040fa
...
...
@@ -250,8 +250,9 @@ static int ptr_cmp(void **a, void **b)
#define add_to_purgatory(PINS, ADDR) \
do \
{ \
*(void **)((char *)(ADDR)+(PINS)->pinbox->free_ptr_offset)= \
(PINS)->purgatory; \
my_atomic_storeptr_explicit( \
(void **)((char *)(ADDR)+(PINS)->pinbox->free_ptr_offset), \
(PINS)->purgatory, MY_MEMORY_ORDER_RELEASE); \
(PINS)->purgatory= (ADDR); \
(PINS)->purgatory_count++; \
} while (0)
...
...
mysys/lf_hash.cc
View file @
3f7040fa
...
...
@@ -103,8 +103,9 @@ static int l_find(LF_SLIST **head, CHARSET_INFO *cs, uint32 hashnr,
do
{
/* PTR() isn't necessary below, head is a dummy node */
cursor
->
curr
=
my_assume_aligned
<
sizeof
(
LF_SLIST
*
)
>
((
LF_SLIST
*
)(
*
cursor
->
prev
));
lf_pin
(
pins
,
1
,
cursor
->
curr
);
}
while
(
my_atomic_loadptr
((
void
**
)
my_assume_aligned
<
sizeof
(
LF_SLIST
*
)
>
(
cursor
->
prev
))
!=
cursor
->
curr
&&
LF_BACKOFF
());
}
while
(
my_atomic_loadptr
(
(
void
**
)
my_assume_aligned
<
sizeof
(
LF_SLIST
*
)
>
(
cursor
->
prev
))
!=
cursor
->
curr
&&
LF_BACKOFF
());
for
(;;)
{
if
(
unlikely
(
!
cursor
->
curr
))
...
...
@@ -114,14 +115,17 @@ static int l_find(LF_SLIST **head, CHARSET_INFO *cs, uint32 hashnr,
cur_keylen
=
cursor
->
curr
->
keylen
;
/* The key element needs to be aligned, not necessary what it points to */
my_assume_aligned
<
sizeof
(
const
uchar
*
)
>
(
&
cursor
->
curr
->
key
);
cur_key
=
cursor
->
curr
->
key
;
cur_key
=
(
const
uchar
*
)
my_atomic_loadptr_explicit
((
void
**
)
&
cursor
->
curr
->
key
,
MY_MEMORY_ORDER_ACQUIRE
);
do
{
/* attempting to my_assume_aligned onlink below broke the implementation */
link
=
cursor
->
curr
->
link
;
link
=
(
intptr
)
my_atomic_loadptr_explicit
((
void
**
)
&
cursor
->
curr
->
link
,
MY_MEMORY_ORDER_RELAXED
);
cursor
->
next
=
my_assume_aligned
<
sizeof
(
LF_SLIST
*
)
>
(
PTR
(
link
));
lf_pin
(
pins
,
0
,
cursor
->
next
);
}
while
(
link
!=
cursor
->
curr
->
link
&&
LF_BACKOFF
());
}
while
(
link
!=
(
intptr
)
my_atomic_loadptr
((
void
*
volatile
*
)
&
cursor
->
curr
->
link
)
&&
LF_BACKOFF
());
if
(
!
DELETED
(
link
))
{
...
...
storage/innobase/include/mtr0types.h
View file @
3f7040fa
...
...
@@ -206,7 +206,7 @@ enum mrec_type_t
/** Zero-initialize a page. The current byte offset (for subsequent
records) will be reset to FIL_PAGE_TYPE. */
INIT_PAGE
=
0x10
,
/**
Insert a record into a page. FIXME: implement this!
*/
/**
Extended record; @see mrec_ext_t
*/
EXTENDED
=
0x20
,
/** Write a string of bytes. Followed by the byte offset (unsigned,
relative to the current byte offset, encoded in 1 to 3 bytes) and
...
...
storage/innobase/log/log0log.cc
View file @
3f7040fa
...
...
@@ -613,9 +613,7 @@ log_write_buf(
log_block_store_checksum
(
buf
+
i
*
OS_FILE_LOG_BLOCK_SIZE
);
}
ut_a
((
next_offset
>>
srv_page_size_shift
)
<=
ULINT_MAX
);
log_sys
.
log
.
write
(
static_cast
<
size_t
>
(
next_offset
),
{
buf
,
write_len
});
log_sys
.
log
.
write
(
next_offset
,
{
buf
,
write_len
});
if
(
write_len
<
len
)
{
start_lsn
+=
write_len
;
...
...
storage/innobase/srv/srv0start.cc
View file @
3f7040fa
...
...
@@ -1457,8 +1457,7 @@ dberr_t srv_start(bool create_new_db)
}
/* fall through */
case
SRV_OPERATION_RESTORE
:
/* This must precede
recv_apply_hashed_log_recs(true). */
/* This must precede recv_sys.apply(true). */
srv_undo_tablespaces_active
=
trx_rseg_get_n_undo_tablespaces
();
err
=
srv_validate_undo_tablespaces
();
...
...
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