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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
9d2e90f3
Commit
9d2e90f3
authored
Mar 28, 2014
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Plain Diff
Merged revision 3471, 3472 & 3473 from maria-5.5-galera.
parents
02ba2bfd
a500865c
Changes
34
Show whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
624 additions
and
11 deletions
+624
-11
extra/my_print_defaults.c
extra/my_print_defaults.c
+8
-3
mysql-test/include/galera_cluster.inc
mysql-test/include/galera_cluster.inc
+10
-0
mysql-test/include/galera_connect.inc
mysql-test/include/galera_connect.inc
+45
-0
mysql-test/include/galera_diff.inc
mysql-test/include/galera_diff.inc
+100
-0
mysql-test/include/galera_end.inc
mysql-test/include/galera_end.inc
+25
-0
mysql-test/include/galera_init.inc
mysql-test/include/galera_init.inc
+26
-0
mysql-test/include/have_wsrep.inc
mysql-test/include/have_wsrep.inc
+8
-4
mysql-test/include/have_wsrep_enabled.inc
mysql-test/include/have_wsrep_enabled.inc
+9
-0
mysql-test/include/mtr_warnings.sql
mysql-test/include/mtr_warnings.sql
+8
-0
mysql-test/include/not_wsrep.inc
mysql-test/include/not_wsrep.inc
+7
-0
mysql-test/lib/mtr_cases.pm
mysql-test/lib/mtr_cases.pm
+3
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+3
-0
mysql-test/r/not_wsrep.require
mysql-test/r/not_wsrep.require
+2
-0
mysql-test/suite/galera/galera_2nodes.cnf
mysql-test/suite/galera/galera_2nodes.cnf
+21
-0
mysql-test/suite/galera/my.cnf
mysql-test/suite/galera/my.cnf
+1
-0
mysql-test/suite/galera/r/basic.result
mysql-test/suite/galera/r/basic.result
+30
-0
mysql-test/suite/galera/r/unique_key.result
mysql-test/suite/galera/r/unique_key.result
+47
-0
mysql-test/suite/galera/t/basic.test
mysql-test/suite/galera/t/basic.test
+26
-0
mysql-test/suite/galera/t/unique_key.test
mysql-test/suite/galera/t/unique_key.test
+54
-0
mysql-test/suite/wsrep/README
mysql-test/suite/wsrep/README
+7
-0
mysql-test/suite/wsrep/r/binlog_format.result
mysql-test/suite/wsrep/r/binlog_format.result
+2
-0
mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result
mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result
+70
-0
mysql-test/suite/wsrep/r/pool_of_threads.result
mysql-test/suite/wsrep/r/pool_of_threads.result
+8
-0
mysql-test/suite/wsrep/r/variables.result
mysql-test/suite/wsrep/r/variables.result
+13
-0
mysql-test/suite/wsrep/t/binlog_format.test
mysql-test/suite/wsrep/t/binlog_format.test
+4
-1
mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test
mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test
+40
-0
mysql-test/suite/wsrep/t/pool_of_threads.opt
mysql-test/suite/wsrep/t/pool_of_threads.opt
+1
-0
mysql-test/suite/wsrep/t/pool_of_threads.test
mysql-test/suite/wsrep/t/pool_of_threads.test
+11
-0
mysql-test/suite/wsrep/t/trans.test
mysql-test/suite/wsrep/t/trans.test
+1
-0
mysql-test/suite/wsrep/t/variables.test
mysql-test/suite/wsrep/t/variables.test
+16
-1
mysql-test/t/mysql_tzinfo_to_sql_symlink.test
mysql-test/t/mysql_tzinfo_to_sql_symlink.test
+5
-0
sql/handler.cc
sql/handler.cc
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+4
-0
sql/tztime.cc
sql/tztime.cc
+8
-1
No files found.
extra/my_print_defaults.c
View file @
9d2e90f3
...
...
@@ -98,6 +98,11 @@ static struct my_option my_long_options[] =
{
0
,
0
,
0
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
}
};
void
cleanup_and_exit
(
int
exit_code
)
{
my_end
(
0
);
exit
(
exit_code
);
}
static
void
usage
(
my_bool
version
)
{
...
...
@@ -112,7 +117,7 @@ static void usage(my_bool version)
my_print_default_files
(
config_file
);
my_print_variables
(
my_long_options
);
printf
(
"
\n
Example usage:
\n
%s --defaults-file=example.cnf client client-server mysql
\n
"
,
my_progname
);
exit
(
0
);
cleanup_and_
exit
(
0
);
}
...
...
@@ -125,7 +130,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
opt_defaults_file_used
=
1
;
break
;
case
'n'
:
exit
(
0
);
cleanup_and_
exit
(
0
);
case
'I'
:
case
'?'
:
usage
(
0
);
...
...
@@ -174,7 +179,7 @@ int main(int argc, char **argv)
/* Check out the args */
if
(
get_options
(
&
argc
,
&
argv
))
exit
(
1
);
cleanup_and_
exit
(
1
);
nargs
=
argc
+
1
;
if
(
opt_mysqld
)
...
...
mysql-test/include/galera_cluster.inc
0 → 100644
View file @
9d2e90f3
# galera_cluster.inc
# ==================
#
# Description
# -----------
# Configure galera cluster with 2 nodes.
#
--
let
$galera_cluster_size
=
2
--
source
include
/
galera_init
.
inc
mysql-test/include/galera_connect.inc
0 → 100644
View file @
9d2e90f3
# galera_connect.inc
# ==================
#
# Description
# -----------
# Open a connection to the specified server number ($galera_server_number).
# The connection itself would be identified by $galera_connection_name.
#
# Parameters
# ----------
# $galera_connection_name
# Name of the resulting connection.
#
# $galera_server_number
# Sequence number of the node in the galera cluster.
#
# $galera_debug
# Print debug information.
#
if
(
!
$galera_connection_name
)
{
--
die
ERROR
IN
TEST
:
$galera_connection_name
must
be
set
before
sourcing
include
/
galera_connect
.
inc
}
if
(
!
$galera_server_number
)
{
--
die
ERROR
IN
TEST
:
$galera_server_number
must
be
set
before
sourcing
include
/
galera_connect
.
inc
}
--
let
$_galera_port
=
\
$NODE_MYPORT_$galera_server_number
if
(
!
$_galera_port
)
{
--
echo
Bug
in
test
case
:
'\$NODE_MYPORT_$galera_server_number'
not
initialized
.
Check
the
test
'
s
.
cfg
file
.
--
die
Not
all
NODE_MYPORT_
*
environment
variables
are
setup
correctly
.
}
if
(
$galera_debug
)
{
--
echo
connect
(
$galera_connection_name
,
127.0
.
0.1
,
root
,,
test
,
$_galera_port
,)
}
# Open a connection
--
connect
(
$galera_connection_name
,
127.0
.
0.1
,
root
,,
test
,
$_galera_port
,)
mysql-test/include/galera_diff.inc
0 → 100644
View file @
9d2e90f3
# galera_diff.inc
# ===============
#
# Description
# -----------
# Compare the output of the given statement on all the nodes of the cluster.
#
# Parameters
# ----------
# $galera_diff_statement
# Statement for which the output would be compared.
#
# $galera_diff_database
# Database against which the above statement would be executed.
# (Default : test)
#
# $galera_diff_servers
# Comma separated list of servers to executed the diff statement on. If not
# set, a list of servers will be generated based on $galera_cluster_size.
#
# $galerra_debug
# Print debug information.
#
if
(
!
$galera_diff_statement
)
{
--
die
ERROR
IN
TEST
:
$galera_diff_statement
must
be
set
before
sourcing
include
/
galera_diff
.
inc
}
--
let
$_galera_diff_database
=
$galera_diff_database
if
(
!
$_galera_diff_database
)
{
--
let
$_galera_diff_database
=
test
}
--
let
$_galera_diff_servers
=
$galera_diff_servers
if
(
!
$_galera_diff_servers
)
{
--
let
$_i
=
$galera_cluster_size
--
let
$_galera_diff_servers
=
while
(
$_i
)
{
--
let
$_galera_diff_servers
=
$_i
,
$_galera_diff_servers
--
dec
$_i
}
}
if
(
$galera_debug
)
{
--
echo
\
$galera_diff_servers
=
'$_galera_diff_servers'
}
if
(
!
$galera_debug
)
{
--
disable_query_log
}
# Generate file containing $galera_diff_statement. We don't pass the
# statement on the command line, because it would be subject to shell
# substitutions.
--
let
$write_to_file
=
GENERATE
--
let
$write_var
=
$galera_diff_statement
--
source
include
/
write_var_to_file
.
inc
--
let
$_galera_diff_statement_file
=
$write_to_file
if
(
!
$galera_debug
)
{
--
enable_query_log
}
# Compare all servers.
--
let
$_galera_diff_first
=
1
while
(
$_galera_diff_servers
)
{
# Set $_galera_diff_server_i to the first number in the list
--
let
$_galera_diff_server_i
=
`SELECT SUBSTRING_INDEX('$_galera_diff_servers', ',', 1)`
# Remove $_galera_diff_server_i from the list
--
let
$_galera_diff_servers
=
`SELECT SUBSTRING('$_galera_diff_servers', LENGTH('$_galera_diff_server_i') + 2)`
# Execute statement
--
let
$_galera_diff_file
=
$MYSQLTEST_VARDIR
/
tmp
/
_galera_diff_server
-
$_galera_diff_server_i
.
tmp
--
exec
$MYSQL
--
defaults
-
group
-
suffix
=.
$_galera_diff_server_i
$_galera_diff_database
<
$_galera_diff_statement_file
>
$_galera_diff_file
# Compare
if
(
!
$_galera_diff_first
)
{
if
(
$galera_debug
)
{
--
echo
diffing
$_galera_diff_file
and
$_galera_diff_prev_file
}
--
diff_files
$_galera_diff_file
$_galera_diff_prev_file
--
remove_file
$_galera_diff_prev_file
}
--
let
$_galera_diff_prev_file
=
$_galera_diff_file
--
let
$_galera_diff_first
=
0
}
# Cleanup
--
remove_file
$_galera_diff_prev_file
--
remove_file
$_galera_diff_statement_file
mysql-test/include/galera_end.inc
0 → 100644
View file @
9d2e90f3
# galera_end.inc
# ==============
#
# Description
# -----------
# Closes the connections opened via include/galera_init.inc
#
# Parameters
# ----------
# $galera_cluster_size
# Number of nodes in the cluster.
#
--
let
$_galera_node
=
$galera_cluster_size
while
(
$_galera_node
)
{
if
(
$galera_debug
)
{
--
echo
Disconnecting
node_
$_galera_node
}
--
disconnect
node_
$_galera_node
--
dec
$_galera_node
}
mysql-test/include/galera_init.inc
0 → 100644
View file @
9d2e90f3
# galera_init.inc
# ===============
#
# Description
# -----------
# Set up a Galera cluster with $wsrep_cluster_size nodes.
#
# Parameters
# ----------
# $galera_cluster_size
# Number of nodes in the cluster.
#
--
source
include
/
have_wsrep_enabled
.
inc
--
let
$_galera_node
=
$galera_cluster_size
while
(
$_galera_node
)
{
--
let
$galera_connection_name
=
node_
$_galera_node
--
let
$galera_server_number
=
$_galera_node
--
source
include
/
galera_connect
.
inc
--
dec
$_galera_node
}
mysql-test/include/have_wsrep.inc
View file @
9d2e90f3
--
require
r
/
have_wsrep
.
require
disable_query_log
;
show
variables
like
'wsrep_on'
;
enable_query_log
;
# To be used in a test which requires server to be compiled with wsrep support
# (-DWITH_WSREP=ON) and wsrep plugin is ACTIVE.
if
(
`SELECT COUNT(*)=0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'wsrep' AND PLUGIN_STATUS='ACTIVE'`
)
{
--
skip
Test
required
wsrep
plugin
.
}
mysql-test/include/have_wsrep_enabled.inc
0 → 100644
View file @
9d2e90f3
# To be used in a test which requires wsrep plugin to be ACTIVE and enabled
# (i.e. wsrep_on=ON). It includes have_wsrep.inc.
--
source
include
/
have_wsrep
.
inc
--
require
r
/
have_wsrep
.
require
disable_query_log
;
SHOW
VARIABLES
LIKE
'wsrep_on'
;
enable_query_log
;
mysql-test/include/mtr_warnings.sql
View file @
9d2e90f3
...
...
@@ -226,6 +226,14 @@ INSERT INTO global_suppressions VALUES
(
"Slave I/O: Notifying master by SET @master_binlog_checksum= @@global.binlog_checksum failed with error.*"
),
(
"Slave I/O: Setting master-side filtering of @@skip_replication failed with error:.*"
),
(
"Slave I/O: Setting @mariadb_slave_capability failed with error:.*"
),
/*
Galera-related warnings.
*/
(
"WSREP: Could not open saved state file for reading: .*"
),
(
"WSREP: last inactive check more than .* skipping check"
),
(
"WSREP: Gap in state sequence. Need state transfer."
),
(
"WSREP: Failed to prepare for incremental state transfer: .*"
),
(
"THE_LAST_SUPPRESSION"
)
||
...
...
mysql-test/include/not_wsrep.inc
0 → 100644
View file @
9d2e90f3
# To be used in a test which should be skipped if server is compiled with wsrep
# support (-DWITH_WSREP=ON) and wsrep plugin is ACTIVE.
--
require
r
/
not_wsrep
.
require
disable_query_log
;
SELECT
VERSION
()
LIKE
'%wsrep%'
AS
'HAVE_WSREP'
;
enable_query_log
;
mysql-test/lib/mtr_cases.pm
View file @
9d2e90f3
...
...
@@ -862,6 +862,8 @@ sub collect_one_test_case {
# Suite has no config, autodetect which one to use
if
(
$tinfo
->
{
rpl_test
})
{
$config
=
"
suite/rpl/my.cnf
";
}
elsif
(
$tinfo
->
{
galera_test
})
{
$config
=
"
suite/galera/my.cnf
";
}
else
{
$config
=
"
include/default_my.cnf
";
}
...
...
@@ -982,6 +984,7 @@ my $tags_map= {'big_test' => ['big_test', 1],
'
master-slave
'
=>
['
rpl_test
',
1
],
'
ndb_master-slave
'
=>
['
rpl_test
',
1
,
'
ndb_test
',
1
],
'
long_test
'
=>
['
long_test
',
1
],
'
galera_init
'
=>
['
galera_test
',
1
],
};
my
$tags_regex_string
=
join
('
|
',
keys
%
$tags_map
);
my
$tags_regex
=
qr:include/($tags_regex_string)\.inc:
o
;
...
...
mysql-test/mysql-test-run.pl
View file @
9d2e90f3
...
...
@@ -4832,6 +4832,9 @@ sub extract_warning_lines ($$) {
qr|Plugin 'FEEDBACK' registration as a INFORMATION SCHEMA failed|
,
qr|'log-bin-use-v1-row-events' is MySQL 5.6 compatible option|
,
qr|InnoDB: Setting thread \d+ nice to \d+ failed, current nice \d+, errno 13|
,
# setpriority() fails under valgrind
# Galera-related warnings.
qr|WSREP:.*down context.*|
,
qr|WSREP: Failed to send state UUID:.*|
,
);
my
$matched_lines
=
[]
;
...
...
mysql-test/r/not_wsrep.require
0 → 100644
View file @
9d2e90f3
HAVE_WSREP
0
mysql-test/suite/galera/galera_2nodes.cnf
0 → 100644
View file @
9d2e90f3
# Use default setting for mysqld processes
!include include/default_mysqld.cnf
[mysqld.1]
binlog-format=row
wsrep_provider=/usr/lib/libgalera_smm.so
wsrep_cluster_address='gcomm://'
[mysqld.2]
binlog-format=row
wsrep_provider=/usr/lib/libgalera_smm.so
wsrep_cluster_address='gcomm://127.0.0.1:4567'
wsrep_provider_options='gmcast.listen_addr=tcp://127.0.0.1:4568'
[ENV]
NODE_MYPORT_1= @mysqld.1.port
NODE_MYSOCK_1= @mysqld.1.socket
NODE_MYPORT_2= @mysqld.2.port
NODE_MYSOCK_2= @mysqld.2.socket
mysql-test/suite/galera/my.cnf
0 → 100644
View file @
9d2e90f3
!include galera_2nodes.cnf
mysql-test/suite/galera/r/basic.result
0 → 100644
View file @
9d2e90f3
USE test;
CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=INNODB;
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
SELECT * FROM t1;
c1
1
2
3
4
5
# On node_1
SELECT * FROM test.t1;
c1
1
2
3
4
5
# On node_2
SELECT * FROM test.t1;
c1
1
2
3
4
5
DROP TABLE t1;
# End of test
mysql-test/suite/galera/r/unique_key.result
0 → 100644
View file @
9d2e90f3
#
# MDEV#5552 Deadlock when inserting NULL column value in column with
# UNIQUE index
#
USE test;
# On node_1
CREATE TABLE t1(c1 INT DEFAULT NULL, UNIQUE KEY c1(c1)) ENGINE=INNODB;
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
SELECT * FROM test.t1;
c1
NULL
NULL
# On node_2
SELECT * FROM test.t1;
c1
NULL
NULL
# On node_1
INSERT INTO t1 VALUES (1);
UPDATE t1 SET c1=NULL WHERE c1=1;
SELECT * FROM test.t1;
c1
NULL
NULL
NULL
# On node_2
SELECT * FROM test.t1;
c1
NULL
NULL
NULL
# On node_1
DELETE FROM t1 WHERE c1<=>NULL;
SELECT * FROM test.t1;
c1
# On node_2
SELECT * FROM test.t1;
c1
DROP TABLE t1;
# End of test
mysql-test/suite/galera/t/basic.test
0 → 100644
View file @
9d2e90f3
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
USE
test
;
CREATE
TABLE
t1
(
c1
INT
PRIMARY
KEY
)
ENGINE
=
INNODB
;
INSERT
INTO
t1
VALUES
(
1
),
(
2
),
(
3
),
(
4
),
(
5
);
SELECT
*
FROM
t1
;
--
echo
--
echo
# On node_1
--
connection
node_1
SELECT
*
FROM
test
.
t1
;
--
echo
--
echo
# On node_2
--
connection
node_2
SELECT
*
FROM
test
.
t1
;
--
let
$galera_diff_statement
=
SELECT
*
FROM
t1
--
source
include
/
galera_diff
.
inc
# Cleanup
DROP
TABLE
t1
;
--
source
include
/
galera_end
.
inc
--
echo
# End of test
mysql-test/suite/galera/t/unique_key.test
0 → 100644
View file @
9d2e90f3
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
--
echo
#
--
echo
# MDEV#5552 Deadlock when inserting NULL column value in column with
--
echo
# UNIQUE index
--
echo
#
USE
test
;
--
echo
--
echo
# On node_1
--
connection
node_1
CREATE
TABLE
t1
(
c1
INT
DEFAULT
NULL
,
UNIQUE
KEY
c1
(
c1
))
ENGINE
=
INNODB
;
INSERT
INTO
t1
VALUES
(
NULL
);
INSERT
INTO
t1
VALUES
(
NULL
);
SELECT
*
FROM
test
.
t1
;
--
echo
--
echo
# On node_2
--
connection
node_2
SELECT
*
FROM
test
.
t1
;
--
echo
--
echo
# On node_1
--
connection
node_1
INSERT
INTO
t1
VALUES
(
1
);
UPDATE
t1
SET
c1
=
NULL
WHERE
c1
=
1
;
SELECT
*
FROM
test
.
t1
;
--
echo
--
echo
# On node_2
--
connection
node_2
SELECT
*
FROM
test
.
t1
;
--
echo
--
echo
# On node_1
--
connection
node_1
DELETE
FROM
t1
WHERE
c1
<=>
NULL
;
SELECT
*
FROM
test
.
t1
;
--
echo
--
echo
# On node_2
--
connection
node_2
SELECT
*
FROM
test
.
t1
;
--
let
$galera_diff_statement
=
SELECT
*
FROM
t1
--
source
include
/
galera_diff
.
inc
# Cleanup
DROP
TABLE
t1
;
--
source
include
/
galera_end
.
inc
--
echo
# End of test
mysql-test/suite/wsrep/README
0 → 100644
View file @
9d2e90f3
* 'wsrep' suite is designated for tests which do not require a multi-node
galera cluster.
* As these tests are specific to wsrep-related functionalities, they must skip
on server built without wsrep patch (vanilla). (-DWITH_WSREP=OFF)
See : include/have_wsrep.inc, include/have_wsrep_enabled.inc, not_wsrep.inc
mysql-test/suite/wsrep/r/binlog_format.result
View file @
9d2e90f3
call mtr.add_suppression("WSREP: cannot get fake InnoDB transaction ID");
call mtr.add_suppression("WSREP: Could not open saved state file for reading:.*");
SHOW VARIABLES LIKE 'binlog_format';
Variable_name Value
binlog_format ROW
...
...
mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result
0 → 100644
View file @
9d2e90f3
#
# MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
#
# Verbose run
SET GLOBAL wsrep_replicate_myisam= ON;
TRUNCATE TABLE time_zone;
TRUNCATE TABLE time_zone_name;
TRUNCATE TABLE time_zone_transition;
TRUNCATE TABLE time_zone_transition_type;
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
SET @time_zone_id= LAST_INSERT_ID();
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('GMT', @time_zone_id);
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
(@time_zone_id, 0, 0, 0, 'GMT')
;
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/garbage' as time zone. Skipping it.
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/ignored.tab' as time zone. Skipping it.
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
SET @time_zone_id= LAST_INSERT_ID();
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('posix/GMT', @time_zone_id);
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
(@time_zone_id, 0, 0, 0, 'GMT')
;
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/posix/garbage' as time zone. Skipping it.
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/posix/ignored.tab' as time zone. Skipping it.
Warning: Skipping directory 'MYSQLTEST_VARDIR/zoneinfo/posix/posix': to avoid infinite symlink recursion.
ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
SET GLOBAL wsrep_replicate_myisam= OFF;
# Silent run
SET GLOBAL wsrep_replicate_myisam= ON;
TRUNCATE TABLE time_zone;
TRUNCATE TABLE time_zone_name;
TRUNCATE TABLE time_zone_transition;
TRUNCATE TABLE time_zone_transition_type;
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
SET @time_zone_id= LAST_INSERT_ID();
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('GMT', @time_zone_id);
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
(@time_zone_id, 0, 0, 0, 'GMT')
;
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/garbage' as time zone. Skipping it.
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
SET @time_zone_id= LAST_INSERT_ID();
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('posix/GMT', @time_zone_id);
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
(@time_zone_id, 0, 0, 0, 'GMT')
;
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/posix/garbage' as time zone. Skipping it.
ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
SET GLOBAL wsrep_replicate_myisam= OFF;
#
# Testing with explicit timezonefile
#
SET GLOBAL wsrep_replicate_myisam= ON;
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
SET @time_zone_id= LAST_INSERT_ID();
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('XXX', @time_zone_id);
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
(@time_zone_id, 0, 0, 0, 'GMT')
;
SET GLOBAL wsrep_replicate_myisam= OFF;
#
# Testing --leap
#
SET GLOBAL wsrep_replicate_myisam= ON;
TRUNCATE TABLE time_zone_leap_second;
ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
SET GLOBAL wsrep_replicate_myisam= OFF;
mysql-test/suite/wsrep/r/pool_of_threads.result
0 → 100644
View file @
9d2e90f3
#
# MDEV#5687: Maria doesn't shutdown following upgrade to 5.5.35-galera
#
SELECT @@GLOBAL.thread_handling;
@@GLOBAL.thread_handling
pool-of-threads
# End of test.
mysql-test/suite/wsrep/r/variables.result
View file @
9d2e90f3
# MDEV#5534: mysql_tzinfo_to_sql generates wrong query
#
# Testing wsrep_replicate_myisam variable.
SELECT @@session.wsrep_replicate_myisam;
ERROR HY000: Variable 'wsrep_replicate_myisam' is a GLOBAL variable
SELECT @@global.wsrep_replicate_myisam;
@@global.wsrep_replicate_myisam
0
SET SESSION wsrep_replicate_myisam= ON;
ERROR HY000: Variable 'wsrep_replicate_myisam' is a GLOBAL variable and should be set with SET GLOBAL
SET GLOBAL wsrep_replicate_myisam= ON;
SET GLOBAL wsrep_replicate_myisam= OFF;
#
# MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
# variables when using "_"
...
...
mysql-test/suite/wsrep/t/binlog_format.test
View file @
9d2e90f3
--
source
include
/
have_wsrep
.
inc
--
source
include
/
have_wsrep
_enabled
.
inc
--
source
include
/
have_binlog_format_row
.
inc
#
# MDEV-4227: Galera server should stop crashing on setting binlog_format STATEMENT
#
call
mtr
.
add_suppression
(
"WSREP: cannot get fake InnoDB transaction ID"
);
call
mtr
.
add_suppression
(
"WSREP: Could not open saved state file for reading:.*"
);
SHOW
VARIABLES
LIKE
'binlog_format'
;
--
error
ER_WRONG_VALUE_FOR_VAR
SET
binlog_format
=
STATEMENT
;
...
...
mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test
0 → 100644
View file @
9d2e90f3
--
source
include
/
have_wsrep
.
inc
--
source
include
/
have_symlink
.
inc
--
source
include
/
not_windows
.
inc
--
echo
#
--
echo
# MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
--
echo
#
--
exec
mkdir
$MYSQLTEST_VARDIR
/
zoneinfo
--
exec
ln
-
s
$MYSQLTEST_VARDIR
/
zoneinfo
$MYSQLTEST_VARDIR
/
zoneinfo
/
posix
--
copy_file
std_data
/
zoneinfo
/
GMT
$MYSQLTEST_VARDIR
/
zoneinfo
/
GMT
--
copy_file
std_data
/
words
.
dat
$MYSQLTEST_VARDIR
/
zoneinfo
/
garbage
--
copy_file
std_data
/
words
.
dat
$MYSQLTEST_VARDIR
/
zoneinfo
/
ignored
.
tab
--
echo
# Verbose run
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
exec
$MYSQL_TZINFO_TO_SQL
--
verbose
$MYSQLTEST_VARDIR
/
zoneinfo
2
>&
1
--
echo
# Silent run
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
exec
$MYSQL_TZINFO_TO_SQL
$MYSQLTEST_VARDIR
/
zoneinfo
2
>&
1
--
echo
#
--
echo
# Testing with explicit timezonefile
--
echo
#
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
exec
$MYSQL_TZINFO_TO_SQL
$MYSQLTEST_VARDIR
/
zoneinfo
/
GMT
XXX
2
>&
1
--
echo
#
--
echo
# Testing --leap
--
echo
#
--
exec
$MYSQL_TZINFO_TO_SQL
--
leap
$MYSQLTEST_VARDIR
/
zoneinfo
/
GMT
2
>&
1
#
# Cleanup
#
--
exec
rm
-
rf
$MYSQLTEST_VARDIR
/
zoneinfo
mysql-test/suite/wsrep/t/pool_of_threads.opt
0 → 100644
View file @
9d2e90f3
--binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=/usr/lib/galera/libgalera_smm.so --wsrep-cluster-address=gcomm:// --thread_handling=pool-of-threads
mysql-test/suite/wsrep/t/pool_of_threads.test
0 → 100644
View file @
9d2e90f3
--
source
include
/
have_wsrep
.
inc
--
echo
--
echo
#
--
echo
# MDEV#5687: Maria doesn't shutdown following upgrade to 5.5.35-galera
--
echo
#
# Note: This test is to ensure that server shuts down properly.
SELECT
@@
GLOBAL
.
thread_handling
;
--
echo
# End of test.
mysql-test/suite/wsrep/t/trans.test
View file @
9d2e90f3
--
source
include
/
have_wsrep
.
inc
--
source
include
/
have_innodb
.
inc
--
echo
#
...
...
mysql-test/suite/wsrep/t/variables.test
View file @
9d2e90f3
--
source
include
/
have_wsrep
.
inc
--
echo
--
echo
# MDEV#5534: mysql_tzinfo_to_sql generates wrong query
--
echo
#
--
echo
# Testing wsrep_replicate_myisam variable.
--
error
ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT
@@
session
.
wsrep_replicate_myisam
;
SELECT
@@
global
.
wsrep_replicate_myisam
;
--
error
ER_GLOBAL_VARIABLE
SET
SESSION
wsrep_replicate_myisam
=
ON
;
SET
GLOBAL
wsrep_replicate_myisam
=
ON
;
# Reset it back.
SET
GLOBAL
wsrep_replicate_myisam
=
OFF
;
--
echo
#
--
echo
# MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
--
echo
# variables when using "_"
...
...
@@ -18,4 +34,3 @@ SHOW VARIABLES LIKE 'wsrep_%';
SHOW
VARIABLES
LIKE
'x'
;
--
echo
# End of test.
mysql-test/t/mysql_tzinfo_to_sql_symlink.test
View file @
9d2e90f3
--
source
include
/
have_symlink
.
inc
--
source
include
/
not_windows
.
inc
# Note: The output of mysql_tzinfo_to_sql is different if server is compiled
# with wsrep. Hence a copy of this test has been placed under wsrep suite with
# the updated result. (lp:1161432)
--
source
include
/
not_wsrep
.
inc
--
echo
#
--
echo
# MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
--
echo
#
...
...
sql/handler.cc
View file @
9d2e90f3
...
...
@@ -6218,7 +6218,7 @@ void ha_wsrep_fake_trx_id(THD *thd)
}
else
{
WSREP_WARN
(
"cannot get
get
fake InnoDB transaction ID"
);
WSREP_WARN
(
"cannot get fake InnoDB transaction ID"
);
}
DBUG_VOID_RETURN
;
...
...
sql/mysqld.cc
View file @
9d2e90f3
...
...
@@ -2055,6 +2055,10 @@ extern "C" void unireg_abort(int exit_code)
wsrep_close_threads
(
thd
);
/* this won't close all threads */
sleep
(
1
);
/* so give some time to exit for those which can */
WSREP_INFO
(
"Some threads may fail to exit."
);
/* In bootstrap mode we deinitialize wsrep here. */
if
(
opt_bootstrap
&&
wsrep_inited
)
wsrep_deinit
();
}
#endif // WITH_WSREP
clean_up
(
!
opt_abort
&&
(
exit_code
||
!
opt_bootstrap
));
/* purecov: inspected */
...
...
sql/tztime.cc
View file @
9d2e90f3
...
...
@@ -2709,8 +2709,10 @@ main(int argc, char **argv)
return
1
;
}
#ifdef WITH_WSREP
// Replicate MyISAM DDL for this session, cf. lp:1161432
printf
(
"SET SESSION wsrep_replicate_myisam=ON;
\n
"
);
printf
(
"SET GLOBAL wsrep_replicate_myisam= ON;
\n
"
);
#endif
/* WITH_WSREP */
if
(
argc
==
1
&&
!
opt_leap
)
{
...
...
@@ -2759,6 +2761,11 @@ main(int argc, char **argv)
free_root
(
&
tz_storage
,
MYF
(
0
));
}
#ifdef WITH_WSREP
// Reset wsrep_replicate_myisam. lp:1161432
printf
(
"SET GLOBAL wsrep_replicate_myisam= OFF;
\n
"
);
#endif
/* WITH_WSREP */
free_defaults
(
default_argv
);
my_end
(
0
);
return
0
;
...
...
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