mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
This commit is contained in:
@ -250,11 +250,21 @@ set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1;
|
||||
insert delayed into t1 values (207);
|
||||
insert delayed into t1 values (null);
|
||||
insert delayed into t1 values (300);
|
||||
insert delayed into t1 values (null),(null),(null),(null);
|
||||
insert delayed into t1 values (null),(null),(400),(null);
|
||||
select * from t1;
|
||||
a
|
||||
207
|
||||
208
|
||||
300
|
||||
301
|
||||
302
|
||||
303
|
||||
304
|
||||
305
|
||||
306
|
||||
400
|
||||
401
|
||||
show binlog events from 102;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key)
|
||||
@ -268,4 +278,12 @@ master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
drop table t1;
|
||||
|
32
mysql-test/r/binlog_statement_insert_delayed.result
Normal file
32
mysql-test/r/binlog_statement_insert_delayed.result
Normal file
@ -0,0 +1,32 @@
|
||||
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
|
||||
set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1;
|
||||
insert delayed into t1 values (207);
|
||||
insert delayed into t1 values (null);
|
||||
insert delayed into t1 values (300);
|
||||
insert delayed into t1 values (null),(null),(null),(null);
|
||||
insert delayed into t1 values (null),(null),(400),(null);
|
||||
select * from t1;
|
||||
a
|
||||
207
|
||||
208
|
||||
300
|
||||
301
|
||||
302
|
||||
303
|
||||
304
|
||||
305
|
||||
306
|
||||
400
|
||||
401
|
||||
show binlog events from 102;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (207)
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=208
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (null)
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (300)
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=301
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (null),(null),(null),(null)
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=305
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (null),(null),(400),(null)
|
||||
drop table t1;
|
@ -160,11 +160,21 @@ set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1;
|
||||
insert delayed into t1 values (207);
|
||||
insert delayed into t1 values (null);
|
||||
insert delayed into t1 values (300);
|
||||
insert delayed into t1 values (null),(null),(null),(null);
|
||||
insert delayed into t1 values (null),(null),(400),(null);
|
||||
select * from t1;
|
||||
a
|
||||
207
|
||||
208
|
||||
300
|
||||
301
|
||||
302
|
||||
303
|
||||
304
|
||||
305
|
||||
306
|
||||
400
|
||||
401
|
||||
show binlog events from 102;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key)
|
||||
@ -172,8 +182,18 @@ master-bin.000001 # Intvar 1 # INSERT_ID=127
|
||||
master-bin.000001 # Query 1 # use `test`; insert into t1 values(null)
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (207)
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=208
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (null)
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (300)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
drop table t1;
|
||||
|
2
mysql-test/r/have_binlog_format_mixed.require
Normal file
2
mysql-test/r/have_binlog_format_mixed.require
Normal file
@ -0,0 +1,2 @@
|
||||
Variable_name Value
|
||||
binlog_format MIXED
|
@ -46,6 +46,8 @@ COLUMN_PRIVILEGES
|
||||
ENGINES
|
||||
EVENTS
|
||||
FILES
|
||||
GLOBAL_STATUS
|
||||
GLOBAL_VARIABLES
|
||||
KEY_COLUMN_USAGE
|
||||
PARTITIONS
|
||||
PLUGINS
|
||||
@ -54,6 +56,8 @@ REFERENTIAL_CONSTRAINTS
|
||||
ROUTINES
|
||||
SCHEMATA
|
||||
SCHEMA_PRIVILEGES
|
||||
SESSION_STATUS
|
||||
SESSION_VARIABLES
|
||||
STATISTICS
|
||||
TABLES
|
||||
TABLE_CONSTRAINTS
|
||||
@ -758,6 +762,7 @@ table_schema table_name column_name
|
||||
information_schema COLUMNS COLUMN_TYPE
|
||||
information_schema EVENTS EVENT_DEFINITION
|
||||
information_schema EVENTS SQL_MODE
|
||||
information_schema GLOBAL_VARIABLES VARIABLE_VALUE
|
||||
information_schema PARTITIONS PARTITION_EXPRESSION
|
||||
information_schema PARTITIONS SUBPARTITION_EXPRESSION
|
||||
information_schema PARTITIONS PARTITION_DESCRIPTION
|
||||
@ -765,6 +770,7 @@ information_schema PLUGINS PLUGIN_DESCRIPTION
|
||||
information_schema PROCESSLIST INFO
|
||||
information_schema ROUTINES ROUTINE_DEFINITION
|
||||
information_schema ROUTINES SQL_MODE
|
||||
information_schema SESSION_VARIABLES VARIABLE_VALUE
|
||||
information_schema TRIGGERS ACTION_CONDITION
|
||||
information_schema TRIGGERS ACTION_STATEMENT
|
||||
information_schema TRIGGERS SQL_MODE
|
||||
@ -847,7 +853,7 @@ delete from mysql.db where user='mysqltest_4';
|
||||
flush privileges;
|
||||
SELECT table_schema, count(*) FROM information_schema.TABLES where TABLE_SCHEMA!='cluster' GROUP BY TABLE_SCHEMA;
|
||||
table_schema count(*)
|
||||
information_schema 23
|
||||
information_schema 27
|
||||
mysql 21
|
||||
create table t1 (i int, j int);
|
||||
create trigger trg1 before insert on t1 for each row
|
||||
@ -1240,6 +1246,8 @@ COLUMN_PRIVILEGES TABLE_SCHEMA
|
||||
ENGINES ENGINE
|
||||
EVENTS EVENT_SCHEMA
|
||||
FILES TABLE_SCHEMA
|
||||
GLOBAL_STATUS VARIABLE_NAME
|
||||
GLOBAL_VARIABLES VARIABLE_NAME
|
||||
KEY_COLUMN_USAGE CONSTRAINT_SCHEMA
|
||||
PARTITIONS TABLE_SCHEMA
|
||||
PLUGINS PLUGIN_NAME
|
||||
@ -1248,6 +1256,8 @@ REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA
|
||||
ROUTINES ROUTINE_SCHEMA
|
||||
SCHEMATA SCHEMA_NAME
|
||||
SCHEMA_PRIVILEGES TABLE_SCHEMA
|
||||
SESSION_STATUS VARIABLE_NAME
|
||||
SESSION_VARIABLES VARIABLE_NAME
|
||||
STATISTICS TABLE_SCHEMA
|
||||
TABLES TABLE_SCHEMA
|
||||
TABLE_CONSTRAINTS CONSTRAINT_SCHEMA
|
||||
@ -1278,6 +1288,8 @@ COLUMN_PRIVILEGES TABLE_SCHEMA
|
||||
ENGINES ENGINE
|
||||
EVENTS EVENT_SCHEMA
|
||||
FILES TABLE_SCHEMA
|
||||
GLOBAL_STATUS VARIABLE_NAME
|
||||
GLOBAL_VARIABLES VARIABLE_NAME
|
||||
KEY_COLUMN_USAGE CONSTRAINT_SCHEMA
|
||||
PARTITIONS TABLE_SCHEMA
|
||||
PLUGINS PLUGIN_NAME
|
||||
@ -1286,6 +1298,8 @@ REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA
|
||||
ROUTINES ROUTINE_SCHEMA
|
||||
SCHEMATA SCHEMA_NAME
|
||||
SCHEMA_PRIVILEGES TABLE_SCHEMA
|
||||
SESSION_STATUS VARIABLE_NAME
|
||||
SESSION_VARIABLES VARIABLE_NAME
|
||||
STATISTICS TABLE_SCHEMA
|
||||
TABLES TABLE_SCHEMA
|
||||
TABLE_CONSTRAINTS CONSTRAINT_SCHEMA
|
||||
|
@ -13,6 +13,8 @@ COLUMN_PRIVILEGES
|
||||
ENGINES
|
||||
EVENTS
|
||||
FILES
|
||||
GLOBAL_STATUS
|
||||
GLOBAL_VARIABLES
|
||||
KEY_COLUMN_USAGE
|
||||
PARTITIONS
|
||||
PLUGINS
|
||||
@ -21,6 +23,8 @@ REFERENTIAL_CONSTRAINTS
|
||||
ROUTINES
|
||||
SCHEMATA
|
||||
SCHEMA_PRIVILEGES
|
||||
SESSION_STATUS
|
||||
SESSION_VARIABLES
|
||||
STATISTICS
|
||||
TABLES
|
||||
TABLE_CONSTRAINTS
|
||||
|
@ -23,6 +23,9 @@ INSERT INTO t1 VALUES (1), (2);
|
||||
</database>
|
||||
</mysqldump>
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #2005
|
||||
#
|
||||
CREATE TABLE t1 (a decimal(64, 20));
|
||||
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
||||
("0987654321098765432109876543210987654321");
|
||||
@ -31,6 +34,9 @@ CREATE TABLE `t1` (
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('987654321098765432109876543210987654321.00000000000000000000');
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #2055
|
||||
#
|
||||
CREATE TABLE t1 (a double);
|
||||
INSERT INTO t1 VALUES ('-9e999999');
|
||||
Warnings:
|
||||
@ -40,6 +46,9 @@ CREATE TABLE `t1` (
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t1` VALUES (RES);
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #3361 mysqldump quotes DECIMAL values inconsistently
|
||||
#
|
||||
CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT);
|
||||
INSERT INTO t1 VALUES (1.2345, 2.3456);
|
||||
INSERT INTO t1 VALUES ('1.2345', 2.3456);
|
||||
@ -137,6 +146,9 @@ INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
|
||||
</database>
|
||||
</mysqldump>
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #1707
|
||||
#
|
||||
CREATE TABLE t1 (`a"b"` char(2));
|
||||
INSERT INTO t1 VALUES ("1\""), ("\"2");
|
||||
<?xml version="1.0"?>
|
||||
@ -156,6 +168,10 @@ INSERT INTO t1 VALUES ("1\""), ("\"2");
|
||||
</database>
|
||||
</mysqldump>
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #1994
|
||||
# Bug #4261
|
||||
#
|
||||
CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r;
|
||||
INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL);
|
||||
|
||||
@ -191,6 +207,9 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #2634
|
||||
#
|
||||
CREATE TABLE t1 (a int) ENGINE=MYISAM;
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
@ -240,11 +259,17 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #2592 'mysqldump doesn't quote "tricky" names correctly'
|
||||
#
|
||||
create table ```a` (i int);
|
||||
CREATE TABLE ```a` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
drop table ```a`;
|
||||
#
|
||||
# Bug #2591 "mysqldump quotes names inconsistently"
|
||||
#
|
||||
create table t1(a int);
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
@ -353,6 +378,9 @@ UNLOCK TABLES;
|
||||
|
||||
set global sql_mode='';
|
||||
drop table t1;
|
||||
#
|
||||
# Bug #2705 'mysqldump --tab extra output'
|
||||
#
|
||||
create table t1(a int);
|
||||
insert into t1 values (1),(2),(3);
|
||||
|
||||
@ -381,6 +409,9 @@ CREATE TABLE `t1` (
|
||||
2
|
||||
3
|
||||
drop table t1;
|
||||
#
|
||||
# Bug #6101: create database problem
|
||||
#
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
@ -433,6 +464,12 @@ USE `mysqldump_test_db`;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop database mysqldump_test_db;
|
||||
#
|
||||
# Bug #7020
|
||||
# Check that we don't dump in UTF8 in compatible mode by default,
|
||||
# but use the default compiled values, or the values given in
|
||||
# --default-character-set=xxx. However, we should dump in UTF8
|
||||
# if it is explicitely set.
|
||||
CREATE TABLE t1 (a CHAR(10));
|
||||
INSERT INTO t1 VALUES (_latin1 '<27><><EFBFBD><EFBFBD>');
|
||||
|
||||
@ -466,6 +503,13 @@ UNLOCK TABLES;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
#
|
||||
# Bug#8063: make test mysqldump [ fail ]
|
||||
# We cannot tes this command because its output depends
|
||||
# on --default-character-set incompiled into "mysqldump" program.
|
||||
# If the future we can move this command into a separate test with
|
||||
# checking that "mysqldump" is compiled with "latin1"
|
||||
#
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
@ -536,6 +580,9 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# WL #2319: Exclude Tables from dump
|
||||
#
|
||||
CREATE TABLE t1 (a int);
|
||||
CREATE TABLE t2 (a int);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
@ -573,6 +620,9 @@ UNLOCK TABLES;
|
||||
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
#
|
||||
# Bug #8830
|
||||
#
|
||||
CREATE TABLE t1 (`b` blob);
|
||||
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
|
||||
|
||||
@ -607,6 +657,9 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Test for --insert-ignore
|
||||
#
|
||||
CREATE TABLE t1 (a int);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
INSERT INTO t1 VALUES (4),(5),(6);
|
||||
@ -671,6 +724,10 @@ INSERT DELAYED IGNORE INTO `t1` VALUES (1),(2),(3),(4),(5),(6);
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #10286: mysqldump -c crashes on table that has many fields with long
|
||||
# names
|
||||
#
|
||||
create table t1 (
|
||||
F_c4ca4238a0b923820dcc509a6f75849b int,
|
||||
F_c81e728d9d4c2f636f067f89cc14862c int,
|
||||
@ -1364,6 +1421,9 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop table t1;
|
||||
#
|
||||
# Test for --add-drop-database
|
||||
#
|
||||
CREATE TABLE t1 (a int);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
|
||||
@ -1404,6 +1464,9 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #9558 mysqldump --no-data db t1 t2 format still dumps data
|
||||
#
|
||||
CREATE DATABASE mysqldump_test_db;
|
||||
USE mysqldump_test_db;
|
||||
CREATE TABLE t1 ( a INT );
|
||||
@ -1492,6 +1555,11 @@ CREATE TABLE `t2` (
|
||||
</mysqldump>
|
||||
DROP TABLE t1, t2;
|
||||
DROP DATABASE mysqldump_test_db;
|
||||
#
|
||||
# Testing with tables and databases that don't exists
|
||||
# or contains illegal characters
|
||||
# (Bug #9358 mysqldump crashes if tablename starts with \)
|
||||
#
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
create table t1(a varchar(30) primary key, b int not null);
|
||||
@ -1530,6 +1598,9 @@ mysqldump: Got error: 1049: Unknown database 'mysqld\ump_test_db' when selecting
|
||||
drop table t1, t2, t3;
|
||||
drop database mysqldump_test_db;
|
||||
use test;
|
||||
#
|
||||
# Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly
|
||||
#
|
||||
create table t1 (a int(10));
|
||||
create table t2 (pk int primary key auto_increment,
|
||||
a int(10), b varchar(30), c datetime, d blob, e text);
|
||||
@ -1586,6 +1657,9 @@ insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thir
|
||||
</database>
|
||||
</mysqldump>
|
||||
drop table t1, t2;
|
||||
#
|
||||
# BUG #12123
|
||||
#
|
||||
create table t1 (a text character set utf8, b text character set latin1);
|
||||
insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E);
|
||||
select * from t1;
|
||||
@ -1596,7 +1670,13 @@ select * from t1;
|
||||
a b
|
||||
Osnabr<EFBFBD>ck K<>ln
|
||||
drop table t1;
|
||||
#
|
||||
# BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
|
||||
#
|
||||
--fields-optionally-enclosed-by="
|
||||
#
|
||||
# BUG #19025 mysqldump doesn't correctly dump "auto_increment = [int]"
|
||||
#
|
||||
create table `t1` (
|
||||
t1_name varchar(255) default null,
|
||||
t1_id int(10) unsigned not null auto_increment,
|
||||
@ -1634,6 +1714,9 @@ t1 CREATE TABLE `t1` (
|
||||
KEY `t1_name` (`t1_name`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=1003 DEFAULT CHARSET=latin1
|
||||
drop table `t1`;
|
||||
#
|
||||
# Bug #18536: wrong table order
|
||||
#
|
||||
create table t1(a int);
|
||||
create table t2(a int);
|
||||
create table t3(a int);
|
||||
@ -1671,6 +1754,9 @@ CREATE TABLE `t2` (
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop table t1, t2, t3;
|
||||
#
|
||||
# Bug #21288: mysqldump segmentation fault when using --where
|
||||
#
|
||||
create table t1 (a int);
|
||||
mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `t1` WHERE xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx': 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 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1 (1064)
|
||||
mysqldump: Got error: 1064: 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 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1 when retrieving data from server
|
||||
@ -1702,6 +1788,9 @@ CREATE TABLE `t1` (
|
||||
|
||||
drop table t1;
|
||||
End of 4.1 tests
|
||||
#
|
||||
# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
|
||||
#
|
||||
create database db1;
|
||||
use db1;
|
||||
CREATE TABLE t2 (
|
||||
@ -1761,6 +1850,9 @@ drop table t2;
|
||||
drop view v2;
|
||||
drop database db1;
|
||||
use test;
|
||||
#
|
||||
# Bug 10713 mysqldump includes database in create view and referenced tables
|
||||
#
|
||||
create database db2;
|
||||
use db2;
|
||||
create table t1 (a int);
|
||||
@ -1790,6 +1882,9 @@ a b
|
||||
drop table t1, t2;
|
||||
drop database db1;
|
||||
use test;
|
||||
#
|
||||
# dump of view
|
||||
#
|
||||
create table t1(a int);
|
||||
create view v1 as select * from t1;
|
||||
|
||||
@ -1834,6 +1929,9 @@ DROP TABLE IF EXISTS `v1`;
|
||||
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
#
|
||||
# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
|
||||
#
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
CREATE TABLE t2 (
|
||||
@ -1893,6 +1991,9 @@ drop table t2;
|
||||
drop view v2;
|
||||
drop database mysqldump_test_db;
|
||||
use test;
|
||||
#
|
||||
# Bug #9756
|
||||
#
|
||||
CREATE TABLE t1 (a char(10));
|
||||
INSERT INTO t1 VALUES ('\'');
|
||||
|
||||
@ -1927,6 +2028,9 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #10927 mysqldump: Can't reload dump with view that consist of other view
|
||||
#
|
||||
create table t1(a int, b int, c varchar(30));
|
||||
insert into t1 values(1, 2, "one"), (2, 4, "two"), (3, 6, "three");
|
||||
create view v3 as
|
||||
@ -2004,6 +2108,9 @@ DROP TABLE IF EXISTS `v3`;
|
||||
|
||||
drop view v1, v2, v3;
|
||||
drop table t1;
|
||||
#
|
||||
# Test for dumping triggers
|
||||
#
|
||||
CREATE TABLE t1 (a int, b bigint default NULL);
|
||||
CREATE TABLE t2 (a int);
|
||||
create trigger trg1 before insert on t1 for each row
|
||||
@ -2202,8 +2309,14 @@ set @fired:= "No";
|
||||
end if;
|
||||
end BEFORE # STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER root@localhost
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bugs #9136, #12917: problems with --defaults-extra-file option
|
||||
#
|
||||
--port=1234
|
||||
--port=1234
|
||||
#
|
||||
# Test of fix to BUG 12597
|
||||
#
|
||||
DROP TABLE IF EXISTS `test1`;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 'test1'
|
||||
@ -2235,6 +2348,9 @@ a2
|
||||
DROP TRIGGER testref;
|
||||
DROP TABLE test1;
|
||||
DROP TABLE test2;
|
||||
#
|
||||
# BUG#9056 - mysqldump does not dump routines
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP FUNCTION IF EXISTS bug9056_func1;
|
||||
DROP FUNCTION IF EXISTS bug9056_func2;
|
||||
@ -2331,6 +2447,9 @@ DROP PROCEDURE bug9056_proc1;
|
||||
DROP PROCEDURE bug9056_proc2;
|
||||
DROP PROCEDURE `a'b`;
|
||||
drop table t1;
|
||||
#
|
||||
# BUG# 13052 - mysqldump timestamp reloads broken
|
||||
#
|
||||
drop table if exists t1;
|
||||
create table t1 (`d` timestamp, unique (`d`));
|
||||
set time_zone='+00:00';
|
||||
@ -2417,6 +2536,9 @@ UNLOCK TABLES;
|
||||
drop table t1;
|
||||
set global time_zone=default;
|
||||
set time_zone=default;
|
||||
#
|
||||
# Test of fix to BUG 13146 - ansi quotes break loading of triggers
|
||||
#
|
||||
DROP TABLE IF EXISTS `t1 test`;
|
||||
DROP TABLE IF EXISTS `t2 test`;
|
||||
CREATE TABLE `t1 test` (
|
||||
@ -2480,6 +2602,9 @@ UNLOCK TABLES;
|
||||
DROP TRIGGER `test trig`;
|
||||
DROP TABLE `t1 test`;
|
||||
DROP TABLE `t2 test`;
|
||||
#
|
||||
# BUG# 12838 mysqldump -x with views exits with error
|
||||
#
|
||||
drop table if exists t1;
|
||||
create table t1 (a int, b varchar(32), c varchar(32));
|
||||
insert into t1 values (1, 'first value', 'xxxx');
|
||||
@ -2572,6 +2697,10 @@ drop view v2;
|
||||
drop view v0;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
#
|
||||
# BUG#14554 - mysqldump does not separate words "ROW" and "BEGIN"
|
||||
# for tables with trigger created in the IGNORE_SPACE sql mode.
|
||||
#
|
||||
SET @old_sql_mode = @@SQL_MODE;
|
||||
SET SQL_MODE = IGNORE_SPACE;
|
||||
CREATE TABLE t1 (a INT);
|
||||
@ -2627,6 +2756,9 @@ DELIMITER ;
|
||||
|
||||
DROP TRIGGER tr1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #13318: Bad result with empty field and --hex-blob
|
||||
#
|
||||
create table t1 (a binary(1), b blob);
|
||||
insert into t1 values ('','');
|
||||
|
||||
@ -2694,6 +2826,9 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop table t1;
|
||||
#
|
||||
# Bug 14871 Invalid view dump output
|
||||
#
|
||||
create table t1 (a int);
|
||||
insert into t1 values (289), (298), (234), (456), (789);
|
||||
create definer = CURRENT_USER view v1 as select * from t1;
|
||||
@ -2720,6 +2855,9 @@ a
|
||||
789
|
||||
drop table t1;
|
||||
drop view v1, v2, v3, v4, v5;
|
||||
#
|
||||
# Bug #16878 dump of trigger
|
||||
#
|
||||
create table t1 (a int, created datetime);
|
||||
create table t2 (b int, created datetime);
|
||||
create trigger tr1 before insert on t1 for each row set
|
||||
@ -2742,6 +2880,9 @@ end AFTER # root@localhost
|
||||
drop trigger tr1;
|
||||
drop trigger tr2;
|
||||
drop table t1, t2;
|
||||
#
|
||||
# Bug#18462 mysqldump does not dump view structures correctly
|
||||
#
|
||||
create table t (qty int, price int);
|
||||
insert into t values(3, 50);
|
||||
insert into t values(5, 51);
|
||||
@ -2761,6 +2902,10 @@ mysqldump {
|
||||
drop view v1;
|
||||
drop view v2;
|
||||
drop table t;
|
||||
#
|
||||
# Bug#14857 Reading dump files with single statement stored routines fails.
|
||||
# fixed by patch for bug#16878
|
||||
#
|
||||
/*!50003 CREATE FUNCTION `f`() RETURNS bigint(20)
|
||||
return 42 */|
|
||||
/*!50003 CREATE PROCEDURE `p`()
|
||||
@ -2775,6 +2920,9 @@ p CREATE DEFINER=`root`@`localhost` PROCEDURE `p`()
|
||||
select 42
|
||||
drop function f;
|
||||
drop procedure p;
|
||||
#
|
||||
# Bug #17371 Unable to dump a schema with invalid views
|
||||
#
|
||||
create table t1 ( id serial );
|
||||
create view v1 as select * from t1;
|
||||
drop table t1;
|
||||
@ -2784,6 +2932,9 @@ mysqldump {
|
||||
|
||||
} mysqldump
|
||||
drop view v1;
|
||||
# BUG#17201 Spurious 'DROP DATABASE' in output,
|
||||
# also confusion between tables and views.
|
||||
# Example code from Markus Popp
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
create table t1 (id int);
|
||||
@ -2844,6 +2995,9 @@ USE `mysqldump_test_db`;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
drop database mysqldump_test_db;
|
||||
#
|
||||
# Bug21014 Segmentation fault of mysqldump on view
|
||||
#
|
||||
create database mysqldump_tables;
|
||||
use mysqldump_tables;
|
||||
create table basetable ( id serial, tag varchar(64) );
|
||||
@ -2877,6 +3031,9 @@ drop view nasishnasifu;
|
||||
drop database mysqldump_views;
|
||||
drop table mysqldump_tables.basetable;
|
||||
drop database mysqldump_tables;
|
||||
#
|
||||
# Bug20221 Dumping of multiple databases containing view(s) yields maleformed dumps
|
||||
#
|
||||
create database mysqldump_dba;
|
||||
use mysqldump_dba;
|
||||
create table t1 (f1 int, f2 int);
|
||||
@ -2909,6 +3066,9 @@ drop view v1;
|
||||
drop table t1;
|
||||
drop database mysqldump_dbb;
|
||||
use test;
|
||||
#
|
||||
# Bug#21215 mysqldump creating incomplete backups without warning
|
||||
#
|
||||
create user mysqltest_1@localhost;
|
||||
create table t1(a int, b varchar(34));
|
||||
reset master;
|
||||
@ -2920,6 +3080,12 @@ mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need the SU
|
||||
grant REPLICATION CLIENT on *.* to mysqltest_1@localhost;
|
||||
drop table t1;
|
||||
drop user mysqltest_1@localhost;
|
||||
#
|
||||
# Bug #21527 mysqldump incorrectly tries to LOCK TABLES on the
|
||||
# information_schema database.
|
||||
#
|
||||
# Bug #21424 mysqldump failing to export/import views
|
||||
#
|
||||
create database mysqldump_myDB;
|
||||
use mysqldump_myDB;
|
||||
create user myDB_User;
|
||||
@ -2938,6 +3104,9 @@ revoke all privileges on mysqldump_myDB.* from myDB_User@localhost;
|
||||
drop user myDB_User;
|
||||
drop database mysqldump_myDB;
|
||||
flush privileges;
|
||||
# Bug #21424 continues from here.
|
||||
# Restore. Flush Privileges test ends.
|
||||
#
|
||||
use mysqldump_myDB;
|
||||
select * from mysqldump_myDB.v1;
|
||||
c1
|
||||
@ -2953,7 +3122,81 @@ revoke all privileges on mysqldump_myDB.* from myDB_User@localhost;
|
||||
drop user myDB_User;
|
||||
drop database mysqldump_myDB;
|
||||
use test;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# BUG#13926: --order-by-primary fails if PKEY contains quote character
|
||||
#
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`a b` INT,
|
||||
`c"d` INT,
|
||||
`e``f` INT,
|
||||
PRIMARY KEY (`a b`, `c"d`, `e``f`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
insert into t1 values (0815, 4711, 2006);
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS "t1";
|
||||
CREATE TABLE "t1" (
|
||||
"a b" int(11) NOT NULL DEFAULT '0',
|
||||
"c""d" int(11) NOT NULL DEFAULT '0',
|
||||
"e`f" int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY ("a b","c""d","e`f")
|
||||
);
|
||||
|
||||
LOCK TABLES "t1" WRITE;
|
||||
/*!40000 ALTER TABLE "t1" DISABLE KEYS */;
|
||||
INSERT INTO "t1" VALUES (815,4711,2006);
|
||||
/*!40000 ALTER TABLE "t1" ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`a b` int(11) NOT NULL DEFAULT '0',
|
||||
`c"d` int(11) NOT NULL DEFAULT '0',
|
||||
`e``f` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`a b`,`c"d`,`e``f`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
LOCK TABLES `t1` WRITE;
|
||||
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
||||
INSERT INTO `t1` VALUES (815,4711,2006);
|
||||
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE `t1`;
|
||||
#
|
||||
# End of 5.0 tests
|
||||
#
|
||||
drop table if exists t1;
|
||||
CREATE TABLE t1(a int, b int);
|
||||
INSERT INTO t1 VALUES (1,1);
|
||||
@ -3167,6 +3410,9 @@ mysql-import: Error: 1146, Table 'test.words' doesn't exist, when using table: w
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table words2;
|
||||
#
|
||||
# BUG# 16853: mysqldump doesn't show events
|
||||
#
|
||||
create database first;
|
||||
use first;
|
||||
set time_zone = 'UTC';
|
||||
@ -3204,6 +3450,11 @@ third ee3 root@localhost ONE TIME 2030-12-31 22:01:23 NULL NULL NULL NULL ENABLE
|
||||
drop database third;
|
||||
set time_zone = 'SYSTEM';
|
||||
use test;
|
||||
#
|
||||
# BUG#17201 Spurious 'DROP DATABASE' in output,
|
||||
# also confusion between tables and views.
|
||||
# Example code from Markus Popp
|
||||
#
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
create table t1 (id int);
|
||||
@ -3264,4 +3515,6 @@ USE `mysqldump_test_db`;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
drop database mysqldump_test_db;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
@ -87,6 +87,8 @@ Database: information_schema
|
||||
| ENGINES |
|
||||
| EVENTS |
|
||||
| FILES |
|
||||
| GLOBAL_STATUS |
|
||||
| GLOBAL_VARIABLES |
|
||||
| KEY_COLUMN_USAGE |
|
||||
| PARTITIONS |
|
||||
| PLUGINS |
|
||||
@ -95,6 +97,8 @@ Database: information_schema
|
||||
| ROUTINES |
|
||||
| SCHEMATA |
|
||||
| SCHEMA_PRIVILEGES |
|
||||
| SESSION_STATUS |
|
||||
| SESSION_VARIABLES |
|
||||
| STATISTICS |
|
||||
| TABLES |
|
||||
| TABLE_CONSTRAINTS |
|
||||
@ -115,6 +119,8 @@ Database: INFORMATION_SCHEMA
|
||||
| ENGINES |
|
||||
| EVENTS |
|
||||
| FILES |
|
||||
| GLOBAL_STATUS |
|
||||
| GLOBAL_VARIABLES |
|
||||
| KEY_COLUMN_USAGE |
|
||||
| PARTITIONS |
|
||||
| PLUGINS |
|
||||
@ -123,6 +129,8 @@ Database: INFORMATION_SCHEMA
|
||||
| ROUTINES |
|
||||
| SCHEMATA |
|
||||
| SCHEMA_PRIVILEGES |
|
||||
| SESSION_STATUS |
|
||||
| SESSION_VARIABLES |
|
||||
| STATISTICS |
|
||||
| TABLES |
|
||||
| TABLE_CONSTRAINTS |
|
||||
|
@ -1,3 +1,6 @@
|
||||
#
|
||||
# Bug#20821: INSERT DELAYED fails to write some rows to binlog
|
||||
#
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
@ -13,4 +16,8 @@ COUNT(*)
|
||||
SELECT COUNT(*) FROM mysqlslap.t1;
|
||||
COUNT(*)
|
||||
5000
|
||||
DROP SCHEMA IF EXISTS mysqlslap;
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
USE test;
|
||||
DROP SCHEMA mysqlslap;
|
||||
|
@ -1,3 +1,14 @@
|
||||
#
|
||||
# Setup
|
||||
#
|
||||
use test;
|
||||
drop table if exists t1, t2, t3;
|
||||
#
|
||||
# See if queries that use both auto_increment and LAST_INSERT_ID()
|
||||
# are replicated well
|
||||
#
|
||||
# We also check how the foreign_key_check variable is replicated
|
||||
#
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
@ -38,6 +49,9 @@ select * from t2;
|
||||
b c
|
||||
5 0
|
||||
6 11
|
||||
#
|
||||
# check if INSERT SELECT in auto_increment is well replicated (bug #490)
|
||||
#
|
||||
drop table t2;
|
||||
drop table t1;
|
||||
create table t1(a int auto_increment, key(a));
|
||||
@ -68,12 +82,19 @@ b c
|
||||
9 13
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
#
|
||||
# Bug#8412: Error codes reported in binary log for CHARACTER SET,
|
||||
# FOREIGN_KEY_CHECKS
|
||||
#
|
||||
SET TIMESTAMP=1000000000;
|
||||
CREATE TABLE t1 ( a INT UNIQUE );
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
INSERT INTO t1 VALUES (1),(1);
|
||||
Got one of the listed errors
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#14553: NULL in WHERE resets LAST_INSERT_ID
|
||||
#
|
||||
create table t1(a int auto_increment, key(a));
|
||||
create table t2(a int);
|
||||
insert into t1 (a) values (null);
|
||||
@ -87,6 +108,14 @@ a
|
||||
1
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
#
|
||||
# End of 4.1 tests
|
||||
#
|
||||
#
|
||||
# BUG#15728: LAST_INSERT_ID function inside a stored function returns 0
|
||||
#
|
||||
# The solution is not to reset last_insert_id on enter to sub-statement.
|
||||
#
|
||||
drop function if exists bug15728;
|
||||
drop function if exists bug15728_insert;
|
||||
drop table if exists t1, t2;
|
||||
@ -234,6 +263,9 @@ n b
|
||||
2 100
|
||||
3 350
|
||||
drop table t1;
|
||||
#
|
||||
# End of 5.0 tests
|
||||
#
|
||||
truncate table t2;
|
||||
create table t1 (id tinyint primary key);
|
||||
create function insid() returns int
|
||||
@ -267,5 +299,30 @@ select * from t2;
|
||||
id last_id
|
||||
4 0
|
||||
8 0
|
||||
drop table t1, t2;
|
||||
drop table t1;
|
||||
drop function insid;
|
||||
truncate table t2;
|
||||
create table t1 (n int primary key auto_increment not null,
|
||||
b int, unique(b));
|
||||
create procedure foo()
|
||||
begin
|
||||
insert into t1 values(null,10);
|
||||
insert ignore into t1 values(null,10);
|
||||
insert ignore into t1 values(null,10);
|
||||
insert into t2 values(null,3);
|
||||
end|
|
||||
call foo();
|
||||
select * from t1;
|
||||
n b
|
||||
1 10
|
||||
select * from t2;
|
||||
id last_id
|
||||
1 3
|
||||
select * from t1;
|
||||
n b
|
||||
1 10
|
||||
select * from t2;
|
||||
id last_id
|
||||
1 3
|
||||
drop table t1, t2;
|
||||
drop procedure foo;
|
||||
|
@ -28,7 +28,7 @@ day id category name
|
||||
2003-03-22 2416 a bbbbb
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
slave-bin.000001 1248
|
||||
slave-bin.000001 1276
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
@ -39,7 +39,7 @@ set global sql_slave_skip_counter=1;
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1765 # # master-bin.000001 Yes Yes # 0 0 1765 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1793 # # master-bin.000001 Yes Yes # 0 0 1793 # None 0 No #
|
||||
set sql_log_bin=0;
|
||||
delete from t1;
|
||||
set sql_log_bin=1;
|
||||
@ -49,7 +49,7 @@ change master to master_user='test';
|
||||
change master to master_user='root';
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1800 # # master-bin.000001 No No # 0 0 1800 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1828 # # master-bin.000001 No No # 0 0 1828 # None 0 No #
|
||||
set global sql_slave_skip_counter=1;
|
||||
start slave;
|
||||
set sql_log_bin=0;
|
||||
|
@ -30,16 +30,16 @@ a b
|
||||
2 2
|
||||
3 3
|
||||
4 4
|
||||
7 5
|
||||
10 6
|
||||
5 5
|
||||
6 6
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
3 3
|
||||
4 4
|
||||
7 5
|
||||
10 6
|
||||
5 5
|
||||
6 6
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
a int unsigned not null auto_increment primary key,
|
||||
|
@ -5,9 +5,6 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
SET BINLOG_FORMAT=MIXED;
|
||||
SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
|
||||
@@GLOBAL.BINLOG_FORMAT @@SESSION.BINLOG_FORMAT
|
||||
STATEMENT MIXED
|
||||
SET GLOBAL BINLOG_FORMAT=MIXED;
|
||||
SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
|
||||
@@GLOBAL.BINLOG_FORMAT @@SESSION.BINLOG_FORMAT
|
||||
|
@ -60,3 +60,43 @@ master-bin.000001 4 Format_desc 1 102 Server ver: SERVER_VERSION, Binlog ver: 4
|
||||
master-bin.000001 102 Query 1 188 use `test`; CREATE TABLE t1 (a INT)
|
||||
master-bin.000001 188 Table_map 1 227 table_id: # (test.t1)
|
||||
master-bin.000001 227 Write_rows 1 266 table_id: # flags: STMT_END_F
|
||||
DROP TABLE t1;
|
||||
================ Test for BUG#17620 ================
|
||||
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;
|
||||
**** On Slave ****
|
||||
SET GLOBAL QUERY_CACHE_SIZE=0;
|
||||
**** On Master ****
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
**** On Slave ****
|
||||
SET GLOBAL QUERY_CACHE_SIZE=16*1024*1024;
|
||||
**** On Master ****
|
||||
INSERT INTO t1 VALUES (4),(5),(6);
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
**** On Master ****
|
||||
INSERT INTO t1 VALUES (7),(8),(9);
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
DROP TABLE t1;
|
||||
|
@ -5,7 +5,10 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET BINLOG_FORMAT=ROW;
|
||||
SET @@BINLOG_FORMAT = ROW;
|
||||
SELECT @@BINLOG_FORMAT;
|
||||
@@BINLOG_FORMAT
|
||||
ROW
|
||||
**** Partition RANGE testing ****
|
||||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
|
||||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
|
||||
|
@ -1,3 +1,5 @@
|
||||
SET SESSION BINLOG_FORMAT=ROW;
|
||||
SET GLOBAL BINLOG_FORMAT=ROW;
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
@ -5,9 +7,15 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
stop slave;
|
||||
#
|
||||
# Generate a big enough master's binlog to cause relay log rotations
|
||||
#
|
||||
create table t1 (a int);
|
||||
drop table t1;
|
||||
reset slave;
|
||||
#
|
||||
# Test 1
|
||||
#
|
||||
set global max_binlog_size=8192;
|
||||
set global max_relay_log_size=8192-1;
|
||||
select @@global.max_relay_log_size;
|
||||
@ -15,47 +23,251 @@ select @@global.max_relay_log_size;
|
||||
4096
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 58664 # # master-bin.000001 Yes Yes # 0 0 58664 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 58664
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 58664
|
||||
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 #
|
||||
#
|
||||
# Test 2
|
||||
#
|
||||
stop slave;
|
||||
reset slave;
|
||||
set global max_relay_log_size=(5*4096);
|
||||
select @@global.max_relay_log_size;
|
||||
@@global.max_relay_log_size
|
||||
20480
|
||||
@@global.max_relay_log_size 20480
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 58664 # # master-bin.000001 Yes Yes # 0 0 58664 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 58664
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 58664
|
||||
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 #
|
||||
#
|
||||
# Test 3: max_relay_log_size = 0
|
||||
#
|
||||
stop slave;
|
||||
reset slave;
|
||||
set global max_relay_log_size=0;
|
||||
select @@global.max_relay_log_size;
|
||||
@@global.max_relay_log_size
|
||||
0
|
||||
@@global.max_relay_log_size 0
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 58664 # # master-bin.000001 Yes Yes # 0 0 58664 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 58664
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 58664
|
||||
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 #
|
||||
#
|
||||
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
|
||||
#
|
||||
stop slave;
|
||||
reset slave;
|
||||
flush logs;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File
|
||||
Read_Master_Log_Pos 4
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File
|
||||
Slave_IO_Running No
|
||||
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 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 0
|
||||
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 #
|
||||
#
|
||||
# Test 5
|
||||
#
|
||||
reset slave;
|
||||
start slave;
|
||||
flush logs;
|
||||
create table t1 (a int);
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 58750 # # master-bin.000001 Yes Yes # 0 0 58750 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 58750
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 58750
|
||||
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 #
|
||||
#
|
||||
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
|
||||
#
|
||||
flush logs;
|
||||
drop table t1;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 58826 # # master-bin.000001 Yes Yes # 0 0 58826 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 58826
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 58826
|
||||
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 #
|
||||
flush logs;
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000002 102 <Binlog_Ignore_DB>
|
||||
File master-bin.000002
|
||||
Position 102
|
||||
Binlog_Do_DB <Binlog_Ignore_DB>
|
||||
Binlog_Ignore_DB
|
||||
#
|
||||
# End of 4.1 tests
|
||||
#
|
||||
|
381
mysql-test/r/rpl_row_tabledefs_2myisam.result
Normal file
381
mysql-test/r/rpl_row_tabledefs_2myisam.result
Normal file
@ -0,0 +1,381 @@
|
||||
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;
|
||||
STOP SLAVE;
|
||||
SET GLOBAL SQL_MODE='STRICT_ALL_TABLES';
|
||||
START SLAVE;
|
||||
CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t4 (a INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t7 (a INT NOT NULL) ENGINE='MyISAM';
|
||||
CREATE TABLE t8 (a INT NOT NULL) ENGINE='MyISAM';
|
||||
CREATE TABLE t9 (a INT) ENGINE='MyISAM';
|
||||
ALTER TABLE t1_int ADD x INT DEFAULT 42;
|
||||
ALTER TABLE t1_bit
|
||||
ADD x BIT(3) DEFAULT b'011',
|
||||
ADD y BIT(5) DEFAULT b'10101',
|
||||
ADD z BIT(2) DEFAULT b'10';
|
||||
ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test';
|
||||
ALTER TABLE t1_nodef ADD x INT NOT NULL;
|
||||
ALTER TABLE t2 DROP b;
|
||||
ALTER TABLE t4 MODIFY a FLOAT;
|
||||
ALTER TABLE t5 MODIFY b FLOAT;
|
||||
ALTER TABLE t6 MODIFY c FLOAT;
|
||||
ALTER TABLE t7 ADD e1 INT, ADD e2 INT, ADD e3 INT, ADD e4 INT,
|
||||
ADD e5 INT, ADD e6 INT, ADD e7 INT, ADD e8 INT;
|
||||
ALTER TABLE t8 ADD e1 INT NOT NULL DEFAULT 0, ADD e2 INT NOT NULL DEFAULT 0,
|
||||
ADD e3 INT NOT NULL DEFAULT 0, ADD e4 INT NOT NULL DEFAULT 0,
|
||||
ADD e5 INT NOT NULL DEFAULT 0, ADD e6 INT NOT NULL DEFAULT 0,
|
||||
ADD e7 INT NOT NULL DEFAULT 0, ADD e8 INT NOT NULL DEFAULT 0;
|
||||
INSERT INTO t1_int VALUES (2, 4, 4711);
|
||||
INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar');
|
||||
INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01');
|
||||
**** On Master ****
|
||||
INSERT INTO t1_int VALUES (1,2);
|
||||
INSERT INTO t1_int VALUES (2,5);
|
||||
INSERT INTO t1_bit VALUES (1,2);
|
||||
INSERT INTO t1_bit VALUES (2,5);
|
||||
INSERT INTO t1_char VALUES (1,2);
|
||||
INSERT INTO t1_char VALUES (2,5);
|
||||
SELECT * FROM t1_int;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
SELECT * FROM t1_bit;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
SELECT * FROM t1_char;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
**** On Slave ****
|
||||
SELECT a,b,x FROM t1_int;
|
||||
a b x
|
||||
2 5 4711
|
||||
1 2 42
|
||||
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
|
||||
a b HEX(x) HEX(y) HEX(z)
|
||||
2 5 5 1C 1
|
||||
1 2 3 15 2
|
||||
SELECT a,b,x FROM t1_char;
|
||||
a b x
|
||||
2 5 Foo is a bar
|
||||
1 2 Just a test
|
||||
**** On Master ****
|
||||
UPDATE t1_int SET b=2*b WHERE a=2;
|
||||
UPDATE t1_char SET b=2*b WHERE a=2;
|
||||
UPDATE t1_bit SET b=2*b WHERE a=2;
|
||||
SELECT * FROM t1_int;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
SELECT * FROM t1_bit;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
SELECT * FROM t1_char;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
**** On Slave ****
|
||||
SELECT a,b,x FROM t1_int;
|
||||
a b x
|
||||
2 10 4711
|
||||
1 2 42
|
||||
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
|
||||
a b HEX(x) HEX(y) HEX(z)
|
||||
2 10 5 1C 1
|
||||
1 2 3 15 2
|
||||
SELECT a,b,x FROM t1_char;
|
||||
a b x
|
||||
2 10 Foo is a bar
|
||||
1 2 Just a test
|
||||
INSERT INTO t9 VALUES (2);
|
||||
INSERT INTO t1_nodef VALUES (1,2);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
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 1364
|
||||
Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef
|
||||
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 #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (2);
|
||||
INSERT INTO t2 VALUES (2,4);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
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 1522
|
||||
Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns
|
||||
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 #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (4);
|
||||
INSERT INTO t4 VALUES (4);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
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 1522
|
||||
Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4
|
||||
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 #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (5);
|
||||
INSERT INTO t5 VALUES (5,10,25);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
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 1522
|
||||
Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4
|
||||
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 #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (6);
|
||||
INSERT INTO t6 VALUES (6,12,36);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
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 1522
|
||||
Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4
|
||||
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 #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (6);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
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 Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
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 #
|
||||
INSERT INTO t7 VALUES (1),(2),(3);
|
||||
INSERT INTO t8 VALUES (1),(2),(3);
|
||||
SELECT * FROM t7;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT * FROM t8;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT * FROM t7;
|
||||
a e1 e2 e3 e4 e5 e6 e7 e8
|
||||
1 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
2 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
3 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
SELECT * FROM t8;
|
||||
a e1 e2 e3 e4 e5 e6 e7 e8
|
||||
1 0 0 0 0 0 0 0 0
|
||||
2 0 0 0 0 0 0 0 0
|
||||
3 0 0 0 0 0 0 0 0
|
||||
**** On Master ****
|
||||
TRUNCATE t1_nodef;
|
||||
SET SQL_LOG_BIN=0;
|
||||
INSERT INTO t1_nodef VALUES (1,2);
|
||||
INSERT INTO t1_nodef VALUES (2,4);
|
||||
SET SQL_LOG_BIN=1;
|
||||
**** On Slave ****
|
||||
INSERT INTO t1_nodef VALUES (1,2,3);
|
||||
INSERT INTO t1_nodef VALUES (2,4,6);
|
||||
**** On Master ****
|
||||
UPDATE t1_nodef SET b=2*b WHERE a=1;
|
||||
SELECT * FROM t1_nodef;
|
||||
a b
|
||||
1 4
|
||||
2 4
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1_nodef;
|
||||
a b x
|
||||
1 4 3
|
||||
2 4 6
|
||||
**** On Master ****
|
||||
DELETE FROM t1_nodef WHERE a=2;
|
||||
SELECT * FROM t1_nodef;
|
||||
a b
|
||||
1 4
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1_nodef;
|
||||
a b x
|
||||
1 4 3
|
||||
**** Cleanup ****
|
||||
DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef;
|
||||
DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9;
|
381
mysql-test/r/rpl_row_tabledefs_3innodb.result
Normal file
381
mysql-test/r/rpl_row_tabledefs_3innodb.result
Normal file
@ -0,0 +1,381 @@
|
||||
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;
|
||||
STOP SLAVE;
|
||||
SET GLOBAL SQL_MODE='STRICT_ALL_TABLES';
|
||||
START SLAVE;
|
||||
CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t4 (a INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t7 (a INT NOT NULL) ENGINE='InnoDB';
|
||||
CREATE TABLE t8 (a INT NOT NULL) ENGINE='InnoDB';
|
||||
CREATE TABLE t9 (a INT) ENGINE='InnoDB';
|
||||
ALTER TABLE t1_int ADD x INT DEFAULT 42;
|
||||
ALTER TABLE t1_bit
|
||||
ADD x BIT(3) DEFAULT b'011',
|
||||
ADD y BIT(5) DEFAULT b'10101',
|
||||
ADD z BIT(2) DEFAULT b'10';
|
||||
ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test';
|
||||
ALTER TABLE t1_nodef ADD x INT NOT NULL;
|
||||
ALTER TABLE t2 DROP b;
|
||||
ALTER TABLE t4 MODIFY a FLOAT;
|
||||
ALTER TABLE t5 MODIFY b FLOAT;
|
||||
ALTER TABLE t6 MODIFY c FLOAT;
|
||||
ALTER TABLE t7 ADD e1 INT, ADD e2 INT, ADD e3 INT, ADD e4 INT,
|
||||
ADD e5 INT, ADD e6 INT, ADD e7 INT, ADD e8 INT;
|
||||
ALTER TABLE t8 ADD e1 INT NOT NULL DEFAULT 0, ADD e2 INT NOT NULL DEFAULT 0,
|
||||
ADD e3 INT NOT NULL DEFAULT 0, ADD e4 INT NOT NULL DEFAULT 0,
|
||||
ADD e5 INT NOT NULL DEFAULT 0, ADD e6 INT NOT NULL DEFAULT 0,
|
||||
ADD e7 INT NOT NULL DEFAULT 0, ADD e8 INT NOT NULL DEFAULT 0;
|
||||
INSERT INTO t1_int VALUES (2, 4, 4711);
|
||||
INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar');
|
||||
INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01');
|
||||
**** On Master ****
|
||||
INSERT INTO t1_int VALUES (1,2);
|
||||
INSERT INTO t1_int VALUES (2,5);
|
||||
INSERT INTO t1_bit VALUES (1,2);
|
||||
INSERT INTO t1_bit VALUES (2,5);
|
||||
INSERT INTO t1_char VALUES (1,2);
|
||||
INSERT INTO t1_char VALUES (2,5);
|
||||
SELECT * FROM t1_int;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
SELECT * FROM t1_bit;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
SELECT * FROM t1_char;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
**** On Slave ****
|
||||
SELECT a,b,x FROM t1_int;
|
||||
a b x
|
||||
2 5 4711
|
||||
1 2 42
|
||||
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
|
||||
a b HEX(x) HEX(y) HEX(z)
|
||||
2 5 5 1C 1
|
||||
1 2 3 15 2
|
||||
SELECT a,b,x FROM t1_char;
|
||||
a b x
|
||||
2 5 Foo is a bar
|
||||
1 2 Just a test
|
||||
**** On Master ****
|
||||
UPDATE t1_int SET b=2*b WHERE a=2;
|
||||
UPDATE t1_char SET b=2*b WHERE a=2;
|
||||
UPDATE t1_bit SET b=2*b WHERE a=2;
|
||||
SELECT * FROM t1_int;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
SELECT * FROM t1_bit;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
SELECT * FROM t1_char;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
**** On Slave ****
|
||||
SELECT a,b,x FROM t1_int;
|
||||
a b x
|
||||
2 10 4711
|
||||
1 2 42
|
||||
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
|
||||
a b HEX(x) HEX(y) HEX(z)
|
||||
2 10 5 1C 1
|
||||
1 2 3 15 2
|
||||
SELECT a,b,x FROM t1_char;
|
||||
a b x
|
||||
2 10 Foo is a bar
|
||||
1 2 Just a test
|
||||
INSERT INTO t9 VALUES (2);
|
||||
INSERT INTO t1_nodef VALUES (1,2);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
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 1364
|
||||
Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef
|
||||
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 #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (2);
|
||||
INSERT INTO t2 VALUES (2,4);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
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 1522
|
||||
Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns
|
||||
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 #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (4);
|
||||
INSERT INTO t4 VALUES (4);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
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 1522
|
||||
Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4
|
||||
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 #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (5);
|
||||
INSERT INTO t5 VALUES (5,10,25);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
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 1522
|
||||
Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4
|
||||
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 #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (6);
|
||||
INSERT INTO t6 VALUES (6,12,36);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
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 1522
|
||||
Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4
|
||||
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 #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (6);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
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 Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
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 #
|
||||
INSERT INTO t7 VALUES (1),(2),(3);
|
||||
INSERT INTO t8 VALUES (1),(2),(3);
|
||||
SELECT * FROM t7;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT * FROM t8;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT * FROM t7;
|
||||
a e1 e2 e3 e4 e5 e6 e7 e8
|
||||
1 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
2 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
3 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
SELECT * FROM t8;
|
||||
a e1 e2 e3 e4 e5 e6 e7 e8
|
||||
1 0 0 0 0 0 0 0 0
|
||||
2 0 0 0 0 0 0 0 0
|
||||
3 0 0 0 0 0 0 0 0
|
||||
**** On Master ****
|
||||
TRUNCATE t1_nodef;
|
||||
SET SQL_LOG_BIN=0;
|
||||
INSERT INTO t1_nodef VALUES (1,2);
|
||||
INSERT INTO t1_nodef VALUES (2,4);
|
||||
SET SQL_LOG_BIN=1;
|
||||
**** On Slave ****
|
||||
INSERT INTO t1_nodef VALUES (1,2,3);
|
||||
INSERT INTO t1_nodef VALUES (2,4,6);
|
||||
**** On Master ****
|
||||
UPDATE t1_nodef SET b=2*b WHERE a=1;
|
||||
SELECT * FROM t1_nodef;
|
||||
a b
|
||||
1 4
|
||||
2 4
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1_nodef;
|
||||
a b x
|
||||
1 4 3
|
||||
2 4 6
|
||||
**** On Master ****
|
||||
DELETE FROM t1_nodef WHERE a=2;
|
||||
SELECT * FROM t1_nodef;
|
||||
a b
|
||||
1 4
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1_nodef;
|
||||
a b x
|
||||
1 4 3
|
||||
**** Cleanup ****
|
||||
DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef;
|
||||
DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9;
|
@ -4,21 +4,96 @@ reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=myisam;
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE=myisam;
|
||||
CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=myisam;
|
||||
CREATE TABLE t4 (a INT) ENGINE=myisam;
|
||||
CREATE TABLE t5 (a INT, b INT, c INT) ENGINE=myisam;
|
||||
CREATE TABLE t6 (a INT, b INT, c INT) ENGINE=myisam;
|
||||
CREATE TABLE t9 (a INT PRIMARY KEY) ENGINE=myisam;
|
||||
ALTER TABLE t1 ADD x INT DEFAULT 42;
|
||||
ALTER TABLE t2 ADD x INT DEFAULT 42 AFTER a;
|
||||
ALTER TABLE t3 ADD x INT DEFAULT 42 FIRST;
|
||||
STOP SLAVE;
|
||||
SET GLOBAL SQL_MODE='STRICT_ALL_TABLES';
|
||||
START SLAVE;
|
||||
CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='NDB';
|
||||
CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='NDB';
|
||||
CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='NDB';
|
||||
CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='NDB';
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='NDB';
|
||||
CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='NDB';
|
||||
CREATE TABLE t4 (a INT) ENGINE='NDB';
|
||||
CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='NDB';
|
||||
CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='NDB';
|
||||
CREATE TABLE t9 (a INT) ENGINE='NDB';
|
||||
ALTER TABLE t1_int ADD x INT DEFAULT 42;
|
||||
ALTER TABLE t1_bit
|
||||
ADD x BIT(3) DEFAULT b'011',
|
||||
ADD y BIT(5) DEFAULT b'10101',
|
||||
ADD z BIT(2) DEFAULT b'10';
|
||||
ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test';
|
||||
ALTER TABLE t1_nodef ADD x INT NOT NULL;
|
||||
ALTER TABLE t2 DROP b;
|
||||
ALTER TABLE t4 MODIFY a FLOAT;
|
||||
ALTER TABLE t5 MODIFY b FLOAT;
|
||||
ALTER TABLE t6 MODIFY c FLOAT;
|
||||
INSERT INTO t9 VALUES (1);
|
||||
INSERT INTO t1 VALUES (1,2);
|
||||
INSERT INTO t1_int VALUES (2, 4, 4711);
|
||||
INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar');
|
||||
INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01');
|
||||
**** On Master ****
|
||||
INSERT INTO t1_int VALUES (1,2);
|
||||
INSERT INTO t1_int VALUES (2,5);
|
||||
INSERT INTO t1_bit VALUES (1,2);
|
||||
INSERT INTO t1_bit VALUES (2,5);
|
||||
INSERT INTO t1_char VALUES (1,2);
|
||||
INSERT INTO t1_char VALUES (2,5);
|
||||
SELECT * FROM t1_int;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
SELECT * FROM t1_bit;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
SELECT * FROM t1_char;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
**** On Slave ****
|
||||
SELECT a,b,x FROM t1_int;
|
||||
a b x
|
||||
1 2 42
|
||||
2 5 42
|
||||
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
|
||||
a b HEX(x) HEX(y) HEX(z)
|
||||
1 2 3 15 2
|
||||
2 5 3 15 2
|
||||
SELECT a,b,x FROM t1_char;
|
||||
a b x
|
||||
1 2 Just a test
|
||||
2 5 Just a test
|
||||
**** On Master ****
|
||||
UPDATE t1_int SET b=2*b WHERE a=2;
|
||||
UPDATE t1_char SET b=2*b WHERE a=2;
|
||||
UPDATE t1_bit SET b=2*b WHERE a=2;
|
||||
SELECT * FROM t1_int;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
SELECT * FROM t1_bit;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
SELECT * FROM t1_char;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
**** On Slave ****
|
||||
SELECT a,b,x FROM t1_int;
|
||||
a b x
|
||||
1 2 42
|
||||
2 10 42
|
||||
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
|
||||
a b HEX(x) HEX(y) HEX(z)
|
||||
1 2 3 15 2
|
||||
2 10 3 15 2
|
||||
SELECT a,b,x FROM t1_char;
|
||||
a b x
|
||||
1 2 Just a test
|
||||
2 10 Just a test
|
||||
INSERT INTO t9 VALUES (2);
|
||||
INSERT INTO t1_nodef VALUES (1,2);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
@ -26,7 +101,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 1042
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@ -38,10 +113,10 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1454
|
||||
Last_Error Table width mismatch - received 2 columns, test.t1 has 3 columns
|
||||
Last_Errno 1364
|
||||
Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 968
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
@ -64,7 +139,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 1185
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@ -76,48 +151,10 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1454
|
||||
Last_Error Table width mismatch - received 2 columns, test.t2 has 3 columns
|
||||
Last_Errno 1514
|
||||
Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 1111
|
||||
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 #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (3);
|
||||
INSERT INTO t3 VALUES (3,6);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 1328
|
||||
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 1454
|
||||
Last_Error Table width mismatch - received 2 columns, test.t3 has 3 columns
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 1254
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
@ -140,7 +177,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 1466
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@ -152,10 +189,10 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1454
|
||||
Last_Errno 1514
|
||||
Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 1397
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
@ -178,7 +215,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 1614
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@ -190,10 +227,10 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1454
|
||||
Last_Errno 1514
|
||||
Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 1535
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
@ -216,7 +253,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 1762
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@ -228,10 +265,10 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1454
|
||||
Last_Errno 1514
|
||||
Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 1683
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
@ -245,4 +282,5 @@ Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t9;
|
||||
DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef;
|
||||
DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t9;
|
@ -5,9 +5,15 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
stop slave;
|
||||
#
|
||||
# Generate a big enough master's binlog to cause relay log rotations
|
||||
#
|
||||
create table t1 (a int);
|
||||
drop table t1;
|
||||
reset slave;
|
||||
#
|
||||
# Test 1
|
||||
#
|
||||
set global max_binlog_size=8192;
|
||||
set global max_relay_log_size=8192-1;
|
||||
select @@global.max_relay_log_size;
|
||||
@ -15,47 +21,251 @@ select @@global.max_relay_log_size;
|
||||
4096
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 72956 # # master-bin.000001 Yes Yes # 0 0 72956 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 72956
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 72956
|
||||
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 #
|
||||
#
|
||||
# Test 2
|
||||
#
|
||||
stop slave;
|
||||
reset slave;
|
||||
set global max_relay_log_size=(5*4096);
|
||||
select @@global.max_relay_log_size;
|
||||
@@global.max_relay_log_size
|
||||
20480
|
||||
@@global.max_relay_log_size 20480
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 72956 # # master-bin.000001 Yes Yes # 0 0 72956 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 72956
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 72956
|
||||
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 #
|
||||
#
|
||||
# Test 3: max_relay_log_size = 0
|
||||
#
|
||||
stop slave;
|
||||
reset slave;
|
||||
set global max_relay_log_size=0;
|
||||
select @@global.max_relay_log_size;
|
||||
@@global.max_relay_log_size
|
||||
0
|
||||
@@global.max_relay_log_size 0
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 72956 # # master-bin.000001 Yes Yes # 0 0 72956 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 72956
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 72956
|
||||
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 #
|
||||
#
|
||||
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
|
||||
#
|
||||
stop slave;
|
||||
reset slave;
|
||||
flush logs;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File
|
||||
Read_Master_Log_Pos 4
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File
|
||||
Slave_IO_Running No
|
||||
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 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 0
|
||||
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 #
|
||||
#
|
||||
# Test 5
|
||||
#
|
||||
reset slave;
|
||||
start slave;
|
||||
flush logs;
|
||||
create table t1 (a int);
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73042 # # master-bin.000001 Yes Yes # 0 0 73042 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 73042
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 73042
|
||||
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 #
|
||||
#
|
||||
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
|
||||
#
|
||||
flush logs;
|
||||
drop table t1;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73118 # # master-bin.000001 Yes Yes # 0 0 73118 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 73118
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 73118
|
||||
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 #
|
||||
flush logs;
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000002 102 <Binlog_Ignore_DB>
|
||||
File master-bin.000002
|
||||
Position 102
|
||||
Binlog_Do_DB <Binlog_Ignore_DB>
|
||||
Binlog_Ignore_DB
|
||||
#
|
||||
# End of 4.1 tests
|
||||
#
|
||||
|
@ -7,6 +7,8 @@ start slave;
|
||||
drop database if exists mysqltest1;
|
||||
create database mysqltest1;
|
||||
use mysqltest1;
|
||||
set session binlog_format=row;
|
||||
set global binlog_format=row;
|
||||
show global variables like "binlog_format%";
|
||||
Variable_name Value
|
||||
binlog_format ROW
|
||||
@ -358,6 +360,28 @@ count(*)
|
||||
select count(*) from t16;
|
||||
count(*)
|
||||
3
|
||||
DROP TABLE IF EXISTS t11;
|
||||
SET SESSION BINLOG_FORMAT=STATEMENT;
|
||||
CREATE TABLE t11 (song VARCHAR(255));
|
||||
LOCK TABLES t11 WRITE;
|
||||
SET SESSION BINLOG_FORMAT=ROW;
|
||||
INSERT INTO t11 VALUES('Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict');
|
||||
SET SESSION BINLOG_FORMAT=STATEMENT;
|
||||
INSERT INTO t11 VALUES('Careful With That Axe, Eugene');
|
||||
UNLOCK TABLES;
|
||||
SELECT * FROM t11;
|
||||
song Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict
|
||||
song Careful With That Axe, Eugene
|
||||
USE mysqltest1;
|
||||
SELECT * FROM t11;
|
||||
song Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict
|
||||
song Careful With That Axe, Eugene
|
||||
DROP TABLE IF EXISTS t12;
|
||||
SET SESSION BINLOG_FORMAT=MIXED;
|
||||
CREATE TABLE t12 (data LONG);
|
||||
LOCK TABLES t12 WRITE;
|
||||
INSERT INTO t12 VALUES(UUID());
|
||||
UNLOCK TABLES;
|
||||
show binlog events from 102;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # drop database if exists mysqltest1
|
||||
@ -659,4 +683,323 @@ master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t16)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t16 values("try_66_")
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; DROP TABLE IF EXISTS t11
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t11 (song VARCHAR(255))
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t11)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t11 VALUES('Careful With That Axe, Eugene')
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; DROP TABLE IF EXISTS t12
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t12 (data LONG)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t12)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
show binlog events from 102;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # drop database if exists mysqltest1
|
||||
master-bin.000001 # Query 1 # create database mysqltest1
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t1 (a varchar(100))
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_8_")
|
||||
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F375F COLLATE latin1_swedish_ci
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_9_")
|
||||
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F375F COLLATE latin1_swedish_ci
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("for_10_")
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_11_"
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_13_")
|
||||
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F31325F COLLATE latin1_swedish_ci
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_14_")
|
||||
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F31325F COLLATE latin1_swedish_ci
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("for_15_")
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_16_"
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_18_")
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F31375F COLLATE latin1_swedish_ci
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_21_"
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F31375F COLLATE latin1_swedish_ci
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_24_"
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE `t2` (
|
||||
`rpad(UUID(),100,' ')` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT ''
|
||||
)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE `t3` (
|
||||
`1` varbinary(36) NOT NULL DEFAULT ''
|
||||
)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t3)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE `t4` (
|
||||
`a` varchar(100) DEFAULT NULL
|
||||
)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t4)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t5)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo()
|
||||
begin
|
||||
insert into t1 values("work_25_");
|
||||
insert into t1 values(concat("for_26_",UUID()));
|
||||
insert into t1 select "yesterday_27_";
|
||||
end
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo2()
|
||||
begin
|
||||
insert into t1 values(concat("emergency_28_",UUID()));
|
||||
insert into t1 values("work_29_");
|
||||
insert into t1 values(concat("for_30_",UUID()));
|
||||
set session binlog_format=row; # accepted for stored procs
|
||||
insert into t1 values("more work_31_");
|
||||
set session binlog_format=mixed;
|
||||
end
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned
|
||||
begin
|
||||
set session binlog_format=row; # rejected for stored funcs
|
||||
insert into t1 values("alarm");
|
||||
return 100;
|
||||
end
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo4(x varchar(100))
|
||||
begin
|
||||
insert into t1 values(concat("work_250_",x));
|
||||
insert into t1 select "yesterday_270_";
|
||||
end
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'hello')))
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_270_"
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'world')))
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_270_"
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; drop function foo3
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned
|
||||
begin
|
||||
insert into t1 values("foo3_32_");
|
||||
call foo();
|
||||
return 100;
|
||||
end
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo4() returns bigint unsigned
|
||||
begin
|
||||
insert into t2 select foo3();
|
||||
return 100;
|
||||
end
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo5() returns bigint unsigned
|
||||
begin
|
||||
insert into t2 select UUID();
|
||||
return 100;
|
||||
end
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo6(x varchar(100)) returns bigint unsigned
|
||||
begin
|
||||
insert into t2 select x;
|
||||
return 100;
|
||||
end
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `foo6`(_latin1'foo6_1_')
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select uuid()
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t11 (data varchar(255))
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t11)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11')
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11')
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11')
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t11_bi before insert on t11 for each row
|
||||
begin
|
||||
set NEW.data = concat(NEW.data,UUID());
|
||||
end
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t11)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t20 select * from t1
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t21 select * from t2
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t22 select * from t3
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1,t2,t3
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100))
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t2 (a int primary key auto_increment, b varchar(100))
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t3 (b varchar(100))
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f (x varchar(100)) returns int deterministic
|
||||
begin
|
||||
insert into t1 values(null,x);
|
||||
insert into t2 values(null,x);
|
||||
return 1;
|
||||
end
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=3
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(null,"try_44_")
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t12 select * from t1
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int, b varchar(100), key(a))
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=4
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `f`(_latin1'try_45_')
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t13 select * from t1
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100))
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; drop function f
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t14 (unique (a)) select * from t2
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; truncate table t2
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f1 (x varchar(100)) returns int deterministic
|
||||
begin
|
||||
insert into t1 values(null,x);
|
||||
return 1;
|
||||
end
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic
|
||||
begin
|
||||
insert into t2 values(null,x);
|
||||
return 1;
|
||||
end
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t3)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; drop function f2
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic
|
||||
begin
|
||||
declare y int;
|
||||
insert into t1 values(null,x);
|
||||
set y = (select count(*) from t2);
|
||||
return y;
|
||||
end
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=4
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `f1`(_latin1'try_53_')
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=5
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `f2`(_latin1'try_54_')
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; drop function f2
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert on t1 for each row
|
||||
begin
|
||||
insert into t2 values(null,"try_55_");
|
||||
end
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; alter table t1 modify a int, drop primary key
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=5
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(null,"try_57_")
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE `t16` (
|
||||
`UUID()` varchar(36) CHARACTER SET utf8 NOT NULL DEFAULT ''
|
||||
)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t16)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t16)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t16 values("try_66_")
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; DROP TABLE IF EXISTS t11
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t11 (song VARCHAR(255))
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t11)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t11 VALUES('Careful With That Axe, Eugene')
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; DROP TABLE IF EXISTS t12
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t12 (data LONG)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t12)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
drop database mysqltest1;
|
||||
|
@ -80,4 +80,19 @@ c
|
||||
---> Cleaning up...
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
create table t1(a int, b int);
|
||||
insert into t1 values (1, 1), (1, 2), (1, 3);
|
||||
create view v1(a, b) as select a, sum(b) from t1 group by a;
|
||||
explain v1;
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) YES NULL
|
||||
b decimal(32,0) YES NULL
|
||||
show create table v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,sum(`t1`.`b`) AS `b` from `t1` group by `t1`.`a`
|
||||
select * from v1;
|
||||
a b
|
||||
1 6
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
End of 5.0 tests
|
||||
|
@ -3,6 +3,10 @@ show status like 'Table_lock%';
|
||||
Variable_name Value
|
||||
Table_locks_immediate 0
|
||||
Table_locks_waited 0
|
||||
select * from information_schema.session_status where variable_name like 'Table_lock%';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
TABLE_LOCKS_IMMEDIATE 0.0000000
|
||||
TABLE_LOCKS_WAITED 0.0000000
|
||||
SET SQL_LOG_BIN=0;
|
||||
drop table if exists t1;
|
||||
create table t1(n int) engine=myisam;
|
||||
@ -16,6 +20,10 @@ show status like 'Table_lock%';
|
||||
Variable_name Value
|
||||
Table_locks_immediate 3
|
||||
Table_locks_waited 1
|
||||
select * from information_schema.session_status where variable_name like 'Table_lock%';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
TABLE_LOCKS_IMMEDIATE 3.0000000
|
||||
TABLE_LOCKS_WAITED 1.0000000
|
||||
drop table t1;
|
||||
select 1;
|
||||
1
|
||||
@ -53,21 +61,36 @@ FLUSH STATUS;
|
||||
SHOW STATUS LIKE 'max_used_connections';
|
||||
Variable_name Value
|
||||
Max_used_connections 1
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_USED_CONNECTIONS 1.0000000
|
||||
SET @save_thread_cache_size=@@thread_cache_size;
|
||||
SET GLOBAL thread_cache_size=3;
|
||||
SHOW STATUS LIKE 'max_used_connections';
|
||||
Variable_name Value
|
||||
Max_used_connections 3
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_USED_CONNECTIONS 3.0000000
|
||||
FLUSH STATUS;
|
||||
SHOW STATUS LIKE 'max_used_connections';
|
||||
Variable_name Value
|
||||
Max_used_connections 2
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_USED_CONNECTIONS 2.0000000
|
||||
SHOW STATUS LIKE 'max_used_connections';
|
||||
Variable_name Value
|
||||
Max_used_connections 3
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_USED_CONNECTIONS 3.0000000
|
||||
SHOW STATUS LIKE 'max_used_connections';
|
||||
Variable_name Value
|
||||
Max_used_connections 4
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_USED_CONNECTIONS 4.0000000
|
||||
SET GLOBAL thread_cache_size=@save_thread_cache_size;
|
||||
show status like 'com_show_status';
|
||||
Variable_name Value
|
||||
|
@ -103,21 +103,36 @@ set max_join_size=100;
|
||||
show variables like 'max_join_size';
|
||||
Variable_name Value
|
||||
max_join_size 100
|
||||
select * from information_schema.session_variables where variable_name like 'max_join_size';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_JOIN_SIZE 100
|
||||
show global variables like 'max_join_size';
|
||||
Variable_name Value
|
||||
max_join_size 10
|
||||
select * from information_schema.global_variables where variable_name like 'max_join_size';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_JOIN_SIZE 10
|
||||
set GLOBAL max_join_size=2000;
|
||||
show global variables like 'max_join_size';
|
||||
Variable_name Value
|
||||
max_join_size 2000
|
||||
select * from information_schema.global_variables where variable_name like 'max_join_size';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_JOIN_SIZE 2000
|
||||
set max_join_size=DEFAULT;
|
||||
show variables like 'max_join_size';
|
||||
Variable_name Value
|
||||
max_join_size 2000
|
||||
select * from information_schema.session_variables where variable_name like 'max_join_size';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_JOIN_SIZE 2000
|
||||
set GLOBAL max_join_size=DEFAULT;
|
||||
show global variables like 'max_join_size';
|
||||
Variable_name Value
|
||||
max_join_size HA_POS_ERROR
|
||||
select * from information_schema.global_variables where variable_name like 'max_join_size';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_JOIN_SIZE HA_POS_ERROR
|
||||
set @@max_join_size=1000, @@global.max_join_size=2000;
|
||||
select @@local.max_join_size, @@global.max_join_size;
|
||||
@@local.max_join_size @@global.max_join_size
|
||||
@ -149,14 +164,23 @@ set global concurrent_insert=2;
|
||||
show variables like 'concurrent_insert';
|
||||
Variable_name Value
|
||||
concurrent_insert 2
|
||||
select * from information_schema.session_variables where variable_name like 'concurrent_insert';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
CONCURRENT_INSERT 2
|
||||
set global concurrent_insert=1;
|
||||
show variables like 'concurrent_insert';
|
||||
Variable_name Value
|
||||
concurrent_insert 1
|
||||
select * from information_schema.session_variables where variable_name like 'concurrent_insert';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
CONCURRENT_INSERT 1
|
||||
set global concurrent_insert=0;
|
||||
show variables like 'concurrent_insert';
|
||||
Variable_name Value
|
||||
concurrent_insert 0
|
||||
select * from information_schema.session_variables where variable_name like 'concurrent_insert';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
CONCURRENT_INSERT 0
|
||||
set global concurrent_insert=DEFAULT;
|
||||
select @@concurrent_insert;
|
||||
@@concurrent_insert
|
||||
@ -165,26 +189,44 @@ set global timed_mutexes=ON;
|
||||
show variables like 'timed_mutexes';
|
||||
Variable_name Value
|
||||
timed_mutexes ON
|
||||
select * from information_schema.session_variables where variable_name like 'timed_mutexes';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
TIMED_MUTEXES ON
|
||||
set global timed_mutexes=0;
|
||||
show variables like 'timed_mutexes';
|
||||
Variable_name Value
|
||||
timed_mutexes OFF
|
||||
select * from information_schema.session_variables where variable_name like 'timed_mutexes';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
TIMED_MUTEXES OFF
|
||||
set storage_engine=MYISAM, storage_engine="HEAP", global storage_engine="MERGE";
|
||||
show local variables like 'storage_engine';
|
||||
Variable_name Value
|
||||
storage_engine MEMORY
|
||||
select * from information_schema.session_variables where variable_name like 'storage_engine';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
STORAGE_ENGINE MEMORY
|
||||
show global variables like 'storage_engine';
|
||||
Variable_name Value
|
||||
storage_engine MRG_MYISAM
|
||||
select * from information_schema.global_variables where variable_name like 'storage_engine';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
STORAGE_ENGINE MRG_MYISAM
|
||||
set GLOBAL query_cache_size=100000;
|
||||
set GLOBAL myisam_max_sort_file_size=2000000;
|
||||
show global variables like 'myisam_max_sort_file_size';
|
||||
Variable_name Value
|
||||
myisam_max_sort_file_size 1048576
|
||||
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MYISAM_MAX_SORT_FILE_SIZE 1048576
|
||||
set GLOBAL myisam_max_sort_file_size=default;
|
||||
show variables like 'myisam_max_sort_file_size';
|
||||
Variable_name Value
|
||||
myisam_max_sort_file_size FILE_SIZE
|
||||
select * from information_schema.session_variables where variable_name like 'myisam_max_sort_file_size';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MYISAM_MAX_SORT_FILE_SIZE FILE_SIZE
|
||||
set global net_retry_count=10, session net_retry_count=10;
|
||||
set global net_buffer_length=1024, net_write_timeout=200, net_read_timeout=300;
|
||||
set session net_buffer_length=2048, net_write_timeout=500, net_read_timeout=600;
|
||||
@ -194,12 +236,24 @@ net_buffer_length 1024
|
||||
net_read_timeout 300
|
||||
net_retry_count 10
|
||||
net_write_timeout 200
|
||||
select * from information_schema.global_variables where variable_name like 'net_%';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
NET_BUFFER_LENGTH 1024
|
||||
NET_READ_TIMEOUT 300
|
||||
NET_RETRY_COUNT 10
|
||||
NET_WRITE_TIMEOUT 200
|
||||
show session variables like 'net_%';
|
||||
Variable_name Value
|
||||
net_buffer_length 2048
|
||||
net_read_timeout 600
|
||||
net_retry_count 10
|
||||
net_write_timeout 500
|
||||
select * from information_schema.session_variables where variable_name like 'net_%';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
NET_BUFFER_LENGTH 2048
|
||||
NET_READ_TIMEOUT 600
|
||||
NET_RETRY_COUNT 10
|
||||
NET_WRITE_TIMEOUT 500
|
||||
set session net_buffer_length=8000, global net_read_timeout=900, net_write_timeout=1000;
|
||||
show global variables like 'net_%';
|
||||
Variable_name Value
|
||||
@ -207,24 +261,45 @@ net_buffer_length 1024
|
||||
net_read_timeout 900
|
||||
net_retry_count 10
|
||||
net_write_timeout 1000
|
||||
select * from information_schema.global_variables where variable_name like 'net_%';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
NET_BUFFER_LENGTH 1024
|
||||
NET_READ_TIMEOUT 900
|
||||
NET_RETRY_COUNT 10
|
||||
NET_WRITE_TIMEOUT 1000
|
||||
show session variables like 'net_%';
|
||||
Variable_name Value
|
||||
net_buffer_length 7168
|
||||
net_read_timeout 600
|
||||
net_retry_count 10
|
||||
net_write_timeout 500
|
||||
select * from information_schema.session_variables where variable_name like 'net_%';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
NET_BUFFER_LENGTH 7168
|
||||
NET_READ_TIMEOUT 600
|
||||
NET_RETRY_COUNT 10
|
||||
NET_WRITE_TIMEOUT 500
|
||||
set net_buffer_length=1;
|
||||
show variables like 'net_buffer_length';
|
||||
Variable_name Value
|
||||
net_buffer_length 1024
|
||||
select * from information_schema.session_variables where variable_name like 'net_buffer_length';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
NET_BUFFER_LENGTH 1024
|
||||
set net_buffer_length=2000000000;
|
||||
show variables like 'net_buffer_length';
|
||||
Variable_name Value
|
||||
net_buffer_length 1048576
|
||||
select * from information_schema.session_variables where variable_name like 'net_buffer_length';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
NET_BUFFER_LENGTH 1048576
|
||||
set character set cp1251_koi8;
|
||||
show variables like "character_set_client";
|
||||
Variable_name Value
|
||||
character_set_client cp1251
|
||||
select * from information_schema.session_variables where variable_name like 'character_set_client';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
CHARACTER_SET_CLIENT cp1251
|
||||
select @@timestamp>0;
|
||||
@@timestamp>0
|
||||
1
|
||||
@ -239,6 +314,13 @@ query_prealloc_size 8192
|
||||
range_alloc_block_size 2048
|
||||
transaction_alloc_block_size 8192
|
||||
transaction_prealloc_size 4096
|
||||
select * from information_schema.session_variables where variable_name like '%alloc%';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
QUERY_ALLOC_BLOCK_SIZE 8192
|
||||
QUERY_PREALLOC_SIZE 8192
|
||||
RANGE_ALLOC_BLOCK_SIZE 2048
|
||||
TRANSACTION_ALLOC_BLOCK_SIZE 8192
|
||||
TRANSACTION_PREALLOC_SIZE 4096
|
||||
set @@range_alloc_block_size=1024*16;
|
||||
set @@query_alloc_block_size=1024*17+2;
|
||||
set @@query_prealloc_size=1024*18;
|
||||
@ -254,6 +336,13 @@ query_prealloc_size 18432
|
||||
range_alloc_block_size 16384
|
||||
transaction_alloc_block_size 19456
|
||||
transaction_prealloc_size 20480
|
||||
select * from information_schema.session_variables where variable_name like '%alloc%';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
QUERY_ALLOC_BLOCK_SIZE 17408
|
||||
QUERY_PREALLOC_SIZE 18432
|
||||
RANGE_ALLOC_BLOCK_SIZE 16384
|
||||
TRANSACTION_ALLOC_BLOCK_SIZE 19456
|
||||
TRANSACTION_PREALLOC_SIZE 20480
|
||||
set @@range_alloc_block_size=default;
|
||||
set @@query_alloc_block_size=default, @@query_prealloc_size=default;
|
||||
set transaction_alloc_block_size=default, @@transaction_prealloc_size=default;
|
||||
@ -264,6 +353,13 @@ query_prealloc_size 8192
|
||||
range_alloc_block_size 2048
|
||||
transaction_alloc_block_size 8192
|
||||
transaction_prealloc_size 4096
|
||||
select * from information_schema.session_variables where variable_name like '%alloc%';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
QUERY_ALLOC_BLOCK_SIZE 8192
|
||||
QUERY_PREALLOC_SIZE 8192
|
||||
RANGE_ALLOC_BLOCK_SIZE 2048
|
||||
TRANSACTION_ALLOC_BLOCK_SIZE 8192
|
||||
TRANSACTION_PREALLOC_SIZE 4096
|
||||
SELECT @@version LIKE 'non-existent';
|
||||
@@version LIKE 'non-existent'
|
||||
0
|
||||
@ -485,6 +581,9 @@ set global myisam_max_sort_file_size=4294967296;
|
||||
show global variables like 'myisam_max_sort_file_size';
|
||||
Variable_name Value
|
||||
myisam_max_sort_file_size MAX_FILE_SIZE
|
||||
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MYISAM_MAX_SORT_FILE_SIZE MAX_FILE_SIZE
|
||||
set global myisam_max_sort_file_size=default;
|
||||
select @@global.max_user_connections,@@local.max_join_size;
|
||||
@@global.max_user_connections @@local.max_join_size
|
||||
@ -524,18 +623,30 @@ set @tstlw = @@log_warnings;
|
||||
show global variables like 'log_warnings';
|
||||
Variable_name Value
|
||||
log_warnings 1
|
||||
select * from information_schema.global_variables where variable_name like 'log_warnings';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
LOG_WARNINGS 1
|
||||
set global log_warnings = 0;
|
||||
show global variables like 'log_warnings';
|
||||
Variable_name Value
|
||||
log_warnings 0
|
||||
select * from information_schema.global_variables where variable_name like 'log_warnings';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
LOG_WARNINGS 0
|
||||
set global log_warnings = 42;
|
||||
show global variables like 'log_warnings';
|
||||
Variable_name Value
|
||||
log_warnings 42
|
||||
select * from information_schema.global_variables where variable_name like 'log_warnings';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
LOG_WARNINGS 42
|
||||
set global log_warnings = @tstlw;
|
||||
show global variables like 'log_warnings';
|
||||
Variable_name Value
|
||||
log_warnings 1
|
||||
select * from information_schema.global_variables where variable_name like 'log_warnings';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
LOG_WARNINGS 1
|
||||
create table t1 (
|
||||
c1 tinyint,
|
||||
c2 smallint,
|
||||
@ -567,10 +678,16 @@ SET GLOBAL MYISAM_DATA_POINTER_SIZE= 7;
|
||||
SHOW VARIABLES LIKE 'MYISAM_DATA_POINTER_SIZE';
|
||||
Variable_name Value
|
||||
myisam_data_pointer_size 7
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'MYISAM_DATA_POINTER_SIZE';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MYISAM_DATA_POINTER_SIZE 7
|
||||
SET GLOBAL table_open_cache=-1;
|
||||
SHOW VARIABLES LIKE 'table_open_cache';
|
||||
Variable_name Value
|
||||
table_open_cache 1
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'table_open_cache';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
TABLE_OPEN_CACHE 1
|
||||
SET GLOBAL table_open_cache=DEFAULT;
|
||||
set character_set_results=NULL;
|
||||
select ifnull(@@character_set_results,"really null");
|
||||
@ -639,21 +756,36 @@ set @@sql_big_selects = 1;
|
||||
show variables like 'sql_big_selects';
|
||||
Variable_name Value
|
||||
sql_big_selects ON
|
||||
select * from information_schema.session_variables where variable_name like 'sql_big_selects';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
SQL_BIG_SELECTS ON
|
||||
set @@sql_big_selects = @old_sql_big_selects;
|
||||
set @@sql_notes = 0, @@sql_warnings = 0;
|
||||
show variables like 'sql_notes';
|
||||
Variable_name Value
|
||||
sql_notes OFF
|
||||
select * from information_schema.session_variables where variable_name like 'sql_notes';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
SQL_NOTES OFF
|
||||
show variables like 'sql_warnings';
|
||||
Variable_name Value
|
||||
sql_warnings OFF
|
||||
select * from information_schema.session_variables where variable_name like 'sql_warnings';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
SQL_WARNINGS OFF
|
||||
set @@sql_notes = 1, @@sql_warnings = 1;
|
||||
show variables like 'sql_notes';
|
||||
Variable_name Value
|
||||
sql_notes ON
|
||||
select * from information_schema.session_variables where variable_name like 'sql_notes';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
SQL_NOTES ON
|
||||
show variables like 'sql_warnings';
|
||||
Variable_name Value
|
||||
sql_warnings ON
|
||||
select * from information_schema.session_variables where variable_name like 'sql_warnings';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
SQL_WARNINGS ON
|
||||
select @@system_time_zone;
|
||||
@@system_time_zone
|
||||
#
|
||||
@ -667,12 +799,21 @@ select @@basedir, @@datadir, @@tmpdir;
|
||||
show variables like 'basedir';
|
||||
Variable_name Value
|
||||
basedir #
|
||||
select * from information_schema.session_variables where variable_name like 'basedir';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
BASEDIR #
|
||||
show variables like 'datadir';
|
||||
Variable_name Value
|
||||
datadir #
|
||||
select * from information_schema.session_variables where variable_name like 'datadir';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
DATADIR #
|
||||
show variables like 'tmpdir';
|
||||
Variable_name Value
|
||||
tmpdir #
|
||||
select * from information_schema.session_variables where variable_name like 'tmpdir';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
TMPDIR #
|
||||
select @@ssl_ca, @@ssl_capath, @@ssl_cert, @@ssl_cipher, @@ssl_key;
|
||||
@@ssl_ca @@ssl_capath @@ssl_cert @@ssl_cipher @@ssl_key
|
||||
# # # # #
|
||||
@ -683,12 +824,22 @@ ssl_capath #
|
||||
ssl_cert #
|
||||
ssl_cipher #
|
||||
ssl_key #
|
||||
select * from information_schema.session_variables where variable_name like 'ssl%';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
SSL_CA #
|
||||
SSL_CAPATH #
|
||||
SSL_CERT #
|
||||
SSL_CIPHER #
|
||||
SSL_KEY #
|
||||
select @@log_queries_not_using_indexes;
|
||||
@@log_queries_not_using_indexes
|
||||
0
|
||||
show variables like 'log_queries_not_using_indexes';
|
||||
Variable_name Value
|
||||
log_queries_not_using_indexes OFF
|
||||
select * from information_schema.session_variables where variable_name like 'log_queries_not_using_indexes';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
LOG_QUERIES_NOT_USING_INDEXES OFF
|
||||
select @@"";
|
||||
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
|
||||
select @@&;
|
||||
|
Reference in New Issue
Block a user