Commit 4768db8a authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

Update upstream source from tag 'upstream/10.1.34'

Update to upstream version '10.1.34'
with Debian dir 4b26ffc88bd634f8403c4707b28cee52312ddd15
parents 840ab6db 7c477360
......@@ -121,6 +121,9 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
my_free(mysql->options.my_cnf_file);
my_free(mysql->options.my_cnf_group);
mysql->options.my_cnf_file=mysql->options.my_cnf_group=0;
if (mysql->options.protocol == UINT_MAX32)
goto error;
}
if (!db || !db[0])
......
......@@ -691,8 +691,7 @@ it was built/distributed. Defaults to on; use \fB\-\-skip\-version\-check\fR to
.sp
Cause binary logging to be enabled while
\fBmysql_upgrade\fR
runs\&. This is the default behavior; to disable binary logging during the upgrade, use the inverse of this option (that is, start the program with
\fB\-\-skip\-write\-binlog\fR)\&.
runs\&.
.RE
.SH "COPYRIGHT"
.br
......
'\" t
.\"
.TH "\FBMYSQLADMIN\FR" "1" "14/12/2015" "MariaDB 10\&.1" "MariaDB Database System"
.TH "\FBMYSQLADMIN\FR" "1" "28 December 2017" "MariaDB 10\&.1" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
......@@ -106,6 +106,97 @@ Display the server status variables and their values\&.
.sp -1
.IP \(bu 2.3
.\}
flush\-all\-statistics
.sp
Flush all statistics tables\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-all\-status
.sp
Flush all status and statistics\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-binary\-log
.sp
Flush the binary log\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-client\-statistics
.sp
Flush client statistics\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-engine\-log
.sp
Flush engine log\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-error\-log
.sp
Flush error log\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-general\-log
.sp
Flush general query log\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-hosts
.sp
Flush all information in the host cache\&.
......@@ -119,6 +210,19 @@ Flush all information in the host cache\&.
.sp -1
.IP \(bu 2.3
.\}
flush\-index\-statistics
.sp
Flush index statistics\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-logs
.sp
Flush all logs\&.
......@@ -146,6 +250,32 @@ reload)\&.
.sp -1
.IP \(bu 2.3
.\}
flush\-relay\-log
.sp
Flush relay log\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-slow\-log
.sp
Flush slow query log\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-status
.sp
Clear status variables\&.
......@@ -159,6 +289,19 @@ Clear status variables\&.
.sp -1
.IP \(bu 2.3
.\}
flush\-table\-statistics
.sp
Flush table statistics\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-tables
.sp
Flush all tables\&.
......@@ -185,6 +328,19 @@ Flush the thread cache\&.
.sp -1
.IP \(bu 2.3
.\}
flush\-user\-resources
.sp
Flush user resources\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
kill \fIid\fR,\fIid\fR,\&.\&.\&.
.sp
Kill server threads\&. If multiple thread ID values are given, there must be no spaces in the list\&.
......@@ -344,6 +500,19 @@ Stop the server\&.
.sp -1
.IP \(bu 2.3
.\}
start\-all\-slaves
.sp
Start all slaves\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
start\-slave
.sp
Start replication on a slave server\&.
......@@ -370,6 +539,19 @@ Display a short server status message\&.
.sp -1
.IP \(bu 2.3
.\}
stop\-all\-slaves
.sp
Stop all slaves\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
stop\-slave
.sp
Stop replication on a slave server\&.
......@@ -821,7 +1003,7 @@ Connect to the MariaDB server on the given host\&.
\fB\-\-local\fR,
\fB\-l\fR
.sp
Suppress the SQL command(s) from being written to the binary log by enabling sql_log_bin=0 for the session\&.
Suppress the SQL command(s) from being written to the binary log by using FLUSH LOCAL or enabling sql_log_bin=0 for the session\&.
.RE
.sp
.RS 4
......
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2018, 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
......
......@@ -32,345 +32,97 @@ INSERT INTO tt_2(ddl_case) VALUES(0);
--echo # CHECK IMPLICT COMMIT
--echo #########################################################################
SET AUTOCOMMIT= 0;
let $ddl_cases= 43;
while ($ddl_cases >= 1)
{
--echo -b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b-
let $in_temporary= no;
let $ok= yes;
#
# In SBR and MIXED modes, the commit event is usually the third event in the
# binary log:
#
# 1: BEGIN
# 2: INSERT
# 3: COMMIT
# 4: DDL EVENT which triggered the previous commmit.
#
if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`)
{
let $commit_event_row_number= 3;
}
#
# In RBR mode, the commit event is usually the fourth event in the binary log:
#
# 1: BEGIN
# 2: TABLE MAP EVENT
# 3: ROW EVENT
# 4: COMMIT
# 5: DDL EVENT which triggered the previous commmit.
#
if (`select @@binlog_format = 'ROW'`)
{
let $commit_event_row_number= 4;
}
let $first_binlog_position= query_get_value("SHOW MASTER STATUS", Position, 1);
--enable_query_log
eval INSERT INTO tt_1(ddl_case) VALUES ($ddl_cases);
if ($ddl_cases == 43)
{
let $cmd= CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
}
if ($ddl_cases == 42)
{
let $cmd= DROP FUNCTION myfunc_int;
}
if ($ddl_cases == 41)
{
let $cmd= LOAD INDEX INTO CACHE nt_1 IGNORE LEAVES;
}
if ($ddl_cases == 40)
{
let $cmd= LOAD INDEX INTO CACHE tt_1, tt_2 IGNORE LEAVES;
}
if ($ddl_cases == 39)
{
let $cmd= ANALYZE TABLE nt_1;
}
if ($ddl_cases == 38)
{
let $cmd= CHECK TABLE nt_1;
}
if ($ddl_cases == 37)
{
let $cmd= OPTIMIZE TABLE nt_1;
}
if ($ddl_cases == 36)
{
let $cmd= REPAIR TABLE nt_1;
}
if ($ddl_cases == 35)
{
let $cmd= LOCK TABLES tt_1 WRITE;
}
if ($ddl_cases == 34)
{
let $cmd= UNLOCK TABLES;
}
if ($ddl_cases == 33)
{
let $cmd= CREATE USER 'user'@'localhost';
}
if ($ddl_cases == 32)
{
let $cmd= GRANT ALL ON *.* TO 'user'@'localhost';
}
if ($ddl_cases == 31)
{
let $cmd= SET PASSWORD FOR 'user'@'localhost' = PASSWORD('newpass');
}
if ($ddl_cases == 30)
{
let $cmd= REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user'@'localhost';
}
if ($ddl_cases == 29)
{
let $cmd= RENAME USER 'user'@'localhost' TO 'user_new'@'localhost';
}
if ($ddl_cases == 28)
{
let $cmd= DROP USER 'user_new'@'localhost';
}
if ($ddl_cases == 27)
{
let $cmd= CREATE EVENT evt ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT * FROM tt_1;
}
if ($ddl_cases == 26)
{
let $cmd= ALTER EVENT evt COMMENT 'evt';
}
if ($ddl_cases == 25)
{
let $cmd= DROP EVENT evt;
}
if ($ddl_cases == 24)
{
let $cmd= CREATE TRIGGER tr AFTER INSERT ON tt_1 FOR EACH ROW UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case;
}
if ($ddl_cases == 23)
{
let $cmd= DROP TRIGGER tr;
#
# In RBR mode, due to the trigger the tt_2 is also updated:
#
# 1: BEGIN
# 2: TABLE MAP EVENT
# 3: TABLE MAP EVENT
# 4: ROW EVENT
# 5: COMMIT
# 6: DDL EVENT which triggered the previous commmit.
#
if (`select @@binlog_format = 'ROW'`)
{
let $commit_event_row_number= 5;
}
}
if ($ddl_cases == 22)
{
let $cmd= CREATE FUNCTION fc () RETURNS VARCHAR(64) RETURN "fc";
}
if ($ddl_cases == 21)
{
let $cmd= ALTER FUNCTION fc COMMENT 'fc';
}
if ($ddl_cases == 20)
{
let $cmd= DROP FUNCTION fc;
}
if ($ddl_cases == 19)
{
let $cmd= CREATE PROCEDURE pc () UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case;
}
if ($ddl_cases == 18)
{
let $cmd= ALTER PROCEDURE pc COMMENT 'pc';
}
if ($ddl_cases == 17)
{
let $cmd= DROP PROCEDURE pc;
}
if ($ddl_cases == 16)
{
let $cmd= CREATE VIEW v AS SELECT * FROM tt_1;
}
if ($ddl_cases == 15)
{
let $cmd= ALTER VIEW v AS SELECT * FROM tt_1;
}
if ($ddl_cases == 14)
{
let $cmd= DROP VIEW v;
}
if ($ddl_cases == 13)
{
let $cmd= CREATE INDEX ix ON tt_1(ddl_case);
}
if ($ddl_cases == 12)
{
let $cmd= DROP INDEX ix ON tt_1;
}
if ($ddl_cases == 11)
{
let $cmd= CREATE TEMPORARY TABLE tt_xx (a int);
let $in_temporary= yes;
# In SBR and MIXED modes, the DDL statement is written to the binary log but
# does not commit the current transaction.
#
# 1: BEGIN
# 2: CREATE TEMPORARY
# 3: INSERT
# 4: COMMIT
#
# In RBR the transaction is not committed either and the statement is not
# written to the binary log:
#
# 1: BEGIN
# 2: TABLE MAP EVENT
# 3: ROW EVENT
# 4: COMMIT
#
if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'` )
{
let $commit_event_row_number= 4;
}
}
if ($ddl_cases == 10)
{
let $cmd= ALTER TABLE tt_xx ADD COLUMN (b int);
#
# In MIXED mode, the changes are logged as rows and we have what follows:
#
# 1: BEGIN
# 2: TABLE MAP EVENT
# 3: ROW EVENT
# 4: COMMIT
# 5: DDL EVENT which triggered the previous commmit.
#
if (`select @@binlog_format = 'MIXED'`)
{
let $commit_event_row_number= 4;
}
}
if ($ddl_cases == 9)
{
let $cmd= ALTER TABLE tt_xx RENAME new_tt_xx;
#
# In MIXED mode, the changes are logged as rows and we have what follows:
#
# 1: BEGIN
# 2: TABLE MAP EVENT
# 3: ROW EVENT
# 4: COMMIT
# 5: DDL EVENT which triggered the previous commmit.
#
if (`select @@binlog_format = 'MIXED'`)
{
let $commit_event_row_number= 4;
}
}
if ($ddl_cases == 8)
{
let $cmd= DROP TEMPORARY TABLE IF EXISTS new_tt_xx;
let $in_temporary= yes;
#
# In SBR and MIXED modes, the DDL statement is written to the binary log
# but does not commit the current transaction:
#
# In SBR, we have what follows:
#
# 1: BEGIN
# 2: INSERT
# 3: DROP TEMPORARY
# 4: COMMIT
#
# In RBR the transaction is not committed either and the statement is not
# written to the binary log:
#
# 1: BEGIN
# 2: TABLE MAP EVENT
# 3: ROW EVENT
# 4: COMMIT
#
if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'ROW'`)
{
let $commit_event_row_number= 4;
}
# In MIXED mode, the changes are logged as rows and we have what follows:
#
# 1: BEGIN
# 2: TABLE MAP EVENT
# 3: ROW EVENT
# 4: DROP TEMPORARY
# 5: COMMIT
#
if (`select @@binlog_format = 'MIXED'`)
{
let $commit_event_row_number= 5;
}
}
if ($ddl_cases == 7)
{
let $cmd= CREATE TABLE tt_xx (a int);
}
if ($ddl_cases == 6)
{
let $cmd= ALTER TABLE tt_xx ADD COLUMN (b int);
}
if ($ddl_cases == 5)
{
let $cmd= RENAME TABLE tt_xx TO new_tt_xx;
}
if ($ddl_cases == 4)
{
let $cmd= TRUNCATE TABLE new_tt_xx;
}
if ($ddl_cases == 3)
{
let $cmd= DROP TABLE IF EXISTS tt_xx, new_tt_xx;
}
if ($ddl_cases == 2)
{
let $cmd= CREATE DATABASE db;
}
if ($ddl_cases == 1)
{
let $cmd= DROP DATABASE IF EXISTS db;
}
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
--eval $cmd
--disable_query_log
#
# When a temporary table is either created or dropped, there is no implicit
# commit. The flag in_temporary is used to avoid aborting the test in such
# cases. Thus we force the commit.
#
if ($in_temporary == yes)
{
--eval COMMIT
}
let $event_commit= query_get_value("SHOW BINLOG EVENTS FROM $first_binlog_position", Info, $commit_event_row_number);
if (`SELECT SUBSTRING("$event_commit",1,6) != "COMMIT"`)
{
if ($ok == yes)
{
--echo it *does not* commit the current transaction.
--echo $cmd
--echo $event_commit
SHOW BINLOG EVENTS;
exit;
}
}
INSERT INTO tt_1(ddl_case) VALUES (43);
replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB;
eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
INSERT INTO tt_1(ddl_case) VALUES (42);
DROP FUNCTION myfunc_int;
INSERT INTO tt_1(ddl_case) VALUES (41);
LOAD INDEX INTO CACHE nt_1 IGNORE LEAVES;
INSERT INTO tt_1(ddl_case) VALUES (40);
LOAD INDEX INTO CACHE tt_1, tt_2 IGNORE LEAVES;
INSERT INTO tt_1(ddl_case) VALUES (39);
ANALYZE TABLE nt_1;
INSERT INTO tt_1(ddl_case) VALUES (38);
CHECK TABLE nt_1;
INSERT INTO tt_1(ddl_case) VALUES (37);
OPTIMIZE TABLE nt_1;
INSERT INTO tt_1(ddl_case) VALUES (36);
REPAIR TABLE nt_1;
INSERT INTO tt_1(ddl_case) VALUES (35);
LOCK TABLES tt_1 WRITE;
INSERT INTO tt_1(ddl_case) VALUES (34);
UNLOCK TABLES;
INSERT INTO tt_1(ddl_case) VALUES (33);
CREATE USER 'user'@'localhost';
INSERT INTO tt_1(ddl_case) VALUES (32);
GRANT ALL ON *.* TO 'user'@'localhost';
INSERT INTO tt_1(ddl_case) VALUES (31);
SET PASSWORD FOR 'user'@'localhost' = PASSWORD('newpass');
INSERT INTO tt_1(ddl_case) VALUES (30);
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user'@'localhost';
INSERT INTO tt_1(ddl_case) VALUES (29);
RENAME USER 'user'@'localhost' TO 'user_new'@'localhost';
INSERT INTO tt_1(ddl_case) VALUES (28);
DROP USER 'user_new'@'localhost';
INSERT INTO tt_1(ddl_case) VALUES (27);
CREATE EVENT evt ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT * FROM tt_1;
INSERT INTO tt_1(ddl_case) VALUES (26);
ALTER EVENT evt COMMENT 'evt';
INSERT INTO tt_1(ddl_case) VALUES (25);
DROP EVENT evt;
INSERT INTO tt_1(ddl_case) VALUES (24);
CREATE TRIGGER tr AFTER INSERT ON tt_1 FOR EACH ROW UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case;
INSERT INTO tt_1(ddl_case) VALUES (23);
DROP TRIGGER tr;
INSERT INTO tt_1(ddl_case) VALUES (22);
CREATE FUNCTION fc () RETURNS VARCHAR(64) RETURN "fc";
INSERT INTO tt_1(ddl_case) VALUES (21);
ALTER FUNCTION fc COMMENT 'fc';
INSERT INTO tt_1(ddl_case) VALUES (20);
DROP FUNCTION fc;
INSERT INTO tt_1(ddl_case) VALUES (19);
CREATE PROCEDURE pc () UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case;
INSERT INTO tt_1(ddl_case) VALUES (18);
ALTER PROCEDURE pc COMMENT 'pc';
INSERT INTO tt_1(ddl_case) VALUES (17);
DROP PROCEDURE pc;
INSERT INTO tt_1(ddl_case) VALUES (16);
CREATE VIEW v AS SELECT * FROM tt_1;
INSERT INTO tt_1(ddl_case) VALUES (15);
ALTER VIEW v AS SELECT * FROM tt_1;
INSERT INTO tt_1(ddl_case) VALUES (14);
DROP VIEW v;
INSERT INTO tt_1(ddl_case) VALUES (13);
CREATE INDEX ix ON tt_1(ddl_case);
INSERT INTO tt_1(ddl_case) VALUES (12);
DROP INDEX ix ON tt_1;
INSERT INTO tt_1(ddl_case) VALUES (11);
CREATE TEMPORARY TABLE tt_xx (a int);
INSERT INTO tt_1(ddl_case) VALUES (10);
ALTER TABLE tt_xx ADD COLUMN (b int);
INSERT INTO tt_1(ddl_case) VALUES (9);
ALTER TABLE tt_xx RENAME new_tt_xx;
INSERT INTO tt_1(ddl_case) VALUES (8);
DROP TEMPORARY TABLE IF EXISTS new_tt_xx;
INSERT INTO tt_1(ddl_case) VALUES (7);
CREATE TABLE tt_xx (a int);
INSERT INTO tt_1(ddl_case) VALUES (6);
ALTER TABLE tt_xx ADD COLUMN (b int);
INSERT INTO tt_1(ddl_case) VALUES (5);
RENAME TABLE tt_xx TO new_tt_xx;
INSERT INTO tt_1(ddl_case) VALUES (4);
TRUNCATE TABLE new_tt_xx;
INSERT INTO tt_1(ddl_case) VALUES (3);
DROP TABLE IF EXISTS tt_xx, new_tt_xx;
INSERT INTO tt_1(ddl_case) VALUES (2);
CREATE DATABASE db;
INSERT INTO tt_1(ddl_case) VALUES (1);
DROP DATABASE IF EXISTS db;
source include/show_binlog_events.inc;
--echo -e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e-
let $binlog_start= $first_binlog_position;
--echo -b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b-
--source include/show_binlog_events.inc
--echo -e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e-
--echo
dec $ddl_cases;
}
SET AUTOCOMMIT= 1;
--echo ###################################################################################
......
......@@ -65,6 +65,8 @@ flush logs;
# To make it predictable, we do a useless update now, but which has the
# interest of making the slave catch both rotate events.
let $skip_checkpoint_events=1;
eval create table t3 (a int)ENGINE=$engine_type;
# Sync slave and force it to start on another binary log
......
......@@ -53,6 +53,9 @@
#
# $rpl_debug
# If set, verbose debug info is printed.
#
# $filter_script
# If set, rows matching this regexp will be filtered out
--let $include_filename= filter_file.inc
--source include/begin_include_file.inc
......@@ -67,10 +70,12 @@ if ($rpl_debug)
--let _FF_PRE_SCRIPT= $pre_script
--let _FF_SCRIPT= $script
--let _FF_FILTER_SCRIPT= $filter_script
--let _FF_INPUT_FILE= $input_file
--let _FF_OUTPUT_FILE= $output_file
--let _FF_SELECT_COLUMNS= $select_columns
--let _FF_DEBUG= $rpl_debug
if (!$output_file)
{
--let _FF_OUTPUT_FILE= $input_file
......@@ -79,6 +84,7 @@ perl;
my $pre_script = $ENV{'_FF_PRE_SCRIPT'};
$pre_script =~ s/DOLLAR/\$/g;
my $script = $ENV{'_FF_SCRIPT'};
my $filter_script = $ENV{'_FF_FILTER_SCRIPT'};
$script =~ s/DOLLAR/\$/g;
my $input_file = $ENV{'_FF_INPUT_FILE'};
my $output_file = $ENV{'_FF_OUTPUT_FILE'};
......@@ -123,7 +129,10 @@ perl;
{
' . $script . '
}
$filtered_contents .= $_."\n";
if (!$filter_script || ! m/$filter_script/)
{
$filtered_contents .= $_."\n";
}
}
close FILE or die "Error closing $input_file: $!";
open FILE, "> $output_file" or die "Error opening $output_file: $!";
......
let $wait_condition = SELECT 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready' AND VARIABLE_VALUE = 'ON';
--source include/wait_condition.inc
# include/galera_wait_ready.inc
#
# Waits for galera node to transition to READY state.
#
--enable_reconnect
--disable_query_log
--disable_result_log
let $wait_counter = 600;
while ($wait_counter)
{
--disable_abort_on_error
let $success = `SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'`;
--enable_abort_on_error
if ($success)
{
let $wait_counter = 0;
}
if (!$success)
{
real_sleep 0.1;
dec $wait_counter;
}
}
if (!$success)
{
die "Server did not transition to READY state";
}
--disable_reconnect
--enable_query_log
--enable_result_log
[redundant]
innodb_default_row_format=redundant
[compact]
innodb_default_row_format=compact
[dynamic]
innodb_default_row_format=dynamic
# The goal of including this file is to enable innodb_default_row_format
# combinations (see include/innodb_row_format.combinations)
--source include/have_innodb.inc
[debug]
--enable-gdb
[release]
--disable-gdb
# include file for test files that can be run with and without debug
# having debug and non-debug tests.
let $have_debug=`select version() like '%debug%'`;
......@@ -50,9 +50,6 @@ if (!$restart_parameters)
# Call script that will poll the server waiting for it to be back online again
--source include/wait_until_connected_again.inc
# Wait for wsrep
--source include/wait_wsrep_ready.inc
# Turn off reconnect again
--disable_reconnect
......@@ -7,7 +7,7 @@
# [--let $binlog_file= [<FILENAME> | LAST]]
# [--let $binlog_start= <POSITION> ]
# [--let $binlog_limit= 1, 3 ]
# [--let $keep_gtid_events= 1]
# [--let $skip_checkpoint_events= 1]
# --source include/show_binlog_events.inc
#
# Parameters:
......@@ -26,12 +26,6 @@
# Limit for the 'LIMIT' clause of SHOW BINLOG EVENTS, i.e.:
# $binlog_limit= 3 -- print three events
# $binlog_limit= 4, 3 -- skip four events, print the three next events
#
# $keep_gtid_events
# By default, Gtid_log_event and Previous_gtid_log_event are
# filtered out, so that the output is independent of whether GTIDs
# are enabled or not. If this flag is set, events are kept but
# the actual GTID values are masked out.
--let $include_filename= show_binlog_events.inc
--source include/begin_include_file.inc
......
......@@ -104,8 +104,15 @@ let $script=
s{DOLLARmysqltest_vardir}{MYSQLTEST_VARDIR}g;
||
--let $pre_script= my DOLLARmysqltest_vardir = DOLLARENV{'MYSQLTEST_VARDIR'};
--delimiter ;
if ($skip_checkpoint_events)
{
let $filter_script=Binlog_checkpoint;
}
#--let $select_columns= 1 3 6
--let $input_file= $output_file
--source include/filter_file.inc
......
# ==== Purpose ====
#
# Extract Gtid_list info from SHOW BINLOG EVENTS output masking
# non-deterministic fields.
#
# ==== Usage ====
#
# [--let $binlog_file=filename
#
if ($binlog_file)
{
--let $_in_binlog_file=in '$binlog_file'
}
--replace_column 2 # 5 #
--eval show binlog events $_in_binlog_file limit 1,1
......@@ -16,9 +16,6 @@ if (!$restart_parameters)
# Call script that will poll the server waiting for it to be back online again
--source include/wait_until_connected_again.inc
# Wait for wsrep
--source include/wait_wsrep_ready.inc
# Turn off reconnect again
--disable_reconnect
# truncate a giving file, all contents of the file are be cleared
if (!$file)
if (!$TRUNCATE_FILE)
{
--echo Please assign a file name to $file!!
exit;
die TRUNCATE_FILE is not set;
}
let TRUNCATE_FILE= $file;
perl;
use Env;
Env::import('TRUNCATE_FILE');
open FILE, '>', $TRUNCATE_FILE || die "Can not open file $file";
open FILE, '>', $ENV{TRUNCATE_FILE} or die "open(>$ENV{TRUNCATE_FILE}): $!";
close FILE;
EOF
......@@ -39,7 +39,7 @@ let $wait_timeout= 0;
let $wait_condition_reps= 0;
while ($wait_counter)
{
--error 0,ER_NO_SUCH_TABLE,ER_LOCK_WAIT_TIMEOUT,ER_UNKNOWN_COM_ERROR
--error 0,ER_NO_SUCH_TABLE,ER_LOCK_WAIT_TIMEOUT,ER_UNKNOWN_COM_ERROR,ER_LOCK_DEADLOCK
let $success= `$wait_condition`;
inc $wait_condition_reps;
if ($success)
......
......@@ -14,7 +14,7 @@ while ($mysql_errno)
# Strangely enough, the server might return "Too many connections"
# while being shutdown, thus 1040 is an "allowed" error
# See BUG#36228
--error 0,1040,1053,2002,2003,2005,2006,2013,1927
--error 0,ER_CON_COUNT_ERROR,ER_SERVER_SHUTDOWN,ER_LOCK_WAIT_TIMEOUT,ER_CONNECTION_KILLED,2002,2003,2005,2006,2013
show status;
dec $counter;
......@@ -26,3 +26,9 @@ while ($mysql_errno)
}
--enable_query_log
--enable_result_log
# WSREP: SHOW STATUS queries are allowed even if wsrep
# is not ready. Make sure wsrep is ready before
# returning from this script
--source include/wait_wsrep_ready.inc
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment