Commit 5a8ec4a0 authored by Bjorn Munch's avatar Bjorn Munch

merge from next-mr

parents a748b2bf 2fa7509b
......@@ -3150,17 +3150,12 @@ AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' C
AC_OUTPUT
echo
echo "MySQL has a Web site at http://www.mysql.com/ which carries details on the"
echo "latest release, upcoming features, and other information to make your"
echo "work or play with MySQL more productive. There you can also find"
echo "information about mailing lists for MySQL discussion."
echo
echo "Remember to check the platform specific part of the reference manual for"
echo "hints about installing MySQL on your platform. Also have a look at the"
echo "files in the Docs directory."
echo
# The following text is checked in ./Do-compile to verify that configure
# The first line "Thank you ..." is checked in ./Do-compile to verify that configure
# ended sucessfully - don't remove it.
echo
echo "Thank you for choosing MySQL!"
echo
echo "Remember to check the platform specific part of the reference manual"
echo "for hints about installing MySQL on your platform."
echo "Also have a look at the files in the Docs directory."
echo
/* Copyright (C) 2008-2009 Sun Microsystems, Inc
/* Copyright (C) 2008-2010 Sun Microsystems, Inc
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
......@@ -614,6 +614,9 @@ typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
/** Delete the current thread instrumentation. */
typedef void (*delete_current_thread_v1_t)(void);
/** Delete a thread instrumentation. */
typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
/**
Get a mutex instrumentation locker.
@param mutex the instrumented mutex to lock
......@@ -890,6 +893,8 @@ struct PSI_v1
set_thread_v1_t set_thread;
/** @sa delete_current_thread_v1_t. */
delete_current_thread_v1_t delete_current_thread;
/** @sa delete_thread_v1_t. */
delete_thread_v1_t delete_thread;
/** @sa get_thread_mutex_locker_v1_t. */
get_thread_mutex_locker_v1_t get_thread_mutex_locker;
/** @sa get_thread_rwlock_locker_v1_t. */
......
......@@ -127,6 +127,7 @@ typedef void (*set_thread_id_v1_t)(struct PSI_thread *thread,
typedef struct PSI_thread* (*get_thread_v1_t)(void);
typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
typedef void (*delete_current_thread_v1_t)(void);
typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
typedef struct PSI_mutex_locker* (*get_thread_mutex_locker_v1_t)
(struct PSI_mutex *mutex, enum PSI_mutex_operation op);
typedef struct PSI_rwlock_locker* (*get_thread_rwlock_locker_v1_t)
......@@ -204,6 +205,7 @@ struct PSI_v1
get_thread_v1_t get_thread;
set_thread_v1_t set_thread;
delete_current_thread_v1_t delete_current_thread;
delete_thread_v1_t delete_thread;
get_thread_mutex_locker_v1_t get_thread_mutex_locker;
get_thread_rwlock_locker_v1_t get_thread_rwlock_locker;
get_thread_cond_locker_v1_t get_thread_cond_locker;
......
......@@ -16,9 +16,6 @@ main.plugin # Bug#47146 Linking problem with exampl
main.signal_demo3 @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
main.sp @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
perfschema.tampered_perfschema_table1 @windows # Bug#50478 2010-01-20 alik perfschema.tampered_perfschema_table1 fails sporadically on Windows and Solaris
perfschema.tampered_perfschema_table1 @solaris # Bug#50478 2010-01-20 alik perfschema.tampered_perfschema_table1 fails sporadically on Windows and Solaris
rpl.rpl_heartbeat_basic # BUG#43828 2009-10-22 luis fails sporadically
rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails sporadically
rpl.rpl_innodb_bug28430* # Bug#46029
......@@ -26,12 +23,9 @@ rpl.rpl_innodb_bug30888* @solaris # Bug#47646 2009-09-25 alik rpl.rpl_inn
rpl.rpl_killed_ddl @windows # Bug#47638 2010-01-20 alik The rpl_killed_ddl test fails on Windows
rpl.rpl_plugin_load* @solaris # Bug#47146
rpl.rpl_row_sp011* @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
rpl.rpl_slave_load_remove_tmpfile* @windows # Bug#50474 2010-01-20 alik rpl_slave_load_remove_tmpfile failed on windows debug enabled binary
rpl.rpl_sync* @windows # Bug#50473 2010-01-20 alik rpl_sync fails on windows debug enabled binaries
rpl.rpl_timezone* # Bug#47017 2009-10-27 alik rpl_timezone fails on PB-2 with mismatch error
sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
sys_vars.delayed_insert_limit_func # Bug#50435 2010-01-25 alik sys_vars.delayed_insert_limit_func fails on Ubuntu x86_64 in debug mode
# Declare all NDB-tests in ndb and rpl_ndb test suites experimental.
# Usually the test cases from ndb and rpl_ndb test suites are not run in PB,
......
# Check if ipv4 mapped to ipv6 is available.
--disable_query_log
--disable_abort_on_error
connect (checkcon123456789,::FFFF:127.0.0.1,root,,test);
if($mysql_errno)
{
skip wrong IP;
}
connection default;
disconnect checkcon123456789;
--enable_abort_on_error
--enable_query_log
# end check
......@@ -6,7 +6,9 @@ eval SET @nip= inet_aton('$IPv6');
SELECT @nip;
SELECT inet_ntoa(@nip);
# delivers a wrong value, see bug#34037
--replace_result ::1 localhost
SELECT USER();
--replace_result ::1 localhost
SELECT current_user();
--disable_result_log
SHOW PROCESSLIST;
......@@ -17,6 +19,7 @@ disconnect con1;
eval REVOKE ALL ON test.* FROM testuser@'$IPv6';
eval RENAME USER testuser@'$IPv6' to testuser1@'$IPv6';
eval SET PASSWORD FOR testuser1@'$IPv6' = PASSWORD ('9876');
--replace_result ::1 localhost
SELECT USER();
eval DROP USER testuser1@'$IPv6';
......@@ -1354,3 +1354,15 @@ DROP i,
ADD i INT UNSIGNED NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT = 1;
DROP TABLE t1;
CREATE TABLE t1 (a CHAR(1), PRIMARY KEY (a(255)));
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
CREATE TABLE t1 (a CHAR(1));
ALTER TABLE t1 ADD PRIMARY KEY (a(20));
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
ALTER TABLE t1 ADD KEY (a(20));
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
CREATE UNIQUE INDEX i1 ON t1 (a(20));
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
CREATE INDEX i2 ON t1 (a(20));
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
DROP TABLE t1;
......@@ -3,7 +3,7 @@ create table t1 (a int check (a>0));
insert into t1 values (1);
insert into t1 values (0);
drop table t1;
create table t1 (a int ,b int, check a>b);
create table t1 (a int, b int, check (a>b));
insert into t1 values (1,0);
insert into t1 values (0,1);
drop table t1;
......@@ -27,3 +27,19 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `key_2` (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
drop table if exists t_illegal;
create table t_illegal (a int, b int, check a>b);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a>b)' at line 1
create table t_illegal (a int, b int, constraint abc check a>b);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a>b)' at line 1
create table t_illegal (a int, b int, constraint abc);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
drop table if exists t_11714;
create table t_11714(a int, b int);
alter table t_11714 add constraint cons1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
drop table t_11714;
CREATE TABLE t_illegal (col_1 INT CHECK something (whatever));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'something (whatever))' at line 1
CREATE TABLE t_illegal (col_1 INT CHECK something);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'something)' at line 1
......@@ -13,3 +13,45 @@ foreign key (a,b) references t3 (c,d) on update set null);
create index a on t1 (a);
create unique index b on t1 (a,b);
drop table t1;
drop table if exists t_34455;
create table t_34455 (
a int not null,
foreign key (a) references t3 (a) match full match partial);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match partial)' at line 3
create table t_34455 (
a int not null,
foreign key (a) references t3 (a) on delete set default match full);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match full)' at line 3
create table t_34455 (
a int not null,
foreign key (a) references t3 (a) on update set default match full);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match full)' at line 3
create table t_34455 (
a int not null,
foreign key (a) references t3 (a)
on delete set default on delete set default);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delete set default)' at line 4
create table t_34455 (
a int not null,
foreign key (a) references t3 (a)
on update set default on update set default);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update set default)' at line 4
create table t_34455 (a int not null);
alter table t_34455
add foreign key (a) references t3 (a) match full match partial);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match partial)' at line 2
alter table t_34455
add foreign key (a) references t3 (a) on delete set default match full);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match full)' at line 2
alter table t_34455
add foreign key (a) references t3 (a) on update set default match full);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match full)' at line 2
alter table t_34455
add foreign key (a) references t3 (a)
on delete set default on delete set default);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delete set default)' at line 3
alter table t_34455
add foreign key (a) references t3 (a)
on update set default on update set default);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update set default)' at line 3
drop table t_34455;
......@@ -1058,3 +1058,33 @@ SELECT Polygon(12345123,'');
Polygon(12345123,'')
NULL
End of 5.1 tests
CREATE TABLE t1(
col0 BINARY NOT NULL,
col2 TIMESTAMP,
SPATIAL INDEX i1 (col0)
) ENGINE=MyISAM;
ERROR 42000: A SPATIAL index may only contain a geometrical type column
CREATE TABLE t1 (
col0 BINARY NOT NULL,
col2 TIMESTAMP
) ENGINE=MyISAM;
CREATE SPATIAL INDEX idx0 ON t1(col0);
ERROR 42000: A SPATIAL index may only contain a geometrical type column
ALTER TABLE t1 ADD SPATIAL INDEX i1 (col0);
ERROR 42000: A SPATIAL index may only contain a geometrical type column
CREATE TABLE t2 (
col0 INTEGER NOT NULL,
col1 POINT,
col2 POINT
);
CREATE SPATIAL INDEX idx0 ON t2 (col1, col2);
ERROR HY000: Incorrect arguments to SPATIAL INDEX
CREATE TABLE t3 (
col0 INTEGER NOT NULL,
col1 POINT,
col2 LINESTRING,
SPATIAL INDEX i1 (col1, col2)
);
ERROR HY000: Incorrect arguments to SPATIAL INDEX
DROP TABLE t1;
DROP TABLE t2;
......@@ -2686,7 +2686,7 @@ a c COUNT(DISTINCT c, a, b)
1 1 1
1 1 1
1 1 1
2 1 1
1 1 1
2 1 1
2 1 1
2 1 1
......@@ -2714,7 +2714,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL a 10 NULL 9 Using index for group-by
SELECT a, COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a;
a COUNT(DISTINCT b) SUM(DISTINCT b)
2 8 36
1 8 36
2 8 36
EXPLAIN SELECT COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
......@@ -2761,7 +2761,7 @@ SELECT 42 * (a + c + COUNT(DISTINCT c, a, b)) FROM t2 GROUP BY a, b, c;
126
126
126
168
126
168
168
168
......@@ -2779,3 +2779,24 @@ SELECT (SUM(DISTINCT a) + MAX(b)) FROM t2 GROUP BY a;
10
DROP TABLE t1,t2;
# end of WL#3220 tests
#
# Bug#50539: Wrong result when loose index scan is used for an aggregate
# function with distinct
#
CREATE TABLE t1 (
f1 int(11) NOT NULL DEFAULT '0',
f2 char(1) NOT NULL DEFAULT '',
PRIMARY KEY (f1,f2)
) ;
insert into t1 values(1,'A'),(1 , 'B'), (1, 'C'), (2, 'A'),
(3, 'A'), (3, 'B'), (3, 'C'), (3, 'D');
SELECT f1, COUNT(DISTINCT f2) FROM t1 GROUP BY f1;
f1 COUNT(DISTINCT f2)
1 3
2 1
3 4
explain SELECT f1, COUNT(DISTINCT f2) FROM t1 GROUP BY f1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL PRIMARY 5 NULL 9 Using index for group-by (scanning)
drop table t1;
# End of test#50539.
=============Test of '127.0.0.1' (IPv4) ===========================
mysqld is alive
CREATE USER testuser@'127.0.0.1' identified by '1234';
GRANT ALL ON test.* TO testuser@'127.0.0.1';
SHOW GRANTS FOR testuser@'127.0.0.1';
Grants for testuser@127.0.0.1
GRANT USAGE ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'127.0.0.1'
SET @nip= inet_aton('127.0.0.1');
SELECT @nip;
@nip
2130706433
SELECT inet_ntoa(@nip);
inet_ntoa(@nip)
127.0.0.1
SELECT USER();
USER()
root@127.0.0.1
SELECT current_user();
current_user()
root@127.0.0.1
SHOW PROCESSLIST;
REVOKE ALL ON test.* FROM testuser@'127.0.0.1';
RENAME USER testuser@'127.0.0.1' to testuser1@'127.0.0.1';
SET PASSWORD FOR testuser1@'127.0.0.1' = PASSWORD ('9876');
SELECT USER();
USER()
root@127.0.0.1
DROP USER testuser1@'127.0.0.1';
=============Test of '::1' ========================
connect (con1, ::1, root, , test, MASTER_MYPORT);
Got one of the listed errors
......@@ -86,179 +86,3 @@ SELECT USER();
USER()
root@localhost
DROP USER testuser1@'0:0:0:0:0:0:0:1';
=============Test of '127.0.0.1' (IPv4) ===========================
mysqld is alive
CREATE USER testuser@'127.0.0.1' identified by '1234';
GRANT ALL ON test.* TO testuser@'127.0.0.1';
SHOW GRANTS FOR testuser@'127.0.0.1';
Grants for testuser@127.0.0.1
GRANT USAGE ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'127.0.0.1'
SET @nip= inet_aton('127.0.0.1');
SELECT @nip;
@nip
2130706433
SELECT inet_ntoa(@nip);
inet_ntoa(@nip)
127.0.0.1
SELECT USER();
USER()
root@localhost
SELECT current_user();
current_user()
root@localhost
SHOW PROCESSLIST;
REVOKE ALL ON test.* FROM testuser@'127.0.0.1';
RENAME USER testuser@'127.0.0.1' to testuser1@'127.0.0.1';
SET PASSWORD FOR testuser1@'127.0.0.1' = PASSWORD ('9876');
SELECT USER();
USER()
root@localhost
DROP USER testuser1@'127.0.0.1';
=============Test of '0:0:0:0:0:FFFF:127.0.0.1' ===================
mysqld is alive
CREATE USER testuser@'0:0:0:0:0:FFFF:127.0.0.1' identified by '1234';
GRANT ALL ON test.* TO testuser@'0:0:0:0:0:FFFF:127.0.0.1';
SHOW GRANTS FOR testuser@'0:0:0:0:0:FFFF:127.0.0.1';
Grants for testuser@0:0:0:0:0:FFFF:127.0.0.1
GRANT USAGE ON *.* TO 'testuser'@'0:0:0:0:0:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0:0:0:0:FFFF:127.0.0.1'
SET @nip= inet_aton('0:0:0:0:0:FFFF:127.0.0.1');
SELECT @nip;
@nip
NULL
SELECT inet_ntoa(@nip);
inet_ntoa(@nip)
NULL
SELECT USER();
USER()
root@localhost
SELECT current_user();
current_user()
root@localhost
SHOW PROCESSLIST;
REVOKE ALL ON test.* FROM testuser@'0:0:0:0:0:FFFF:127.0.0.1';
RENAME USER testuser@'0:0:0:0:0:FFFF:127.0.0.1' to testuser1@'0:0:0:0:0:FFFF:127.0.0.1';
SET PASSWORD FOR testuser1@'0:0:0:0:0:FFFF:127.0.0.1' = PASSWORD ('9876');
SELECT USER();
USER()
root@localhost
DROP USER testuser1@'0:0:0:0:0:FFFF:127.0.0.1';
=============Test of '0000:0000:0000:0000:0000:FFFF:127.0.0.1' ====
mysqld is alive
CREATE USER testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' identified by '1234';
GRANT ALL ON test.* TO testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
SHOW GRANTS FOR testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
Grants for testuser@0000:0000:0000:0000:0000:FFFF:127.0.0.1
GRANT USAGE ON *.* TO 'testuser'@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0000:0000:0000:0000:0000:FFFF:127.0.0.1'
SET @nip= inet_aton('0000:0000:0000:0000:0000:FFFF:127.0.0.1');
SELECT @nip;
@nip
NULL
SELECT inet_ntoa(@nip);
inet_ntoa(@nip)
NULL
SELECT USER();
USER()
root@localhost
SELECT current_user();
current_user()
root@localhost
SHOW PROCESSLIST;
REVOKE ALL ON test.* FROM testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
RENAME USER testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' to testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
SET PASSWORD FOR testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' = PASSWORD ('9876');
SELECT USER();
USER()
root@localhost
DROP USER testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
=============Test of '0:0000:0000:0:0000:FFFF:127.0.0.1' ====
mysqld is alive
CREATE USER testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1' identified by '1234';
GRANT ALL ON test.* TO testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1';
SHOW GRANTS FOR testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1';
Grants for testuser@0:0000:0000:0:0000:FFFF:127.0.0.1
GRANT USAGE ON *.* TO 'testuser'@'0:0000:0000:0:0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0000:0000:0:0000:FFFF:127.0.0.1'
SET @nip= inet_aton('0:0000:0000:0:0000:FFFF:127.0.0.1');
SELECT @nip;
@nip
NULL
SELECT inet_ntoa(@nip);
inet_ntoa(@nip)
NULL
SELECT USER();
USER()
root@localhost
SELECT current_user();
current_user()
root@localhost
SHOW PROCESSLIST;
REVOKE ALL ON test.* FROM testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1';
RENAME USER testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1' to testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1';
SET PASSWORD FOR testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1' = PASSWORD ('9876');
SELECT USER();
USER()
root@localhost
DROP USER testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1';
=============Test of '0::0000:FFFF:127.0.0.1' ====
mysqld is alive
CREATE USER testuser@'0::0000:FFFF:127.0.0.1' identified by '1234';
GRANT ALL ON test.* TO testuser@'0::0000:FFFF:127.0.0.1';
SHOW GRANTS FOR testuser@'0::0000:FFFF:127.0.0.1';
Grants for testuser@0::0000:FFFF:127.0.0.1
GRANT USAGE ON *.* TO 'testuser'@'0::0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0::0000:FFFF:127.0.0.1'
SET @nip= inet_aton('0::0000:FFFF:127.0.0.1');
SELECT @nip;
@nip
NULL
SELECT inet_ntoa(@nip);
inet_ntoa(@nip)
NULL
SELECT USER();
USER()
root@localhost
SELECT current_user();
current_user()
root@localhost
SHOW PROCESSLIST;
REVOKE ALL ON test.* FROM testuser@'0::0000:FFFF:127.0.0.1';
RENAME USER testuser@'0::0000:FFFF:127.0.0.1' to testuser1@'0::0000:FFFF:127.0.0.1';
SET PASSWORD FOR testuser1@'0::0000:FFFF:127.0.0.1' = PASSWORD ('9876');
SELECT USER();
USER()
root@localhost
DROP USER testuser1@'0::0000:FFFF:127.0.0.1';
=============Test of '0:0:0:0:0:FFFF:127.0.0.1/96' ================
=============Test of '::FFFF:127.0.0.1' ===========================
mysqld is alive
CREATE USER testuser@'::FFFF:127.0.0.1' identified by '1234';
GRANT ALL ON test.* TO testuser@'::FFFF:127.0.0.1';
SHOW GRANTS FOR testuser@'::FFFF:127.0.0.1';
Grants for testuser@::FFFF:127.0.0.1
GRANT USAGE ON *.* TO 'testuser'@'::FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::FFFF:127.0.0.1'
SET @nip= inet_aton('::FFFF:127.0.0.1');
SELECT @nip;
@nip
NULL
SELECT inet_ntoa(@nip);
inet_ntoa(@nip)
NULL
SELECT USER();
USER()
root@localhost
SELECT current_user();
current_user()
root@localhost
SHOW PROCESSLIST;
REVOKE ALL ON test.* FROM testuser@'::FFFF:127.0.0.1';
RENAME USER testuser@'::FFFF:127.0.0.1' to testuser1@'::FFFF:127.0.0.1';
SET PASSWORD FOR testuser1@'::FFFF:127.0.0.1' = PASSWORD ('9876');
SELECT USER();
USER()
root@localhost
DROP USER testuser1@'::FFFF:127.0.0.1';
=============Test of '::FFFF:127.0.0.1/96' ========================
=============Test of '::1' ========================================
mysqld is alive
CREATE USER testuser@'::1' identified by '1234';
GRANT ALL ON test.* TO testuser@'::1';
SHOW GRANTS FOR testuser@'::1';
Grants for testuser@::1
GRANT USAGE ON *.* TO 'testuser'@'::1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::1'
SET @nip= inet_aton('::1');
SELECT @nip;
@nip
NULL
SELECT inet_ntoa(@nip);
inet_ntoa(@nip)
NULL
SELECT USER();
USER()
root@::1
SELECT current_user();
current_user()
root@::1
SHOW PROCESSLIST;
REVOKE ALL ON test.* FROM testuser@'::1';
RENAME USER testuser@'::1' to testuser1@'::1';
SET PASSWORD FOR testuser1@'::1' = PASSWORD ('9876');
SELECT USER();
USER()
root@::1
DROP USER testuser1@'::1';
=============Test of '::1/128' ====================================
=============Test of '0000:0000:0000:0000:0000:0000:0000:0001' ====
mysqld is alive
CREATE USER testuser@'0000:0000:0000:0000:0000:0000:0000:0001' identified by '1234';
GRANT ALL ON test.* TO testuser@'0000:0000:0000:0000:0000:0000:0000:0001';
SHOW GRANTS FOR testuser@'0000:0000:0000:0000:0000:0000:0000:0001';
Grants for testuser@0000:0000:0000:0000:0000:0000:0000:0001
GRANT USAGE ON *.* TO 'testuser'@'0000:0000:0000:0000:0000:0000:0000:0001' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0000:0000:0000:0000:0000:0000:0000:0001'
SET @nip= inet_aton('0000:0000:0000:0000:0000:0000:0000:0001');
SELECT @nip;
@nip
NULL
SELECT inet_ntoa(@nip);
inet_ntoa(@nip)
NULL
SELECT USER();
USER()
root@::1
SELECT current_user();
current_user()
root@::1
SHOW PROCESSLIST;
REVOKE ALL ON test.* FROM testuser@'0000:0000:0000:0000:0000:0000:0000:0001';
RENAME USER testuser@'0000:0000:0000:0000:0000:0000:0000:0001' to testuser1@'0000:0000:0000:0000:0000:0000:0000:0001';
SET PASSWORD FOR testuser1@'0000:0000:0000:0000:0000:0000:0000:0001' = PASSWORD ('9876');
SELECT USER();
USER()
root@::1
DROP USER testuser1@'0000:0000:0000:0000:0000:0000:0000:0001';
=============Test of '0:0:0:0:0:0:0:1' ============================
mysqld is alive
CREATE USER testuser@'0:0:0:0:0:0:0:1' identified by '1234';
GRANT ALL ON test.* TO testuser@'0:0:0:0:0:0:0:1';
SHOW GRANTS FOR testuser@'0:0:0:0:0:0:0:1';
Grants for testuser@0:0:0:0:0:0:0:1
GRANT USAGE ON *.* TO 'testuser'@'0:0:0:0:0:0:0:1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0:0:0:0:0:0:1'
SET @nip= inet_aton('0:0:0:0:0:0:0:1');
SELECT @nip;
@nip
NULL
SELECT inet_ntoa(@nip);
inet_ntoa(@nip)
NULL
SELECT USER();
USER()
root@::1
SELECT current_user();
current_user()
root@::1
SHOW PROCESSLIST;
REVOKE ALL ON test.* FROM testuser@'0:0:0:0:0:0:0:1';
RENAME USER testuser@'0:0:0:0:0:0:0:1' to testuser1@'0:0:0:0:0:0:0:1';
SET PASSWORD FOR testuser1@'0:0:0:0:0:0:0:1' = PASSWORD ('9876');
SELECT USER();
USER()
root@::1
DROP USER testuser1@'0:0:0:0:0:0:0:1';
SET profiling = 1;
SELECT 1;
1
1
SHOW PROFILES;
Query_ID Duration Query
1 # SELECT 1
SHOW PROFILE FOR QUERY 1;
SHOW PROFILE CPU FOR QUERY 1;
SET profiling = 0;
SELECT @@SESSION.binlog_format;
@@SESSION.binlog_format
MIXED
CREATE TABLE t1 (a VARCHAR(100));
CREATE TEMPORARY TABLE t2 (a VARCHAR(100));
# Test allow switching @@SESSION.binlog_format from MIXED to STATEMENT
# when there are open temp tables and we are logging in statement based format.
SET SESSION binlog_format = STATEMENT;
SELECT @@SESSION.binlog_format;
@@SESSION.binlog_format
STATEMENT
# Test allow switching @@SESSION.binlog_format from STATEMENT to
# STATEMENT when there are open temp tables.
SET SESSION binlog_format = STATEMENT;
SELECT @@SESSION.binlog_format;
@@SESSION.binlog_format
STATEMENT
INSERT INTO t1 VALUES ('statement based');
SELECT @@SESSION.binlog_format;
@@SESSION.binlog_format
STATEMENT
# Test allow switching @@SESSION.binlog_format from STATEMENT to
# MIXED when there are open temp tables.
SET SESSION binlog_format = MIXED;
SELECT @@SESSION.binlog_format;
@@SESSION.binlog_format
MIXED
# Test allow switching @@SESSION.binlog_format from MIXED to MIXED
# when there are open temp tables.
SET SESSION binlog_format = MIXED;
SELECT @@SESSION.binlog_format;
@@SESSION.binlog_format
MIXED
INSERT INTO t2 VALUES (UUID());
SELECT @@SESSION.binlog_format;
@@SESSION.binlog_format
MIXED
# Test forbit switching @@SESSION.binlog_format from MIXED to STATEMENT
# when there are open temp tables and we are logging in row based format.
SET SESSION binlog_format = STATEMENT;
ERROR HY000: Cannot switch out of the row-based binary log format when the session has open temporary tables
SELECT @@SESSION.binlog_format;
@@SESSION.binlog_format
MIXED
SET SESSION binlog_format = ROW;
SELECT @@SESSION.binlog_format;
@@SESSION.binlog_format
ROW
INSERT INTO t1 VALUES ('row based');
# Test allow switching @@SESSION.binlog_format from ROW to MIXED
# when there are open temp tables.
SET SESSION binlog_format = MIXED;
SELECT @@SESSION.binlog_format;
@@SESSION.binlog_format
MIXED
INSERT INTO t1 VALUES ('row based');
# Test allow switching @@SESSION.binlog_format from MIXED to ROW
# when there are open temp tables.
SET SESSION binlog_format = ROW;
SELECT @@SESSION.binlog_format;
@@SESSION.binlog_format
ROW
# Test allow switching @@SESSION.binlog_format from ROW to ROW
# when there are open temp tables.
SET SESSION binlog_format = ROW;
SELECT @@SESSION.binlog_format;
@@SESSION.binlog_format
ROW
INSERT INTO t1 VALUES ('row based');
# Test forbit switching @@SESSION.binlog_format from ROW to STATEMENT
# when there are open temp tables.
SET SESSION binlog_format = STATEMENT;
ERROR HY000: Cannot switch out of the row-based binary log format when the session has open temporary tables
SELECT @@SESSION.binlog_format;
@@SESSION.binlog_format
ROW
DROP TEMPORARY TABLE t2;
DROP TABLE t1;
......@@ -744,8 +744,9 @@ ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Intvar # # INSERT_ID=3
master-bin.000001 # Query # # use `test`; insert into t2 values (bug27417(2))
master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
select count(*) from t1 /* must be 3 */;
count(*)
......@@ -761,8 +762,9 @@ count(*)
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Intvar # # INSERT_ID=4
master-bin.000001 # Query # # use `test`; delete from t2 where a=bug27417(3)
master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
select count(*) from t1 /* must be 5 */;
count(*)
......@@ -784,6 +786,10 @@ insert into t2 values (bug27417(1));
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
select count(*) from t1 /* must be 1 */;
count(*)
1
......@@ -795,6 +801,10 @@ insert into t2 select bug27417(1) union select bug27417(2);
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
select count(*) from t1 /* must be 2 */;
count(*)
2
......@@ -806,8 +816,11 @@ ERROR 23000: Duplicate entry '4' for key 'b'
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Intvar # # INSERT_ID=4
master-bin.000001 # Query # # use `test`; update t3 set b=b+bug27417(1)
master-bin.000001 # Table_map # # table_id: # (test.t3)
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: #
master-bin.000001 # Update_rows # # table_id: #
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
select count(*) from t1 /* must be 2 */;
count(*)
......@@ -821,6 +834,10 @@ UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */;
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
select count(*) from t1 /* must be 4 */;
count(*)
4
......@@ -834,7 +851,7 @@ UPDATE t3,t4 SET t3.a=t4.a + bug27417(1);
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
select count(*) from t1 /* must be 1 */;
count(*)
1
2
drop table t4;
delete from t1;
delete from t2;
......@@ -848,6 +865,11 @@ delete from t2;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t3)
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
select count(*) from t1 /* must be 1 */;
count(*)
1
......@@ -864,6 +886,10 @@ delete t2.* from t2,t5 where t2.a=t5.a + 1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
select count(*) from t1 /* must be 1 */;
count(*)
1
......@@ -881,6 +907,10 @@ count(*)
2
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
drop trigger trg_del_t2;
drop table t1,t2,t3,t4,t5;
drop function bug27417;
......@@ -519,10 +519,10 @@ end|
reset master;
insert into t2 values (bug27417(1));
Warnings:
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement updates two AUTO_INCREMENT columns. This is unsafe because the generated value cannot be predicted by slave.
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement invokes a trigger or a stored function that inserts into AUTO_INCREMENT column which is unsafe to binlog in STATEMENT format because slave may execute it non-deterministically.
insert into t2 select bug27417(2);
Warnings:
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement updates two AUTO_INCREMENT columns. This is unsafe because the generated value cannot be predicted by slave.
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement invokes a trigger or a stored function that inserts into AUTO_INCREMENT column which is unsafe to binlog in STATEMENT format because slave may execute it non-deterministically.
reset master;
insert into t2 values (bug27417(2));
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
......@@ -542,7 +542,7 @@ count(*)
2
delete from t2 where a=bug27417(3);
Warnings:
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement updates two AUTO_INCREMENT columns. This is unsafe because the generated value cannot be predicted by slave.
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement invokes a trigger or a stored function that inserts into AUTO_INCREMENT column which is unsafe to binlog in STATEMENT format because slave may execute it non-deterministically.
select count(*) from t2 /* nothing got deleted */;
count(*)
2
......@@ -559,7 +559,7 @@ count(*)
delete t2 from t2 where t2.a=bug27417(100) /* must not affect t2 */;
affected rows: 0
Warnings:
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement updates two AUTO_INCREMENT columns. This is unsafe because the generated value cannot be predicted by slave.
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement invokes a trigger or a stored function that inserts into AUTO_INCREMENT column which is unsafe to binlog in STATEMENT format because slave may execute it non-deterministically.
select count(*) from t1 /* must be 7 */;
count(*)
7
......@@ -783,10 +783,10 @@ end|
reset master;
insert into t2 values (bug27417(1));
Warnings:
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement updates two AUTO_INCREMENT columns. This is unsafe because the generated value cannot be predicted by slave.
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement invokes a trigger or a stored function that inserts into AUTO_INCREMENT column which is unsafe to binlog in STATEMENT format because slave may execute it non-deterministically.
insert into t2 select bug27417(2);
Warnings:
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement updates two AUTO_INCREMENT columns. This is unsafe because the generated value cannot be predicted by slave.
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement invokes a trigger or a stored function that inserts into AUTO_INCREMENT column which is unsafe to binlog in STATEMENT format because slave may execute it non-deterministically.
reset master;
insert into t2 values (bug27417(2));
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
......@@ -805,7 +805,7 @@ count(*)
2
delete from t2 where a=bug27417(3);
Warnings:
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement updates two AUTO_INCREMENT columns. This is unsafe because the generated value cannot be predicted by slave.
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement invokes a trigger or a stored function that inserts into AUTO_INCREMENT column which is unsafe to binlog in STATEMENT format because slave may execute it non-deterministically.
select count(*) from t2 /* nothing got deleted */;
count(*)
2
......@@ -821,7 +821,7 @@ count(*)
delete t2 from t2 where t2.a=bug27417(100) /* must not affect t2 */;
affected rows: 0
Warnings:
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement updates two AUTO_INCREMENT columns. This is unsafe because the generated value cannot be predicted by slave.
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement invokes a trigger or a stored function that inserts into AUTO_INCREMENT column which is unsafe to binlog in STATEMENT format because slave may execute it non-deterministically.
select count(*) from t1 /* must be 7 */;
count(*)
7
......
call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. .*");
call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement uses a system function whose value may differ on slave. .*");
call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement invokes a trigger or a stored function that inserts into AUTO_INCREMENT column");
### NOT filtered database => assertion: warnings ARE shown
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a int, b int, primary key (a));
......@@ -50,3 +51,29 @@ SET GLOBAL log_warnings = @old_log_warnings;
# Count the number of times the "Unsafe" message was printed
# to the error log.
Occurrences: 1
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (a int);
CREATE TABLE t2 (a int auto_increment primary key, b int);
CREATE TRIGGER tr_bug50192 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t2 (b) VALUES (1);
CREATE FUNCTION sf_bug50192() RETURNS INTEGER
BEGIN
INSERT INTO t2(b) VALUES(2);
RETURN 1;
END |
INSERT INTO t1 VALUES (0);
Warnings:
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement invokes a trigger or a stored function that inserts into AUTO_INCREMENT column which is unsafe to binlog in STATEMENT format because slave may execute it non-deterministically.
SHOW WARNINGS;
Level Code Message
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement invokes a trigger or a stored function that inserts into AUTO_INCREMENT column which is unsafe to binlog in STATEMENT format because slave may execute it non-deterministically.
SELECT sf_bug50192();
sf_bug50192()
1
Warnings:
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement invokes a trigger or a stored function that inserts into AUTO_INCREMENT column which is unsafe to binlog in STATEMENT format because slave may execute it non-deterministically.
SHOW WARNINGS;
Level Code Message
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement invokes a trigger or a stored function that inserts into AUTO_INCREMENT column which is unsafe to binlog in STATEMENT format because slave may execute it non-deterministically.
DROP FUNCTION sf_bug50192;
DROP TRIGGER tr_bug50192;
DROP TABLE t1, t2;
RESET MASTER;
SET @positive= 18446744073709551615;
SET @negative= -9223372036854775808;
CREATE TABLE t1 (`tinyint` TINYINT,
`smallint` SMALLINT,
`mediumint` MEDIUMINT,
`integer` INTEGER,
`bigint` BIGINT,
`utinyint` TINYINT UNSIGNED,
`usmallint` SMALLINT UNSIGNED,
`umediumint` MEDIUMINT UNSIGNED,
`uinteger` INTEGER UNSIGNED,
`ubigint` BIGINT UNSIGNED,
`double` DOUBLE,
`float` FLOAT,
`real` REAL(30,2),
`decimal` DECIMAL(30,2)) ENGINE = MyISAM;
### insert max unsigned
### a) declarative
INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);;
TRUNCATE t1;
### b) user var
INSERT INTO t1 VALUES (@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive);
## assertion: checks that User_var_log_event::pack_info
## correctly displays the binlog content by taking into
## account the unsigned_flag
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (`tinyint` TINYINT,
`smallint` SMALLINT,
`mediumint` MEDIUMINT,
`integer` INTEGER,
`bigint` BIGINT,
`utinyint` TINYINT UNSIGNED,
`usmallint` SMALLINT UNSIGNED,
`umediumint` MEDIUMINT UNSIGNED,
`uinteger` INTEGER UNSIGNED,
`ubigint` BIGINT UNSIGNED,
`double` DOUBLE,
`float` FLOAT,
`real` REAL(30,2),
`decimal` DECIMAL(30,2)) ENGINE = MyISAM
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; TRUNCATE t1
master-bin.000001 # Query # # BEGIN
master-bin.000001 # User var # # @`positive`=18446744073709551615
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive)
master-bin.000001 # Query # # COMMIT
### insert min signed
### a) declarative
INSERT INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);;
TRUNCATE t1;
### b) user var
INSERT INTO t1 VALUES (@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative);
## assertion: checks that User_var_log_event::pack_info
## correctly displays the binlog content by taking into
## account the unsigned_flag
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (`tinyint` TINYINT,
`smallint` SMALLINT,
`mediumint` MEDIUMINT,
`integer` INTEGER,
`bigint` BIGINT,
`utinyint` TINYINT UNSIGNED,
`usmallint` SMALLINT UNSIGNED,
`umediumint` MEDIUMINT UNSIGNED,
`uinteger` INTEGER UNSIGNED,
`ubigint` BIGINT UNSIGNED,
`double` DOUBLE,
`float` FLOAT,
`real` REAL(30,2),
`decimal` DECIMAL(30,2)) ENGINE = MyISAM
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; TRUNCATE t1
master-bin.000001 # Query # # BEGIN
master-bin.000001 # User var # # @`positive`=18446744073709551615
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; TRUNCATE t1
master-bin.000001 # Query # # BEGIN
master-bin.000001 # User var # # @`negative`=-9223372036854775808
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative)
master-bin.000001 # Query # # COMMIT
DROP TABLE t1;
#
# Bug #45855 row events in binlog after switch from binlog_fmt=mix to stmt with open tmp tbl
# Bug #45856 can't switch from binlog_format=row to mix with open tmp tbl
# This test verfies if the program will generate ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR
# error and forbid switching @@SESSION.binlog_format from MIXED or ROW to
# STATEMENT when there are open temp tables and we are logging in row format.
# There is no error in any other case.
#
source include/have_binlog_format_mixed.inc;
SELECT @@SESSION.binlog_format;
CREATE TABLE t1 (a VARCHAR(100));
CREATE TEMPORARY TABLE t2 (a VARCHAR(100));
--echo # Test allow switching @@SESSION.binlog_format from MIXED to STATEMENT
--echo # when there are open temp tables and we are logging in statement based format.
SET SESSION binlog_format = STATEMENT;
SELECT @@SESSION.binlog_format;
--echo # Test allow switching @@SESSION.binlog_format from STATEMENT to
--echo # STATEMENT when there are open temp tables.
SET SESSION binlog_format = STATEMENT;
SELECT @@SESSION.binlog_format;
INSERT INTO t1 VALUES ('statement based');
SELECT @@SESSION.binlog_format;
--echo # Test allow switching @@SESSION.binlog_format from STATEMENT to
--echo # MIXED when there are open temp tables.
SET SESSION binlog_format = MIXED;
SELECT @@SESSION.binlog_format;
--echo # Test allow switching @@SESSION.binlog_format from MIXED to MIXED
--echo # when there are open temp tables.
SET SESSION binlog_format = MIXED;
SELECT @@SESSION.binlog_format;
INSERT INTO t2 VALUES (UUID());
SELECT @@SESSION.binlog_format;
--echo # Test forbit switching @@SESSION.binlog_format from MIXED to STATEMENT
--echo # when there are open temp tables and we are logging in row based format.
--ERROR ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR
SET SESSION binlog_format = STATEMENT;
SELECT @@SESSION.binlog_format;
SET SESSION binlog_format = ROW;
SELECT @@SESSION.binlog_format;
INSERT INTO t1 VALUES ('row based');
--echo # Test allow switching @@SESSION.binlog_format from ROW to MIXED
--echo # when there are open temp tables.
SET SESSION binlog_format = MIXED;
SELECT @@SESSION.binlog_format;
INSERT INTO t1 VALUES ('row based');
--echo # Test allow switching @@SESSION.binlog_format from MIXED to ROW
--echo # when there are open temp tables.
SET SESSION binlog_format = ROW;
SELECT @@SESSION.binlog_format;
--echo # Test allow switching @@SESSION.binlog_format from ROW to ROW
--echo # when there are open temp tables.
SET SESSION binlog_format = ROW;
SELECT @@SESSION.binlog_format;
INSERT INTO t1 VALUES ('row based');
--echo # Test forbit switching @@SESSION.binlog_format from ROW to STATEMENT
--echo # when there are open temp tables.
--ERROR ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR
SET SESSION binlog_format = STATEMENT;
SELECT @@SESSION.binlog_format;
DROP TEMPORARY TABLE t2;
DROP TABLE t1;
......@@ -27,6 +27,7 @@
-- source include/have_binlog_format_statement.inc
call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. .*");
call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement uses a system function whose value may differ on slave. .*");
call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement invokes a trigger or a stored function that inserts into AUTO_INCREMENT column");
-- echo ### NOT filtered database => assertion: warnings ARE shown
......@@ -117,3 +118,34 @@ perl;
print "Occurrences: $count\n";
close(FILE);
EOF
# bug#50192: diplaying the unsafe warning comes out to the user warning stack
-- disable_warnings
DROP TABLE IF EXISTS t1, t2;
-- enable_warnings
CREATE TABLE t1 (a int);
CREATE TABLE t2 (a int auto_increment primary key, b int);
CREATE TRIGGER tr_bug50192 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t2 (b) VALUES (1);
DELIMITER |;
CREATE FUNCTION sf_bug50192() RETURNS INTEGER
BEGIN
INSERT INTO t2(b) VALUES(2);
RETURN 1;
END |
DELIMITER ;|
INSERT INTO t1 VALUES (0);
SHOW WARNINGS;
SELECT sf_bug50192();
SHOW WARNINGS;
# cleanup
DROP FUNCTION sf_bug50192;
DROP TRIGGER tr_bug50192;
DROP TABLE t1, t2;
-- source include/have_binlog_format_statement.inc
RESET MASTER;
#
# BUG#49562: SBR out of sync when using numeric data types + user variable
#
-- let $max_unsigned_long= 18446744073709551615
-- let $min_signed_long= -9223372036854775808
-- eval SET @positive= $max_unsigned_long
-- eval SET @negative= $min_signed_long
CREATE TABLE t1 (`tinyint` TINYINT,
`smallint` SMALLINT,
`mediumint` MEDIUMINT,
`integer` INTEGER,
`bigint` BIGINT,
`utinyint` TINYINT UNSIGNED,
`usmallint` SMALLINT UNSIGNED,
`umediumint` MEDIUMINT UNSIGNED,
`uinteger` INTEGER UNSIGNED,
`ubigint` BIGINT UNSIGNED,
`double` DOUBLE,
`float` FLOAT,
`real` REAL(30,2),
`decimal` DECIMAL(30,2)) ENGINE = MyISAM;
-- echo ### insert max unsigned
-- echo ### a) declarative
-- disable_warnings
-- eval INSERT INTO t1 VALUES ($max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long,$max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long);
-- enable_warnings
TRUNCATE t1;
-- echo ### b) user var
-- disable_warnings
INSERT INTO t1 VALUES (@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive);
-- enable_warnings
-- echo ## assertion: checks that User_var_log_event::pack_info
-- echo ## correctly displays the binlog content by taking into
-- echo ## account the unsigned_flag
-- source include/show_binlog_events.inc
-- echo ### insert min signed
-- echo ### a) declarative
-- disable_warnings
-- eval INSERT INTO t1 VALUES ($min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long,$min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long);
-- enable_warnings
TRUNCATE t1;
-- echo ### b) user var
-- disable_warnings
INSERT INTO t1 VALUES (@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative);
-- enable_warnings
-- echo ## assertion: checks that User_var_log_event::pack_info
-- echo ## correctly displays the binlog content by taking into
-- echo ## account the unsigned_flag
-- source include/show_binlog_events.inc
DROP TABLE t1;
......@@ -308,7 +308,7 @@ ENGINE = NDB;
DROP USER mysqltest_u1@localhost;
DROP USER mysqltest_u2@localhost;
DROP DATABASE IF EXISTS mysqltest2;
DROP DATABASE mysqltest2;
# -----------------------------------------------------------------
# End 6.0 test
......
......@@ -10,6 +10,8 @@
#
##############################################################################
ndb_partition_error2 : Bug#40989 ndb_partition_error2 needs maintenance
ndb_partition_error2 : Bug#40989 ndb_partition_error2 needs maintenance
ndb_condition_pushdown : Bug#49746 2010-02-08 alik ndb_condition_pushdown fails in mysql-next-mr
# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
......@@ -462,7 +462,7 @@ ENGINE = NDB;
DROP USER mysqltest_u1@localhost;
DROP USER mysqltest_u2@localhost;
DROP DATABASE IF EXISTS mysqltest2;
DROP DATABASE mysqltest2;
--echo
--echo # -----------------------------------------------------------------
......
CREATE TABLE t1 (a INT) ENGINE = InnoDB PARTITION BY HASH(a);
INSERT INTO t1 VALUES (0), (1), (2);
START TRANSACTION;
UPDATE t1 SET a = 5 WHERE a = 1;
# Connection con1
# InnoDB lock timeout and monitor thread runs every 15 seconds
SET innodb_lock_wait_timeout = 20;
START TRANSACTION;
UPDATE t1 SET a = 3 WHERE a = 1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
COMMIT;
# Connection default
COMMIT;
DROP TABLE t1;
--source include/have_innodb.inc
--source include/have_partition.inc
CREATE TABLE t1 (a INT) ENGINE = InnoDB PARTITION BY HASH(a);
INSERT INTO t1 VALUES (0), (1), (2);
START TRANSACTION;
UPDATE t1 SET a = 5 WHERE a = 1;
connect (con1, localhost, root,,);
--echo # Connection con1
--echo # InnoDB lock timeout and monitor thread runs every 15 seconds
SET innodb_lock_wait_timeout = 20;
START TRANSACTION;
--error ER_LOCK_WAIT_TIMEOUT
UPDATE t1 SET a = 3 WHERE a = 1;
COMMIT;
disconnect con1;
connection default;
--echo # Connection default
COMMIT;
DROP TABLE t1;
......@@ -16,6 +16,7 @@ b CHAR(100) DEFAULT 'initial value')
ENGINE=MyISAM;
insert into t1 (id) values (1), (2), (3), (4), (5), (6), (7), (8);
update performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO';
update performance_schema.SETUP_CONSUMERS set enabled = 'NO';
set @dump_all=FALSE;
"Verifying file aggregate consistency"
SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ)
......@@ -51,14 +52,14 @@ SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(i.SUM_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.SUM_TIMER_WAIT <> SUM(i.SUM_TIMER_WAIT))
HAVING (e.SUM_TIMER_WAIT < SUM(i.SUM_TIMER_WAIT))
OR @dump_all;
EVENT_NAME SUM_TIMER_WAIT SUM(i.SUM_TIMER_WAIT)
SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(i.MIN_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MIN_TIMER_WAIT <> MIN(i.MIN_TIMER_WAIT))
HAVING (e.MIN_TIMER_WAIT > MIN(i.MIN_TIMER_WAIT))
AND (MIN(i.MIN_TIMER_WAIT) != 0)
OR @dump_all;
EVENT_NAME MIN_TIMER_WAIT MIN(i.MIN_TIMER_WAIT)
......@@ -66,7 +67,7 @@ SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(i.MAX_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MAX_TIMER_WAIT <> MAX(i.MAX_TIMER_WAIT))
HAVING (e.MAX_TIMER_WAIT < MAX(i.MAX_TIMER_WAIT))
OR @dump_all;
EVENT_NAME MAX_TIMER_WAIT MAX(i.MAX_TIMER_WAIT)
"Verifying waits aggregate consistency (thread)"
......@@ -75,7 +76,7 @@ FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.SUM_TIMER_WAIT <> SUM(t.SUM_TIMER_WAIT))
HAVING (e.SUM_TIMER_WAIT < SUM(t.SUM_TIMER_WAIT))
OR @dump_all;
EVENT_NAME SUM_TIMER_WAIT SUM(t.SUM_TIMER_WAIT)
SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(t.MIN_TIMER_WAIT)
......@@ -83,7 +84,7 @@ FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MIN_TIMER_WAIT <> MIN(t.MIN_TIMER_WAIT))
HAVING (e.MIN_TIMER_WAIT > MIN(t.MIN_TIMER_WAIT))
AND (MIN(t.MIN_TIMER_WAIT) != 0)
OR @dump_all;
EVENT_NAME MIN_TIMER_WAIT MIN(t.MIN_TIMER_WAIT)
......@@ -92,7 +93,7 @@ FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MAX_TIMER_WAIT <> MAX(t.MAX_TIMER_WAIT))
HAVING (e.MAX_TIMER_WAIT < MAX(t.MAX_TIMER_WAIT))
OR @dump_all;
EVENT_NAME MAX_TIMER_WAIT MAX(t.MAX_TIMER_WAIT)
update performance_schema.SETUP_CONSUMERS set enabled = 'YES';
......
select * from performance_schema.MUTEX_INSTANCES limit 1;
NAME OBJECT_INSTANCE_BEGIN LOCKED_BY_THREAD_ID
# # NULL
# # #
select * from performance_schema.MUTEX_INSTANCES
where name='FOO';
NAME OBJECT_INSTANCE_BEGIN LOCKED_BY_THREAD_ID
......
select * from performance_schema.RWLOCK_INSTANCES limit 1;
NAME OBJECT_INSTANCE_BEGIN WRITE_LOCKED_BY_THREAD_ID READ_LOCKED_BY_COUNT
# # NULL 0
# # # #
select * from performance_schema.RWLOCK_INSTANCES
where name='FOO';
NAME OBJECT_INSTANCE_BEGIN WRITE_LOCKED_BY_THREAD_ID READ_LOCKED_BY_COUNT
......
......@@ -16,7 +16,8 @@ wait/synch/mutex/sql/LOCK_delayed_create YES YES
wait/synch/mutex/sql/LOCK_delayed_insert YES YES
select * from performance_schema.SETUP_INSTRUMENTS
where name like 'Wait/Synch/Rwlock/sql/%'
order by name limit 10;
and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock')
order by name limit 10;
NAME ENABLED TIMED
wait/synch/rwlock/sql/LOCK_dboptions YES YES
wait/synch/rwlock/sql/LOCK_grant YES YES
......
# Copyright (C) 2009 Sun Microsystems, Inc
# Copyright (C) 2009-2010 Sun Microsystems, Inc
#
# 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
......@@ -50,6 +50,8 @@ insert into t1 (id) values (1), (2), (3), (4), (5), (6), (7), (8);
# Stop recording data, so the select below don't add noise.
update performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO';
# Disable all consumers, for long standing waits
update performance_schema.SETUP_CONSUMERS set enabled = 'NO';
# Helper to debug
set @dump_all=FALSE;
......@@ -132,14 +134,14 @@ SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(i.SUM_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.SUM_TIMER_WAIT <> SUM(i.SUM_TIMER_WAIT))
HAVING (e.SUM_TIMER_WAIT < SUM(i.SUM_TIMER_WAIT))
OR @dump_all;
SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(i.MIN_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MIN_TIMER_WAIT <> MIN(i.MIN_TIMER_WAIT))
HAVING (e.MIN_TIMER_WAIT > MIN(i.MIN_TIMER_WAIT))
AND (MIN(i.MIN_TIMER_WAIT) != 0)
OR @dump_all;
......@@ -147,7 +149,7 @@ SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(i.MAX_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MAX_TIMER_WAIT <> MAX(i.MAX_TIMER_WAIT))
HAVING (e.MAX_TIMER_WAIT < MAX(i.MAX_TIMER_WAIT))
OR @dump_all;
--echo "Verifying waits aggregate consistency (thread)"
......@@ -157,7 +159,7 @@ FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.SUM_TIMER_WAIT <> SUM(t.SUM_TIMER_WAIT))
HAVING (e.SUM_TIMER_WAIT < SUM(t.SUM_TIMER_WAIT))
OR @dump_all;
SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(t.MIN_TIMER_WAIT)
......@@ -165,7 +167,7 @@ FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MIN_TIMER_WAIT <> MIN(t.MIN_TIMER_WAIT))
HAVING (e.MIN_TIMER_WAIT > MIN(t.MIN_TIMER_WAIT))
AND (MIN(t.MIN_TIMER_WAIT) != 0)
OR @dump_all;
......@@ -174,7 +176,7 @@ FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MAX_TIMER_WAIT <> MAX(t.MAX_TIMER_WAIT))
HAVING (e.MAX_TIMER_WAIT < MAX(t.MAX_TIMER_WAIT))
OR @dump_all;
......
......@@ -18,7 +18,7 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
--replace_column 1 # 2 #
--replace_column 1 # 2 # 3 #
select * from performance_schema.MUTEX_INSTANCES limit 1;
select * from performance_schema.MUTEX_INSTANCES
......
......@@ -18,7 +18,7 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
--replace_column 1 # 2 #
--replace_column 1 # 2 # 3 # 4 #
select * from performance_schema.RWLOCK_INSTANCES limit 1;
select * from performance_schema.RWLOCK_INSTANCES
......
......@@ -36,8 +36,11 @@ select * from performance_schema.SETUP_INSTRUMENTS
and name not in ('wait/synch/mutex/sql/DEBUG_SYNC::mutex')
order by name limit 10;
# CRYPTO_dynlock_value::lock is dependent on the build (SSL)
select * from performance_schema.SETUP_INSTRUMENTS
where name like 'Wait/Synch/Rwlock/sql/%'
and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock')
order by name limit 10;
# COND_handler_count is dependent on the build (Windows only)
......
......@@ -89,6 +89,7 @@ show grants for rpl_do_grant2@localhost;
ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
show grants for rpl_do_grant2@localhost;
ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
DROP DATABASE IF EXISTS bug42217_db;
CREATE DATABASE bug42217_db;
GRANT CREATE ROUTINE ON bug42217_db.* TO 'create_rout_db'@'localhost'
......@@ -166,9 +167,12 @@ DROP FUNCTION upgrade_del_func;
DROP FUNCTION upgrade_alter_func;
DROP DATABASE bug42217_db;
DROP USER 'create_rout_db'@'localhost';
call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
USE mtr;
call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
######## BUG#49119 #######
### i) test case from the 'how to repeat section'
stop slave;
......
......@@ -46,102 +46,6 @@ Master-Host: 0:0:0:0:0:0:0:1
disconnect slave;
disconnect master;
connection default;
#################### IP: 127.0.0.1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 0:0:0:0:0:0:0:1
change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: 0:0:0:0:0:FFFF:127.0.0.1 ###########################
connect (master,0:0:0:0:0:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 127.0.0.1
change master to master_host='0:0:0:0:0:FFFF:127.0.0.1';
Master-Host: 0:0:0:0:0:FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: 0000:0000:0000:0000:0000:FFFF:127.0.0.1 ###########################
connect (master,0000:0000:0000:0000:0000:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 0:0:0:0:0:FFFF:127.0.0.1
change master to master_host='0000:0000:0000:0000:0000:FFFF:127.0.0.1';
Master-Host: 0000:0000:0000:0000:0000:FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: 0:0000:0000:0:0000:FFFF:127.0.0.1 ###########################
connect (master,0:0000:0000:0:0000:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 0000:0000:0000:0000:0000:FFFF:127.0.0.1
change master to master_host='0:0000:0000:0:0000:FFFF:127.0.0.1';
Master-Host: 0:0000:0000:0:0000:FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: 0::0000:FFFF:127.0.0.1 ###########################
connect (master,0::0000:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 0:0000:0000:0:0000:FFFF:127.0.0.1
change master to master_host='0::0000:FFFF:127.0.0.1';
Master-Host: 0::0000:FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: ::FFFF:127.0.0.1 ###########################
connect (master,::FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 0::0000:FFFF:127.0.0.1
change master to master_host='::FFFF:127.0.0.1';
Master-Host: ::FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: ::1 mix #######################
connect (master,::1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
......@@ -152,11 +56,11 @@ File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: ::FFFF:127.0.0.1
Master-Host: 0:0:0:0:0:0:0:1
change master to master_host='::1';
Master-Host: ::1
change master to master_host='::FFFF:127.0.0.1';
Master-Host: ::FFFF:127.0.0.1
change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
change master to master_host='0:0:0:0:0:0:0:1';
Master-Host: 0:0:0:0:0:0:0:1
disconnect slave;
......
......@@ -14,22 +14,6 @@ Master-Host: ::1
disconnect slave;
disconnect master;
connection default;
#################### IP: ::1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,::1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: ::1
change master to master_host='::1';
Master-Host: ::1
disconnect slave;
disconnect master;
connection default;
#################### IP: 0000:0000:0000:0000:0000:0000:0000:0001 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,0000:0000:0000:0000:0000:0000:0000:0001,root,,test,SLAVE_MYPORT);
......@@ -62,102 +46,6 @@ Master-Host: 0:0:0:0:0:0:0:1
disconnect slave;
disconnect master;
connection default;
#################### IP: 127.0.0.1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 0:0:0:0:0:0:0:1
change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: 0:0:0:0:0:FFFF:127.0.0.1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,0:0:0:0:0:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 127.0.0.1
change master to master_host='0:0:0:0:0:FFFF:127.0.0.1';
Master-Host: 0:0:0:0:0:FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: 0000:0000:0000:0000:0000:FFFF:127.0.0.1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,0000:0000:0000:0000:0000:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 0:0:0:0:0:FFFF:127.0.0.1
change master to master_host='0000:0000:0000:0000:0000:FFFF:127.0.0.1';
Master-Host: 0000:0000:0000:0000:0000:FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: 0:0000:0000:0:0000:FFFF:127.0.0.1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,0:0000:0000:0:0000:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 0000:0000:0000:0000:0000:FFFF:127.0.0.1
change master to master_host='0:0000:0000:0:0000:FFFF:127.0.0.1';
Master-Host: 0:0000:0000:0:0000:FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: 0::0000:FFFF:127.0.0.1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,0::0000:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 0:0000:0000:0:0000:FFFF:127.0.0.1
change master to master_host='0::0000:FFFF:127.0.0.1';
Master-Host: 0::0000:FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: ::FFFF:127.0.0.1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,::FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 0::0000:FFFF:127.0.0.1
change master to master_host='::FFFF:127.0.0.1';
Master-Host: ::FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: ::1 mix #######################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,::1,root,,test,SLAVE_MYPORT);
......@@ -168,11 +56,11 @@ File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: ::FFFF:127.0.0.1
Master-Host: 0:0:0:0:0:0:0:1
change master to master_host='::1';
Master-Host: ::1
change master to master_host='::FFFF:127.0.0.1';
Master-Host: ::FFFF:127.0.0.1
change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
change master to master_host='0:0:0:0:0:0:0:1';
Master-Host: 0:0:0:0:0:0:0:1
disconnect slave;
......
#################### IP: ::1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,::1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: No such row
change master to master_host='::1';
Master-Host: ::1
disconnect slave;
disconnect master;
connection default;
#################### IP: 0000:0000:0000:0000:0000:0000:0000:0001 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,0000:0000:0000:0000:0000:0000:0000:0001,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: ::1
change master to master_host='0000:0000:0000:0000:0000:0000:0000:0001';
Master-Host: 0000:0000:0000:0000:0000:0000:0000:0001
disconnect slave;
disconnect master;
connection default;
#################### IP: 0:0:0:0:0:0:0:1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,0:0:0:0:0:0:0:1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 0000:0000:0000:0000:0000:0000:0000:0001
change master to master_host='0:0:0:0:0:0:0:1';
Master-Host: 0:0:0:0:0:0:0:1
disconnect slave;
disconnect master;
connection default;
#################### IP: 127.0.0.1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 0:0:0:0:0:0:0:1
change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: ::1 mix #######################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,::1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 127.0.0.1
change master to master_host='::1';
Master-Host: ::1
change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
change master to master_host='0:0:0:0:0:0:0:1';
Master-Host: 0:0:0:0:0:0:0:1
disconnect slave;
disconnect master;
connection default;
#################### IP: ::1 ###########################
connect (master,::1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: No such row
change master to master_host='::1';
Master-Host: ::1
disconnect slave;
disconnect master;
connection default;
#################### IP: 0000:0000:0000:0000:0000:0000:0000:0001 ###########################
connect (master,0000:0000:0000:0000:0000:0000:0000:0001,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: ::1
change master to master_host='0000:0000:0000:0000:0000:0000:0000:0001';
Master-Host: 0000:0000:0000:0000:0000:0000:0000:0001
disconnect slave;
disconnect master;
connection default;
#################### IP: 0:0:0:0:0:0:0:1 ###########################
connect (master,0:0:0:0:0:0:0:1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 0000:0000:0000:0000:0000:0000:0000:0001
change master to master_host='0:0:0:0:0:0:0:1';
Master-Host: 0:0:0:0:0:0:0:1
disconnect slave;
disconnect master;
connection default;
#################### IP: 127.0.0.1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 0:0:0:0:0:0:0:1
change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: ::1 mix #######################
connect (master,::1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 127.0.0.1
change master to master_host='::1';
Master-Host: ::1
change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
change master to master_host='0:0:0:0:0:0:0:1';
Master-Host: 0:0:0:0:0:0:0:1
disconnect slave;
disconnect master;
connection default;
......@@ -88,7 +88,7 @@ Master-Host: ::FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: ::1 ###########################
#################### IP: ::FFFF:127.0.0.1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
......@@ -99,12 +99,12 @@ master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: ::FFFF:127.0.0.1
change master to master_host='::1';
Master-Host: ::1
change master to master_host='::FFFF:127.0.0.1';
Master-Host: ::FFFF:127.0.0.1
change master to master_host='0:0:0:0:0:0:0:1';
Master-Host: 0:0:0:0:0:0:0:1
change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
change master to master_host='0:0000:0000:0:0000:FFFF:127.0.0.1';
Master-Host: 0:0000:0000:0:0000:FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: 127.0.0.1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: ::1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 127.0.0.1
change master to master_host='::1';
Master-Host: ::1
change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
change master to master_host='0:0:0:0:0:0:0:1';
Master-Host: 0:0:0:0:0:0:0:1
disconnect slave;
disconnect master;
connection default;
......@@ -43,96 +43,6 @@ Master-Host: 0:0:0:0:0:0:0:1
disconnect slave;
disconnect master;
connection default;
#################### IP: 127.0.0.1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: 0:0:0:0:0:FFFF:127.0.0.1 ###########################
connect (master,0:0:0:0:0:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,0:0:0:0:0:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
change master to master_host='0:0:0:0:0:FFFF:127.0.0.1';
Master-Host: 0:0:0:0:0:FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: 0000:0000:0000:0000:0000:FFFF:127.0.0.1 ###########################
connect (master,0000:0000:0000:0000:0000:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,0000:0000:0000:0000:0000:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
change master to master_host='0000:0000:0000:0000:0000:FFFF:127.0.0.1';
Master-Host: 0000:0000:0000:0000:0000:FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: 0:0000:0000:0:0000:FFFF:127.0.0.1 ###########################
connect (master,0:0000:0000:0:0000:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,0:0000:0000:0:0000:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
change master to master_host='0:0000:0000:0:0000:FFFF:127.0.0.1';
Master-Host: 0:0000:0000:0:0000:FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: 0::0000:FFFF:127.0.0.1 ###########################
connect (master,0::0000:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,0::0000:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
change master to master_host='0::0000:FFFF:127.0.0.1';
Master-Host: 0::0000:FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: ::FFFF:127.0.0.1 ###########################
connect (master,::FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,::FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
change master to master_host='::FFFF:127.0.0.1';
Master-Host: ::FFFF:127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: ::1 mix #######################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
......@@ -143,11 +53,11 @@ File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: ::FFFF:127.0.0.1
Master-Host: 0:0:0:0:0:0:0:1
change master to master_host='::1';
Master-Host: ::1
change master to master_host='::FFFF:127.0.0.1';
Master-Host: ::FFFF:127.0.0.1
change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
change master to master_host='0:0:0:0:0:0:0:1';
Master-Host: 0:0:0:0:0:0:0:1
disconnect slave;
......
#################### IP: ::1 ###########################
connect (master,::1,root,,test,MASTER_MYPORT);
connect (slave,::1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
change master to master_host='::1';
Master-Host: ::1
disconnect slave;
disconnect master;
connection default;
#################### IP: 0000:0000:0000:0000:0000:0000:0000:0001 ###########################
connect (master,0000:0000:0000:0000:0000:0000:0000:0001,root,,test,MASTER_MYPORT);
connect (slave,0000:0000:0000:0000:0000:0000:0000:0001,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
change master to master_host='0000:0000:0000:0000:0000:0000:0000:0001';
Master-Host: 0000:0000:0000:0000:0000:0000:0000:0001
disconnect slave;
disconnect master;
connection default;
#################### IP: 0:0:0:0:0:0:0:1 ###########################
connect (master,0:0:0:0:0:0:0:1,root,,test,MASTER_MYPORT);
connect (slave,0:0:0:0:0:0:0:1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
change master to master_host='0:0:0:0:0:0:0:1';
Master-Host: 0:0:0:0:0:0:0:1
disconnect slave;
disconnect master;
connection default;
#################### IP: 127.0.0.1 ###########################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
disconnect slave;
disconnect master;
connection default;
#################### IP: ::1 mix #######################
connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connection master;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
connection slave;
reset slave;
Master-Host: 127.0.0.1
change master to master_host='::1';
Master-Host: ::1
change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
change master to master_host='0:0:0:0:0:0:0:1';
Master-Host: 0:0:0:0:0:0:0:1
disconnect slave;
disconnect master;
connection default;
......@@ -120,8 +120,27 @@ min(a)
select max(a) from t1;
max(a)
300
# BUG#50157
# semi-sync replication crashes when replicating a transaction which
# include 'CREATE TEMPORARY TABLE `MyISAM_t` SELECT * FROM `Innodb_t` ;
[ on master ]
SET SESSION AUTOCOMMIT= 0;
CREATE TABLE t2(c1 INT) ENGINE=innodb;
BEGIN;
# Even though it is in a transaction, this statement is binlogged into binlog
# file immediately.
CREATE TEMPORARY TABLE t3 SELECT c1 FROM t2 where 1=1;
# These statements will not be binlogged until the transaction is committed
INSERT INTO t2 VALUES(11);
INSERT INTO t2 VALUES(22);
COMMIT;
DROP TABLE t2, t3;
SET SESSION AUTOCOMMIT= 1;
#
# Test semi-sync master will switch OFF after one transacton
# Test semi-sync master will switch OFF after one transaction
# timeout waiting for slave reply.
#
include/stop_slave.inc
......@@ -135,7 +154,7 @@ Variable_name Value
Rpl_semi_sync_master_no_tx 0
show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value
Rpl_semi_sync_master_yes_tx 301
Rpl_semi_sync_master_yes_tx 304
show status like 'Rpl_semi_sync_master_clients';
Variable_name Value
Rpl_semi_sync_master_clients 1
......@@ -150,7 +169,7 @@ Variable_name Value
Rpl_semi_sync_master_no_tx 1
show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value
Rpl_semi_sync_master_yes_tx 301
Rpl_semi_sync_master_yes_tx 304
insert into t1 values (100);
[ master status should be OFF ]
show status like 'Rpl_semi_sync_master_status';
......@@ -161,7 +180,7 @@ Variable_name Value
Rpl_semi_sync_master_no_tx 302
show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value
Rpl_semi_sync_master_yes_tx 301
Rpl_semi_sync_master_yes_tx 304
#
# Test semi-sync status on master will be ON again when slave catches up
#
......@@ -194,7 +213,7 @@ Variable_name Value
Rpl_semi_sync_master_no_tx 302
show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value
Rpl_semi_sync_master_yes_tx 301
Rpl_semi_sync_master_yes_tx 304
show status like 'Rpl_semi_sync_master_clients';
Variable_name Value
Rpl_semi_sync_master_clients 1
......@@ -213,7 +232,7 @@ Variable_name Value
Rpl_semi_sync_master_no_tx 302
SHOW STATUS LIKE 'Rpl_semi_sync_master_yes_tx';
Variable_name Value
Rpl_semi_sync_master_yes_tx 302
Rpl_semi_sync_master_yes_tx 305
FLUSH NO_WRITE_TO_BINLOG STATUS;
[ Semi-sync master status variables after FLUSH STATUS ]
SHOW STATUS LIKE 'Rpl_semi_sync_master_no_tx';
......
......@@ -10,47 +10,7 @@ insert into t1(b) values (1);
insert into t1(b) values (2);
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
commit;
show slave status;
Slave_IO_State #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running No
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 9
Last_Error Error in Begin_load_query event: write to '../../tmp/SQL_LOAD.data' failed
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 9
Last_SQL_Error Error in Begin_load_query event: write to '../../tmp/SQL_LOAD.data' failed
Replicate_Ignore_Server_Ids
Master_Server_Id 1
drop table t1;
drop table t1;
call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3");
call mtr.add_suppression("Slave: Can't get stat of .*");
call mtr.add_suppression("Slave: File.* not found.*");
......@@ -118,7 +118,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 386
Read_Master_Log_Pos 387
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -133,7 +133,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 386
Exec_Master_Log_Pos 387
Relay_Log_Space #
Until_Condition None
Until_Log_File
......
......@@ -213,7 +213,7 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(ddl_case) VALUES (26)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; ALTER DEFINER=`root`@`localhost` EVENT evt COMMENT 'evt'
master-bin.000001 # Query # # use `test`; ALTER EVENT evt COMMENT 'evt'
-e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e-
-b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b-
......
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
SET @positive= 18446744073709551615;
SET @negative= -9223372036854775808;
CREATE TABLE t1 (`tinyint` TINYINT,
`smallint` SMALLINT,
`mediumint` MEDIUMINT,
`integer` INTEGER,
`bigint` BIGINT,
`utinyint` TINYINT UNSIGNED,
`usmallint` SMALLINT UNSIGNED,
`umediumint` MEDIUMINT UNSIGNED,
`uinteger` INTEGER UNSIGNED,
`ubigint` BIGINT UNSIGNED,
`double` DOUBLE,
`float` FLOAT,
`real` REAL(30,2),
`decimal` DECIMAL(30,2)) ENGINE = MyISAM;
### insert max unsigned
### a) declarative
INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);;
#########################################
#### [ on master ]
SELECT * FROM t1;
tinyint 127
smallint 32767
mediumint 8388607
integer 2147483647
bigint 9223372036854775807
utinyint 255
usmallint 65535
umediumint 16777215
uinteger 4294967295
ubigint 18446744073709551615
double 1.8446744073709552e19
float 1.84467e19
real 18446744073709552000.00
decimal 18446744073709551615.00
#### [ on slave ]
SELECT * FROM t1;
tinyint 127
smallint 32767
mediumint 8388607
integer 2147483647
bigint 9223372036854775807
utinyint 255
usmallint 65535
umediumint 16777215
uinteger 4294967295
ubigint 18446744073709551615
double 1.8446744073709552e19
float 1.84467e19
real 18446744073709552000.00
decimal 18446744073709551615.00
#########################################
## assertion: master and slave tables are in sync
Comparing tables master:test.t1 and slave:test.t1
TRUNCATE t1;
### b) user var
INSERT INTO t1 VALUES (@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive);
#########################################
#### [ on master ]
SELECT * FROM t1;
tinyint 127
smallint 32767
mediumint 8388607
integer 2147483647
bigint 9223372036854775807
utinyint 255
usmallint 65535
umediumint 16777215
uinteger 4294967295
ubigint 18446744073709551615
double 1.8446744073709552e19
float 1.84467e19
real 18446744073709552000.00
decimal 18446744073709551615.00
#### [ on slave ]
SELECT * FROM t1;
tinyint 127
smallint 32767
mediumint 8388607
integer 2147483647
bigint 9223372036854775807
utinyint 255
usmallint 65535
umediumint 16777215
uinteger 4294967295
ubigint 18446744073709551615
double 1.8446744073709552e19
float 1.84467e19
real 18446744073709552000.00
decimal 18446744073709551615.00
#########################################
## assertion: master and slave tables are in sync
Comparing tables master:test.t1 and slave:test.t1
TRUNCATE t1;
### insert min signed
### a) declarative
INSERT INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);;
#########################################
#### [ on master ]
SELECT * FROM t1;
tinyint -128
smallint -32768
mediumint -8388608
integer -2147483648
bigint -9223372036854775808
utinyint 0
usmallint 0
umediumint 0
uinteger 0
ubigint 0
double -9.223372036854776e18
float -9.22337e18
real -9223372036854776000.00
decimal -9223372036854775808.00
#### [ on slave ]
SELECT * FROM t1;
tinyint -128
smallint -32768
mediumint -8388608
integer -2147483648
bigint -9223372036854775808
utinyint 0
usmallint 0
umediumint 0
uinteger 0
ubigint 0
double -9.223372036854776e18
float -9.22337e18
real -9223372036854776000.00
decimal -9223372036854775808.00
#########################################
## assertion: master and slave tables are in sync
Comparing tables master:test.t1 and slave:test.t1
TRUNCATE t1;
### b) user var
INSERT INTO t1 VALUES (@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative);
#########################################
#### [ on master ]
SELECT * FROM t1;
tinyint -128
smallint -32768
mediumint -8388608
integer -2147483648
bigint -9223372036854775808
utinyint 0
usmallint 0
umediumint 0
uinteger 0
ubigint 0
double -9.223372036854776e18
float -9.22337e18
real -9223372036854776000.00
decimal -9223372036854775808.00
#### [ on slave ]
SELECT * FROM t1;
tinyint -128
smallint -32768
mediumint -8388608
integer -2147483648
bigint -9223372036854775808
utinyint 0
usmallint 0
umediumint 0
uinteger 0
ubigint 0
double -9.223372036854776e18
float -9.22337e18
real -9223372036854776000.00
decimal -9223372036854775808.00
#########################################
## assertion: master and slave tables are in sync
Comparing tables master:test.t1 and slave:test.t1
TRUNCATE t1;
## check: contents of both tables master's and slave's
DROP TABLE t1;
......@@ -112,6 +112,9 @@ show grants for rpl_do_grant2@localhost;
# BUG42217 mysql.procs_priv does not get replicated
#####################################################
connection master;
call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
sync_slave_with_master;
connection master;
--disable_warnings
DROP DATABASE IF EXISTS bug42217_db;
......@@ -201,12 +204,19 @@ USE bug42217_db;
DROP FUNCTION upgrade_del_func;
DROP FUNCTION upgrade_alter_func;
DROP DATABASE bug42217_db;
-- sync_slave_with_master
-- connection master
# user was already dropped in the slave before
# so no need to wait for the slave to replicate
# this statement (if it did and we later synced
# the slave it would end up in an error anyway)
DROP USER 'create_rout_db'@'localhost';
call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
connection slave;
USE mtr;
call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
# finish entire clean up (remove binlogs)
# so that we leave a pristine environment for the
# following tests
-- source include/master-slave-reset.inc
# BUG#49119: Master crashes when executing 'REVOKE ... ON
# {PROCEDURE|FUNCTION} FROM ...'
......
......@@ -382,7 +382,7 @@ let $slave_param_comparison= =;
let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
# Flush logs every 0.1 second during 5 sec
--disable_query_log
let $i=50;
let $i=100;
while ($i) {
FLUSH LOGS;
dec $i;
......
......@@ -7,8 +7,6 @@
# (see corresponding cnf file)
#
--source include/check_ipv6.inc
# Can't be tested with windows due to mixed format like 0::0000:FFFF:127.0.0.1
--source include/not_windows.inc
--source include/have_log_bin.inc
let $IPv6= ::1;
......@@ -27,38 +25,6 @@ let $IPv6= 0:0:0:0:0:0:0:1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix.inc
let $IPv6= 127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix.inc
let $IPv6= 0:0:0:0:0:FFFF:127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix.inc
let $IPv6= 0000:0000:0000:0000:0000:FFFF:127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix.inc
let $IPv6= 0:0000:0000:0:0000:FFFF:127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix.inc
let $IPv6= 0::0000:FFFF:127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix.inc
#let $IPv6= 0:0:0:0:0:FFFF:127.0.0.1/96;
#--echo #################### IP: $IPv6 ###########################
#--source include/rpl_ip_mix.inc
let $IPv6= ::FFFF:127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix.inc
#let $IPv6= ::FFFF:127.0.0.1/96;
#--echo #################### IP: $IPv6 ###########################
#--source include/rpl_ip_mix.inc
let $IPv6= ::1;
--echo #################### IP: $IPv6 mix #######################
--echo connect (master,$IPv6,root,,test,MASTER_MYPORT);
......@@ -78,7 +44,7 @@ let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
eval change master to master_host='$IPv6';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='::FFFF:127.0.0.1';
eval change master to master_host='127.0.0.1';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='0:0:0:0:0:0:0:1';
......
......@@ -19,14 +19,8 @@ disconnect checkcon123456789;
--enable_abort_on_error
--enable_query_log
# end check
# Can't be tested with windows due to mixed format like 0::0000:FFFF:127.0.0.1
--source include/not_windows.inc
--source include/have_log_bin.inc
let $IPv6= ::1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix2.inc
let $IPv6= ::1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix2.inc
......@@ -43,38 +37,6 @@ let $IPv6= 0:0:0:0:0:0:0:1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix2.inc
let $IPv6= 127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix2.inc
let $IPv6= 0:0:0:0:0:FFFF:127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix2.inc
let $IPv6= 0000:0000:0000:0000:0000:FFFF:127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix2.inc
let $IPv6= 0:0000:0000:0:0000:FFFF:127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix2.inc
let $IPv6= 0::0000:FFFF:127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix2.inc
#let $IPv6= 0:0:0:0:0:FFFF:127.0.0.1/96;
#--echo #################### IP: $IPv6 ###########################
#--source include/rpl_ip_mix2.inc
let $IPv6= ::FFFF:127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix2.inc
#let $IPv6= ::FFFF:127.0.0.1/96;
#--echo #################### IP: $IPv6 ###########################
#--source include/rpl_ip_mix2.inc
let $IPv6= ::1;
--echo #################### IP: $IPv6 mix #######################
--echo connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
......@@ -94,7 +56,7 @@ let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
eval change master to master_host='$IPv6';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='::FFFF:127.0.0.1';
eval change master to master_host='127.0.0.1';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='0:0:0:0:0:0:0:1';
......
# Use default setting for mysqld processes
!include include/default_mysqld.cnf
!include include/default_client.cnf
[mysqld.1]
# Run the master.sh script before starting this process
#!run-master-sh
log-bin= master-bin
loose-innodb
skip-name-resolve
bind-address= 0.0.0.0
[mysqld.2]
# Run the slave.sh script before starting this process
#!run-slave-sh
# Append <testname>-slave.opt file to the list of argument used when
# starting the mysqld
#!use-slave-opt
log-bin= slave-bin
relay-log= slave-relay-bin
init-rpl-role= slave
log-slave-updates
master-retry-count= 10
# Values reported by slave when it connect to master
# and shows up in SHOW SLAVE STATUS;
report-host= localhost
report-port= @mysqld.2.port
report-user= root
skip-slave-start
skip-name-resolve
bind-address= ::
# Directory where slaves find the dumps generated by "load data"
# on the server. The path need to have constant length otherwise
# test results will vary, thus a relative path is used.
slave-load-tmpdir= ../../tmp
loose-innodb
[ENV]
MASTER_MYPORT= @mysqld.1.port
MASTER_MYSOCK= @mysqld.1.socket
SLAVE_MYPORT= @mysqld.2.port
SLAVE_MYSOCK= @mysqld.2.socket
# Copyright (C) 2009 SUN Microsystems
# All rights reserved. Use is subject to license terms.
# Author: Horst Hunger
# Nov. 19, 2009
# Test of ipv6 format, especially "change master host=..."
# Options: --skip-name-resolve, master: --bind-address=0.0.0.0, slave: --bind-address=::
# (see corresponding cnf file)
#
# Check if ipv6 is available. If not, server is crashing (see BUG#48915).
--disable_query_log
--disable_abort_on_error
connect (checkcon123456789,::1,root,,test,$SLAVE_MYPORT);
if($mysql_errno)
{
skip wrong IP for slave;
}
connection default;
disconnect checkcon123456789;
--enable_abort_on_error
--enable_query_log
# end check
# For windows due to missing the mixed format like 0::0000:FFFF:127.0.0.1
--source include/windows.inc
--source include/have_log_bin.inc
let $IPv6= ::1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix2.inc
let $IPv6= ::1/128;
#--echo #################### IP: $IPv6 ###########################
#--source include/rpl_ip_mix2.inc
let $IPv6= 0000:0000:0000:0000:0000:0000:0000:0001;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix2.inc
let $IPv6= 0:0:0:0:0:0:0:1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix2.inc
let $IPv6= 127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix2.inc
let $IPv6= ::1;
--echo #################### IP: $IPv6 mix #######################
--echo connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT);
--echo connect (slave,$IPv6,root,,test,SLAVE_MYPORT);
connect (slave,$IPv6,root,,test,$SLAVE_MYPORT);
--echo connection master;
connection master;
reset master;
source include/show_master_status.inc;
save_master_pos;
--echo connection slave;
connection slave;
reset slave;
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='$IPv6';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='127.0.0.1';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='0:0:0:0:0:0:0:1';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
--echo disconnect slave;
disconnect slave;
--echo disconnect master;
disconnect master;
--echo connection default;
connection default;
--exit
# Use default setting for mysqld processes
!include include/default_mysqld.cnf
!include include/default_client.cnf
[mysqld.1]
# Run the master.sh script before starting this process
#!run-master-sh
log-bin= master-bin
loose-innodb
skip-name-resolve
bind-address= ::
[mysqld.2]
# Run the slave.sh script before starting this process
#!run-slave-sh
# Append <testname>-slave.opt file to the list of argument used when
# starting the mysqld
#!use-slave-opt
log-bin= slave-bin
relay-log= slave-relay-bin
init-rpl-role= slave
log-slave-updates
master-retry-count= 10
# Values reported by slave when it connect to master
# and shows up in SHOW SLAVE STATUS;
report-host= localhost
report-port= @mysqld.2.port
report-user= root
skip-slave-start
skip-name-resolve
bind-address= 0.0.0.0
# Directory where slaves find the dumps generated by "load data"
# on the server. The path need to have constant length otherwise
# test results will vary, thus a relative path is used.
slave-load-tmpdir= ../../tmp
loose-innodb
[ENV]
MASTER_MYPORT= @mysqld.1.port
MASTER_MYSOCK= @mysqld.1.socket
SLAVE_MYPORT= @mysqld.2.port
SLAVE_MYSOCK= @mysqld.2.socket
# Copyright (C) 2009 SUN Microsystems
# All rights reserved. Use is subject to license terms.
# Author: Horst Hunger
# Nov. 19, 2009
# Test of ipv6 format, especially "change master host=..."
# Options: --skip-name-resolve, master: --bind-address=::, slave: --bind-address=0.0.0.0
# (see corresponding cnf file)
#
--source include/check_ipv6.inc
# For windows due to missing the mixed format like 0::0000:FFFF:127.0.0.1
--source include/windows.inc
--source include/have_log_bin.inc
let $IPv6= ::1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix.inc
let $IPv6= ::1/128;
#--echo #################### IP: $IPv6 ###########################
#--source include/rpl_ip_mix.inc
let $IPv6= 0000:0000:0000:0000:0000:0000:0000:0001;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix.inc
let $IPv6= 0:0:0:0:0:0:0:1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix.inc
let $IPv6= 127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ip_mix.inc
let $IPv6= ::1;
--echo #################### IP: $IPv6 mix #######################
--echo connect (master,$IPv6,root,,test,MASTER_MYPORT);
connect (master,$IPv6,root,,test,$MASTER_MYPORT);
--echo connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT);
--echo connection master;
connection master;
reset master;
source include/show_master_status.inc;
save_master_pos;
--echo connection slave;
connection slave;
reset slave;
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='$IPv6';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='127.0.0.1';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='0:0:0:0:0:0:0:1';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
--echo disconnect slave;
disconnect slave;
--echo disconnect master;
disconnect master;
--echo connection default;
connection default;
--exit
......@@ -6,22 +6,7 @@
# Options: --skip-name-resolve, --bind-address=0.0.0.0 (see corresponding cnf file)
# for master and slave
#
# Check if ipv4 is available.
--disable_query_log
--disable_abort_on_error
connect (checkcon123456789,127.0.0.1,root,,test);
if($mysql_errno)
{
skip wrong IP;
}
connection default;
disconnect checkcon123456789;
--enable_abort_on_error
--enable_query_log
# end check
# Can't be tested with windows due to mixed format like 0::0000:FFFF:127.0.0.1
--source include/not_windows.inc
--source include/have_ipv4_mapped.inc
--source include/have_log_bin.inc
let $IPv6= 127.0.0.1;
......@@ -56,7 +41,7 @@ let $IPv6= ::FFFF:127.0.0.1;
#--echo #################### IP: $IPv6 ###########################
#--source include/rpl_ipv6.inc
let $IPv6= ::1;
let $IPv6= ::FFFF:127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--echo connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT);
......@@ -75,10 +60,10 @@ let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
eval change master to master_host='$IPv6';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='::FFFF:127.0.0.1';
eval change master to master_host='127.0.0.1';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='0:0:0:0:0:0:0:1';
eval change master to master_host='0:0000:0000:0:0000:FFFF:127.0.0.1';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
--echo disconnect slave;
......
# Use default setting for mysqld processes
!include include/default_mysqld.cnf
!include include/default_client.cnf
[mysqld.1]
# Run the master.sh script before starting this process
#!run-master-sh
log-bin= master-bin
loose-innodb
skip-name-resolve
bind-address= 0.0.0.0
[mysqld.2]
# Run the slave.sh script before starting this process
#!run-slave-sh
# Append <testname>-slave.opt file to the list of argument used when
# starting the mysqld
#!use-slave-opt
log-bin= slave-bin
relay-log= slave-relay-bin
init-rpl-role= slave
log-slave-updates
master-retry-count= 10
# Values reported by slave when it connect to master
# and shows up in SHOW SLAVE STATUS;
report-host= localhost
report-port= @mysqld.2.port
report-user= root
skip-slave-start
skip-name-resolve
bind-address= 0.0.0.0
# Directory where slaves find the dumps generated by "load data"
# on the server. The path need to have constant length otherwise
# test results will vary, thus a relative path is used.
slave-load-tmpdir= ../../tmp
loose-innodb
[ENV]
MASTER_MYPORT= @mysqld.1.port
MASTER_MYSOCK= @mysqld.1.socket
SLAVE_MYPORT= @mysqld.2.port
SLAVE_MYSOCK= @mysqld.2.socket
# Copyright (C) 2009 SUN Microsystems
# All rights reserved. Use is subject to license terms.
# Author: Horst Hunger
# Nov. 19, 2009
# Test of ipv4 (127.0.0.1) in ipv6 format, especially "change master host=..."
# Options: --skip-name-resolve, --bind-address=0.0.0.0 (see corresponding cnf file)
# for master and slave
#
# Check if ipv4 is available.
--disable_query_log
--disable_abort_on_error
connect (checkcon123456789,127.0.0.1,root,,test);
if($mysql_errno)
{
skip wrong IP;
}
connection default;
disconnect checkcon123456789;
--enable_abort_on_error
--enable_query_log
# end check
# For windows due to missing the mixed format like 0::0000:FFFF:127.0.0.1
--source include/windows.inc
--source include/have_log_bin.inc
let $IPv6= 127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ipv6.inc
let $IPv6= ::1;
--echo #################### IP: $IPv6 ###########################
--echo connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT);
--echo connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT);
--echo connection master;
connection master;
reset master;
source include/show_master_status.inc;
save_master_pos;
--echo connection slave;
connection slave;
reset slave;
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='$IPv6';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='127.0.0.1';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='0:0:0:0:0:0:0:1';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
--echo disconnect slave;
disconnect slave;
--echo disconnect master;
disconnect master;
--echo connection default;
connection default;
--exit
......@@ -27,38 +27,6 @@ let $IPv6= 0:0:0:0:0:0:0:1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ipv6.inc
let $IPv6= 127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ipv6.inc
let $IPv6= 0:0:0:0:0:FFFF:127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ipv6.inc
let $IPv6= 0000:0000:0000:0000:0000:FFFF:127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ipv6.inc
let $IPv6= 0:0000:0000:0:0000:FFFF:127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ipv6.inc
let $IPv6= 0::0000:FFFF:127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ipv6.inc
#let $IPv6= 0:0:0:0:0:FFFF:127.0.0.1/96;
#--echo #################### IP: $IPv6 ###########################
#--source include/rpl_ipv6.inc
let $IPv6= ::FFFF:127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ipv6.inc
#let $IPv6= ::FFFF:127.0.0.1/96;
#--echo #################### IP: $IPv6 ###########################
#--source include/rpl_ipv6.inc
let $IPv6= ::1;
--echo #################### IP: $IPv6 mix #######################
--echo connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
......@@ -78,7 +46,7 @@ let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
eval change master to master_host='$IPv6';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='::FFFF:127.0.0.1';
eval change master to master_host='127.0.0.1';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='0:0:0:0:0:0:0:1';
......
# Use default setting for mysqld processes
!include include/default_mysqld.cnf
!include include/default_client.cnf
[mysqld.1]
# Run the master.sh script before starting this process
#!run-master-sh
log-bin= master-bin
loose-innodb
skip-name-resolve
bind-address= ::
[mysqld.2]
# Run the slave.sh script before starting this process
#!run-slave-sh
# Append <testname>-slave.opt file to the list of argument used when
# starting the mysqld
#!use-slave-opt
log-bin= slave-bin
relay-log= slave-relay-bin
init-rpl-role= slave
log-slave-updates
master-retry-count= 10
# Values reported by slave when it connect to master
# and shows up in SHOW SLAVE STATUS;
report-host= localhost
report-port= @mysqld.2.port
report-user= root
skip-slave-start
skip-name-resolve
bind-address= ::
# Directory where slaves find the dumps generated by "load data"
# on the server. The path need to have constant length otherwise
# test results will vary, thus a relative path is used.
slave-load-tmpdir= ../../tmp
loose-innodb
[ENV]
MASTER_MYPORT= @mysqld.1.port
MASTER_MYSOCK= @mysqld.1.socket
SLAVE_MYPORT= @mysqld.2.port
SLAVE_MYSOCK= @mysqld.2.socket
# Copyright (C) 2009 SUN Microsystems
# All rights reserved. Use is subject to license terms.
# Author: Horst Hunger
# Nov. 19, 2009
# Test of ipv6 format, especially "change master host=..."
# Options: --skip-name-resolve, --bind-address=:: (see corresponding cnf file)
# for master and slave.
#
--source include/check_ipv6.inc
# For windows due to missing the mixed format like 0::0000:FFFF:127.0.0.1
--source include/windows.inc
--source include/have_log_bin.inc
let $IPv6= ::1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ipv6.inc
let $IPv6= ::1/128;
#--echo #################### IP: $IPv6 ###########################
#--source include/rpl_ipv6.inc
let $IPv6= 0000:0000:0000:0000:0000:0000:0000:0001;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ipv6.inc
let $IPv6= 0:0:0:0:0:0:0:1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ipv6.inc
let $IPv6= 127.0.0.1;
--echo #################### IP: $IPv6 ###########################
--source include/rpl_ipv6.inc
let $IPv6= ::1;
--echo #################### IP: $IPv6 mix #######################
--echo connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT);
--echo connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT);
--echo connection master;
connection master;
reset master;
source include/show_master_status.inc;
save_master_pos;
--echo connection slave;
connection slave;
reset slave;
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='$IPv6';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='127.0.0.1';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
eval change master to master_host='0:0:0:0:0:0:0:1';
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
--echo disconnect slave;
disconnect slave;
--echo disconnect master;
disconnect master;
--echo connection default;
connection default;
--exit
......@@ -11,6 +11,7 @@ disable_query_log;
connection master;
call mtr.add_suppression("Timeout waiting for reply of binlog");
call mtr.add_suppression("Read semi-sync reply");
call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT.");
connection slave;
call mtr.add_suppression("Master server does not support semi-sync");
call mtr.add_suppression("Semi-sync slave .* reply");
......@@ -193,8 +194,38 @@ select count(distinct a) from t1;
select min(a) from t1;
select max(a) from t1;
--echo
--echo # BUG#50157
--echo # semi-sync replication crashes when replicating a transaction which
--echo # include 'CREATE TEMPORARY TABLE `MyISAM_t` SELECT * FROM `Innodb_t` ;
connection master;
echo [ on master ];
SET SESSION AUTOCOMMIT= 0;
CREATE TABLE t2(c1 INT) ENGINE=innodb;
sync_slave_with_master;
connection master;
BEGIN;
--echo
--echo # Even though it is in a transaction, this statement is binlogged into binlog
--echo # file immediately.
--disable_warnings
CREATE TEMPORARY TABLE t3 SELECT c1 FROM t2 where 1=1;
--enable_warnings
--echo
--echo # These statements will not be binlogged until the transaction is committed
INSERT INTO t2 VALUES(11);
INSERT INTO t2 VALUES(22);
COMMIT;
DROP TABLE t2, t3;
SET SESSION AUTOCOMMIT= 1;
sync_slave_with_master;
--echo #
--echo # Test semi-sync master will switch OFF after one transacton
--echo # Test semi-sync master will switch OFF after one transaction
--echo # timeout waiting for slave reply.
--echo #
connection slave;
......
......@@ -33,10 +33,17 @@ commit;
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
--replace_result $MASTER_MYPORT MASTER_MYPORT
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
--replace_regex /SQL_LOAD-[0-9]-[0-9]-[0-9]*/SQL_LOAD/
query_vertical show slave status;
--let $error= query_get_value(SHOW SLAVE STATUS, Last_Errno, 1)
# windows and linux different error numbers here:
# Windows:
# - Last_Errno 29 (File not found)
# Unix like OS:
# - Last_Errno 13 (Can't stat file)
--let $assertion= `SELECT $error=29 OR $error=13`
if (!$assertion)
{
--echo UNEXPECTED ERROR NUMBER: $error
}
##########################################################################
# Clean up
......@@ -49,4 +56,5 @@ connection slave;
drop table t1;
call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3");
call mtr.add_suppression("Slave: Can't get stat of .*");
call mtr.add_suppression("Slave: File.* not found.*");
#
# BUG#49562: SBR out of sync when using numeric data types + user variable
#
-- source include/master-slave.inc
-- source include/have_binlog_format_statement.inc
## Setup user variables for several numeric types, so that we get
## coverage on the User_var_log_event different val types
-- let $max_unsigned_long= 18446744073709551615
-- let $min_signed_long= -9223372036854775808
-- eval SET @positive= $max_unsigned_long
-- eval SET @negative= $min_signed_long
CREATE TABLE t1 (`tinyint` TINYINT,
`smallint` SMALLINT,
`mediumint` MEDIUMINT,
`integer` INTEGER,
`bigint` BIGINT,
`utinyint` TINYINT UNSIGNED,
`usmallint` SMALLINT UNSIGNED,
`umediumint` MEDIUMINT UNSIGNED,
`uinteger` INTEGER UNSIGNED,
`ubigint` BIGINT UNSIGNED,
`double` DOUBLE,
`float` FLOAT,
`real` REAL(30,2),
`decimal` DECIMAL(30,2)) ENGINE = MyISAM;
-- disable_warnings
-- echo ### insert max unsigned
-- echo ### a) declarative
-- eval INSERT INTO t1 VALUES ($max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long,$max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long);
-- echo #########################################
-- echo #### [ on master ]
-- query_vertical SELECT * FROM t1
-- sync_slave_with_master
-- echo #### [ on slave ]
-- query_vertical SELECT * FROM t1
-- echo #########################################
-- connection master
-- echo ## assertion: master and slave tables are in sync
-- let $diff_table_1=master:test.t1
-- let $diff_table_2=slave:test.t1
-- source include/diff_tables.inc
-- connection master
TRUNCATE t1;
-- echo ### b) user var
INSERT INTO t1 VALUES (@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive,
@positive);
-- echo #########################################
-- echo #### [ on master ]
-- query_vertical SELECT * FROM t1
-- sync_slave_with_master
-- echo #### [ on slave ]
-- query_vertical SELECT * FROM t1
-- echo #########################################
-- connection master
-- echo ## assertion: master and slave tables are in sync
-- let $diff_table_1=master:test.t1
-- let $diff_table_2=slave:test.t1
-- source include/diff_tables.inc
-- connection master
TRUNCATE t1;
-- echo ### insert min signed
-- echo ### a) declarative
-- eval INSERT INTO t1 VALUES ($min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long,$min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long);
-- echo #########################################
-- echo #### [ on master ]
-- query_vertical SELECT * FROM t1
-- sync_slave_with_master
-- echo #### [ on slave ]
-- query_vertical SELECT * FROM t1
-- echo #########################################
-- connection master
-- echo ## assertion: master and slave tables are in sync
-- let $diff_table_1=master:test.t1
-- let $diff_table_2=slave:test.t1
-- source include/diff_tables.inc
-- connection master
TRUNCATE t1;
-- echo ### b) user var
INSERT INTO t1 VALUES (@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative,
@negative);
-- echo #########################################
-- echo #### [ on master ]
-- query_vertical SELECT * FROM t1
-- sync_slave_with_master
-- echo #### [ on slave ]
-- query_vertical SELECT * FROM t1
-- echo #########################################
-- connection master
-- echo ## assertion: master and slave tables are in sync
-- let $diff_table_1=master:test.t1
-- let $diff_table_2=slave:test.t1
-- source include/diff_tables.inc
-- connection master
TRUNCATE t1;
-- echo ## check: contents of both tables master's and slave's
-- enable_warnings
## cleanup
-- connection master
DROP TABLE t1;
-- sync_slave_with_master
......@@ -64,8 +64,15 @@ stop slave IO_THREAD;
source include/wait_for_slave_io_to_stop.inc;
let $file= query_get_value("SHOW SLAVE STATUS", Relay_Log_File, 1);
--replace_result $MYSQLD_SLAVE_DATADIR MYSQLD_SLAVE_DATADIR
--exec echo "failure" > $MYSQLD_SLAVE_DATADIR/$file
--let FILE_TO_CORRUPT= $MYSQLD_SLAVE_DATADIR/$file
perl;
$file= $ENV{'FILE_TO_CORRUPT'};
open(FILE, ">$file") || die "Unable to open $file.";
truncate(FILE,0);
print FILE "failure";
close ($file);
EOF
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
SET SESSION debug="d,crash_before_rotate_relaylog";
......@@ -102,9 +109,6 @@ insert into t1(a) values(8);
insert into t1(a) values(9);
connection slave;
--replace_result $MYSQLD_SLAVE_DATADIR MYSQLD_SLAVE_DATADIR
--exec cat $MYSQLD_SLAVE_DATADIR/master.backup > $MYSQLD_SLAVE_DATADIR/master.info
let MYSQLD_SLAVE_DATADIR=`select @@datadir`;
--perl
......
......@@ -10,4 +10,5 @@ source include/have_binlog_format_row.inc;
LET $ENGINE_TYPE= MyISAM;
source extra/rpl_tests/rpl_tmp_table_and_DDL.test;
sync_slave_with_master;
......@@ -524,7 +524,7 @@ id hex(b1) vc bc d f total y t
--- Check Update on slave ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Remove a record from t1 on master ---
DELETE FROM t1 WHERE id = 42;
--- Show current count on master for t1 ---
......
......@@ -100,19 +100,19 @@ INSERT DELAYED INTO t1 VALUES('21');
INSERT DELAYED INTO t1 VALUES('22');|
** Connection con0 **
Asynchronous execute
SELECT COUNT(*) = 22 FROM t1;
SELECT COUNT(*) BETWEEN 6 AND 22 FROM t1;
** Connection default **
** Wait till con0 is blocked **
UNLOCK TABLES;
** Connection con1 **
** Connection con0 **
Asynchronous "reap" result
COUNT(*) = 22
COUNT(*) BETWEEN 6 AND 22
1
** Connection default**
Checking if the delayed insert gives the same result afterwards
SELECT COUNT(*) = 22 FROM t1;
COUNT(*) = 22
SELECT COUNT(*) BETWEEN 6 AND 22 FROM t1;
COUNT(*) BETWEEN 6 AND 22
1
** Connection default**
DROP TABLE t1;
......
SET @start_global_value = @@global.innodb_adaptive_flushing;
SELECT @start_global_value;
@start_global_value
1
Valid values are 'ON' and 'OFF'
select @@global.innodb_adaptive_flushing in (0, 1);
@@global.innodb_adaptive_flushing in (0, 1)
1
select @@global.innodb_adaptive_flushing;
@@global.innodb_adaptive_flushing
1
select @@session.innodb_adaptive_flushing;
ERROR HY000: Variable 'innodb_adaptive_flushing' is a GLOBAL variable
show global variables like 'innodb_adaptive_flushing';
Variable_name Value
innodb_adaptive_flushing ON
show session variables like 'innodb_adaptive_flushing';
Variable_name Value
innodb_adaptive_flushing ON
select * from information_schema.global_variables where variable_name='innodb_adaptive_flushing';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_FLUSHING ON
select * from information_schema.session_variables where variable_name='innodb_adaptive_flushing';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_FLUSHING ON
set global innodb_adaptive_flushing='OFF';
select @@global.innodb_adaptive_flushing;
@@global.innodb_adaptive_flushing
0
select * from information_schema.global_variables where variable_name='innodb_adaptive_flushing';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_FLUSHING OFF
select * from information_schema.session_variables where variable_name='innodb_adaptive_flushing';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_FLUSHING OFF
set @@global.innodb_adaptive_flushing=1;
select @@global.innodb_adaptive_flushing;
@@global.innodb_adaptive_flushing
1
select * from information_schema.global_variables where variable_name='innodb_adaptive_flushing';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_FLUSHING ON
select * from information_schema.session_variables where variable_name='innodb_adaptive_flushing';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_FLUSHING ON
set global innodb_adaptive_flushing=0;
select @@global.innodb_adaptive_flushing;
@@global.innodb_adaptive_flushing
0
select * from information_schema.global_variables where variable_name='innodb_adaptive_flushing';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_FLUSHING OFF
select * from information_schema.session_variables where variable_name='innodb_adaptive_flushing';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_FLUSHING OFF
set @@global.innodb_adaptive_flushing='ON';
select @@global.innodb_adaptive_flushing;
@@global.innodb_adaptive_flushing
1
select * from information_schema.global_variables where variable_name='innodb_adaptive_flushing';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_FLUSHING ON
select * from information_schema.session_variables where variable_name='innodb_adaptive_flushing';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_FLUSHING ON
set session innodb_adaptive_flushing='OFF';
ERROR HY000: Variable 'innodb_adaptive_flushing' is a GLOBAL variable and should be set with SET GLOBAL
set @@session.innodb_adaptive_flushing='ON';
ERROR HY000: Variable 'innodb_adaptive_flushing' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_adaptive_flushing=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_adaptive_flushing'
set global innodb_adaptive_flushing=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_adaptive_flushing'
set global innodb_adaptive_flushing=2;
ERROR 42000: Variable 'innodb_adaptive_flushing' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_adaptive_flushing=-3;
select @@global.innodb_adaptive_flushing;
@@global.innodb_adaptive_flushing
1
select * from information_schema.global_variables where variable_name='innodb_adaptive_flushing';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_FLUSHING ON
select * from information_schema.session_variables where variable_name='innodb_adaptive_flushing';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_FLUSHING ON
set global innodb_adaptive_flushing='AUTO';
ERROR 42000: Variable 'innodb_adaptive_flushing' can't be set to the value of 'AUTO'
SET @@global.innodb_adaptive_flushing = @start_global_value;
SELECT @@global.innodb_adaptive_flushing;
@@global.innodb_adaptive_flushing
1
SET @start_global_value = @@global.innodb_adaptive_hash_index;
SELECT @start_global_value;
@start_global_value
1
Valid values are 'ON' and 'OFF'
select @@global.innodb_adaptive_hash_index in (0, 1);
@@global.innodb_adaptive_hash_index in (0, 1)
1
select @@global.innodb_adaptive_hash_index;
@@global.innodb_adaptive_hash_index
1
select @@session.innodb_adaptive_hash_index;
ERROR HY000: Variable 'innodb_adaptive_hash_index' is a GLOBAL variable
show global variables like 'innodb_adaptive_hash_index';
Variable_name Value
innodb_adaptive_hash_index ON
show session variables like 'innodb_adaptive_hash_index';
Variable_name Value
innodb_adaptive_hash_index ON
select * from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_HASH_INDEX ON
select * from information_schema.session_variables where variable_name='innodb_adaptive_hash_index';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_HASH_INDEX ON
set global innodb_adaptive_hash_index='OFF';
select @@global.innodb_adaptive_hash_index;
@@global.innodb_adaptive_hash_index
0
select * from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_HASH_INDEX OFF
select * from information_schema.session_variables where variable_name='innodb_adaptive_hash_index';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_HASH_INDEX OFF
set @@global.innodb_adaptive_hash_index=1;
select @@global.innodb_adaptive_hash_index;
@@global.innodb_adaptive_hash_index
1
select * from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_HASH_INDEX ON
select * from information_schema.session_variables where variable_name='innodb_adaptive_hash_index';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_HASH_INDEX ON
set global innodb_adaptive_hash_index=0;
select @@global.innodb_adaptive_hash_index;
@@global.innodb_adaptive_hash_index
0
select * from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_HASH_INDEX OFF
select * from information_schema.session_variables where variable_name='innodb_adaptive_hash_index';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_HASH_INDEX OFF
set @@global.innodb_adaptive_hash_index='ON';
select @@global.innodb_adaptive_hash_index;
@@global.innodb_adaptive_hash_index
1
select * from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_HASH_INDEX ON
select * from information_schema.session_variables where variable_name='innodb_adaptive_hash_index';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_HASH_INDEX ON
set session innodb_adaptive_hash_index='OFF';
ERROR HY000: Variable 'innodb_adaptive_hash_index' is a GLOBAL variable and should be set with SET GLOBAL
set @@session.innodb_adaptive_hash_index='ON';
ERROR HY000: Variable 'innodb_adaptive_hash_index' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_adaptive_hash_index=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_adaptive_hash_index'
set global innodb_adaptive_hash_index=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_adaptive_hash_index'
set global innodb_adaptive_hash_index=2;
ERROR 42000: Variable 'innodb_adaptive_hash_index' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_adaptive_hash_index=-3;
select @@global.innodb_adaptive_hash_index;
@@global.innodb_adaptive_hash_index
1
select * from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_HASH_INDEX ON
select * from information_schema.session_variables where variable_name='innodb_adaptive_hash_index';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ADAPTIVE_HASH_INDEX ON
set global innodb_adaptive_hash_index='AUTO';
ERROR 42000: Variable 'innodb_adaptive_hash_index' can't be set to the value of 'AUTO'
SET @@global.innodb_adaptive_hash_index = @start_global_value;
SELECT @@global.innodb_adaptive_hash_index;
@@global.innodb_adaptive_hash_index
1
SET @start_global_value = @@global.innodb_change_buffering;
SELECT @start_global_value;
@start_global_value
inserts
Valid values are 'inserts' and 'none'
select @@global.innodb_change_buffering in ('inserts', 'none');
@@global.innodb_change_buffering in ('inserts', 'none')
1
select @@global.innodb_change_buffering;
@@global.innodb_change_buffering
inserts
select @@session.innodb_change_buffering;
ERROR HY000: Variable 'innodb_change_buffering' is a GLOBAL variable
show global variables like 'innodb_change_buffering';
Variable_name Value
innodb_change_buffering inserts
show session variables like 'innodb_change_buffering';
Variable_name Value
innodb_change_buffering inserts
select * from information_schema.global_variables where variable_name='innodb_change_buffering';
VARIABLE_NAME VARIABLE_VALUE
INNODB_CHANGE_BUFFERING inserts
select * from information_schema.session_variables where variable_name='innodb_change_buffering';
VARIABLE_NAME VARIABLE_VALUE
INNODB_CHANGE_BUFFERING inserts
set global innodb_change_buffering='none';
select @@global.innodb_change_buffering;
@@global.innodb_change_buffering
none
select * from information_schema.global_variables where variable_name='innodb_change_buffering';
VARIABLE_NAME VARIABLE_VALUE
INNODB_CHANGE_BUFFERING none
select * from information_schema.session_variables where variable_name='innodb_change_buffering';
VARIABLE_NAME VARIABLE_VALUE
INNODB_CHANGE_BUFFERING none
set @@global.innodb_change_buffering='inserts';
select @@global.innodb_change_buffering;
@@global.innodb_change_buffering
inserts
select * from information_schema.global_variables where variable_name='innodb_change_buffering';
VARIABLE_NAME VARIABLE_VALUE
INNODB_CHANGE_BUFFERING inserts
select * from information_schema.session_variables where variable_name='innodb_change_buffering';
VARIABLE_NAME VARIABLE_VALUE
INNODB_CHANGE_BUFFERING inserts
set session innodb_change_buffering='some';
ERROR HY000: Variable 'innodb_change_buffering' is a GLOBAL variable and should be set with SET GLOBAL
set @@session.innodb_change_buffering='some';
ERROR HY000: Variable 'innodb_change_buffering' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_change_buffering=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering'
set global innodb_change_buffering=1;
ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering'
set global innodb_change_buffering=-2;
ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering'
set global innodb_change_buffering=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering'
set global innodb_change_buffering='some';
ERROR 42000: Variable 'innodb_change_buffering' can't be set to the value of 'some'
SET @@global.innodb_change_buffering = @start_global_value;
SELECT @@global.innodb_change_buffering;
@@global.innodb_change_buffering
inserts
SET @start_global_value = @@global.innodb_file_format;
SELECT @start_global_value;
@start_global_value
Antelope
Valid values are 'Antelope' and 'Barracuda'
select @@global.innodb_file_format in ('Antelope', 'Barracuda');
@@global.innodb_file_format in ('Antelope', 'Barracuda')
1
select @@global.innodb_file_format;
@@global.innodb_file_format
Antelope
select @@session.innodb_file_format;
ERROR HY000: Variable 'innodb_file_format' is a GLOBAL variable
show global variables like 'innodb_file_format';
Variable_name Value
innodb_file_format Antelope
show session variables like 'innodb_file_format';
Variable_name Value
innodb_file_format Antelope
select * from information_schema.global_variables where variable_name='innodb_file_format';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT Antelope
select * from information_schema.session_variables where variable_name='innodb_file_format';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT Antelope
set global innodb_file_format='Antelope';
select @@global.innodb_file_format;
@@global.innodb_file_format
Antelope
select * from information_schema.global_variables where variable_name='innodb_file_format';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT Antelope
select * from information_schema.session_variables where variable_name='innodb_file_format';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT Antelope
set @@global.innodb_file_format='Barracuda';
select @@global.innodb_file_format;
@@global.innodb_file_format
Barracuda
select * from information_schema.global_variables where variable_name='innodb_file_format';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT Barracuda
select * from information_schema.session_variables where variable_name='innodb_file_format';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT Barracuda
set session innodb_file_format='Salmon';
ERROR HY000: Variable 'innodb_file_format' is a GLOBAL variable and should be set with SET GLOBAL
set @@session.innodb_file_format='Salmon';
ERROR HY000: Variable 'innodb_file_format' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_file_format=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_file_format'
set global innodb_file_format=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_file_format'
set global innodb_file_format='Salmon';
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'Salmon'
SET @@global.innodb_file_format = @start_global_value;
SELECT @@global.innodb_file_format;
@@global.innodb_file_format
Antelope
SET @start_global_value = @@global.innodb_file_format_check;
SELECT @start_global_value;
@start_global_value
Antelope
Valid values are 'Antelope' and 'Barracuda'
select @@global.innodb_file_format_check in ('Antelope', 'Barracuda');
@@global.innodb_file_format_check in ('Antelope', 'Barracuda')
1
select @@global.innodb_file_format_check;
@@global.innodb_file_format_check
Antelope
select @@session.innodb_file_format_check;
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable
show global variables like 'innodb_file_format_check';
Variable_name Value
innodb_file_format_check Antelope
show session variables like 'innodb_file_format_check';
Variable_name Value
innodb_file_format_check Antelope
select * from information_schema.global_variables where variable_name='innodb_file_format_check';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT_CHECK Antelope
select * from information_schema.session_variables where variable_name='innodb_file_format_check';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT_CHECK Antelope
set global innodb_file_format_check='Antelope';
select @@global.innodb_file_format_check;
@@global.innodb_file_format_check
Antelope
select * from information_schema.global_variables where variable_name='innodb_file_format_check';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT_CHECK Antelope
select * from information_schema.session_variables where variable_name='innodb_file_format_check';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT_CHECK Antelope
set @@global.innodb_file_format_check='Barracuda';
select @@global.innodb_file_format_check;
@@global.innodb_file_format_check
Barracuda
select * from information_schema.global_variables where variable_name='innodb_file_format_check';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT_CHECK Barracuda
select * from information_schema.session_variables where variable_name='innodb_file_format_check';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT_CHECK Barracuda
set session innodb_file_format_check='Salmon';
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable and should be set with SET GLOBAL
set @@session.innodb_file_format_check='Salmon';
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_file_format_check=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_file_format_check'
set global innodb_file_format_check=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_file_format_check'
set global innodb_file_format_check='Salmon';
ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'Salmon'
SET @@global.innodb_file_format_check = @start_global_value;
SELECT @@global.innodb_file_format_check;
@@global.innodb_file_format_check
Antelope
SET @start_global_value = @@global.innodb_io_capacity;
SELECT @start_global_value;
@start_global_value
200
Valid value 100 or more
select @@global.innodb_io_capacity > 99;
@@global.innodb_io_capacity > 99
1
select @@global.innodb_io_capacity;
@@global.innodb_io_capacity
200
select @@session.innodb_io_capacity;
ERROR HY000: Variable 'innodb_io_capacity' is a GLOBAL variable
show global variables like 'innodb_io_capacity';
Variable_name Value
innodb_io_capacity 200
show session variables like 'innodb_io_capacity';
Variable_name Value
innodb_io_capacity 200
select * from information_schema.global_variables where variable_name='innodb_io_capacity';
VARIABLE_NAME VARIABLE_VALUE
INNODB_IO_CAPACITY 200
select * from information_schema.session_variables where variable_name='innodb_io_capacity';
VARIABLE_NAME VARIABLE_VALUE
INNODB_IO_CAPACITY 200
set global innodb_io_capacity=123;
select @@global.innodb_io_capacity;
@@global.innodb_io_capacity
123
select * from information_schema.global_variables where variable_name='innodb_io_capacity';
VARIABLE_NAME VARIABLE_VALUE
INNODB_IO_CAPACITY 123
select * from information_schema.session_variables where variable_name='innodb_io_capacity';
VARIABLE_NAME VARIABLE_VALUE
INNODB_IO_CAPACITY 123
set session innodb_io_capacity=444;
ERROR HY000: Variable 'innodb_io_capacity' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_io_capacity=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_io_capacity'
set global innodb_io_capacity=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_io_capacity'
set global innodb_io_capacity="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_io_capacity'
set global innodb_io_capacity=7;
Warnings:
Warning 1292 Truncated incorrect innodb_io_capacity value: '7'
select @@global.innodb_io_capacity;
@@global.innodb_io_capacity
100
select * from information_schema.global_variables where variable_name='innodb_io_capacity';
VARIABLE_NAME VARIABLE_VALUE
INNODB_IO_CAPACITY 100
set global innodb_io_capacity=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_io_capacity value: '-7'
select @@global.innodb_io_capacity;
@@global.innodb_io_capacity
100
select * from information_schema.global_variables where variable_name='innodb_io_capacity';
VARIABLE_NAME VARIABLE_VALUE
INNODB_IO_CAPACITY 100
set global innodb_io_capacity=100;
select @@global.innodb_io_capacity;
@@global.innodb_io_capacity
100
SET @@global.innodb_io_capacity = @start_global_value;
SELECT @@global.innodb_io_capacity;
@@global.innodb_io_capacity
200
SET @start_global_value = @@global.innodb_old_blocks_pct;
SELECT @start_global_value;
@start_global_value
37
Valid values are between 5 and 95
select @@global.innodb_old_blocks_pct between 5 and 95;
@@global.innodb_old_blocks_pct between 5 and 95
1
select @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
37
select @@session.innodb_old_blocks_pct;
ERROR HY000: Variable 'innodb_old_blocks_pct' is a GLOBAL variable
show global variables like 'innodb_old_blocks_pct';
Variable_name Value
innodb_old_blocks_pct 37
show session variables like 'innodb_old_blocks_pct';
Variable_name Value
innodb_old_blocks_pct 37
select * from information_schema.global_variables where variable_name='innodb_old_blocks_pct';
VARIABLE_NAME VARIABLE_VALUE
INNODB_OLD_BLOCKS_PCT 37
select * from information_schema.session_variables where variable_name='innodb_old_blocks_pct';
VARIABLE_NAME VARIABLE_VALUE
INNODB_OLD_BLOCKS_PCT 37
set global innodb_old_blocks_pct=10;
select @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
10
select * from information_schema.global_variables where variable_name='innodb_old_blocks_pct';
VARIABLE_NAME VARIABLE_VALUE
INNODB_OLD_BLOCKS_PCT 10
select * from information_schema.session_variables where variable_name='innodb_old_blocks_pct';
VARIABLE_NAME VARIABLE_VALUE
INNODB_OLD_BLOCKS_PCT 10
set session innodb_old_blocks_pct=1;
ERROR HY000: Variable 'innodb_old_blocks_pct' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_old_blocks_pct=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_old_blocks_pct'
set global innodb_old_blocks_pct=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_old_blocks_pct'
set global innodb_old_blocks_pct="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_old_blocks_pct'
set global innodb_old_blocks_pct=4;
Warnings:
Warning 1292 Truncated incorrect innodb_old_blocks_pct value: '4'
select @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
5
select * from information_schema.global_variables where variable_name='innodb_old_blocks_pct';
VARIABLE_NAME VARIABLE_VALUE
INNODB_OLD_BLOCKS_PCT 5
set global innodb_old_blocks_pct=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_old_blocks_pct value: '-7'
select @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
5
select * from information_schema.global_variables where variable_name='innodb_old_blocks_pct';
VARIABLE_NAME VARIABLE_VALUE
INNODB_OLD_BLOCKS_PCT 5
set global innodb_old_blocks_pct=96;
Warnings:
Warning 1292 Truncated incorrect innodb_old_blocks_pct value: '96'
select @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
95
select * from information_schema.global_variables where variable_name='innodb_old_blocks_pct';
VARIABLE_NAME VARIABLE_VALUE
INNODB_OLD_BLOCKS_PCT 95
set global innodb_old_blocks_pct=5;
select @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
5
set global innodb_old_blocks_pct=95;
select @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
95
SET @@global.innodb_old_blocks_pct = @start_global_value;
SELECT @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
37
SET @start_global_value = @@global.innodb_old_blocks_time;
SELECT @start_global_value;
@start_global_value
0
Valid values are zero or above
select @@global.innodb_old_blocks_time >=0;
@@global.innodb_old_blocks_time >=0
1
select @@global.innodb_old_blocks_time;
@@global.innodb_old_blocks_time
0
select @@session.innodb_old_blocks_time;
ERROR HY000: Variable 'innodb_old_blocks_time' is a GLOBAL variable
show global variables like 'innodb_old_blocks_time';
Variable_name Value
innodb_old_blocks_time 0
show session variables like 'innodb_old_blocks_time';
Variable_name Value
innodb_old_blocks_time 0
select * from information_schema.global_variables where variable_name='innodb_old_blocks_time';
VARIABLE_NAME VARIABLE_VALUE
INNODB_OLD_BLOCKS_TIME 0
select * from information_schema.session_variables where variable_name='innodb_old_blocks_time';
VARIABLE_NAME VARIABLE_VALUE
INNODB_OLD_BLOCKS_TIME 0
set global innodb_old_blocks_time=10;
select @@global.innodb_old_blocks_time;
@@global.innodb_old_blocks_time
10
select * from information_schema.global_variables where variable_name='innodb_old_blocks_time';
VARIABLE_NAME VARIABLE_VALUE
INNODB_OLD_BLOCKS_TIME 10
select * from information_schema.session_variables where variable_name='innodb_old_blocks_time';
VARIABLE_NAME VARIABLE_VALUE
INNODB_OLD_BLOCKS_TIME 10
set session innodb_old_blocks_time=1;
ERROR HY000: Variable 'innodb_old_blocks_time' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_old_blocks_time=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_old_blocks_time'
set global innodb_old_blocks_time=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_old_blocks_time'
set global innodb_old_blocks_time="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_old_blocks_time'
set global innodb_old_blocks_time=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_old_blocks_time value: '-7'
select @@global.innodb_old_blocks_time;
@@global.innodb_old_blocks_time
0
select * from information_schema.global_variables where variable_name='innodb_old_blocks_time';
VARIABLE_NAME VARIABLE_VALUE
INNODB_OLD_BLOCKS_TIME 0
SET @@global.innodb_old_blocks_time = @start_global_value;
SELECT @@global.innodb_old_blocks_time;
@@global.innodb_old_blocks_time
0
SET @start_global_value = @@global.innodb_read_ahead_threshold;
SELECT @start_global_value;
@start_global_value
56
Valid values are between 0 and 64
select @@global.innodb_read_ahead_threshold between 0 and 64;
@@global.innodb_read_ahead_threshold between 0 and 64
1
select @@global.innodb_read_ahead_threshold;
@@global.innodb_read_ahead_threshold
56
select @@session.innodb_read_ahead_threshold;
ERROR HY000: Variable 'innodb_read_ahead_threshold' is a GLOBAL variable
show global variables like 'innodb_read_ahead_threshold';
Variable_name Value
innodb_read_ahead_threshold 56
show session variables like 'innodb_read_ahead_threshold';
Variable_name Value
innodb_read_ahead_threshold 56
select * from information_schema.global_variables where variable_name='innodb_read_ahead_threshold';
VARIABLE_NAME VARIABLE_VALUE
INNODB_READ_AHEAD_THRESHOLD 56
select * from information_schema.session_variables where variable_name='innodb_read_ahead_threshold';
VARIABLE_NAME VARIABLE_VALUE
INNODB_READ_AHEAD_THRESHOLD 56
set global innodb_read_ahead_threshold=10;
select @@global.innodb_read_ahead_threshold;
@@global.innodb_read_ahead_threshold
10
select * from information_schema.global_variables where variable_name='innodb_read_ahead_threshold';
VARIABLE_NAME VARIABLE_VALUE
INNODB_READ_AHEAD_THRESHOLD 10
select * from information_schema.session_variables where variable_name='innodb_read_ahead_threshold';
VARIABLE_NAME VARIABLE_VALUE
INNODB_READ_AHEAD_THRESHOLD 10
set session innodb_read_ahead_threshold=1;
ERROR HY000: Variable 'innodb_read_ahead_threshold' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_read_ahead_threshold=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_read_ahead_threshold'
set global innodb_read_ahead_threshold=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_read_ahead_threshold'
set global innodb_read_ahead_threshold="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_read_ahead_threshold'
set global innodb_read_ahead_threshold=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_read_ahead_threshold value: '-7'
select @@global.innodb_read_ahead_threshold;
@@global.innodb_read_ahead_threshold
0
select * from information_schema.global_variables where variable_name='innodb_read_ahead_threshold';
VARIABLE_NAME VARIABLE_VALUE
INNODB_READ_AHEAD_THRESHOLD 0
set global innodb_read_ahead_threshold=96;
Warnings:
Warning 1292 Truncated incorrect innodb_read_ahead_threshold value: '96'
select @@global.innodb_read_ahead_threshold;
@@global.innodb_read_ahead_threshold
64
select * from information_schema.global_variables where variable_name='innodb_read_ahead_threshold';
VARIABLE_NAME VARIABLE_VALUE
INNODB_READ_AHEAD_THRESHOLD 64
set global innodb_read_ahead_threshold=0;
select @@global.innodb_read_ahead_threshold;
@@global.innodb_read_ahead_threshold
0
set global innodb_read_ahead_threshold=64;
select @@global.innodb_read_ahead_threshold;
@@global.innodb_read_ahead_threshold
64
SET @@global.innodb_read_ahead_threshold = @start_global_value;
SELECT @@global.innodb_read_ahead_threshold;
@@global.innodb_read_ahead_threshold
56
select @@global.innodb_read_io_threads;
@@global.innodb_read_io_threads
2
select @@session.innodb_read_io_threads;
ERROR HY000: Variable 'innodb_read_io_threads' is a GLOBAL variable
show global variables like 'innodb_read_io_threads';
Variable_name Value
innodb_read_io_threads 2
show session variables like 'innodb_read_io_threads';
Variable_name Value
innodb_read_io_threads 2
select * from information_schema.global_variables where variable_name='innodb_read_io_threads';
VARIABLE_NAME VARIABLE_VALUE
INNODB_READ_IO_THREADS 2
select * from information_schema.session_variables where variable_name='innodb_read_io_threads';
VARIABLE_NAME VARIABLE_VALUE
INNODB_READ_IO_THREADS 2
set global innodb_read_io_threads=1;
ERROR HY000: Variable 'innodb_read_io_threads' is a read only variable
set session innodb_read_io_threads=1;
ERROR HY000: Variable 'innodb_read_io_threads' is a read only variable
SET @start_global_value = @@global.innodb_replication_delay;
SELECT @start_global_value;
@start_global_value
0
Valid values are zero or above
select @@global.innodb_replication_delay >=0;
@@global.innodb_replication_delay >=0
1
select @@global.innodb_replication_delay;
@@global.innodb_replication_delay
0
select @@session.innodb_replication_delay;
ERROR HY000: Variable 'innodb_replication_delay' is a GLOBAL variable
show global variables like 'innodb_replication_delay';
Variable_name Value
innodb_replication_delay 0
show session variables like 'innodb_replication_delay';
Variable_name Value
innodb_replication_delay 0
select * from information_schema.global_variables where variable_name='innodb_replication_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_REPLICATION_DELAY 0
select * from information_schema.session_variables where variable_name='innodb_replication_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_REPLICATION_DELAY 0
set global innodb_replication_delay=10;
select @@global.innodb_replication_delay;
@@global.innodb_replication_delay
10
select * from information_schema.global_variables where variable_name='innodb_replication_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_REPLICATION_DELAY 10
select * from information_schema.session_variables where variable_name='innodb_replication_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_REPLICATION_DELAY 10
set session innodb_replication_delay=1;
ERROR HY000: Variable 'innodb_replication_delay' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_replication_delay=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_replication_delay'
set global innodb_replication_delay=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_replication_delay'
set global innodb_replication_delay="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_replication_delay'
set global innodb_replication_delay=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_replication_delay value: '-7'
select @@global.innodb_replication_delay;
@@global.innodb_replication_delay
0
select * from information_schema.global_variables where variable_name='innodb_replication_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_REPLICATION_DELAY 0
SET @@global.innodb_replication_delay = @start_global_value;
SELECT @@global.innodb_replication_delay;
@@global.innodb_replication_delay
0
SET @start_global_value = @@global.innodb_spin_wait_delay;
SELECT @start_global_value;
@start_global_value
6
Valid values are zero or above
select @@global.innodb_spin_wait_delay >=0;
@@global.innodb_spin_wait_delay >=0
1
select @@global.innodb_spin_wait_delay;
@@global.innodb_spin_wait_delay
6
select @@session.innodb_spin_wait_delay;
ERROR HY000: Variable 'innodb_spin_wait_delay' is a GLOBAL variable
show global variables like 'innodb_spin_wait_delay';
Variable_name Value
innodb_spin_wait_delay 6
show session variables like 'innodb_spin_wait_delay';
Variable_name Value
innodb_spin_wait_delay 6
select * from information_schema.global_variables where variable_name='innodb_spin_wait_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_SPIN_WAIT_DELAY 6
select * from information_schema.session_variables where variable_name='innodb_spin_wait_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_SPIN_WAIT_DELAY 6
set global innodb_spin_wait_delay=10;
select @@global.innodb_spin_wait_delay;
@@global.innodb_spin_wait_delay
10
select * from information_schema.global_variables where variable_name='innodb_spin_wait_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_SPIN_WAIT_DELAY 10
select * from information_schema.session_variables where variable_name='innodb_spin_wait_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_SPIN_WAIT_DELAY 10
set session innodb_spin_wait_delay=1;
ERROR HY000: Variable 'innodb_spin_wait_delay' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_spin_wait_delay=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_spin_wait_delay'
set global innodb_spin_wait_delay=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_spin_wait_delay'
set global innodb_spin_wait_delay="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_spin_wait_delay'
set global innodb_spin_wait_delay=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_spin_wait_delay value: '-7'
select @@global.innodb_spin_wait_delay;
@@global.innodb_spin_wait_delay
0
select * from information_schema.global_variables where variable_name='innodb_spin_wait_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_SPIN_WAIT_DELAY 0
SET @@global.innodb_spin_wait_delay = @start_global_value;
SELECT @@global.innodb_spin_wait_delay;
@@global.innodb_spin_wait_delay
6
SET @start_global_value = @@global.innodb_stats_on_metadata;
SELECT @start_global_value;
@start_global_value
1
Valid values are 'ON' and 'OFF'
select @@global.innodb_stats_on_metadata in (0, 1);
@@global.innodb_stats_on_metadata in (0, 1)
1
select @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata
1
select @@session.innodb_stats_on_metadata;
ERROR HY000: Variable 'innodb_stats_on_metadata' is a GLOBAL variable
show global variables like 'innodb_stats_on_metadata';
Variable_name Value
innodb_stats_on_metadata ON
show session variables like 'innodb_stats_on_metadata';
Variable_name Value
innodb_stats_on_metadata ON
select * from information_schema.global_variables where variable_name='innodb_stats_on_metadata';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_ON_METADATA ON
select * from information_schema.session_variables where variable_name='innodb_stats_on_metadata';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_ON_METADATA ON
set global innodb_stats_on_metadata='OFF';
select @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata
0
select * from information_schema.global_variables where variable_name='innodb_stats_on_metadata';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_ON_METADATA OFF
select * from information_schema.session_variables where variable_name='innodb_stats_on_metadata';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_ON_METADATA OFF
set @@global.innodb_stats_on_metadata=1;
select @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata
1
select * from information_schema.global_variables where variable_name='innodb_stats_on_metadata';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_ON_METADATA ON
select * from information_schema.session_variables where variable_name='innodb_stats_on_metadata';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_ON_METADATA ON
set global innodb_stats_on_metadata=0;
select @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata
0
select * from information_schema.global_variables where variable_name='innodb_stats_on_metadata';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_ON_METADATA OFF
select * from information_schema.session_variables where variable_name='innodb_stats_on_metadata';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_ON_METADATA OFF
set @@global.innodb_stats_on_metadata='ON';
select @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata
1
select * from information_schema.global_variables where variable_name='innodb_stats_on_metadata';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_ON_METADATA ON
select * from information_schema.session_variables where variable_name='innodb_stats_on_metadata';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_ON_METADATA ON
set session innodb_stats_on_metadata='OFF';
ERROR HY000: Variable 'innodb_stats_on_metadata' is a GLOBAL variable and should be set with SET GLOBAL
set @@session.innodb_stats_on_metadata='ON';
ERROR HY000: Variable 'innodb_stats_on_metadata' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_stats_on_metadata=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_stats_on_metadata'
set global innodb_stats_on_metadata=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_stats_on_metadata'
set global innodb_stats_on_metadata=2;
ERROR 42000: Variable 'innodb_stats_on_metadata' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_stats_on_metadata=-3;
select @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata
1
select * from information_schema.global_variables where variable_name='innodb_stats_on_metadata';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_ON_METADATA ON
select * from information_schema.session_variables where variable_name='innodb_stats_on_metadata';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_ON_METADATA ON
set global innodb_stats_on_metadata='AUTO';
ERROR 42000: Variable 'innodb_stats_on_metadata' can't be set to the value of 'AUTO'
SET @@global.innodb_stats_on_metadata = @start_global_value;
SELECT @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata
1
SET @start_global_value = @@global.innodb_stats_sample_pages;
SELECT @start_global_value;
@start_global_value
8
Valid values are one or above
select @@global.innodb_stats_sample_pages >=1;
@@global.innodb_stats_sample_pages >=1
1
select @@global.innodb_stats_sample_pages;
@@global.innodb_stats_sample_pages
8
select @@session.innodb_stats_sample_pages;
ERROR HY000: Variable 'innodb_stats_sample_pages' is a GLOBAL variable
show global variables like 'innodb_stats_sample_pages';
Variable_name Value
innodb_stats_sample_pages 8
show session variables like 'innodb_stats_sample_pages';
Variable_name Value
innodb_stats_sample_pages 8
select * from information_schema.global_variables where variable_name='innodb_stats_sample_pages';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_SAMPLE_PAGES 8
select * from information_schema.session_variables where variable_name='innodb_stats_sample_pages';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_SAMPLE_PAGES 8
set global innodb_stats_sample_pages=10;
select @@global.innodb_stats_sample_pages;
@@global.innodb_stats_sample_pages
10
select * from information_schema.global_variables where variable_name='innodb_stats_sample_pages';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_SAMPLE_PAGES 10
select * from information_schema.session_variables where variable_name='innodb_stats_sample_pages';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_SAMPLE_PAGES 10
set session innodb_stats_sample_pages=1;
ERROR HY000: Variable 'innodb_stats_sample_pages' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_stats_sample_pages=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_stats_sample_pages'
set global innodb_stats_sample_pages=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_stats_sample_pages'
set global innodb_stats_sample_pages="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_stats_sample_pages'
set global innodb_stats_sample_pages=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_stats_sample_pages value: '-7'
select @@global.innodb_stats_sample_pages;
@@global.innodb_stats_sample_pages
1
select * from information_schema.global_variables where variable_name='innodb_stats_sample_pages';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_SAMPLE_PAGES 1
SET @@global.innodb_stats_sample_pages = @start_global_value;
SELECT @@global.innodb_stats_sample_pages;
@@global.innodb_stats_sample_pages
8
SET @start_global_value = @@global.innodb_strict_mode;
SELECT @start_global_value;
@start_global_value
0
Valid values are 'ON' and 'OFF'
select @@global.innodb_strict_mode in (0, 1);
@@global.innodb_strict_mode in (0, 1)
1
select @@global.innodb_strict_mode;
@@global.innodb_strict_mode
0
select @@session.innodb_strict_mode in (0, 1);
@@session.innodb_strict_mode in (0, 1)
1
select @@session.innodb_strict_mode;
@@session.innodb_strict_mode
0
show global variables like 'innodb_strict_mode';
Variable_name Value
innodb_strict_mode OFF
show session variables like 'innodb_strict_mode';
Variable_name Value
innodb_strict_mode OFF
select * from information_schema.global_variables where variable_name='innodb_strict_mode';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STRICT_MODE OFF
select * from information_schema.session_variables where variable_name='innodb_strict_mode';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STRICT_MODE OFF
set global innodb_strict_mode='OFF';
set session innodb_strict_mode='OFF';
select @@global.innodb_strict_mode;
@@global.innodb_strict_mode
0
select @@session.innodb_strict_mode;
@@session.innodb_strict_mode
0
select * from information_schema.global_variables where variable_name='innodb_strict_mode';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STRICT_MODE OFF
select * from information_schema.session_variables where variable_name='innodb_strict_mode';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STRICT_MODE OFF
set @@global.innodb_strict_mode=1;
set @@session.innodb_strict_mode=1;
select @@global.innodb_strict_mode;
@@global.innodb_strict_mode
1
select @@session.innodb_strict_mode;
@@session.innodb_strict_mode
1
select * from information_schema.global_variables where variable_name='innodb_strict_mode';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STRICT_MODE ON
select * from information_schema.session_variables where variable_name='innodb_strict_mode';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STRICT_MODE ON
set global innodb_strict_mode=0;
set session innodb_strict_mode=0;
select @@global.innodb_strict_mode;
@@global.innodb_strict_mode
0
select @@session.innodb_strict_mode;
@@session.innodb_strict_mode
0
select * from information_schema.global_variables where variable_name='innodb_strict_mode';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STRICT_MODE OFF
select * from information_schema.session_variables where variable_name='innodb_strict_mode';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STRICT_MODE OFF
set @@global.innodb_strict_mode='ON';
set @@session.innodb_strict_mode='ON';
select @@global.innodb_strict_mode;
@@global.innodb_strict_mode
1
select @@session.innodb_strict_mode;
@@session.innodb_strict_mode
1
select * from information_schema.global_variables where variable_name='innodb_strict_mode';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STRICT_MODE ON
select * from information_schema.session_variables where variable_name='innodb_strict_mode';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STRICT_MODE ON
set global innodb_strict_mode=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_strict_mode'
set session innodb_strict_mode=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_strict_mode'
set global innodb_strict_mode=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_strict_mode'
set session innodb_strict_mode=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_strict_mode'
set global innodb_strict_mode=2;
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of '2'
set session innodb_strict_mode=2;
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of '2'
set global innodb_strict_mode='AUTO';
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of 'AUTO'
set session innodb_strict_mode='AUTO';
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of 'AUTO'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_strict_mode=-3;
set session innodb_strict_mode=-7;
select @@global.innodb_strict_mode;
@@global.innodb_strict_mode
1
select @@session.innodb_strict_mode;
@@session.innodb_strict_mode
1
select * from information_schema.global_variables where variable_name='innodb_strict_mode';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STRICT_MODE ON
select * from information_schema.session_variables where variable_name='innodb_strict_mode';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STRICT_MODE ON
SET @@global.innodb_strict_mode = @start_global_value;
SELECT @@global.innodb_strict_mode;
@@global.innodb_strict_mode
0
SET @global_start_value = @@global.innodb_thread_sleep_delay;
SELECT @global_start_value;
@global_start_value
SET @start_global_value = @@global.innodb_thread_sleep_delay;
SELECT @start_global_value;
@start_global_value
10000
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_thread_sleep_delay = 0;
SET @@global.innodb_thread_sleep_delay = DEFAULT;
SELECT @@global.innodb_thread_sleep_delay;
Valid values are zero or above
select @@global.innodb_thread_sleep_delay >=0;
@@global.innodb_thread_sleep_delay >=0
1
select @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
10000
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_thread_sleep_delay = 1;
select @@session.innodb_thread_sleep_delay;
ERROR HY000: Variable 'innodb_thread_sleep_delay' is a GLOBAL variable
show global variables like 'innodb_thread_sleep_delay';
Variable_name Value
innodb_thread_sleep_delay 10000
show session variables like 'innodb_thread_sleep_delay';
Variable_name Value
innodb_thread_sleep_delay 10000
select * from information_schema.global_variables where variable_name='innodb_thread_sleep_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_THREAD_SLEEP_DELAY 10000
select * from information_schema.session_variables where variable_name='innodb_thread_sleep_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_THREAD_SLEEP_DELAY 10000
set global innodb_thread_sleep_delay=10;
select @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
10
select * from information_schema.global_variables where variable_name='innodb_thread_sleep_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_THREAD_SLEEP_DELAY 10
select * from information_schema.session_variables where variable_name='innodb_thread_sleep_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_THREAD_SLEEP_DELAY 10
set session innodb_thread_sleep_delay=1;
ERROR HY000: Variable 'innodb_thread_sleep_delay' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_thread_sleep_delay;
@@innodb_thread_sleep_delay
10000
SELECT local.innodb_thread_sleep_delay;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_thread_sleep_delay = 0;
SELECT @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
0
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_thread_sleep_delay = 0;
SELECT @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
0
SET @@global.innodb_thread_sleep_delay = 1;
SELECT @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
1
SET @@global.innodb_thread_sleep_delay = 4294967295;
SELECT @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
4294967295
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_thread_sleep_delay = -1;
SELECT @@global.innodb_autoextend_increment;
@@global.innodb_autoextend_increment
8
SET @@global.innodb_thread_sleep_delay = "T";
set global innodb_thread_sleep_delay=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_thread_sleep_delay'
SELECT @@global.innodb_autoextend_increment;
@@global.innodb_autoextend_increment
8
SET @@global.innodb_thread_sleep_delay = "Y";
set global innodb_thread_sleep_delay=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_thread_sleep_delay'
SELECT @@global.innodb_autoextend_increment;
@@global.innodb_autoextend_increment
8
SET @@global.innodb_thread_sleep_delay = 1001;
SELECT @@global.innodb_autoextend_increment;
@@global.innodb_autoextend_increment
8
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_thread_sleep_delay = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_thread_sleep_delay';
@@global.innodb_thread_sleep_delay = VARIABLE_VALUE
1
SELECT @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
1001
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_thread_sleep_delay';
VARIABLE_VALUE
1001
'#---------------------FN_DYNVARS_046_06-------------------------#'
SET @@global.innodb_thread_sleep_delay = OFF;
set global innodb_thread_sleep_delay="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_thread_sleep_delay'
SELECT @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
1001
SET @@global.innodb_thread_sleep_delay = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_thread_sleep_delay'
SELECT @@global.innodb_thread_sleep_delay;
set global innodb_thread_sleep_delay=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_thread_sleep_delay value: '-7'
select @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
1001
'#---------------------FN_DYNVARS_046_07----------------------#'
SET @@global.innodb_thread_sleep_delay = TRUE;
SELECT @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
1
SET @@global.innodb_thread_sleep_delay = FALSE;
0
select * from information_schema.global_variables where variable_name='innodb_thread_sleep_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_THREAD_SLEEP_DELAY 0
SET @@global.innodb_thread_sleep_delay = @start_global_value;
SELECT @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
0
10000
Valid values are 'ON' and 'OFF'
select @@global.innodb_adaptive_flushing in (0, 1);
@@global.innodb_adaptive_flushing in (0, 1)
1
select @@global.innodb_use_sys_malloc;
@@global.innodb_use_sys_malloc
1
select @@session.innodb_use_sys_malloc;
ERROR HY000: Variable 'innodb_use_sys_malloc' is a GLOBAL variable
show global variables like 'innodb_use_sys_malloc';
Variable_name Value
innodb_use_sys_malloc ON
show session variables like 'innodb_use_sys_malloc';
Variable_name Value
innodb_use_sys_malloc ON
select * from information_schema.global_variables where variable_name='innodb_use_sys_malloc';
VARIABLE_NAME VARIABLE_VALUE
INNODB_USE_SYS_MALLOC ON
select * from information_schema.session_variables where variable_name='innodb_use_sys_malloc';
VARIABLE_NAME VARIABLE_VALUE
INNODB_USE_SYS_MALLOC ON
set global innodb_use_sys_malloc=1;
ERROR HY000: Variable 'innodb_use_sys_malloc' is a read only variable
set session innodb_use_sys_malloc=1;
ERROR HY000: Variable 'innodb_use_sys_malloc' is a read only variable
select @@global.innodb_version;
@@global.innodb_version
x.y.z
select @@session.innodb_version;
ERROR HY000: Variable 'innodb_version' is a GLOBAL variable
show global variables like 'innodb_version' disabled so to not change with every version;
show session variables like 'innodb_version' disabled so to not change with every version;
select VARIABLE_VALUE=@@global.innodb_version from information_schema.global_variables where variable_name='innodb_version';
VARIABLE_VALUE=@@global.innodb_version
1
select VARIABLE_VALUE=@@global.innodb_version from information_schema.session_variables where variable_name='innodb_version';
VARIABLE_VALUE=@@global.innodb_version
1
set global innodb_version=1;
ERROR HY000: Variable 'innodb_version' is a read only variable
set session innodb_version=1;
ERROR HY000: Variable 'innodb_version' is a read only variable
select @@global.innodb_write_io_threads;
@@global.innodb_write_io_threads
2
select @@session.innodb_write_io_threads;
ERROR HY000: Variable 'innodb_write_io_threads' is a GLOBAL variable
show global variables like 'innodb_write_io_threads';
Variable_name Value
innodb_write_io_threads 2
show session variables like 'innodb_write_io_threads';
Variable_name Value
innodb_write_io_threads 2
select * from information_schema.global_variables where variable_name='innodb_write_io_threads';
VARIABLE_NAME VARIABLE_VALUE
INNODB_WRITE_IO_THREADS 2
select * from information_schema.session_variables where variable_name='innodb_write_io_threads';
VARIABLE_NAME VARIABLE_VALUE
INNODB_WRITE_IO_THREADS 2
set global innodb_write_io_threads=1;
ERROR HY000: Variable 'innodb_write_io_threads' is a read only variable
set session innodb_write_io_threads=1;
ERROR HY000: Variable 'innodb_write_io_threads' is a read only variable
......@@ -13,12 +13,24 @@ VARIABLE_NAME VARIABLE_VALUE
select * from information_schema.session_variables where variable_name='last_insert_id';
VARIABLE_NAME VARIABLE_VALUE
LAST_INSERT_ID 0
set session last_insert_id=1;
set global last_insert_id=99;
ERROR HY000: Variable 'last_insert_id' is a SESSION variable and can't be used with SET GLOBAL
set session last_insert_id=42;
select @@global.last_insert_id;
ERROR HY000: Variable 'last_insert_id' is a SESSION variable
select @@session.last_insert_id;
@@session.last_insert_id
1
set global last_insert_id=1;
ERROR HY000: Variable 'last_insert_id' is a SESSION variable and can't be used with SET GLOBAL
42
show global variables like 'last_insert_id';
Variable_name Value
show session variables like 'last_insert_id';
Variable_name Value
last_insert_id 42
select * from information_schema.global_variables where variable_name='last_insert_id';
VARIABLE_NAME VARIABLE_VALUE
select * from information_schema.session_variables where variable_name='last_insert_id';
VARIABLE_NAME VARIABLE_VALUE
LAST_INSERT_ID 42
set session last_insert_id=1.1;
ERROR 42000: Incorrect argument type to variable 'last_insert_id'
set session last_insert_id=1e1;
......
......@@ -29,13 +29,19 @@ select @@session.lc_messages;
@@session.lc_messages
ja_JP
set global lc_messages="en_US";
set session lc_messages="en_GB";
select @@global.lc_messages;
@@global.lc_messages
en_US
set session lc_messages="en_GB";
select @@session.lc_messages;
@@session.lc_messages
en_GB
select * from information_schema.global_variables where variable_name='lc_messages';
VARIABLE_NAME VARIABLE_VALUE
LC_MESSAGES en_US
select * from information_schema.session_variables where variable_name='lc_messages';
VARIABLE_NAME VARIABLE_VALUE
LC_MESSAGES en_GB
set global lc_messages=1.1;
ERROR 42000: Incorrect argument type to variable 'lc_messages'
set global lc_messages=1e1;
......
......@@ -65,12 +65,22 @@ Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed i
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
0
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='log_slow_queries';
IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1
SET @@global.log_slow_queries = 1;
Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
1
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='log_slow_queries';
IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_004_07----------------------#'
SET @@global.log_slow_queries = TRUE;
Warnings:
......@@ -78,12 +88,22 @@ Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed i
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
1
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='log_slow_queries';
IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1
SET @@global.log_slow_queries = FALSE;
Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
0
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='log_slow_queries';
IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_004_08----------------------#'
SET @@global.log_slow_queries = ON;
Warnings:
......
......@@ -3,18 +3,19 @@ select @@global.lower_case_file_system=2;
0
select @@session.lower_case_file_system;
ERROR HY000: Variable 'lower_case_file_system' is a GLOBAL variable
show global variables like 'lower_case_file_system';
Variable_name Value
lower_case_file_system #
show session variables like 'lower_case_file_system';
Variable_name Value
lower_case_file_system #
select * from information_schema.global_variables where variable_name='lower_case_file_system';
VARIABLE_NAME VARIABLE_VALUE
LOWER_CASE_FILE_SYSTEM #
select * from information_schema.session_variables where variable_name='lower_case_file_system';
VARIABLE_NAME VARIABLE_VALUE
LOWER_CASE_FILE_SYSTEM #
SELECT @@global.lower_case_file_system in (0,1);
@@global.lower_case_file_system in (0,1)
1
SELECT IF(@@global.lower_case_file_system, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='lower_case_file_system';
IF(@@global.lower_case_file_system, "ON", "OFF") = VARIABLE_VALUE
1
SELECT IF(@@global.lower_case_file_system, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='lower_case_file_system';
IF(@@global.lower_case_file_system, "ON", "OFF") = VARIABLE_VALUE
1
set global lower_case_file_system=1;
ERROR HY000: Variable 'lower_case_file_system' is a read only variable
set session lower_case_file_system=1;
......
......@@ -3,18 +3,19 @@ select @@global.lower_case_table_names=20;
0
select @@session.lower_case_table_names;
ERROR HY000: Variable 'lower_case_table_names' is a GLOBAL variable
show global variables like 'lower_case_table_names';
Variable_name Value
lower_case_table_names #
show session variables like 'lower_case_table_names';
Variable_name Value
lower_case_table_names #
select * from information_schema.global_variables where variable_name='lower_case_table_names';
VARIABLE_NAME VARIABLE_VALUE
LOWER_CASE_TABLE_NAMES #
select * from information_schema.session_variables where variable_name='lower_case_table_names';
VARIABLE_NAME VARIABLE_VALUE
LOWER_CASE_TABLE_NAMES #
SELECT @@global.lower_case_table_names in (0,1,2);
@@global.lower_case_table_names in (0,1,2)
1
SELECT @@global.lower_case_table_names = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='lower_case_table_names';
@@global.lower_case_table_names = VARIABLE_VALUE
1
SELECT @@global.lower_case_table_names = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='lower_case_table_names';
@@global.lower_case_table_names = VARIABLE_VALUE
1
set global lower_case_table_names=1;
ERROR HY000: Variable 'lower_case_table_names' is a read only variable
set session lower_case_table_names=1;
......
......@@ -21,13 +21,25 @@ select * from information_schema.session_variables where variable_name='max_join
VARIABLE_NAME VARIABLE_VALUE
MAX_JOIN_SIZE 18446744073709551615
set global max_join_size=10;
set session max_join_size=20;
select @@global.max_join_size;
@@global.max_join_size
10
set session max_join_size=20;
select @@session.max_join_size;
@@session.max_join_size
20
show global variables like 'max_join_size';
Variable_name Value
max_join_size 10
show session variables like 'max_join_size';
Variable_name Value
max_join_size 20
select * from information_schema.global_variables where variable_name='max_join_size';
VARIABLE_NAME VARIABLE_VALUE
MAX_JOIN_SIZE 10
select * from information_schema.session_variables where variable_name='max_join_size';
VARIABLE_NAME VARIABLE_VALUE
MAX_JOIN_SIZE 20
set global max_join_size=1.1;
ERROR 42000: Incorrect argument type to variable 'max_join_size'
set global max_join_size=1e1;
......
......@@ -21,13 +21,25 @@ select * from information_schema.session_variables where variable_name='old_alte
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE OFF
set global old_alter_table=1;
set session old_alter_table=ON;
select @@global.old_alter_table;
@@global.old_alter_table
1
set session old_alter_table=ON;
select @@session.old_alter_table;
@@session.old_alter_table
1
show global variables like 'old_alter_table';
Variable_name Value
old_alter_table ON
show session variables like 'old_alter_table';
Variable_name Value
old_alter_table ON
select * from information_schema.global_variables where variable_name='old_alter_table';
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE ON
select * from information_schema.session_variables where variable_name='old_alter_table';
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE ON
set global old_alter_table=1.1;
ERROR 42000: Incorrect argument type to variable 'old_alter_table'
set global old_alter_table=1e1;
......
......@@ -21,21 +21,33 @@ select * from information_schema.session_variables where variable_name='optimize
VARIABLE_NAME VARIABLE_VALUE
OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
set global optimizer_switch=10;
set session optimizer_switch=5;
select @@global.optimizer_switch;
@@global.optimizer_switch
index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,engine_condition_pushdown=off
set session optimizer_switch=5;
select @@session.optimizer_switch;
@@session.optimizer_switch
index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off
set global optimizer_switch="index_merge_sort_union=on";
set session optimizer_switch="index_merge=off";
select @@global.optimizer_switch;
@@global.optimizer_switch
index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
set session optimizer_switch="index_merge=off";
select @@session.optimizer_switch;
@@session.optimizer_switch
index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off
show global variables like 'optimizer_switch';
Variable_name Value
optimizer_switch index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
show session variables like 'optimizer_switch';
Variable_name Value
optimizer_switch index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off
select * from information_schema.global_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
OPTIMIZER_SWITCH index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
select * from information_schema.session_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
OPTIMIZER_SWITCH index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off
set session optimizer_switch="default";
select @@session.optimizer_switch;
@@session.optimizer_switch
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
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