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
be055b38
Commit
be055b38
authored
Sep 09, 2014
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor improvements in mtr and wsrep test files.
parent
e5267cae
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
69 additions
and
41 deletions
+69
-41
mysql-test/include/galera_init.inc
mysql-test/include/galera_init.inc
+1
-0
mysql-test/include/have_wsrep_enabled.inc
mysql-test/include/have_wsrep_enabled.inc
+1
-1
mysql-test/include/have_wsrep_provider.inc
mysql-test/include/have_wsrep_provider.inc
+6
-0
mysql-test/include/wait_until_ready.inc
mysql-test/include/wait_until_ready.inc
+34
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+26
-39
mysql-test/r/have_wsrep_on.require
mysql-test/r/have_wsrep_on.require
+0
-0
mysql-test/suite/wsrep/t/binlog_format.test
mysql-test/suite/wsrep/t/binlog_format.test
+1
-1
No files found.
mysql-test/include/galera_init.inc
View file @
be055b38
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
# Number of nodes in the cluster.
# Number of nodes in the cluster.
#
#
--
source
include
/
have_wsrep_provider
.
inc
--
source
include
/
have_wsrep_enabled
.
inc
--
source
include
/
have_wsrep_enabled
.
inc
--
let
$_galera_node
=
$galera_cluster_size
--
let
$_galera_node
=
$galera_cluster_size
...
...
mysql-test/include/have_wsrep_enabled.inc
View file @
be055b38
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
--
source
include
/
have_wsrep
.
inc
--
source
include
/
have_wsrep
.
inc
--
require
r
/
have_wsrep
.
require
--
require
r
/
have_wsrep
_on
.
require
disable_query_log
;
disable_query_log
;
SHOW
VARIABLES
LIKE
'wsrep_on'
;
SHOW
VARIABLES
LIKE
'wsrep_on'
;
enable_query_log
;
enable_query_log
;
mysql-test/include/have_wsrep_provider.inc
0 → 100644
View file @
be055b38
if
(
`SELECT COUNT(*)=0 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE
VARIABLE_NAME LIKE 'wsrep_provider' AND VARIABLE_VALUE NOT LIKE 'none'`
)
{
--
skip
Test
requires
wsrep
provider
library
(
libgalera_smm
.
so
)
}
mysql-test/include/wait_until_ready.inc
0 → 100644
View file @
be055b38
# If wsrep patch is enabled, wait for a minute until node is ready.
# Note: include/wait_for_status_var.inc cannot be used here, as server rejects
# all commands except SHOW & SET until its ready. (see wsrep_ready status
# variable)
--
disable_result_log
--
disable_query_log
--
enable_reconnect
let
$counter
=
600
;
# Check if wsrep_ready status variable exists.
if
(
`SHOW STATUS LIKE 'wsrep_ready'`
)
{
let
$wsrep_ready
=
query_get_value
(
"SHOW STATUS LIKE 'wsrep_ready'"
,
Value
,
1
);
while
(
$wsrep_ready
==
'OFF'
)
{
if
(
!
$counter
)
{
echo
===============================================
;
echo
Node
still
not
ready
after
a
minute
,
giving
up
!
;
echo
===============================================
;
die
;
}
dec
$counter
;
sleep
0.1
;
let
$wsrep_ready
=
query_get_value
(
"SHOW STATUS LIKE 'wsrep_ready'"
,
Value
,
1
);
}
}
--
disable_reconnect
--
enable_query_log
--
enable_result_log
mysql-test/mysql-test-run.pl
View file @
be055b38
...
@@ -135,7 +135,6 @@ my $opt_start;
...
@@ -135,7 +135,6 @@ my $opt_start;
my
$opt_start_dirty
;
my
$opt_start_dirty
;
my
$opt_start_exit
;
my
$opt_start_exit
;
my
$start_only
;
my
$start_only
;
my
$file_wsrep_provider
;
END
{
END
{
if
(
defined
$opt_tmpdir_pid
and
$opt_tmpdir_pid
==
$$
)
if
(
defined
$opt_tmpdir_pid
and
$opt_tmpdir_pid
==
$$
)
...
@@ -2395,24 +2394,6 @@ sub environment_setup {
...
@@ -2395,24 +2394,6 @@ sub environment_setup {
$ENV
{'
NDB_EXAMPLES_OUTPUT
'}
=
$path_ndb_testrun_log
;
$ENV
{'
NDB_EXAMPLES_OUTPUT
'}
=
$path_ndb_testrun_log
;
}
}
# ----------------------------------------------------
# Setup env for wsrep
# ----------------------------------------------------
if
(
have_wsrep
())
{
if
(
defined
$ENV
{'
WSREP_PROVIDER
'}
)
{
# Nothing needs to be done! WSREP_PROVIDER env is already set & checked;
# will be used.
}
else
{
$ENV
{'
WSREP_PROVIDER
'}
=
$file_wsrep_provider
;
}
if
((
defined
$ENV
{'
WSREP_PROVIDER
'})
&&
(
$ENV
{'
WSREP_PROVIDER
'}
ne
""))
{
mtr_verbose
("
WSREP_PROVIDER set to
$ENV
{'WSREP_PROVIDER'}
");
}
else
{
mtr_verbose
("
WSREP_PROVIDER isn't available
");
}
}
# ----------------------------------------------------
# ----------------------------------------------------
# mysql clients
# mysql clients
# ----------------------------------------------------
# ----------------------------------------------------
...
@@ -3181,32 +3162,38 @@ sub have_wsrep() {
...
@@ -3181,32 +3162,38 @@ sub have_wsrep() {
return
defined
$wsrep_on
return
defined
$wsrep_on
}
}
sub
check_wsrep_provider_env
{
if
(
defined
$ENV
{'
WSREP_PROVIDER
'})
{
if
(
mtr_file_exists
(
$ENV
{'
WSREP_PROVIDER
'})
eq
"")
{
mtr_error
("
WSREP_PROVIDER env set to an invalid path
");
return
0
;
# error
}
# Ok, WSREP_PROVIDER set to a valid path.
return
1
;
}
# Ok, WSREP_PROVIDER not defined.
return
2
;
}
sub
check_wsrep_support
()
{
sub
check_wsrep_support
()
{
if
(
have_wsrep
())
if
(
have_wsrep
())
{
{
mtr_report
("
- binaries built with wsrep patch
");
mtr_report
("
- binaries built with wsrep patch
");
$file_wsrep_provider
=
# Add galera test suites
mtr_file_exists
("
/usr/lib/galera/libgalera_smm.so
",
mtr_report
("
- adding wsrep, galera to default test suites
");
"
/usr/lib64/galera/libgalera_smm.so
"
);
push
@DEFAULT_SUITES
,
qw(wsrep galera
)
;
if
((
check_wsrep_provider_env
()
==
1
)
||
(
$file_wsrep_provider
ne
""))
{
# Check whether WSREP_PROVIDER environment variable is set.
# Add galera test suites
if
(
defined
$ENV
{'
WSREP_PROVIDER
'})
{
mtr_report
("
- adding wsrep, galera to default test suites
");
if
((
mtr_file_exists
(
$ENV
{'
WSREP_PROVIDER
'})
eq
"")
&&
push
@DEFAULT_SUITES
,
qw(wsrep galera)
;
(
$ENV
{'
WSREP_PROVIDER
'}
ne
"
none
"))
{
mtr_error
("
WSREP_PROVIDER env set to an invalid path
");
}
# WSREP_PROVIDER is valid; set to a valid path or "none").
mtr_verbose
("
WSREP_PROVIDER env set to
$ENV
{'WSREP_PROVIDER'}
");
}
else
{
# WSREP_PROVIDER env not defined. Lets try to locate the wsrep provider
# library.
my
$file_wsrep_provider
=
mtr_file_exists
("
/usr/lib/galera/libgalera_smm.so
",
"
/usr/lib64/galera/libgalera_smm.so
");
if
(
$file_wsrep_provider
ne
"")
{
# wsrep provider library found !
mtr_verbose
("
wsrep provider library found :
$file_wsrep_provider
");
$ENV
{'
WSREP_PROVIDER
'}
=
$file_wsrep_provider
;
}
else
{
mtr_verbose
("
Could not find wsrep provider library, setting it to 'none'
");
$ENV
{'
WSREP_PROVIDER
'}
=
"
none
";
}
}
}
}
}
}
}
...
...
mysql-test/r/have_wsrep.require
→
mysql-test/r/have_wsrep
_on
.require
View file @
be055b38
File moved
mysql-test/suite/wsrep/t/binlog_format.test
View file @
be055b38
--
source
include
/
have_wsrep_
enabled
.
inc
--
source
include
/
have_wsrep_
provider
.
inc
--
source
include
/
have_binlog_format_row
.
inc
--
source
include
/
have_binlog_format_row
.
inc
#
#
# MDEV-4227: Galera server should stop crashing on setting binlog_format STATEMENT
# MDEV-4227: Galera server should stop crashing on setting binlog_format STATEMENT
...
...
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