Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
MariaDB and MySQL Packaging Team
mariadb-5.5
Commits
81073b03
Commit
81073b03
authored
Aug 07, 2014
by
Otto Kekäläinen
Browse files
Imported Upstream version 5.5.39
parent
16eb3898
Changes
298
Hide whitespace changes
Inline
Side-by-side
mysql-test/suite/innodb/t/innodb_simulate_comp_failures_small.test
0 → 100644
View file @
81073b03
--
let
$num_inserts
=
10000
--
let
$num_ops
=
3000
--
source
suite
/
innodb
/
include
/
innodb_simulate_comp_failures
.
inc
# clean exit
--
exit
mysql-test/suite/maria/maria_partition.result
View file @
81073b03
...
...
@@ -33,3 +33,18 @@ insert into t1 values (2);
select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
a a
drop table t1,t2;
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=Aria PARTITION BY KEY() PARTITIONS 2;
CREATE VIEW v1 AS SELECT * FROM t1;
LOCK TABLE v1 WRITE;
CREATE TABLE v1 (i INT);
ERROR HY000: Table 'v1' was not locked with LOCK TABLES
INSERT INTO v1 VALUES (1);
UNLOCK TABLES;
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
SELECT * FROM t1;
pk
1
drop table t1;
drop view v1;
mysql-test/suite/maria/maria_partition.test
View file @
81073b03
...
...
@@ -49,6 +49,28 @@ insert into t1 values (2);
select
*
from
t2
left
join
t1
on
(
t2
.
a
=
t1
.
a
)
where
t2
.
a
=
'bbb'
;
drop
table
t1
,
t2
;
#
# MDEV-6493
# Assertion `table->file->stats.records > 0 || error'
# failure, or 'Invalid write' valgrind warnings, or crash on scenario
# with Aria table, view, LOCK TABLES #
#
CREATE
TABLE
t1
(
pk
INT
PRIMARY
KEY
)
ENGINE
=
Aria
PARTITION
BY
KEY
()
PARTITIONS
2
;
CREATE
VIEW
v1
AS
SELECT
*
FROM
t1
;
LOCK
TABLE
v1
WRITE
;
--
error
1100
CREATE
TABLE
v1
(
i
INT
);
INSERT
INTO
v1
VALUES
(
1
);
UNLOCK
TABLES
;
check
table
t1
;
SELECT
*
FROM
t1
;
drop
table
t1
;
drop
view
v1
;
# Set defaults back
--
disable_result_log
--
disable_query_log
...
...
mysql-test/suite/rpl/r/failed_create_view-6409.result
0 → 100644
View file @
81073b03
create table v1 (a int);
include/master-slave.inc
[connection master]
create table t1 (a int);
create view v1 as select * from t1;
ERROR 42S01: Table 'v1' already exists
show tables;
Tables_in_test
t1
v1
show tables;
Tables_in_test
t1
drop table if exists t1, v1;
include/rpl_end.inc
mysql-test/suite/rpl/r/kill_hard-6290.result
0 → 100644
View file @
81073b03
include/master-slave.inc
[connection master]
kill user test2@nohost;
include/rpl_end.inc
mysql-test/suite/rpl/r/rpl_heartbeat_debug.result
0 → 100644
View file @
81073b03
include/master-slave.inc
[connection master]
include/stop_slave.inc
set @restore_slave_net_timeout= @@global.slave_net_timeout;
set @@global.slave_net_timeout= 10;
show status like 'Slave_heartbeat_period';;
Variable_name Slave_heartbeat_period
Value 60.000
SET @save_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,simulate_slave_heartbeat_network_error";
CALL mtr.add_suppression('SET @master_heartbeat_period to master failed with error');
CALL mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
include/start_slave.inc
drop table if exists t1;
CREATE TABLE t1 (a INT PRIMARY KEY);
INSERT INTO t1 VALUES (1);
SELECT * FROM t1;
a
1
drop table t1;
include/stop_slave.inc
SET GLOBAL debug_dbug=@save_dbug;
set @@global.slave_net_timeout= @restore_slave_net_timeout;
include/start_slave.inc
include/rpl_end.inc
mysql-test/suite/rpl/r/rpl_semi_sync.result
View file @
81073b03
...
...
@@ -386,6 +386,7 @@ Rpl_semi_sync_slave_status ON
include/stop_slave.inc
[ on master ]
set sql_log_bin=0;
include/stop_dump_threads.inc
UNINSTALL PLUGIN rpl_semi_sync_master;
set sql_log_bin=1;
SHOW VARIABLES LIKE 'rpl_semi_sync_master_enabled';
...
...
@@ -439,9 +440,8 @@ Rpl_semi_sync_slave_status OFF
#
# Clean up
#
include/uninstall_semisync.inc
include/stop_slave.inc
UNINSTALL PLUGIN rpl_semi_sync_slave;
UNINSTALL PLUGIN rpl_semi_sync_master;
change master to master_user='root',master_password='';
include/start_slave.inc
drop table t1;
...
...
mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result
0 → 100644
View file @
81073b03
include/master-slave.inc
[connection master]
INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master';
[connection slave]
INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave';
UNINSTALL PLUGIN rpl_semi_sync_slave;
[connection master]
UNINSTALL PLUGIN rpl_semi_sync_master;
CREATE TABLE t1(i int);
INSERT INTO t1 values (1);
DROP TABLE t1;
[connection slave]
include/install_semisync.inc
[connection slave]
UNINSTALL PLUGIN rpl_semi_sync_slave;
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
plugin_name plugin_status
rpl_semi_sync_slave DELETED
[connection master]
UNINSTALL PLUGIN rpl_semi_sync_master;
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
plugin_name plugin_status
rpl_semi_sync_master DELETED
CREATE TABLE t1(i int);
INSERT INTO t1 values (2);
DROP TABLE t1;
[connection slave]
show status like "Rpl_semi_sync_slave_status";
Variable_name Value
Rpl_semi_sync_slave_status ON
[connection master]
show status like "Rpl_semi_sync_master_status";
Variable_name Value
Rpl_semi_sync_master_status ON
show status like "Rpl_semi_sync_master_clients";
Variable_name Value
Rpl_semi_sync_master_clients 1
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
plugin_name plugin_status
rpl_semi_sync_master DELETED
[connection slave]
include/stop_slave.inc
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
plugin_name plugin_status
include/start_slave.inc
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
plugin_name plugin_status
[connection master]
show status like "Rpl_semi_sync_master_clients";
Variable_name Value
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
plugin_name plugin_status
CREATE TABLE t1(i int);
INSERT INTO t1 values (3);
DROP TABLE t1;
[connection slave]
include/rpl_end.inc
mysql-test/suite/rpl/r/rpl_stop_slave.result
View file @
81073b03
...
...
@@ -94,10 +94,12 @@ DROP TABLE t1, t2;
CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES(1, 1);
include/stop_slave.inc
[connection master]
include/stop_dump_threads.inc
SET GLOBAL debug_dbug= '+d,dump_thread_wait_before_send_xid,*';
[connection slave]
include/
re
start_slave.inc
include/start_slave.inc
BEGIN;
UPDATE t1 SET c2 = 2 WHERE c1 = 1;
[connection master]
...
...
@@ -116,6 +118,9 @@ SET DEBUG_SYNC= 'now WAIT_FOR signal.continued';
[connection slave]
include/wait_for_slave_to_stop.inc
[connection slave1]
[connection master]
include/stop_dump_threads.inc
[connection slave1]
include/start_slave.inc
[connection master]
DROP TABLE t1, t2;
...
...
mysql-test/suite/rpl/t/failed_create_view-6409.test
0 → 100644
View file @
81073b03
#
# MDEV-6409 CREATE VIEW replication problem if error occurs in mysql_register_view
#
#
#
# verify that failed CREATE VIEW is not replicated
create
table
v1
(
a
int
);
source
include
/
master
-
slave
.
inc
;
connection
master
;
create
table
t1
(
a
int
);
--
error
ER_TABLE_EXISTS_ERROR
create
view
v1
as
select
*
from
t1
;
show
tables
;
sync_slave_with_master
;
show
tables
;
connection
master
;
drop
table
if
exists
t1
,
v1
;
--
source
include
/
rpl_end
.
inc
mysql-test/suite/rpl/t/kill_hard-6290.test
0 → 100644
View file @
81073b03
#
# MDEV-6290 Crash in KILL HARD QUERY USER x@y when slave threads are running
#
# this test doesn't depend on the binlog format, no need to run it three times
--
source
include
/
have_binlog_format_mixed
.
inc
--
source
include
/
master
-
slave
.
inc
--
connection
server_2
kill
user
test2
@
nohost
;
--
source
include
/
rpl_end
.
inc
mysql-test/suite/rpl/t/rpl_heartbeat_debug.test
0 → 100644
View file @
81073b03
# Testing master to slave heartbeat protocol, test cases that need debug build.
--
source
include
/
master
-
slave
.
inc
--
source
include
/
have_debug
.
inc
connection
slave
;
--
source
include
/
stop_slave
.
inc
set
@
restore_slave_net_timeout
=
@@
global
.
slave_net_timeout
;
--
disable_warnings
set
@@
global
.
slave_net_timeout
=
10
;
--
enable_warnings
###
### Checking the range
###
#
# default period slave_net_timeout/2
#
--
query_vertical
show
status
like
'Slave_heartbeat_period'
;
SET
@
save_dbug
=
@@
GLOBAL
.
debug_dbug
;
SET
GLOBAL
debug_dbug
=
"+d,simulate_slave_heartbeat_network_error"
;
CALL
mtr
.
add_suppression
(
'SET @master_heartbeat_period to master failed with error'
);
CALL
mtr
.
add_suppression
(
'Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again'
);
--
source
include
/
start_slave
.
inc
connection
master
;
--
disable_warnings
drop
table
if
exists
t1
;
--
enable_warnings
CREATE
TABLE
t1
(
a
INT
PRIMARY
KEY
);
INSERT
INTO
t1
VALUES
(
1
);
sync_slave_with_master
;
--
connection
slave
SELECT
*
FROM
t1
;
connection
master
;
drop
table
t1
;
connection
slave
;
--
source
include
/
stop_slave
.
inc
--
disable_warnings
SET
GLOBAL
debug_dbug
=@
save_dbug
;
set
@@
global
.
slave_net_timeout
=
@
restore_slave_net_timeout
;
--
enable_warnings
--
source
include
/
start_slave
.
inc
--
source
include
/
rpl_end
.
inc
mysql-test/suite/rpl/t/rpl_semi_sync.test
View file @
81073b03
...
...
@@ -548,6 +548,7 @@ source include/stop_slave.inc;
connection
master
;
echo
[
on
master
];
set
sql_log_bin
=
0
;
--
source
include
/
stop_dump_threads
.
inc
UNINSTALL
PLUGIN
rpl_semi_sync_master
;
set
sql_log_bin
=
1
;
enable_query_log
;
...
...
@@ -601,19 +602,10 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
--
echo
#
--
echo
# Clean up
--
echo
#
--
source
include
/
uninstall_semisync
.
inc
connection
slave
;
source
include
/
stop_slave
.
inc
;
UNINSTALL
PLUGIN
rpl_semi_sync_slave
;
connection
master
;
# The dump thread may still be running on the master, and so the following
# UNINSTALL could generate a warning about the plugin is busy.
disable_warnings
;
UNINSTALL
PLUGIN
rpl_semi_sync_master
;
enable_warnings
;
connection
slave
;
change
master
to
master_user
=
'root'
,
master_password
=
''
;
source
include
/
start_slave
.
inc
;
...
...
mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin.test
0 → 100644
View file @
81073b03
###############################################################################
# Bug#17638477 UNINSTALL AND INSTALL SEMI-SYNC PLUGIN CAUSES SLAVES TO BREAK
# Problem: Uninstallation of Semi sync plugin should be blocked when it is
# in use.
# Test case: Uninstallation of semi sync should be allowed
# On Master:
# 1) When there is no dump thread
# 2) When there are no semi sync slaves (i.e., async replication).
# On Slave:
# 1) When there is no I/O thread
# 2) When there are no semi sync enabled I/O thread (i.e.,async replication).
###############################################################################
--
source
include
/
have_semisync_plugin
.
inc
--
source
include
/
not_embedded
.
inc
--
source
include
/
have_binlog_format_statement
.
inc
--
source
include
/
master
-
slave
.
inc
###############################################################################
# Case 1: Uninstallation of semi sync plugins should be allowed when it is
# not in use i.e., when asynchronous replication is active.
###############################################################################
# Step 1.1: Install semi sync master plugin on master
INSTALL
PLUGIN
rpl_semi_sync_master
SONAME
'semisync_master'
;
# Step 1.2: Install semi sync slave plugin on slave
--
connection
slave
--
echo
[
connection
slave
]
INSTALL
PLUGIN
rpl_semi_sync_slave
SONAME
'semisync_slave'
;
# Step 1.3: Uninstallation of semisync plugin on master and slave should be
# allowed at this state as there is no semi sync replication enabled between
# master and slave.
UNINSTALL
PLUGIN
rpl_semi_sync_slave
;
--
connection
master
--
echo
[
connection
master
]
UNINSTALL
PLUGIN
rpl_semi_sync_master
;
# Step 1.4: Check that replication is working fine at the end of the test case.
CREATE
TABLE
t1
(
i
int
);
INSERT
INTO
t1
values
(
1
);
DROP
TABLE
t1
;
--
sync_slave_with_master
--
echo
[
connection
slave
]
###############################################################################
# Case 2: Uninstallation of semi sync plugins should be disallowed
# when it is in use i.e., when semi sync replication is active
###############################################################################
# Step 2.1: Install and enable semi sync replication between master and slave
--
source
include
/
install_semisync
.
inc
# Step 2.2: Check that rpl_semi_sync_slave uninstallation on Slave is not
# possible at this state
--
connection
slave
--
echo
[
connection
slave
]
UNINSTALL
PLUGIN
rpl_semi_sync_slave
;
select
plugin_name
,
plugin_status
from
information_schema
.
plugins
where
plugin_name
like
'rpl_%'
;
# Step 2.3: Check that rpl_semi_sync_master uninstallation on Master is not
# possible at this state
--
connection
master
--
echo
[
connection
master
]
UNINSTALL
PLUGIN
rpl_semi_sync_master
;
select
plugin_name
,
plugin_status
from
information_schema
.
plugins
where
plugin_name
like
'rpl_%'
;
# Step 2.4: Check that replication is working fine at the end of the test case.
CREATE
TABLE
t1
(
i
int
);
INSERT
INTO
t1
values
(
2
);
DROP
TABLE
t1
;
--
sync_slave_with_master
--
echo
[
connection
slave
]
# Step 2.5: Make sure rpl_semi_sync_master_status on Master and
# rpl_semi_sync_slave_staus on Slave are ON
show
status
like
"Rpl_semi_sync_slave_status"
;
###############################################################################
# Case 3: Uninstallation of semi sync plugin should be disallowed when there
# are semi sync slaves even though rpl_semi_sync_master_enabled= OFF;.
###############################################################################
# Step 3.1: Disable semi sync on master
--
connection
master
--
echo
[
connection
master
]
show
status
like
"Rpl_semi_sync_master_status"
;
# Step 3.2: Check that still Rpl_semi_sync_master_clients is 1
show
status
like
"Rpl_semi_sync_master_clients"
;
# Step 3.3: Since Rpl_semi_sync_master_clients is 1, uninstallation of
# rpl_semi_sync_master should be disallowed.
select
plugin_name
,
plugin_status
from
information_schema
.
plugins
where
plugin_name
like
'rpl_%'
;
###############################################################################
# Case 4: Uninstallation of semi sync plugin should be allowed when it is not
# in use. Same as Case 1 but this case is to check the case after enabling and
# disabling semi sync replication.
###############################################################################
# Step 4.1: Stop IO thread on slave.
--
connection
slave
--
echo
[
connection
slave
]
--
source
include
/
stop_slave
.
inc
# Step 4.2: Disable semi sync on slave.
select
plugin_name
,
plugin_status
from
information_schema
.
plugins
where
plugin_name
like
'rpl_%'
;
# Step 4.3: Start IO thread on slave.
--
source
include
/
start_slave
.
inc
# Step 4.4: Uninstall semi sync plugin, it should be successful now.
select
plugin_name
,
plugin_status
from
information_schema
.
plugins
where
plugin_name
like
'rpl_%'
;
# Step 4.5: On Master, check that semi sync slaves are now '0'.
--
connection
master
--
echo
[
connection
master
]
show
status
like
"Rpl_semi_sync_master_clients"
;
# Step 4.6: So uninstalling semi sync plugin should be allowed
select
plugin_name
,
plugin_status
from
information_schema
.
plugins
where
plugin_name
like
'rpl_%'
;
# Step 4.7: Check that replication is working fine at the end of the test case
CREATE
TABLE
t1
(
i
int
);
INSERT
INTO
t1
values
(
3
);
DROP
TABLE
t1
;
--
sync_slave_with_master
--
echo
[
connection
slave
]
# Cleanup
source
include
/
rpl_end
.
inc
;
mysql-test/suite/rpl/t/rpl_stop_slave.test
View file @
81073b03
...
...
@@ -74,14 +74,17 @@ CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
INSERT
INTO
t1
VALUES
(
1
,
1
);
sync_slave_with_master
;
--
source
include
/
stop_slave
.
inc
--
source
include
/
rpl_connection_master
.
inc
# make sure that there are no zombie threads
--
source
include
/
stop_dump_threads
.
inc
let
$debug_save
=
`SELECT @@GLOBAL.debug`
;
SET
GLOBAL
debug_dbug
=
'+d,dump_thread_wait_before_send_xid,*'
;
--
source
include
/
rpl_connection_slave
.
inc
source
include
/
re
start_slave
_sql
.
inc
;
--
source
include
/
start_slave
.
inc
BEGIN
;
UPDATE
t1
SET
c2
=
2
WHERE
c1
=
1
;
...
...
@@ -93,6 +96,10 @@ INSERT INTO t2 VALUES(1);
UPDATE
t1
SET
c2
=
3
WHERE
c1
=
1
;
COMMIT
;
# wait for the dump thread reach the sync point
--
let
$wait_condition
=
select
count
(
*
)
=
1
from
information_schema
.
processlist
where
state
LIKE
'%debug sync point%'
and
command
=
'Binlog Dump'
--
source
include
/
wait_condition
.
inc
--
source
include
/
rpl_connection_slave1
.
inc
let
$show_statement
=
SHOW
PROCESSLIST
;
let
$field
=
Info
;
...
...
@@ -105,6 +112,7 @@ send STOP SLAVE;
ROLLBACK
;
--
source
include
/
rpl_connection_master
.
inc
SET
DEBUG_SYNC
=
'now SIGNAL signal.continue'
;
SET
DEBUG_SYNC
=
'now WAIT_FOR signal.continued'
;
...
...
@@ -113,12 +121,25 @@ source include/wait_for_slave_to_stop.inc;
--
source
include
/
rpl_connection_slave1
.
inc
reap
;
source
include
/
start_slave
.
inc
;
# Slave has stopped, thence lets make sure that
# we kill the zombie dump threads. Also, make
# sure that we disable the DBUG_EXECUTE_IF
# that would set the dump thread to wait
--
source
include
/
rpl_connection_master
.
inc
DROP
TABLE
t1
,
t2
;
--
disable_query_log
eval
SET
GLOBAL
debug_dbug
=
'$debug_save'
;
--
enable_query_log
# make sure that there are no zombie threads
--
source
include
/
stop_dump_threads
.
inc
--
source
include
/
rpl_connection_slave1
.
inc
# now the dump thread on the master will start
# from a clean slate, i.e. without the
# DBUG_EXECUTE_IF set
source
include
/
start_slave
.
inc
;
--
source
include
/
rpl_connection_master
.
inc
DROP
TABLE
t1
,
t2
;
--
source
include
/
rpl_end
.
inc
SET
DEBUG_SYNC
=
'RESET'
;
mysql-test/suite/sys_vars/r/innodb_simulate_comp_failures_basic.result
0 → 100644
View file @
81073b03
SET @start_global_value = @@global.innodb_simulate_comp_failures;
SELECT @start_global_value;
@start_global_value
0
Valid values are between 0 and 99
select @@global.innodb_simulate_comp_failures between 0 and 99;
@@global.innodb_simulate_comp_failures between 0 and 99
1
select @@global.innodb_simulate_comp_failures;
@@global.innodb_simulate_comp_failures
0
select @@session.innodb_simulate_comp_failures;
ERROR HY000: Variable 'innodb_simulate_comp_failures' is a GLOBAL variable
show global variables like 'innodb_simulate_comp_failures';
Variable_name Value
innodb_simulate_comp_failures 0
show session variables like 'innodb_simulate_comp_failures';
Variable_name Value
innodb_simulate_comp_failures 0
select * from information_schema.global_variables where variable_name='innodb_simulate_comp_failures';
VARIABLE_NAME VARIABLE_VALUE
INNODB_SIMULATE_COMP_FAILURES 0
select * from information_schema.session_variables where variable_name='innodb_simulate_comp_failures';
VARIABLE_NAME VARIABLE_VALUE
INNODB_SIMULATE_COMP_FAILURES 0
set global innodb_simulate_comp_failures=10;
select @@global.innodb_simulate_comp_failures;
@@global.innodb_simulate_comp_failures
10
select * from information_schema.global_variables where variable_name='innodb_simulate_comp_failures';
VARIABLE_NAME VARIABLE_VALUE
INNODB_SIMULATE_COMP_FAILURES 10
select * from information_schema.session_variables where variable_name='innodb_simulate_comp_failures';
VARIABLE_NAME VARIABLE_VALUE
INNODB_SIMULATE_COMP_FAILURES 10
set session innodb_simulate_comp_failures=1;
ERROR HY000: Variable 'innodb_simulate_comp_failures' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_simulate_comp_failures=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_simulate_comp_failures'
set global innodb_simulate_comp_failures=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_simulate_comp_failures'
set global innodb_simulate_comp_failures="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_simulate_comp_failures'
set global innodb_simulate_comp_failures=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_simulate_comp_failures value: '-7'
select @@global.innodb_simulate_comp_failures;
@@global.innodb_simulate_comp_failures
0
select * from information_schema.global_variables where variable_name='innodb_simulate_comp_failures';
VARIABLE_NAME VARIABLE_VALUE
INNODB_SIMULATE_COMP_FAILURES 0
set global innodb_simulate_comp_failures=106;
Warnings:
Warning 1292 Truncated incorrect innodb_simulate_comp_failures value: '106'
select @@global.innodb_simulate_comp_failures;
@@global.innodb_simulate_comp_failures
99
select * from information_schema.global_variables where variable_name='innodb_simulate_comp_failures';
VARIABLE_NAME VARIABLE_VALUE
INNODB_SIMULATE_COMP_FAILURES 99
set global innodb_simulate_comp_failures=0;
select @@global.innodb_simulate_comp_failures;
@@global.innodb_simulate_comp_failures
0
set global innodb_simulate_comp_failures=99;
select @@global.innodb_simulate_comp_failures;
@@global.innodb_simulate_comp_failures
99
set global innodb_simulate_comp_failures=DEFAULT;
select @@global.innodb_simulate_comp_failures;
@@global.innodb_simulate_comp_failures
0
SET @@global.innodb_simulate_comp_failures = @start_global_value;
SELECT @@global.innodb_simulate_comp_failures;
@@global.innodb_simulate_comp_failures
0
mysql-test/suite/sys_vars/r/timed_mutexes_basic.result
View file @
81073b03
...
...
@@ -4,7 +4,11 @@ SELECT @global_start_value;
0
'#--------------------FN_DYNVARS_177_01------------------------#'
SET @@global.timed_mutexes = 1;
Warnings:
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
SET @@global.timed_mutexes = DEFAULT;
Warnings:
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
SELECT @@global.timed_mutexes;
@@global.timed_mutexes
0
...
...
@@ -17,15 +21,21 @@ SELECT @@timed_mutexes;
SELECT global.timed_mutexes;
ERROR 42S02: Unknown table 'global' in field list
SET global timed_mutexes = 1;
Warnings:
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
SELECT @@global.timed_mutexes;
@@global.timed_mutexes
1
'#--------------------FN_DYNVARS_177_03------------------------#'
SET @@global.timed_mutexes = 0;
Warnings:
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
SELECT @@global.timed_mutexes;
@@global.timed_mutexes
0
SET @@global.timed_mutexes = 1;
Warnings:
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
SELECT @@global.timed_mutexes;
@@global.timed_mutexes
1
...
...
@@ -82,23 +92,33 @@ VARIABLE_VALUE
ON
'#---------------------FN_DYNVARS_177_08-------------------------#'
SET @@global.timed_mutexes = OFF;
Warnings:
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
SELECT @@global.timed_mutexes;
@@global.timed_mutexes
0
SET @@global.timed_mutexes = ON;
Warnings:
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
SELECT @@global.timed_mutexes;
@@global.timed_mutexes
1
'#---------------------FN_DYNVARS_177_09----------------------#'
SET @@global.timed_mutexes = TRUE;
Warnings:
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
SELECT @@global.timed_mutexes;
@@global.timed_mutexes
1
SET @@global.timed_mutexes = FALSE;
Warnings:
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
SELECT @@global.timed_mutexes;
@@global.timed_mutexes
0
SET @@global.timed_mutexes = @global_start_value;
Warnings:
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
SELECT @@global.timed_mutexes;
@@global.timed_mutexes
0
mysql-test/suite/sys_vars/t/innodb_simulate_comp_failures_basic.test
0 → 100644
View file @
81073b03
--
source
include
/
have_innodb
.
inc
SET
@
start_global_value
=
@@
global
.
innodb_simulate_comp_failures
;
SELECT
@
start_global_value
;
#
# exists as global only
#
--
echo
Valid
values
are
between
0
and
99
select
@@
global
.
innodb_simulate_comp_failures
between
0
and
99
;
select
@@
global
.
innodb_simulate_comp_failures
;
--
error
ER_INCORRECT_GLOBAL_LOCAL_VAR
select
@@
session
.
innodb_simulate_comp_failures
;
show
global
variables
like
'innodb_simulate_comp_failures'
;
show
session
variables
like
'innodb_simulate_comp_failures'
;
select
*
from
information_schema
.
global_variables
where
variable_name
=
'innodb_simulate_comp_failures'
;
select
*
from
information_schema
.
session_variables
where
variable_name
=
'innodb_simulate_comp_failures'
;
#
# show that it's writable
#
set
global
innodb_simulate_comp_failures
=
10
;
select
@@
global
.
innodb_simulate_comp_failures
;
select
*
from
information_schema
.
global_variables
where
variable_name
=
'innodb_simulate_comp_failures'
;
select
*
from
information_schema
.
session_variables
where
variable_name
=
'innodb_simulate_comp_failures'
;
--
error
ER_GLOBAL_VARIABLE
set
session
innodb_simulate_comp_failures
=
1
;
#
# incorrect types
#
--
error
ER_WRONG_TYPE_FOR_VAR
set
global
innodb_simulate_comp_failures
=
1.1
;
--
error
ER_WRONG_TYPE_FOR_VAR
set
global
innodb_simulate_comp_failures
=
1
e1
;
--
error
ER_WRONG_TYPE_FOR_VAR
set
global
innodb_simulate_comp_failures
=
"foo"
;
set
global
innodb_simulate_comp_failures
=-
7
;
select
@@
global
.
innodb_simulate_comp_failures
;
select
*
from
information_schema
.
global_variables
where
variable_name
=
'innodb_simulate_comp_failures'
;
set
global
innodb_simulate_comp_failures
=
106
;
select
@@
global
.
innodb_simulate_comp_failures
;
select
*
from
information_schema
.
global_variables
where
variable_name
=
'innodb_simulate_comp_failures'
;
#
# min/max/DEFAULT values
#
set
global
innodb_simulate_comp_failures
=
0
;
select
@@
global
.
innodb_simulate_comp_failures
;
set
global
innodb_simulate_comp_failures
=
99
;
select
@@
global
.
innodb_simulate_comp_failures
;
set
global
innodb_simulate_comp_failures
=
DEFAULT
;
select
@@
global
.
innodb_simulate_comp_failures
;
SET
@@
global
.
innodb_simulate_comp_failures
=
@
start_global_value
;
SELECT
@@
global
.
innodb_simulate_comp_failures
;
mysql-test/t/ctype_ucs.test
View file @
81073b03
...
...
@@ -837,6 +837,23 @@ SELECT COALESCE(c1) FROM t1 ORDER BY 1;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-5745 analyze MySQL fix for bug#12368495
--
echo
#
SELECT
CHAR_LENGTH
(
TRIM
(
LEADING
0x000000
FROM
_ucs2
0x0061
));
SELECT
CHAR_LENGTH
(
TRIM
(
LEADING
0x0001
FROM
_ucs2
0x0061
));
SELECT
CHAR_LENGTH
(
TRIM
(
LEADING
0x00
FROM
_ucs2
0x0061
));
SELECT
CHAR_LENGTH
(
TRIM
(
TRAILING
0x000000
FROM
_ucs2
0x0061
));
SELECT
CHAR_LENGTH
(
TRIM
(
TRAILING
0x0001
FROM
_ucs2
0x0061
));
SELECT
CHAR_LENGTH
(
TRIM
(
TRAILING
0x61
FROM
_ucs2
0x0061
));
SELECT
CHAR_LENGTH
(
TRIM
(
BOTH
0x000000
FROM
_ucs2
0x0061
));
SELECT
CHAR_LENGTH
(
TRIM
(
BOTH
0x0001
FROM
_ucs2
0x0061
));
SELECT
CHAR_LENGTH
(
TRIM
(
BOTH
0x61
FROM
_ucs2
0x0061
));
SELECT
CHAR_LENGTH
(
TRIM
(
BOTH
0x00
FROM
_ucs2
0x0061
));
--
echo
#
--
echo
# End of 5.5 tests
--
echo
#
mysql-test/t/ctype_utf32.test
View file @
81073b03
...
...
@@ -860,6 +860,22 @@ ORDER BY l DESC;
SELECT
'2010-10-10 10:10:10'
+
INTERVAL
GeometryType
(
GeomFromText
(
'POINT(1 1)'
))
hour_second
;
--
echo
#
--
echo
# MDEV-5745 analyze MySQL fix for bug#12368495
--
echo
#
SELECT
CHAR_LENGTH
(
TRIM
(
LEADING
0x0000000000
FROM
_utf32
0x00000061
));
SELECT
CHAR_LENGTH
(
TRIM
(
LEADING
0x0001
FROM
_utf32
0x00000061
));
SELECT
CHAR_LENGTH
(
TRIM
(
LEADING
0x00
FROM
_utf32
0x00000061
));
SELECT
CHAR_LENGTH
(
TRIM
(
TRAILING
0x0000000000
FROM
_utf32
0x00000061
));
SELECT
CHAR_LENGTH
(
TRIM
(
TRAILING
0x0001
FROM
_utf32
0x00000061
));
SELECT
CHAR_LENGTH
(
TRIM
(
TRAILING
0x61
FROM
_utf32
0x00000061
));
SELECT
CHAR_LENGTH
(
TRIM
(
BOTH
0x0000000000
FROM
_utf32
0x00000061
));
SELECT
CHAR_LENGTH
(
TRIM
(
BOTH
0x0001
FROM
_utf32
0x00000061
));
SELECT
CHAR_LENGTH
(
TRIM
(
BOTH
0x61
FROM
_utf32
0x00000061
));
SELECT
CHAR_LENGTH
(
TRIM
(
BOTH
0x00
FROM
_utf32
0x00000061
));
--
echo
#
--
echo
# End of 5.5 tests
--
echo
#
Prev
1
2
3
4
5
6
7
8
…
15
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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