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
7fd382f1
Commit
7fd382f1
authored
Mar 27, 2014
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged r3466 from maria-5.5-galera.
parent
7b57c5ea
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
222 additions
and
8 deletions
+222
-8
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/not_wsrep.inc
mysql-test/include/not_wsrep.inc
+7
-0
mysql-test/r/mysql_tzinfo_to_sql_symlink.result
mysql-test/r/mysql_tzinfo_to_sql_symlink.result
+36
-0
mysql-test/r/not_wsrep.require
mysql-test/r/not_wsrep.require
+2
-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/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/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/tztime.cc
sql/tztime.cc
+9
-1
No files found.
mysql-test/include/have_wsrep.inc
View file @
7fd382f1
--
require
r
/
have_wsrep
.
require
# To be used in a test which requires server to be compiled with wsrep support
disable_query_log
;
# (-DWITH_WSREP=ON) and wsrep plugin is ACTIVE.
show
variables
like
'wsrep_on'
;
enable_query_log
;
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 @
7fd382f1
# 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/not_wsrep.inc
0 → 100644
View file @
7fd382f1
# 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/r/mysql_tzinfo_to_sql_symlink.result
View file @
7fd382f1
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
# MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
# MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
#
#
SET SESSION wsrep_replicate_myisam=ON;
SET SESSION wsrep_replicate_myisam=ON;
# Verbose run
TRUNCATE TABLE time_zone;
TRUNCATE TABLE time_zone;
TRUNCATE TABLE time_zone_name;
TRUNCATE TABLE time_zone_name;
TRUNCATE TABLE time_zone_transition;
TRUNCATE TABLE time_zone_transition;
...
@@ -21,3 +22,38 @@ INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset,
...
@@ -21,3 +22,38 @@ INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset,
Warning: Skipping directory 'MYSQLTEST_VARDIR/zoneinfo/posix/posix': to avoid infinite symlink recursion.
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 ORDER BY Time_zone_id, Transition_time;
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
# Silent run
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;
#
# Testing with explicit timezonefile
#
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')
;
#
# Testing --leap
#
TRUNCATE TABLE time_zone_leap_second;
ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
mysql-test/r/not_wsrep.require
0 → 100644
View file @
7fd382f1
HAVE_WSREP
0
mysql-test/suite/wsrep/r/binlog_format.result
View file @
7fd382f1
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';
SHOW VARIABLES LIKE 'binlog_format';
Variable_name Value
Variable_name Value
binlog_format ROW
binlog_format ROW
...
...
mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result
0 → 100644
View file @
7fd382f1
#
# 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/variables.result
View file @
7fd382f1
# 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
# MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
# variables when using "_"
# variables when using "_"
...
...
mysql-test/suite/wsrep/t/binlog_format.test
View file @
7fd382f1
--
source
include
/
have_wsrep
.
inc
--
source
include
/
have_wsrep
_enabled
.
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
#
#
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'
;
SHOW
VARIABLES
LIKE
'binlog_format'
;
--
error
ER_WRONG_VALUE_FOR_VAR
--
error
ER_WRONG_VALUE_FOR_VAR
SET
binlog_format
=
STATEMENT
;
SET
binlog_format
=
STATEMENT
;
...
...
mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test
0 → 100644
View file @
7fd382f1
--
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/variables.test
View file @
7fd382f1
--
source
include
/
have_wsrep
.
inc
--
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
#
--
echo
# MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
--
echo
# MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
--
echo
# variables when using "_"
--
echo
# variables when using "_"
...
@@ -18,4 +34,3 @@ SHOW VARIABLES LIKE 'wsrep_%';
...
@@ -18,4 +34,3 @@ SHOW VARIABLES LIKE 'wsrep_%';
SHOW
VARIABLES
LIKE
'x'
;
SHOW
VARIABLES
LIKE
'x'
;
--
echo
# End of test.
--
echo
# End of test.
mysql-test/t/mysql_tzinfo_to_sql_symlink.test
View file @
7fd382f1
--
source
include
/
have_symlink
.
inc
--
source
include
/
have_symlink
.
inc
--
source
include
/
not_windows
.
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
#
--
echo
# MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
--
echo
# MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
--
echo
#
--
echo
#
...
...
sql/handler.cc
View file @
7fd382f1
...
@@ -6131,7 +6131,7 @@ void ha_wsrep_fake_trx_id(THD *thd)
...
@@ -6131,7 +6131,7 @@ void ha_wsrep_fake_trx_id(THD *thd)
}
}
else
else
{
{
WSREP_WARN
(
"cannot get
get
fake InnoDB transaction ID"
);
WSREP_WARN
(
"cannot get fake InnoDB transaction ID"
);
}
}
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
...
...
sql/tztime.cc
View file @
7fd382f1
...
@@ -2590,8 +2590,10 @@ main(int argc, char **argv)
...
@@ -2590,8 +2590,10 @@ main(int argc, char **argv)
return
1
;
return
1
;
}
}
#ifdef WITH_WSREP
// Replicate MyISAM DDL for this session, cf. lp:1161432
// 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
==
2
)
if
(
argc
==
2
)
{
{
...
@@ -2643,6 +2645,12 @@ main(int argc, char **argv)
...
@@ -2643,6 +2645,12 @@ main(int argc, char **argv)
free_root
(
&
tz_storage
,
MYF
(
0
));
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
);
my_end
(
0
);
return
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