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
f42e08f9
Commit
f42e08f9
authored
May 26, 2017
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.0-galera' into 10.1
parents
8c35f105
0e3170e3
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
126 additions
and
22 deletions
+126
-22
cmake/wsrep.cmake
cmake/wsrep.cmake
+0
-1
mysql-test/suite/galera/galera_2nodes.cnf
mysql-test/suite/galera/galera_2nodes.cnf
+1
-1
mysql-test/suite/galera/r/MW-309.result
mysql-test/suite/galera/r/MW-309.result
+22
-0
mysql-test/suite/galera/t/MW-309.test
mysql-test/suite/galera/t/MW-309.test
+32
-0
mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf
mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf
+2
-3
mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.test
mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.test
+1
-1
mysql-test/suite/galera/t/galera_gcs_fc_limit.test
mysql-test/suite/galera/t/galera_gcs_fc_limit.test
+4
-1
mysql-test/suite/galera/t/galera_var_cluster_address.test
mysql-test/suite/galera/t/galera_var_cluster_address.test
+0
-1
mysql-test/suite/galera_3nodes/disabled.def
mysql-test/suite/galera_3nodes/disabled.def
+1
-0
mysql-test/suite/galera_3nodes/galera_3nodes.cnf
mysql-test/suite/galera_3nodes/galera_3nodes.cnf
+4
-5
mysql-test/suite/wsrep/include/check_galera_version.inc
mysql-test/suite/wsrep/include/check_galera_version.inc
+22
-4
sql/handler.cc
sql/handler.cc
+14
-0
sql/log_event.cc
sql/log_event.cc
+0
-1
storage/innobase/include/trx0trx.h
storage/innobase/include/trx0trx.h
+1
-1
storage/innobase/trx/trx0trx.cc
storage/innobase/trx/trx0trx.cc
+1
-0
storage/xtradb/include/trx0trx.h
storage/xtradb/include/trx0trx.h
+19
-2
storage/xtradb/trx/trx0trx.cc
storage/xtradb/trx/trx0trx.cc
+2
-1
No files found.
cmake/wsrep.cmake
View file @
f42e08f9
...
...
@@ -41,4 +41,3 @@ SET(WSREP_PROC_INFO ${WITH_WSREP})
IF
(
WITH_WSREP
)
SET
(
WSREP_PATCH_VERSION
"wsrep_
${
WSREP_VERSION
}
"
)
ENDIF
()
mysql-test/suite/galera/galera_2nodes.cnf
View file @
f42e08f9
...
...
@@ -16,7 +16,7 @@ wsrep-sync-wait=7
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep-cluster-address=gcomm://
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;
gcache.size=10M;evs.suspect_timeout=PT10S
'
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;
evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M
'
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
...
...
mysql-test/suite/galera/r/MW-309.result
0 → 100644
View file @
f42e08f9
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
SET GLOBAL wsrep_max_ws_rows = 2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
SELECT * FROM t1 GROUP BY f1;
f1
1
SELECT * FROM t1 GROUP BY f1;
f1
1
SELECT * FROM t1 GROUP BY f1;
f1
1
SHOW STATUS LIKE '%wsrep%';
SET GLOBAL wsrep_max_ws_rows = 0;
DROP TABLE t1;
mysql-test/suite/galera/t/MW-309.test
0 → 100644
View file @
f42e08f9
#
# MW-309 Regression: wsrep_max_ws_rows limit also applies to certain SELECT queries
#
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
CREATE
TABLE
t1
(
f1
INTEGER
)
ENGINE
=
InnoDB
;
INSERT
INTO
t1
VALUES
(
1
);
INSERT
INTO
t1
SELECT
*
FROM
t1
;
INSERT
INTO
t1
SELECT
*
FROM
t1
;
INSERT
INTO
t1
SELECT
*
FROM
t1
;
INSERT
INTO
t1
SELECT
*
FROM
t1
;
INSERT
INTO
t1
SELECT
*
FROM
t1
;
SET
GLOBAL
wsrep_max_ws_rows
=
2
;
SET
AUTOCOMMIT
=
OFF
;
START
TRANSACTION
;
SELECT
*
FROM
t1
GROUP
BY
f1
;
SELECT
*
FROM
t1
GROUP
BY
f1
;
--
error
0
SELECT
*
FROM
t1
GROUP
BY
f1
;
--
disable_result_log
--
error
0
SHOW
STATUS
LIKE
'%wsrep%'
;
--
enable_result_log
SET
GLOBAL
wsrep_max_ws_rows
=
0
;
DROP
TABLE
t1
;
mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf
View file @
f42e08f9
!include ../galera_2nodes.cnf
[mysqld]
#wsrep_sst_method=xtrabackup-v2
#wsrep_sst_auth="root:"
#wsrep_debug=ON
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth="root:"
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
...
...
mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.test
View file @
f42e08f9
#
# Test that autoincrement works correctly while the cluster membership
# is changing and
I
ST takes place.
# is changing and
S
ST takes place.
#
--
source
include
/
big_test
.
inc
...
...
mysql-test/suite/galera/t/galera_gcs_fc_limit.test
View file @
f42e08f9
...
...
@@ -19,10 +19,13 @@ SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1';
LOCK
TABLE
t1
WRITE
;
--
connection
node_1
--
sleep
1
INSERT
INTO
t1
VALUES
(
2
);
--
sleep
1
INSERT
INTO
t1
VALUES
(
3
);
--
sleep
1
INSERT
INTO
t1
VALUES
(
4
);
--
sleep
1
# This query will hang because flow control will kick in
--
send
...
...
mysql-test/suite/galera/t/galera_var_cluster_address.test
View file @
f42e08f9
...
...
@@ -76,4 +76,3 @@ CALL mtr.add_suppression("WSREP: wsrep::connect\\(gcomm://192.0.2.1\\) failed: 7
--
source
include
/
galera_end
.
inc
--
echo
# End of test
mysql-test/suite/galera_3nodes/disabled.def
View file @
f42e08f9
...
...
@@ -5,3 +5,4 @@ galera_slave_options_do :MDEV-8798
galera_slave_options_ignore : MDEV-8798
galera_pc_bootstrap : TODO: Investigate: Timeout in wait_condition.inc
galera_pc_weight : Test times out
galera_safe_to_bootstrap : I Really dont know :(
mysql-test/suite/galera_3nodes/galera_3nodes.cnf
View file @
f42e08f9
...
...
@@ -14,11 +14,10 @@ wsrep-causal-reads=ON
wsrep-sync-wait=7
[mysqld.1]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep-cluster-address=gcomm://
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;evs.suspect_timeout=PT10S'
wsrep-cluster-address='gcomm://'
wsrep_provider_options='base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
...
...
mysql-test/suite/wsrep/include/check_galera_version.inc
View file @
f42e08f9
...
...
@@ -12,11 +12,29 @@
--
disable_query_log
eval
SET
@
GALERA_VERSION
=
(
SELECT
CONCAT
(
'$galera_version'
,
'%'
));
# Required Version
if
(
!
`SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE
VARIABLE_NAME LIKE 'wsrep_provider_version' AND
VARIABLE_VALUE LIKE @GALERA_VERSION`
)
eval
SET
@
GALERA_VERSION
=
'$galera_version'
;
SELECT
CAST
(
REGEXP_REPLACE
(
@
GALERA_VERSION
,
'^(\\d+)\\.(\\d+)\\.(\\d+).*'
,
'\\1'
)
AS
UNSIGNED
)
INTO
@
GALERA_MAJOR_VERSION
;
SELECT
CAST
(
REGEXP_REPLACE
(
@
GALERA_VERSION
,
'^(\\d+)\\.(\\d+)\\.(\\d+).*'
,
'\\2'
)
AS
UNSIGNED
)
INTO
@
GALERA_MID_VERSION
;
SELECT
CAST
(
REGEXP_REPLACE
(
@
GALERA_VERSION
,
'^(\\d+)\\.(\\d+)\\.(\\d+).*'
,
'\\3'
)
AS
UNSIGNED
)
INTO
@
GALERA_MINOR_VERSION
;
# Actual
SELECT
VARIABLE_VALUE
INTO
@
ACTUAL_GALERA_VERSION
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
LIKE
'wsrep_provider_version'
;
SELECT
CAST
(
REGEXP_REPLACE
(
@
ACTUAL_GALERA_VERSION
,
'^(\\d+)\\.(\\d+)\\.(\\d+).*'
,
'\\1'
)
AS
UNSIGNED
)
INTO
@
ACTUAL_GALERA_MAJOR_VERSION
;
SELECT
CAST
(
REGEXP_REPLACE
(
@
ACTUAL_GALERA_VERSION
,
'^(\\d+)\\.(\\d+)\\.(\\d+).*'
,
'\\2'
)
AS
UNSIGNED
)
INTO
@
ACTUAL_GALERA_MID_VERSION
;
SELECT
CAST
(
REGEXP_REPLACE
(
@
ACTUAL_GALERA_VERSION
,
'^(\\d+)\\.(\\d+)\\.(\\d+).*'
,
'\\3'
)
AS
UNSIGNED
)
INTO
@
ACTUAL_GALERA_MINOR_VERSION
;
# For testing
#SELECT @GALERA_MAJOR_VERSION, @GALERA_MID_VERSION, @GALERA_MINOR_VERSION;
#SELECT @ACTUAL_GALERA_VERSION;
#SELECT @ACTUAL_GALERA_MAJOR_VERSION, @ACTUAL_GALERA_MID_VERSION, @ACTUAL_GALERA_MINOR_VERSION;
if
(
!
`SELECT (@ACTUAL_GALERA_MAJOR_VERSION > @GALERA_MAJOR_VERSION) OR
(@ACTUAL_GALERA_MAJOR_VERSION = @GALERA_MAJOR_VERSION AND @ACTUAL_GALERA_MID_VERSION > @GALERA_MID_VERSION) OR
(@ACTUAL_GALERA_MAJOR_VERSION = @GALERA_MAJOR_VERSION AND @ACTUAL_GALERA_MID_VERSION = @GALERA_MID_VERSION AND @ACTUAL_GALERA_MINOR_VERSION >= @GALERA_MINOR_VERSION)
`
)
{
skip
Test
requires
Galera
library
version
$galera_version
;
}
...
...
sql/handler.cc
View file @
f42e08f9
...
...
@@ -5747,6 +5747,20 @@ static int binlog_log_row(TABLE* table,
table
->
file
->
partition_ht
()
->
db_type
!=
DB_TYPE_INNODB
)
||
(
thd
->
wsrep_ignore_table
==
true
))
return
0
;
/* enforce wsrep_max_ws_rows */
if
(
WSREP
(
thd
)
&&
table
->
s
->
tmp_table
==
NO_TMP_TABLE
)
{
thd
->
wsrep_affected_rows
++
;
if
(
wsrep_max_ws_rows
&&
thd
->
wsrep_exec_mode
!=
REPL_RECV
&&
thd
->
wsrep_affected_rows
>
wsrep_max_ws_rows
)
{
trans_rollback_stmt
(
thd
)
||
trans_rollback
(
thd
);
my_message
(
ER_ERROR_DURING_COMMIT
,
"wsrep_max_ws_rows exceeded"
,
MYF
(
0
));
return
ER_ERROR_DURING_COMMIT
;
}
}
#endif
/* WITH_WSREP */
if
(
check_table_binlog_row_based
(
thd
,
table
))
...
...
sql/log_event.cc
View file @
f42e08f9
...
...
@@ -7587,7 +7587,6 @@ int Xid_log_event::do_apply_event(rpl_group_info *rgi)
consistent.
*/
#ifdef WITH_WSREP
/*Set wsrep_affected_rows = 0 */
thd
->
wsrep_affected_rows
=
0
;
#endif
...
...
storage/innobase/include/trx0trx.h
View file @
f42e08f9
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 201
6, MariaDB Corporation. All Rights Reserved
.
Copyright (c) 201
5, 2017, MariaDB Corporation
.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
storage/innobase/trx/trx0trx.cc
View file @
f42e08f9
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
storage/xtradb/include/trx0trx.h
View file @
f42e08f9
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, 2016, MariaDB Corporation. All Rights Reserved.
Copyright (c) 2015, 2017, MariaDB Corporation
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -334,6 +333,24 @@ trx_print_low(
/*!< in: mem_heap_get_size(trx->lock.lock_heap) */
MY_ATTRIBUTE
((
nonnull
));
#ifdef WITH_WSREP
/**********************************************************************//**
Prints info about a transaction.
Transaction information may be retrieved without having trx_sys->mutex acquired
so it may not be completely accurate. The caller must own lock_sys->mutex
and the trx must have some locks to make sure that it does not escape
without locking lock_sys->mutex. */
UNIV_INTERN
void
wsrep_trx_print_locking
(
/*==============*/
FILE
*
f
,
/*!< in: output stream */
const
trx_t
*
trx
,
/*!< in: transaction */
ulint
max_query_len
)
/*!< in: max query length to print,
or 0 to use the default max length */
MY_ATTRIBUTE
((
nonnull
));
#endif
/* WITH_WSREP */
/**********************************************************************//**
Prints info about a transaction.
The caller must hold lock_sys->mutex and trx_sys->mutex.
...
...
storage/xtradb/trx/trx0trx.cc
View file @
f42e08f9
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -2283,6 +2284,7 @@ wsrep_trx_print_locking(
}
}
#endif
/* WITH_WSREP */
/**********************************************************************//**
Prints info about a transaction.
Acquires and releases lock_sys->mutex and trx_sys->mutex. */
...
...
@@ -2744,4 +2746,3 @@ trx_start_for_ddl_low(
ut_error
;
}
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