Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
de1dcee9
Commit
de1dcee9
authored
Feb 16, 2005
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after merge fixes
parent
2d8b5199
Changes
33
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
555 additions
and
311 deletions
+555
-311
mysql-test/r/ctype_ucs.result
mysql-test/r/ctype_ucs.result
+91
-2
mysql-test/r/drop_temp_table.result
mysql-test/r/drop_temp_table.result
+11
-5
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+110
-11
mysql-test/r/insert_select.result
mysql-test/r/insert_select.result
+13
-1
mysql-test/r/mix_innodb_myisam_binlog.result
mysql-test/r/mix_innodb_myisam_binlog.result
+43
-43
mysql-test/r/mysqlbinlog.result
mysql-test/r/mysqlbinlog.result
+2
-0
mysql-test/r/rpl_change_master.result
mysql-test/r/rpl_change_master.result
+2
-2
mysql-test/r/rpl_charset.result
mysql-test/r/rpl_charset.result
+74
-35
mysql-test/r/rpl_error_ignored_table.result
mysql-test/r/rpl_error_ignored_table.result
+10
-10
mysql-test/r/rpl_flush_log_loop.result
mysql-test/r/rpl_flush_log_loop.result
+1
-1
mysql-test/r/rpl_flush_tables.result
mysql-test/r/rpl_flush_tables.result
+15
-15
mysql-test/r/rpl_loaddata.result
mysql-test/r/rpl_loaddata.result
+4
-4
mysql-test/r/rpl_loaddata_rule_m.result
mysql-test/r/rpl_loaddata_rule_m.result
+2
-2
mysql-test/r/rpl_log.result
mysql-test/r/rpl_log.result
+41
-41
mysql-test/r/rpl_max_relay_size.result
mysql-test/r/rpl_max_relay_size.result
+5
-5
mysql-test/r/rpl_relayrotate.result
mysql-test/r/rpl_relayrotate.result
+1
-1
mysql-test/r/rpl_replicate_do.result
mysql-test/r/rpl_replicate_do.result
+1
-1
mysql-test/r/rpl_rotate_logs.result
mysql-test/r/rpl_rotate_logs.result
+5
-5
mysql-test/r/rpl_temporary.result
mysql-test/r/rpl_temporary.result
+12
-12
mysql-test/r/rpl_timezone.result
mysql-test/r/rpl_timezone.result
+6
-6
mysql-test/r/rpl_until.result
mysql-test/r/rpl_until.result
+11
-11
mysql-test/r/rpl_user_variables.result
mysql-test/r/rpl_user_variables.result
+29
-28
mysql-test/r/user_var.result
mysql-test/r/user_var.result
+11
-7
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+1
-1
mysql-test/t/strict.test
mysql-test/t/strict.test
+2
-2
sql/examples/ha_archive.cc
sql/examples/ha_archive.cc
+24
-6
sql/ha_innodb.cc
sql/ha_innodb.cc
+12
-7
sql/handler.cc
sql/handler.cc
+2
-0
sql/log.cc
sql/log.cc
+1
-4
sql/mysqld.cc
sql/mysqld.cc
+3
-3
sql/sql_class.h
sql/sql_class.h
+0
-1
sql/sql_delete.cc
sql/sql_delete.cc
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+9
-38
No files found.
mysql-test/r/ctype_ucs.result
View file @
de1dcee9
...
...
@@ -526,13 +526,102 @@ insert into t2 values (@v);
show binlog events from 96;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 User var 1 136 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci
master-bin.000001 136 Query 1 2
19
use `test`; insert into t2 values (@v)
master-bin.000001 136 Query 1 2
26
use `test`; insert into t2 values (@v)
flush logs;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
SET @`v`:=_ucs2 0x006100620063 COLLATE
ucs2_general_ci
;
SET @`v`:=_ucs2 0x006100620063 COLLATE
`ucs2_general_ci`
;
use test;
SET TIMESTAMP=10000;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
SET @@session.sql_mode=0;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
insert into t2 values (@v);
drop table t2;
set names latin1;
create table t1 (a enum('x','y','z') character set ucs2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` enum('x','y','z') character set ucs2 default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('x');
insert into t1 values ('y');
insert into t1 values ('z');
select a, hex(a) from t1 order by a;
a hex(a)
x 0078
y 0079
z 007A
alter table t1 change a a enum('x','y','z','d','e','','','') character set ucs2;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` enum('x','y','z','d','e','','','') character set ucs2 default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('D');
insert into t1 values ('E ');
insert into t1 values ('');
insert into t1 values ('');
insert into t1 values ('');
select a, hex(a) from t1 order by a;
a hex(a)
x 0078
y 0079
z 007A
d 0064
e 0065
00E4
00F6
00FC
drop table t1;
create table t1 (a set ('x','y','z','','','') character set ucs2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` set('x','y','z','','','') character set ucs2 default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('x');
insert into t1 values ('y');
insert into t1 values ('z');
insert into t1 values ('x,y');
insert into t1 values ('x,y,z,,,');
select a, hex(a) from t1 order by a;
a hex(a)
x 0078
y 0079
x,y 0078002C0079
z 007A
x,y,z,,, 0078002C0079002C007A002C00E4002C00F6002C00FC
drop table t1;
create table t1(a enum('a','b','c')) default character set ucs2;
insert into t1 values('a'),('b'),('c');
alter table t1 add b char(1);
show warnings;
Level Code Message
select * from t1 order by a;
a b
a NULL
b NULL
c NULL
drop table t1;
SET collation_connection='ucs2_general_ci';
create table t1 select repeat('a',4000) a;
delete from t1;
insert into t1 values ('a'), ('a '), ('a\t');
select collation(a),hex(a) from t1 order by a;
collation(a) hex(a)
ucs2_general_ci 00610009
ucs2_general_ci 0061
ucs2_general_ci 00610020
drop table t1;
SET NAMES latin1;
SET collation_connection='ucs2_bin';
create table t1 select repeat('a',4000) a;
delete from t1;
insert into t1 values ('a'), ('a '), ('a\t');
select collation(a),hex(a) from t1 order by a;
collation(a) hex(a)
ucs2_bin 00610009
ucs2_bin 0061
ucs2_bin 00610020
drop table t1;
mysql-test/r/drop_temp_table.result
View file @
de1dcee9
reset master;
create database `drop-temp+table-test`;
use `drop-temp+table-test`;
create temporary table shortn1 (a int);
create temporary table `table:name` (a int);
create temporary table shortn2 (a int);
select get_lock("a",10);
get_lock("a",10)
1
...
...
@@ -10,9 +12,13 @@ get_lock("a",10)
1
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
master-bin.000001 96 Query 1 207 create database `drop-temp+table-test`
master-bin.000001 207 Query 1 323 use `drop-temp+table-test`; create temporary table `table:name` (a int)
master-bin.000001 323 Query 1 474 use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name`
master-bin.000001 474 Query 1 567 use `drop-temp+table-test`; DO RELEASE_LOCK("a")
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000001 # Query 1 # create database `drop-temp+table-test`
master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table shortn1 (a int)
master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table `table:name` (a int)
master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table shortn2 (a int)
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn2`
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name`
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn1`
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DO RELEASE_LOCK("a")
drop database `drop-temp+table-test`;
mysql-test/r/innodb.result
View file @
de1dcee9
...
...
@@ -249,6 +249,30 @@ n
4
5
6
set autocommit=0;
begin;
savepoint `my_savepoint`;
insert into t1 values (7);
savepoint `savept2`;
insert into t1 values (3);
select n from t1;
n
3
4
5
6
7
rollback to savepoint `savept2`;
release savepoint `my_savepoint`;
select n from t1;
n
4
5
6
7
rollback to savepoint `my_savepoint`;
ERROR 42000: SAVEPOINT my_savepoint does not exist
set autocommit=1;
rollback;
drop table t1;
create table t1 (n int not null primary key) engine=innodb;
...
...
@@ -1326,8 +1350,8 @@ truncate table t1;
insert into t1 (a) values (NULL),(NULL);
SELECT * from t1;
a
3
4
1
2
drop table t1;
CREATE TABLE t1 (`id 1` INT NOT NULL, PRIMARY KEY (`id 1`)) ENGINE=INNODB;
CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (`t1_id`) REFERENCES `t1`(`id 1`) ON DELETE CASCADE ) ENGINE=INNODB;
...
...
@@ -1421,19 +1445,19 @@ insert t2 select * from t1;
insert t3 select * from t1;
checksum table t1, t2, t3, t4 quick;
Table Checksum
test.t1 2
72226711
test.t1 2
948697075
test.t2 NULL
test.t3 NULL
test.t4 NULL
checksum table t1, t2, t3, t4;
Table Checksum
test.t1 2
72226711
test.t1 2
948697075
test.t2 968604391
test.t3 968604391
test.t4 NULL
checksum table t1, t2, t3, t4 extended;
Table Checksum
test.t1
272226711
test.t1
3092701434
test.t2 968604391
test.t3 968604391
test.t4 NULL
...
...
@@ -1609,14 +1633,14 @@ t2 CREATE TABLE `t2` (
drop table t2, t1;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 15
0
Binlog_cache_use 15
2
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 0
create table t1 (a int) engine=innodb;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 15
1
Binlog_cache_use 15
3
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
...
...
@@ -1625,7 +1649,7 @@ delete from t1;
commit;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 15
2
Binlog_cache_use 15
4
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
...
...
@@ -1690,15 +1714,90 @@ Variable_name Value
Innodb_page_size 16384
show status like "Innodb_rows_deleted";
Variable_name Value
Innodb_rows_deleted 207
8
Innodb_rows_deleted 207
0
show status like "Innodb_rows_inserted";
Variable_name Value
Innodb_rows_inserted 3170
6
Innodb_rows_inserted 3170
8
show status like "Innodb_rows_read";
Variable_name Value
Innodb_rows_read 8016
1
Innodb_rows_read 8016
2
show status like "Innodb_rows_updated";
Variable_name Value
Innodb_rows_updated 29530
show status like "Innodb_row_lock_waits";
Variable_name Value
Innodb_row_lock_waits 0
show status like "Innodb_row_lock_current_waits";
Variable_name Value
Innodb_row_lock_current_waits 0
show status like "Innodb_row_lock_time";
Variable_name Value
Innodb_row_lock_time 0
show status like "Innodb_row_lock_time_max";
Variable_name Value
Innodb_row_lock_time_max 0
show status like "Innodb_row_lock_time_avg";
Variable_name Value
Innodb_row_lock_time_avg 0
show variables like "innodb_sync_spin_loops";
Variable_name Value
innodb_sync_spin_loops 20
set global innodb_sync_spin_loops=1000;
show variables like "innodb_sync_spin_loops";
Variable_name Value
innodb_sync_spin_loops 1000
set global innodb_sync_spin_loops=0;
show variables like "innodb_sync_spin_loops";
Variable_name Value
innodb_sync_spin_loops 0
set global innodb_sync_spin_loops=20;
show variables like "innodb_sync_spin_loops";
Variable_name Value
innodb_sync_spin_loops 20
show variables like "innodb_thread_concurrency";
Variable_name Value
innodb_thread_concurrency 8
set global innodb_thread_concurrency=1000;
show variables like "innodb_thread_concurrency";
Variable_name Value
innodb_thread_concurrency 1000
set global innodb_thread_concurrency=0;
show variables like "innodb_thread_concurrency";
Variable_name Value
innodb_thread_concurrency 1
set global innodb_thread_concurrency=16;
show variables like "innodb_thread_concurrency";
Variable_name Value
innodb_thread_concurrency 16
show variables like "innodb_concurrency_tickets";
Variable_name Value
innodb_concurrency_tickets 500
set global innodb_concurrency_tickets=1000;
show variables like "innodb_concurrency_tickets";
Variable_name Value
innodb_concurrency_tickets 1000
set global innodb_concurrency_tickets=0;
show variables like "innodb_concurrency_tickets";
Variable_name Value
innodb_concurrency_tickets 1
set global innodb_concurrency_tickets=500;
show variables like "innodb_concurrency_tickets";
Variable_name Value
innodb_concurrency_tickets 500
show variables like "innodb_thread_sleep_delay";
Variable_name Value
innodb_thread_sleep_delay 10000
set global innodb_thread_sleep_delay=100000;
show variables like "innodb_thread_sleep_delay";
Variable_name Value
innodb_thread_sleep_delay 100000
set global innodb_thread_sleep_delay=0;
show variables like "innodb_thread_sleep_delay";
Variable_name Value
innodb_thread_sleep_delay 0
set global innodb_thread_sleep_delay=10000;
show variables like "innodb_thread_sleep_delay";
Variable_name Value
innodb_thread_sleep_delay 10000
create table t1 (v varchar(16384)) engine=innodb;
ERROR 42000: Column length too big for column 'v' (max = 255); use BLOB instead
mysql-test/r/insert_select.result
View file @
de1dcee9
...
...
@@ -75,7 +75,7 @@ ERROR 23000: Duplicate entry '2' for key 1
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
master-bin.000001 96 Query 1 1
84
use `test`; insert into t1 select * from t2
master-bin.000001 96 Query 1 1
91
use `test`; insert into t1 select * from t2
select * from t1;
a
1
...
...
@@ -638,3 +638,15 @@ No Field Count
0 1 100
0 2 100
drop table t1, t2;
CREATE TABLE t1 (
ID int(11) NOT NULL auto_increment,
NO int(11) NOT NULL default '0',
SEQ int(11) NOT NULL default '0',
PRIMARY KEY (ID),
KEY t1$NO (SEQ,NO)
) ENGINE=MyISAM;
INSERT INTO t1 (SEQ, NO) SELECT "1" AS SEQ, IF(MAX(NO) IS NULL, 0, MAX(NO)) + 1 AS NO FROM t1 WHERE (SEQ = 1);
select SQL_BUFFER_RESULT * from t1 WHERE (SEQ = 1);
ID NO SEQ
1 1 1
drop table t1;
mysql-test/r/mix_innodb_myisam_binlog.result
View file @
de1dcee9
...
...
@@ -9,9 +9,9 @@ commit;
show binlog events from 96;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 Query 1 # use `test`; BEGIN
master-bin.000001 1
58
Query 1 # use `test`; insert into t1 values(1)
master-bin.000001 2
39
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 3
27
Xid 1 # COMMIT /* xid=7 */
master-bin.000001 1
65
Query 1 # use `test`; insert into t1 values(1)
master-bin.000001 2
53
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 3
48
Xid 1 # COMMIT /* xid=7 */
delete from t1;
delete from t2;
reset master;
...
...
@@ -24,9 +24,9 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back
show binlog events from 96;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 Query 1 # use `test`; BEGIN
master-bin.000001 1
58
Query 1 # use `test`; insert into t1 values(2)
master-bin.000001 2
39
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 3
27
Query 1 # use `test`; ROLLBACK
master-bin.000001 1
65
Query 1 # use `test`; insert into t1 values(2)
master-bin.000001 2
53
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 3
48
Query 1 # use `test`; ROLLBACK
delete from t1;
delete from t2;
reset master;
...
...
@@ -42,12 +42,12 @@ commit;
show binlog events from 96;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 Query 1 # use `test`; BEGIN
master-bin.000001 1
58
Query 1 # use `test`; insert into t1 values(3)
master-bin.000001 2
39
Query 1 # use `test`; savepoint my_savepoint
master-bin.000001 3
18
Query 1 # use `test`; insert into t1 values(4)
master-bin.000001
399
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001
487
Query 1 # use `test`; rollback to savepoint my_savepoint
master-bin.000001
578
Xid 1 # COMMIT /* xid=24 */
master-bin.000001 1
65
Query 1 # use `test`; insert into t1 values(3)
master-bin.000001 2
53
Query 1 # use `test`; savepoint my_savepoint
master-bin.000001 3
39
Query 1 # use `test`; insert into t1 values(4)
master-bin.000001
427
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001
522
Query 1 # use `test`; rollback to savepoint my_savepoint
master-bin.000001
620
Xid 1 # COMMIT /* xid=24 */
delete from t1;
delete from t2;
reset master;
...
...
@@ -68,13 +68,13 @@ a
show binlog events from 96;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 Query 1 # use `test`; BEGIN
master-bin.000001 1
58
Query 1 # use `test`; insert into t1 values(5)
master-bin.000001 2
39
Query 1 # use `test`; savepoint my_savepoint
master-bin.000001 3
18
Query 1 # use `test`; insert into t1 values(6)
master-bin.000001
399
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001
487
Query 1 # use `test`; rollback to savepoint my_savepoint
master-bin.000001
578
Query 1 # use `test`; insert into t1 values(7)
master-bin.000001
659
Xid 1 # COMMIT /* xid=36 */
master-bin.000001 1
65
Query 1 # use `test`; insert into t1 values(5)
master-bin.000001 2
53
Query 1 # use `test`; savepoint my_savepoint
master-bin.000001 3
39
Query 1 # use `test`; insert into t1 values(6)
master-bin.000001
427
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001
522
Query 1 # use `test`; rollback to savepoint my_savepoint
master-bin.000001
620
Query 1 # use `test`; insert into t1 values(7)
master-bin.000001
708
Xid 1 # COMMIT /* xid=36 */
delete from t1;
delete from t2;
reset master;
...
...
@@ -90,10 +90,10 @@ get_lock("a",10)
show binlog events from 96;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 Query 1 # use `test`; BEGIN
master-bin.000001 1
58
Query 1 # use `test`; insert into t1 values(8)
master-bin.000001 2
39
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 3
27
Query 1 # use `test`; ROLLBACK
master-bin.000001
392
Query 1 # use `test`; DO RELEASE_LOCK("a")
master-bin.000001 1
65
Query 1 # use `test`; insert into t1 values(8)
master-bin.000001 2
53
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 3
48
Query 1 # use `test`; ROLLBACK
master-bin.000001
420
Query 1 # use `test`; DO RELEASE_LOCK("a")
delete from t1;
delete from t2;
reset master;
...
...
@@ -102,9 +102,9 @@ insert into t2 select * from t1;
show binlog events from 96;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 Query 1 # use `test`; BEGIN
master-bin.000001 1
58
Query 1 # use `test`; insert into t1 values(9)
master-bin.000001 2
39
Xid 1 # COMMIT /* xid=59 */
master-bin.000001 2
66
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 1
65
Query 1 # use `test`; insert into t1 values(9)
master-bin.000001 2
53
Xid 1 # COMMIT /* xid=59 */
master-bin.000001 2
80
Query 1 # use `test`; insert into t2 select * from t1
delete from t1;
delete from t2;
reset master;
...
...
@@ -114,20 +114,20 @@ insert into t2 select * from t1;
show binlog events from 96;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 Query 1 # use `test`; BEGIN
master-bin.000001 1
58
Query 1 # use `test`; insert into t1 values(10)
master-bin.000001 2
40
Xid 1 # COMMIT /* xid=65 */
master-bin.000001 2
67
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 1
65
Query 1 # use `test`; insert into t1 values(10)
master-bin.000001 2
54
Xid 1 # COMMIT /* xid=65 */
master-bin.000001 2
81
Query 1 # use `test`; insert into t2 select * from t1
insert into t1 values(11);
commit;
show binlog events from 96;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 Query 1 # use `test`; BEGIN
master-bin.000001 1
58
Query 1 # use `test`; insert into t1 values(10)
master-bin.000001 2
40
Xid 1 # COMMIT /* xid=65 */
master-bin.000001 2
67
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 3
55
Query 1 # use `test`; BEGIN
master-bin.000001 4
17
Query 1 # use `test`; insert into t1 values(11)
master-bin.000001
499
Xid 1 # COMMIT /* xid=67 */
master-bin.000001 1
65
Query 1 # use `test`; insert into t1 values(10)
master-bin.000001 2
54
Xid 1 # COMMIT /* xid=65 */
master-bin.000001 2
81
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 3
76
Query 1 # use `test`; BEGIN
master-bin.000001 4
45
Query 1 # use `test`; insert into t1 values(11)
master-bin.000001
534
Xid 1 # COMMIT /* xid=67 */
alter table t2 engine=INNODB;
delete from t1;
delete from t2;
...
...
@@ -139,9 +139,9 @@ commit;
show binlog events from 96;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 Query 1 # use `test`; BEGIN
master-bin.000001 1
58
Query 1 # use `test`; insert into t1 values(12)
master-bin.000001 2
40
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 3
28
Xid 1 # COMMIT /* xid=77 */
master-bin.000001 1
65
Query 1 # use `test`; insert into t1 values(12)
master-bin.000001 2
54
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 3
49
Xid 1 # COMMIT /* xid=77 */
delete from t1;
delete from t2;
reset master;
...
...
@@ -164,8 +164,8 @@ commit;
show binlog events from 96;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 Query 1 # use `test`; BEGIN
master-bin.000001 1
58
Query 1 # use `test`; insert into t1 values(14)
master-bin.000001 2
40
Xid 1 # COMMIT /* xid=93 */
master-bin.000001 1
65
Query 1 # use `test`; insert into t1 values(14)
master-bin.000001 2
54
Xid 1 # COMMIT /* xid=93 */
delete from t1;
delete from t2;
reset master;
...
...
@@ -184,9 +184,9 @@ a
show binlog events from 96;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 Query 1 # use `test`; BEGIN
master-bin.000001 1
58
Query 1 # use `test`; insert into t1 values(16)
master-bin.000001 2
40
Query 1 # use `test`; insert into t1 values(18)
master-bin.000001 3
22
Xid 1 # COMMIT /* xid=104 */
master-bin.000001 1
65
Query 1 # use `test`; insert into t1 values(16)
master-bin.000001 2
54
Query 1 # use `test`; insert into t1 values(18)
master-bin.000001 3
43
Xid 1 # COMMIT /* xid=104 */
delete from t1;
delete from t2;
alter table t2 type=MyISAM;
...
...
mysql-test/r/mysqlbinlog.result
View file @
de1dcee9
...
...
@@ -108,8 +108,10 @@ insert into t1 values ("Alas");
use test;
SET TIMESTAMP=1065204671;
BEGIN;
ROLLBACK;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
use test;
SET TIMESTAMP=1065204671;
BEGIN;
ROLLBACK;
drop table t1, t2;
mysql-test/r/rpl_change_master.result
View file @
de1dcee9
...
...
@@ -16,11 +16,11 @@ n
1
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_MYPORT 1 master-bin.000001 3
56 # # master-bin.000001 No No 0 0 275
# None 0 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 3
77 # # master-bin.000001 No No 0 0 289
# None 0 No #
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_MYPORT 1 master-bin.000001 2
75 # # master-bin.000001 No No 0 0 275
# None 0 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 2
89 # # master-bin.000001 No No 0 0 289
# None 0 No #
select release_lock("a");
release_lock("a")
1
...
...
mysql-test/r/rpl_charset.result
View file @
de1dcee9
...
...
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
set timestamp=1000000000;
drop database if exists mysqltest2;
drop database if exists mysqltest3;
create database mysqltest2 character set latin2;
...
...
@@ -87,7 +88,6 @@ a b
2 Muffler
3 latin1_german2_ci
4 Mller
load data infile '../../std_data/words.dat' into table t1 (b);
set @a= _cp850 'Mller' collate cp850_general_ci;
truncate table t1;
insert into t1 (b) values(collation(@a));
...
...
@@ -108,63 +108,39 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # drop database if exists mysqltest2
master-bin.000001 # Query 1 # drop database if exists mysqltest3
master-bin.000001 # Query 1 # create database mysqltest2 character set latin2
master-bin.000001 # Query 1 # use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=30
master-bin.000001 # Query 1 # create database mysqltest3
master-bin.000001 # Query 1 # use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
master-bin.000001 # Query 1 # drop database mysqltest3
master-bin.000001 # Query 1 # use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
master-bin.000001 # Query 1 # create database mysqltest3
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Query 1 # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100))
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Intvar 1 # INSERT_ID=1
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@character_set_server)
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Intvar 1 # INSERT_ID=2
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_server)
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Intvar 1 # INSERT_ID=3
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@character_set_client)
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Intvar 1 # INSERT_ID=4
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@character_set_connection)
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Intvar 1 # INSERT_ID=5
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_connection)
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Query 1 # use `mysqltest2`; truncate table t1
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Intvar 1 # INSERT_ID=1
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_connection)
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Intvar 1 # INSERT_ID=2
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(LEAST("Mller","Muffler"))
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Intvar 1 # INSERT_ID=3
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_connection)
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Intvar 1 # INSERT_ID=4
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(LEAST("Mller","Muffler"))
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Intvar 1 # INSERT_ID=74
master-bin.000001 # Create_file 1 # db=mysqltest2;table=t1;file_id=1;block_len=581
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Intvar 1 # INSERT_ID=5
master-bin.000001 # Exec_load 1 # ;file_id=1
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Query 1 # use `mysqltest2`; truncate table t1
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Intvar 1 # INSERT_ID=1
master-bin.000001 # User var 1 # @`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci
master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(collation(@a))
master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Query 1 # drop database mysqltest2
master-bin.000001 # Query 1 # SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 # Query 1 # drop database mysqltest3
set global character_set_server=latin2;
ERROR HY000: Binary logging and replication forbid changing the global server character set, collation
set global character_set_server=latin1;
set global character_set_server=latin2;
ERROR HY000: Binary logging and replication forbid changing the global server character set, collation
set global character_set_server=latin1;
set one_shot @@character_set_server=latin5;
set @@max_join_size=1000;
select @@character_set_server;
...
...
@@ -198,12 +174,75 @@ CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
select hex(c1), hex(c2) from t1;
hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
stop slave;
delete from t1;
change master to master_log_pos=6810;
start slave until master_log_file='master-bin.000001', master_log_pos=6968;
start slave;
select hex(c1), hex(c2) from t1;
hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
SET TIMESTAMP=1000000000;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
SET @@session.sql_mode=0;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
drop database if exists mysqltest2;
SET TIMESTAMP=1000000000;
drop database if exists mysqltest3;
SET TIMESTAMP=1000000000;
create database mysqltest2 character set latin2;
SET TIMESTAMP=1000000000;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30;
create database mysqltest3;
SET TIMESTAMP=1000000000;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=64;
drop database mysqltest3;
SET TIMESTAMP=1000000000;
create database mysqltest3;
use mysqltest2;
SET TIMESTAMP=1000000000;
create table t1 (a int auto_increment primary key, b varchar(100));
SET INSERT_ID=1;
SET TIMESTAMP=1000000000;
SET @@session.character_set_client=4,@@session.collation_connection=27,@@session.collation_server=64;
insert into t1 (b) values(@@character_set_server);
SET INSERT_ID=2;
SET TIMESTAMP=1000000000;
insert into t1 (b) values(@@collation_server);
SET INSERT_ID=3;
SET TIMESTAMP=1000000000;
insert into t1 (b) values(@@character_set_client);
SET INSERT_ID=4;
SET TIMESTAMP=1000000000;
insert into t1 (b) values(@@character_set_connection);
SET INSERT_ID=5;
SET TIMESTAMP=1000000000;
insert into t1 (b) values(@@collation_connection);
SET TIMESTAMP=1000000000;
SET @@session.character_set_client=8,@@session.collation_connection=5,@@session.collation_server=64;
truncate table t1;
SET INSERT_ID=1;
SET TIMESTAMP=1000000000;
insert into t1 (b) values(@@collation_connection);
SET INSERT_ID=2;
SET TIMESTAMP=1000000000;
insert into t1 (b) values(LEAST("Mller","Muffler"));
SET INSERT_ID=3;
SET TIMESTAMP=1000000000;
SET @@session.character_set_client=8,@@session.collation_connection=31,@@session.collation_server=64;
insert into t1 (b) values(@@collation_connection);
SET INSERT_ID=4;
SET TIMESTAMP=1000000000;
insert into t1 (b) values(LEAST("Mller","Muffler"));
SET TIMESTAMP=1000000000;
truncate table t1;
SET INSERT_ID=1;
SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`;
SET TIMESTAMP=1000000000;
insert into t1 (b) values(collation(@a));
SET TIMESTAMP=1000000000;
drop database mysqltest2;
SET TIMESTAMP=1000000000;
drop database mysqltest3;
use test;
SET TIMESTAMP=1000000000;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30;
CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255));
SET TIMESTAMP=1000000000;
SET @@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30;
INSERT INTO t1 (c1, c2) VALUES (', ',', ');
ROLLBACK;
drop table t1;
mysql-test/r/rpl_error_ignored_table.result
View file @
de1dcee9
...
...
@@ -9,7 +9,7 @@ insert into t1 values (1),(1);
ERROR 23000: Duplicate entry '1' for key 1
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 2
74 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 274
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 2
88 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 288
# None 0 No #
show tables like 't1';
Tables_in_test (t1)
drop table t1;
...
...
@@ -28,12 +28,12 @@ kill @id;
drop table t2,t3;
show binlog events from 96;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 Query 1 1
88
use `test`; create table t1 (a int primary key)
master-bin.000001 1
88 Query 1 274
use `test`; insert into t1 values (1),(1)
master-bin.000001 2
74 Query 1 344
use `test`; drop table t1
master-bin.000001 3
44 Query 1 436
use `test`; create table t2 (a int primary key)
master-bin.000001 4
36 Query 1 517
use `test`; insert into t2 values(1)
master-bin.000001 5
17 Query 1 598
use `test`; create table t3 (id int)
master-bin.000001
598 Query 1 693
use `test`; insert into t3 values(connection_id())
master-bin.000001
693 Query 1 806
use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10)
master-bin.000001 8
06 Query 1 879
use `test`; drop table t2,t3
master-bin.000001 96 Query 1 1
95
use `test`; create table t1 (a int primary key)
master-bin.000001 1
95 Query 1 288
use `test`; insert into t1 values (1),(1)
master-bin.000001 2
88 Query 1 365
use `test`; drop table t1
master-bin.000001 3
65 Query 1 464
use `test`; create table t2 (a int primary key)
master-bin.000001 4
64 Query 1 552
use `test`; insert into t2 values(1)
master-bin.000001 5
52 Query 1 640
use `test`; create table t3 (id int)
master-bin.000001
640 Query 1 742
use `test`; insert into t3 values(connection_id())
master-bin.000001
742 Query 1 862
use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10)
master-bin.000001 8
62 Query 1 942
use `test`; drop table t2,t3
mysql-test/r/rpl_flush_log_loop.result
View file @
de1dcee9
...
...
@@ -14,4 +14,4 @@ start 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 SLAVE_PORT 60 slave-bin.000001 20
0 # # slave-bin.000001 Yes Yes 0 0 200
# None 0 No #
# 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 20
7 # # slave-bin.000001 Yes Yes 0 0 207
# None 0 No #
mysql-test/r/rpl_flush_tables.result
View file @
de1dcee9
...
...
@@ -15,26 +15,26 @@ flush no_write_to_binlog tables;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 96 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 96 Query 1 1
76
use `test`; create table t1 (a int)
master-bin.000001 1
76 Query 1 259
use `test`; insert into t1 values (10)
master-bin.000001 2
59 Query 1 339
use `test`; create table t2 (a int)
master-bin.000001 3
39 Query 1 442
use `test`; create table t3 (a int) engine=merge union(t1)
master-bin.000001 4
42 Query 1 522
use `test`; create table t4 (a int)
master-bin.000001 5
22 Query 1 610
use `test`; insert into t4 select * from t3
master-bin.000001 6
10 Query 1 698
use `test`; rename table t1 to t5, t2 to t1
master-bin.000001 96 Query 1 1
83
use `test`; create table t1 (a int)
master-bin.000001 1
83 Query 1 273
use `test`; insert into t1 values (10)
master-bin.000001 2
73 Query 1 360
use `test`; create table t2 (a int)
master-bin.000001 3
60 Query 1 470
use `test`; create table t3 (a int) engine=merge union(t1)
master-bin.000001 4
70 Query 1 557
use `test`; create table t4 (a int)
master-bin.000001 5
57 Query 1 652
use `test`; insert into t4 select * from t3
master-bin.000001 6
52 Query 1 747
use `test`; rename table t1 to t5, t2 to t1
select * from t3;
a
flush tables;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 96 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 96 Query 1 1
76
use `test`; create table t1 (a int)
master-bin.000001 1
76 Query 1 259
use `test`; insert into t1 values (10)
master-bin.000001 2
59 Query 1 339
use `test`; create table t2 (a int)
master-bin.000001 3
39 Query 1 442
use `test`; create table t3 (a int) engine=merge union(t1)
master-bin.000001 4
42 Query 1 522
use `test`; create table t4 (a int)
master-bin.000001 5
22 Query 1 610
use `test`; insert into t4 select * from t3
master-bin.000001 6
10 Query 1 698
use `test`; rename table t1 to t5, t2 to t1
master-bin.000001
698 Query 1 767
use `test`; flush tables
master-bin.000001 96 Query 1 1
83
use `test`; create table t1 (a int)
master-bin.000001 1
83 Query 1 273
use `test`; insert into t1 values (10)
master-bin.000001 2
73 Query 1 360
use `test`; create table t2 (a int)
master-bin.000001 3
60 Query 1 470
use `test`; create table t3 (a int) engine=merge union(t1)
master-bin.000001 4
70 Query 1 557
use `test`; create table t4 (a int)
master-bin.000001 5
57 Query 1 652
use `test`; insert into t4 select * from t3
master-bin.000001 6
52 Query 1 747
use `test`; rename table t1 to t5, t2 to t1
master-bin.000001
747 Query 1 823
use `test`; flush tables
select * from t3;
a
mysql-test/r/rpl_loaddata.result
View file @
de1dcee9
...
...
@@ -22,7 +22,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 10
69
slave-bin.000001 10
97
drop table t1;
drop table t2;
drop table t3;
...
...
@@ -33,7 +33,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 15
04 # # master-bin.000001 Yes Yes 0 0 1504
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 15
60 # # master-bin.000001 Yes Yes 0 0 1560
# None 0 No #
set sql_log_bin=0;
delete from t1;
set sql_log_bin=1;
...
...
@@ -43,7 +43,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 16
12 # # master-bin.000001 No No 0 0 1612
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 16
68 # # master-bin.000001 No No 0 0 1668
# None 0 No #
set global sql_slave_skip_counter=1;
start slave;
set sql_log_bin=0;
...
...
@@ -64,5 +64,5 @@ terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
ERROR 23000: Duplicate entry '2003-03-22' for key 1
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 53
0
master-bin.000001 53
7
drop table t2;
mysql-test/r/rpl_loaddata_rule_m.result
View file @
de1dcee9
...
...
@@ -12,6 +12,6 @@ use mysqltest;
load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
show binlog events from 96;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 Query 1 19
1
drop database if exists mysqltest
master-bin.000001 19
1 Query 1 278
create database mysqltest
master-bin.000001 96 Query 1 19
8
drop database if exists mysqltest
master-bin.000001 19
8 Query 1 292
create database mysqltest
drop database mysqltest;
mysql-test/r/rpl_log.result
View file @
de1dcee9
...
...
@@ -20,24 +20,24 @@ drop table t1;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
master-bin.000001 96 Query 1 21
1
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 21
1 Intvar 1 239
INSERT_ID=1
master-bin.000001 2
39 Query 1 324
use `test`; insert into t1 values (NULL)
master-bin.000001 3
24 Query 1 394
use `test`; drop table t1
master-bin.000001
394 Query 1 491
use `test`; create table t1 (word char(20) not null)
master-bin.000001
491 Create_file 1 1161
db=test;table=t1;file_id=1;block_len=581
master-bin.000001 11
61 Exec_load 1 1184
;file_id=1
master-bin.000001 1
184 Query 1 1254
use `test`; drop table t1
master-bin.000001 96 Query 1 21
8
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 21
8 Intvar 1 246
INSERT_ID=1
master-bin.000001 2
46 Query 1 338
use `test`; insert into t1 values (NULL)
master-bin.000001 3
38 Query 1 415
use `test`; drop table t1
master-bin.000001
415 Query 1 519
use `test`; create table t1 (word char(20) not null)
master-bin.000001
519 Create_file 1 1189
db=test;table=t1;file_id=1;block_len=581
master-bin.000001 11
89 Exec_load 1 1212
;file_id=1
master-bin.000001 1
212 Query 1 1289
use `test`; drop table t1
show binlog events from 96 limit 1;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 Query 1 21
1
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 96 Query 1 21
8
use `test`; create table t1(n int not null auto_increment primary key)
show binlog events from 96 limit 2;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 Query 1 21
1
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 21
1 Intvar 1 239
INSERT_ID=1
master-bin.000001 96 Query 1 21
8
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 21
8 Intvar 1 246
INSERT_ID=1
show binlog events from 96 limit 2,1;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 2
39 Query 1 324
use `test`; insert into t1 values (NULL)
master-bin.000001 2
46 Query 1 338
use `test`; insert into t1 values (NULL)
flush logs;
create table t5 (a int);
drop table t5;
...
...
@@ -50,23 +50,23 @@ drop table t1;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
master-bin.000001 96 Query 1 21
1
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 21
1 Intvar 1 239
INSERT_ID=1
master-bin.000001 2
39 Query 1 324
use `test`; insert into t1 values (NULL)
master-bin.000001 3
24 Query 1 394
use `test`; drop table t1
master-bin.000001
394 Query 1 491
use `test`; create table t1 (word char(20) not null)
master-bin.000001
491 Create_file 1 1161
db=test;table=t1;file_id=1;block_len=581
master-bin.000001 11
61 Exec_load 1 1184
;file_id=1
master-bin.000001 1
184 Query 1 1254
use `test`; drop table t1
master-bin.000001 12
54 Rotate 1 1298
master-bin.000002;pos=4
master-bin.000001 96 Query 1 21
8
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 21
8 Intvar 1 246
INSERT_ID=1
master-bin.000001 2
46 Query 1 338
use `test`; insert into t1 values (NULL)
master-bin.000001 3
38 Query 1 415
use `test`; drop table t1
master-bin.000001
415 Query 1 519
use `test`; create table t1 (word char(20) not null)
master-bin.000001
519 Create_file 1 1189
db=test;table=t1;file_id=1;block_len=581
master-bin.000001 11
89 Exec_load 1 1212
;file_id=1
master-bin.000001 1
212 Query 1 1289
use `test`; drop table t1
master-bin.000001 12
89 Rotate 1 1333
master-bin.000002;pos=4
show binlog events in 'master-bin.000002';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
master-bin.000002 96 Query 1 1
76
use `test`; create table t5 (a int)
master-bin.000002 1
76 Query 1 246
use `test`; drop table t5
master-bin.000002 2
46 Query 1 326
use `test`; create table t1 (n int)
master-bin.000002 3
26 Query 1 408
use `test`; insert into t1 values (1)
master-bin.000002 4
08 Query 1 478
use `test`; drop table t1
master-bin.000002 96 Query 1 1
83
use `test`; create table t5 (a int)
master-bin.000002 1
83 Query 1 260
use `test`; drop table t5
master-bin.000002 2
60 Query 1 347
use `test`; create table t1 (n int)
master-bin.000002 3
47 Query 1 436
use `test`; insert into t1 values (1)
master-bin.000002 4
36 Query 1 513
use `test`; drop table t1
show binary logs;
Log_name
master-bin.000001
...
...
@@ -79,25 +79,25 @@ slave-bin.000002
show binlog events in 'slave-bin.000001' from 4;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 4 Format_desc 2 96 Server ver: VERSION, Binlog ver: 4
slave-bin.000001 96 Query 1 21
1
use `test`; create table t1(n int not null auto_increment primary key)
slave-bin.000001 21
1 Intvar 1 239
INSERT_ID=1
slave-bin.000001 2
39 Query 1 324
use `test`; insert into t1 values (NULL)
slave-bin.000001 3
24 Query 1 394
use `test`; drop table t1
slave-bin.000001
394 Query 1 491
use `test`; create table t1 (word char(20) not null)
slave-bin.000001
491 Create_file 1 1170
db=test;table=t1;file_id=1;block_len=581
slave-bin.000001 11
70 Exec_load 1 1193
;file_id=1
slave-bin.000001 1
193 Query 1 1263
use `test`; drop table t1
slave-bin.000001 12
63 Query 1 1343
use `test`; create table t5 (a int)
slave-bin.000001 13
43 Query 1 1413
use `test`; drop table t5
slave-bin.000001 14
13 Rotate 2 1456
slave-bin.000002;pos=4
slave-bin.000001 96 Query 1 21
8
use `test`; create table t1(n int not null auto_increment primary key)
slave-bin.000001 21
8 Intvar 1 246
INSERT_ID=1
slave-bin.000001 2
46 Query 1 338
use `test`; insert into t1 values (NULL)
slave-bin.000001 3
38 Query 1 415
use `test`; drop table t1
slave-bin.000001
415 Query 1 519
use `test`; create table t1 (word char(20) not null)
slave-bin.000001
519 Create_file 1 1198
db=test;table=t1;file_id=1;block_len=581
slave-bin.000001 11
98 Exec_load 1 1221
;file_id=1
slave-bin.000001 1
221 Query 1 1298
use `test`; drop table t1
slave-bin.000001 12
98 Query 1 1385
use `test`; create table t5 (a int)
slave-bin.000001 13
85 Query 1 1462
use `test`; drop table t5
slave-bin.000001 14
62 Rotate 2 1505
slave-bin.000002;pos=4
show binlog events in 'slave-bin.000002' from 4;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000002 4 Format_desc 2 96 Server ver: VERSION, Binlog ver: 4
slave-bin.000002 96 Query 1 1
76
use `test`; create table t1 (n int)
slave-bin.000002 1
76 Query 1 258
use `test`; insert into t1 values (1)
slave-bin.000002 2
58 Query 1 328
use `test`; drop table t1
slave-bin.000002 96 Query 1 1
83
use `test`; create table t1 (n int)
slave-bin.000002 1
83 Query 1 272
use `test`; insert into t1 values (1)
slave-bin.000002 2
72 Query 1 349
use `test`; 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.000002
478 # # master-bin.000002 Yes Yes 0 0 478
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002
513 # # master-bin.000002 Yes Yes 0 0 513
# None 0 No #
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
mysql-test/r/rpl_max_relay_size.result
View file @
de1dcee9
...
...
@@ -16,7 +16,7 @@ select @@global.max_relay_log_size;
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
68138 # # master-bin.000001 Yes Yes 0 0 68138
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001
73752 # # master-bin.000001 Yes Yes 0 0 73752
# None 0 No #
stop slave;
reset slave;
set global max_relay_log_size=(5*4096);
...
...
@@ -26,7 +26,7 @@ select @@global.max_relay_log_size;
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
68138 # # master-bin.000001 Yes Yes 0 0 68138
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001
73752 # # master-bin.000001 Yes Yes 0 0 73752
# None 0 No #
stop slave;
reset slave;
set global max_relay_log_size=0;
...
...
@@ -36,7 +36,7 @@ select @@global.max_relay_log_size;
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
68138 # # master-bin.000001 Yes Yes 0 0 68138
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001
73752 # # master-bin.000001 Yes Yes 0 0 73752
# None 0 No #
stop slave;
reset slave;
flush logs;
...
...
@@ -49,12 +49,12 @@ 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
68218 # # master-bin.000001 Yes Yes 0 0 68218
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001
73839 # # master-bin.000001 Yes Yes 0 0 73839
# None 0 No #
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
68288 # # master-bin.000001 Yes Yes 0 0 68288
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001
73916 # # master-bin.000001 Yes Yes 0 0 73916
# None 0 No #
flush logs;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
...
...
mysql-test/r/rpl_relayrotate.result
View file @
de1dcee9
...
...
@@ -18,5 +18,5 @@ max(a)
8000
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_MYPORT 1 master-bin.000001
687172 # # master-bin.000001 Yes Yes 0 0 687172
# None 0 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001
743186 # # master-bin.000001 Yes Yes 0 0 743186
# None 0 No #
drop table t1;
mysql-test/r/rpl_replicate_do.result
View file @
de1dcee9
...
...
@@ -28,4 +28,4 @@ ERROR 42S02: Table 'test.t11' doesn't exist
drop table if exists t1,t2,t11;
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 1
555 # # master-bin.000001 Yes Yes test.t1 0 0 1555
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1
618 # # master-bin.000001 Yes Yes test.t1 0 0 1618
# None 0 No #
mysql-test/r/rpl_rotate_logs.result
View file @
de1dcee9
drop table if exists t1, t2, t3, t4;
drop table if exists t1, t2, t3, t4;
start slave;
ERROR HY000: File 'TESTDIR/var/slave-data/master.info' not found (Errcode: 13)
Got one of the listed errors
start slave;
ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
...
...
@@ -16,7 +16,7 @@ create table t1 (s text);
insert into t1 values('Could not break slave'),('Tried hard');
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 60 master-bin.000001 5
22 # # master-bin.000001 Yes Yes 0 0 522
# None 0 No #
# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 5
50 # # master-bin.000001 Yes Yes 0 0 550
# None 0 No #
select * from t1;
s
Could not break slave
...
...
@@ -57,7 +57,7 @@ master-bin.000003
insert into t2 values (65);
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 60 master-bin.000003 4
70 # # master-bin.000003 Yes Yes 0 0 470
# None 0 No #
# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 4
98 # # master-bin.000003 Yes Yes 0 0 498
# None 0 No #
select * from t2;
m
34
...
...
@@ -79,13 +79,13 @@ master-bin.000004
master-bin.000005
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000005
1388
master-bin.000005
2051
select * from t4;
a
testing temporary tables part 2
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 60 master-bin.000005
1388 # # master-bin.000005 Yes Yes 0 0 1388
# None 0 No #
# 127.0.0.1 root MASTER_PORT 60 master-bin.000005
2051 # # master-bin.000005 Yes Yes 0 0 2051
# None 0 No #
lock tables t3 read;
select count(*) from t3 where n >= 4;
count(*)
...
...
mysql-test/r/rpl_temporary.result
View file @
de1dcee9
...
...
@@ -39,18 +39,18 @@ f
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
master-bin.000001 96 Query 1 1
79
use `test`; drop table if exists t1,t2
master-bin.000001 1
79 Query 1 258
use `test`; create table t1(f int)
master-bin.000001 2
58 Query 1 337
use `test`; create table t2(f int)
master-bin.000001 3
37 Query 1 456
use `test`; insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10)
master-bin.000001 4
56 Query 1 545
use `test`; create temporary table t3(f int)
master-bin.000001 5
45 Query 1 643
use `test`; insert into t3 select * from t1 where f<6
master-bin.000001 6
43 Query 1 732
use `test`; create temporary table t3(f int)
master-bin.000001 7
32 Query 1 827
use `test`; insert into t2 select count(*) from t3
master-bin.000001 8
27 Query 1 926
use `test`; insert into t3 select * from t1 where f>=4
master-bin.000001 9
26 Query 1 100
6 use `test`; drop temporary table t3
master-bin.000001 10
06 Query 1 1101
use `test`; insert into t2 select count(*) from t3
master-bin.000001 11
01 Query 1 1181
use `test`; drop temporary table t3
master-bin.000001 96 Query 1 1
86
use `test`; drop table if exists t1,t2
master-bin.000001 1
86 Query 1 272
use `test`; create table t1(f int)
master-bin.000001 2
72 Query 1 358
use `test`; create table t2(f int)
master-bin.000001 3
58 Query 1 484
use `test`; insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10)
master-bin.000001 4
84 Query 1 580
use `test`; create temporary table t3(f int)
master-bin.000001 5
80 Query 1 685
use `test`; insert into t3 select * from t1 where f<6
master-bin.000001 6
85 Query 1 781
use `test`; create temporary table t3(f int)
master-bin.000001 7
81 Query 1 883
use `test`; insert into t2 select count(*) from t3
master-bin.000001 8
83 Query 1 989
use `test`; insert into t3 select * from t1 where f>=4
master-bin.000001 9
89 Query 1 107
6 use `test`; drop temporary table t3
master-bin.000001 10
76 Query 1 1178
use `test`; insert into t2 select count(*) from t3
master-bin.000001 11
78 Query 1 1265
use `test`; drop temporary table t3
drop table t1, t2;
use test;
SET TIMESTAMP=1040323920;
...
...
mysql-test/r/rpl_timezone.result
View file @
de1dcee9
...
...
@@ -33,12 +33,12 @@ t
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
master-bin.000001 96 Query 1 18
2
use `test`; create table t1 (t timestamp)
master-bin.000001 18
2 Query 1 267
use `test`; create table t2 (t char(32))
master-bin.000001 2
67 Query 1 352
use `test`; SET ONE_SHOT TIME_ZONE='UTC'
master-bin.000001 3
52 Query 1 469
use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
master-bin.000001 4
69 Query 1 540
use `test`; delete from t1
master-bin.000001 5
40 Query 1 657
use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
master-bin.000001 96 Query 1 18
9
use `test`; create table t1 (t timestamp)
master-bin.000001 18
9 Query 1 281
use `test`; create table t2 (t char(32))
master-bin.000001 2
81 Query 1 373
use `test`; SET ONE_SHOT TIME_ZONE='UTC'
master-bin.000001 3
73 Query 1 497
use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
master-bin.000001 4
97 Query 1 575
use `test`; delete from t1
master-bin.000001 5
75 Query 1 699
use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
set time_zone='MET';
insert into t2 (select t from t1);
select * from t1;
...
...
mysql-test/r/rpl_until.result
View file @
de1dcee9
...
...
@@ -15,13 +15,13 @@ drop table t2;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
master-bin.000001 96 Query 1 21
1
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 21
1 Query 1 305
use `test`; insert into t1 values (1),(2),(3),(4)
master-bin.000001 3
05 Query 1 375
use `test`; drop table t1
master-bin.000001 3
75 Query 1 490
use `test`; create table t2(n int not null auto_increment primary key)
master-bin.000001
490 Query 1 576
use `test`; insert into t2 values (1),(2)
master-bin.000001
576 Query 1 662
use `test`; insert into t2 values (3),(4)
master-bin.000001
662 Query 1 732
use `test`; drop table t2
master-bin.000001 96 Query 1 21
8
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 21
8 Query 1 319
use `test`; insert into t1 values (1),(2),(3),(4)
master-bin.000001 3
19 Query 1 396
use `test`; drop table t1
master-bin.000001 3
96 Query 1 518
use `test`; create table t2(n int not null auto_increment primary key)
master-bin.000001
518 Query 1 611
use `test`; insert into t2 values (1),(2)
master-bin.000001
611 Query 1 704
use `test`; insert into t2 values (3),(4)
master-bin.000001
704 Query 1 781
use `test`; drop table t2
start slave until master_log_file='master-bin.000001', master_log_pos=304;
select * from t1;
n
...
...
@@ -31,7 +31,7 @@ n
4
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_MYPORT 1 master-bin.000001 7
32 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 305
# Master master-bin.000001 304 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 7
81 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 319
# Master master-bin.000001 304 No #
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
select * from t1;
n
...
...
@@ -41,7 +41,7 @@ n
4
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_MYPORT 1 master-bin.000001 7
32 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 305
# Master master-no-such-bin.000001 291 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 7
81 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 319
# Master master-no-such-bin.000001 291 No #
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=710;
select * from t2;
n
...
...
@@ -49,13 +49,13 @@ n
2
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_MYPORT 1 master-bin.000001 7
32 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 576
# Relay slave-relay-bin.000004 710 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 7
81 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 611
# Relay slave-relay-bin.000004 710 No #
start slave;
stop slave;
start slave until master_log_file='master-bin.000001', master_log_pos=710;
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_MYPORT 1 master-bin.000001 7
32 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 732
# Master master-bin.000001 710 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 7
81 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 781
# Master master-bin.000001 710 No #
start slave until master_log_file='master-bin', master_log_pos=561;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
...
...
mysql-test/r/rpl_user_variables.result
View file @
de1dcee9
...
...
@@ -76,34 +76,35 @@ abcn1n2
NULL
NULL
NULL
show binlog events from
180
;
show binlog events from
96
;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 180 User var 2 223 @`i1`=12345678901234
slave-bin.000001 223 User var 2 266 @`i2`=-12345678901234
slave-bin.000001 266 User var 2 309 @`i3`=0
slave-bin.000001 309 User var 2 352 @`i4`=-1
slave-bin.000001 352 Query 1 457 use `test`; insert into t1 values (@i1), (@i2), (@i3), (@i4)
slave-bin.000001 457 User var 2 500 @`r1`=12.5
slave-bin.000001 500 User var 2 543 @`r2`=-12.5
slave-bin.000001 543 Query 1 634 use `test`; insert into t1 values (@r1), (@r2)
slave-bin.000001 634 User var 2 683 @`s1`=_latin1 0x5468697320697320612074657374 COLLATE latin1_swedish_ci
slave-bin.000001 683 User var 2 718 @`s2`=_latin1 "" COLLATE latin1_swedish_ci
slave-bin.000001 718 User var 2 760 @`s3`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci
slave-bin.000001 760 User var 2 802 @`s4`=_latin1 0x6162635C646566 COLLATE latin1_swedish_ci
slave-bin.000001 802 User var 2 844 @`s5`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci
slave-bin.000001 844 Query 1 956 use `test`; insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5)
slave-bin.000001 956 User var 2 982 @`n1`=NULL
slave-bin.000001 982 Query 1 1066 use `test`; insert into t1 values (@n1)
slave-bin.000001 1066 User var 2 1092 @`n2`=NULL
slave-bin.000001 1092 Query 1 1176 use `test`; insert into t1 values (@n2)
slave-bin.000001 1176 Query 1 1286 use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1)
slave-bin.000001 1286 User var 2 1328 @`a`=2
slave-bin.000001 1328 Query 1 1422 use `test`; insert into t1 values (@a+(@b:=@a+1))
slave-bin.000001 1422 User var 2 1459 @`q`=_latin1 0x616263 COLLATE latin1_swedish_ci
slave-bin.000001 1459 Query 1 1585 use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2'))
slave-bin.000001 1585 User var 2 1627 @`a`=5
slave-bin.000001 1627 Query 1 1715 use `test`; insert into t1 values (@a),(@a)
slave-bin.000001 1715 User var 2 1740 @`a`=NULL
slave-bin.000001 1740 Query 1 1835 use `test`; insert into t1 values (@a),(@a),(@a*5)
slave-bin.000001 96 Query 1 187 use `test`; create table t1(n char(30))
slave-bin.000001 187 User var 2 230 @`i1`=12345678901234
slave-bin.000001 230 User var 2 273 @`i2`=-12345678901234
slave-bin.000001 273 User var 2 316 @`i3`=0
slave-bin.000001 316 User var 2 359 @`i4`=-1
slave-bin.000001 359 Query 1 471 use `test`; insert into t1 values (@i1), (@i2), (@i3), (@i4)
slave-bin.000001 471 User var 2 510 @`r1`=12.5
slave-bin.000001 510 User var 2 549 @`r2`=-12.5
slave-bin.000001 549 Query 1 647 use `test`; insert into t1 values (@r1), (@r2)
slave-bin.000001 647 User var 2 696 @`s1`=_latin1 0x5468697320697320612074657374 COLLATE latin1_swedish_ci
slave-bin.000001 696 User var 2 731 @`s2`=_latin1 "" COLLATE latin1_swedish_ci
slave-bin.000001 731 User var 2 773 @`s3`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci
slave-bin.000001 773 User var 2 815 @`s4`=_latin1 0x6162635C646566 COLLATE latin1_swedish_ci
slave-bin.000001 815 User var 2 857 @`s5`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci
slave-bin.000001 857 Query 1 976 use `test`; insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5)
slave-bin.000001 976 User var 2 1002 @`n1`=NULL
slave-bin.000001 1002 Query 1 1093 use `test`; insert into t1 values (@n1)
slave-bin.000001 1093 User var 2 1119 @`n2`=NULL
slave-bin.000001 1119 Query 1 1210 use `test`; insert into t1 values (@n2)
slave-bin.000001 1210 Query 1 1327 use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1)
slave-bin.000001 1327 User var 2 1369 @`a`=2
slave-bin.000001 1369 Query 1 1470 use `test`; insert into t1 values (@a+(@b:=@a+1))
slave-bin.000001 1470 User var 2 1507 @`q`=_latin1 0x616263 COLLATE latin1_swedish_ci
slave-bin.000001 1507 Query 1 1640 use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2'))
slave-bin.000001 1640 User var 2 1682 @`a`=5
slave-bin.000001 1682 Query 1 1777 use `test`; insert into t1 values (@a),(@a)
slave-bin.000001 1777 User var 2 1802 @`a`=NULL
slave-bin.000001 1802 Query 1 1904 use `test`; insert into t1 values (@a),(@a),(@a*5)
drop table t1;
stop slave;
mysql-test/r/user_var.result
View file @
de1dcee9
...
...
@@ -172,24 +172,28 @@ SET TIMESTAMP=10000;
SET @`a b`='hello';
INSERT INTO t1 VALUES(@`a b`);
set @var1= "';aaa";
insert into t1 values (@var1);
SET @var2=char(ascii('a'));
insert into t1 values (@var1),(@var2);
show binlog events from 96;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 96 User var 1 137 @`a b`=_latin1 0x68656C6C6F COLLATE latin1_swedish_ci
master-bin.000001 137 Query 1 223 use `test`; INSERT INTO t1 VALUES(@`a b`)
master-bin.000001 223 User var 1 265 @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci
master-bin.000001 265 Query 1 351 use `test`; insert into t1 values (@var1)
master-bin.000001 137 Query 1 230 use `test`; INSERT INTO t1 VALUES(@`a b`)
master-bin.000001 230 User var 1 272 @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci
master-bin.000001 272 User var 1 310 @`var2`=_latin1 0x61 COLLATE latin1_swedish_ci
master-bin.000001 310 Query 1 411 use `test`; insert into t1 values (@var1),(@var2)
flush logs;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
SET @`a b`:=_latin1 0x68656C6C6F COLLATE
latin1_swedish_ci
;
SET @`a b`:=_latin1 0x68656C6C6F COLLATE
`latin1_swedish_ci`
;
use test;
SET TIMESTAMP=10000;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
SET @@session.sql_mode=0;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
INSERT INTO t1 VALUES(@`a b`);
SET @`var1`:=_latin1 0x273B616161 COLLATE latin1_swedish_ci;
SET @`var1`:=_latin1 0x273B616161 COLLATE `latin1_swedish_ci`;
SET @`var2`:=_latin1 0x61 COLLATE `latin1_swedish_ci`;
SET TIMESTAMP=10000;
insert into t1 values (@var1);
insert into t1 values (@var1)
,(@var2)
;
drop table t1;
set @var= NULL ;
select FIELD( @var,'1it','Hit') as my_column;
...
...
mysql-test/t/innodb.test
View file @
de1dcee9
...
...
@@ -139,7 +139,7 @@ select n from t1;
rollback
to
savepoint
`savept2`
;
release
savepoint
`my_savepoint`
;
select
n
from
t1
;
--
error
1
181
--
error
1
305
rollback
to
savepoint
`my_savepoint`
;
set
autocommit
=
1
;
# nop
...
...
mysql-test/t/strict.test
View file @
de1dcee9
...
...
@@ -569,12 +569,12 @@ DROP TABLE t1;
CREATE
TABLE
t1
(
col1
CHAR
(
5
),
col2
VARCHAR
(
6
));
INSERT
INTO
t1
VALUES
(
'hello'
,
'hello'
),(
'he'
,
'he'
),(
'hello '
,
'hello '
);
--
error
140
0
--
error
140
6
INSERT
INTO
t1
(
col1
)
VALUES
(
'hellobob'
);
--
error
1265
INSERT
INTO
t1
(
col2
)
VALUES
(
'hellobob'
);
INSERT
INTO
t1
(
col2
)
VALUES
(
'hello '
);
--
error
140
0
--
error
140
6
UPDATE
t1
SET
col1
=
'hellobob'
WHERE
col1
=
'he'
;
--
error
1265
UPDATE
t1
SET
col2
=
'hellobob'
WHERE
col2
=
'he'
;
...
...
sql/examples/ha_archive.cc
View file @
de1dcee9
...
...
@@ -133,6 +133,23 @@ static HASH archive_open_tables;
#define DATA_BUFFER_SIZE 2 // Size of the data used in the data file
#define ARCHIVE_CHECK_HEADER 254 // The number we use to determine corruption
/* dummy handlerton - only to have something to return from archive_db_init */
static
handlerton
archive_hton
=
{
0
,
/* slot */
0
,
/* savepoint size. */
0
,
/* close_connection */
0
,
/* savepoint */
0
,
/* rollback to savepoint */
0
,
/* releas savepoint */
0
,
/* commit */
0
,
/* rollback */
0
,
/* prepare */
0
,
/* recover */
0
,
/* commit_by_xid */
0
/* rollback_by_xid */
};
/*
Used for hash table that tracks open tables.
*/
...
...
@@ -152,18 +169,19 @@ static byte* archive_get_key(ARCHIVE_SHARE *share,uint *length,
void
RETURN
FALSE
OK
TRUE
Error
&archive_hton
OK
0
Error
*/
bool
archive_db_init
()
handlerton
*
archive_db_init
()
{
VOID
(
pthread_mutex_init
(
&
archive_mutex
,
MY_MUTEX_INIT_FAST
));
return
(
hash_init
(
&
archive_open_tables
,
system_charset_info
,
32
,
0
,
0
,
(
hash_get_key
)
archive_get_key
,
0
,
0
));
if
(
hash_init
(
&
archive_open_tables
,
system_charset_info
,
32
,
0
,
0
,
(
hash_get_key
)
archive_get_key
,
0
,
0
))
return
0
;
return
&
archive_hton
;
}
/*
Release the archive handler.
...
...
sql/ha_innodb.cc
View file @
de1dcee9
...
...
@@ -154,6 +154,7 @@ static int innobase_commit(THD* thd, bool all);
static
int
innobase_rollback
(
THD
*
thd
,
bool
all
);
static
int
innobase_rollback_to_savepoint
(
THD
*
thd
,
void
*
savepoint
);
static
int
innobase_savepoint
(
THD
*
thd
,
void
*
savepoint
);
static
int
innobase_release_savepoint
(
THD
*
thd
,
void
*
savepoint
);
static
handlerton
innobase_hton
=
{
0
,
/* slot */
...
...
@@ -161,7 +162,7 @@ static handlerton innobase_hton = {
innobase_close_connection
,
innobase_savepoint
,
innobase_rollback_to_savepoint
,
innobase_release_savepoint
innobase_release_savepoint
,
innobase_commit
,
/* commit */
innobase_rollback
,
/* rollback */
innobase_xa_prepare
,
/* prepare */
...
...
@@ -1701,7 +1702,7 @@ innobase_rollback_to_savepoint(
/*********************************************************************
Release transaction savepoint name. */
int
static
int
innobase_release_savepoint
(
/*===========================*/
/* out: 0 if success, HA_ERR_NO_SAVEPOINT if
...
...
@@ -5575,7 +5576,11 @@ ha_innobase::transactional_table_lock(
/* MySQL is setting a new transactional table lock */
/* Set the MySQL flag to mark that there is an active transaction */
thd
->
transaction
.
all
.
innodb_active_trans
=
1
;
if
(
trx
->
active_trans
==
0
)
{
register_trans
(
thd
);
trx
->
active_trans
=
1
;
}
if
(
thd
->
in_lock_tables
&&
thd
->
variables
.
innodb_table_locks
)
{
ulint
error
=
DB_SUCCESS
;
...
...
sql/handler.cc
View file @
de1dcee9
...
...
@@ -1530,6 +1530,8 @@ int ha_enable_transaction(THD *thd, bool on)
DBUG_ENTER
(
"ha_enable_transaction"
);
thd
->
transaction
.
on
=
on
;
if
(
on
)
ha_commit
(
thd
);
DBUG_RETURN
(
error
);
}
...
...
sql/log.cc
View file @
de1dcee9
...
...
@@ -64,14 +64,11 @@ static handlerton binlog_hton = {
this function is mostly a placeholder.
conceptually, binlog initialization (now mostly done in MYSQL_LOG::open)
should be moved here.
for now, we fail if binlog is closed (mysql_bin_log.open() failed for some
reason) - it'll make mysqld to shutdown.
*/
handlerton
*
binlog_init
()
{
return
mysql_bin_log
.
is_open
()
:
&
binlog_hton
:
0
;
return
&
binlog_hton
;
}
static
int
binlog_close_connection
(
THD
*
thd
)
...
...
sql/mysqld.cc
View file @
de1dcee9
...
...
@@ -2743,9 +2743,9 @@ server.");
unireg_abort
(
1
);
}
if
(
opt_bin_log
)
mysql_bin_log
.
open
(
opt_bin_logname
,
LOG_BIN
,
0
,
WRITE_CACHE
,
0
,
max_binlog_size
,
0
);
if
(
opt_bin_log
&&
mysql_bin_log
.
open
(
opt_bin_logname
,
LOG_BIN
,
0
,
WRITE_CACHE
,
0
,
max_binlog_size
,
0
))
unireg_abort
(
1
);
#ifdef HAVE_REPLICATION
if
(
opt_bin_log
&&
expire_logs_days
)
...
...
sql/sql_class.h
View file @
de1dcee9
...
...
@@ -1835,7 +1835,6 @@ class multi_update :public select_result_interceptor
uint
table_count
;
Copy_field
*
copy_field
;
enum
enum_duplicates
handle_duplicates
;
bool
do_update
,
trans_safe
,
transactional_tables
;
bool
do_update
,
trans_safe
,
transactional_tables
,
ignore
;
public:
...
...
sql/sql_delete.cc
View file @
de1dcee9
sql/sql_parse.cc
View file @
de1dcee9
...
...
@@ -833,17 +833,6 @@ static int check_connection(THD *thd)
return
(
ER_OUT_OF_RESOURCES
);
thd
->
client_capabilities
=
uint2korr
(
net
->
read_pos
);
#ifdef TO_BE_REMOVED_IN_4_1_RELEASE
/*
This is just a safety check against any client that would use the old
CLIENT_CHANGE_USER flag
*/
if
((
thd
->
client_capabilities
&
CLIENT_PROTOCOL_41
)
&&
!
(
thd
->
client_capabilities
&
(
CLIENT_RESERVED
|
CLIENT_SECURE_CONNECTION
|
CLIENT_MULTI_RESULTS
)))
thd
->
client_capabilities
&=
~
CLIENT_PROTOCOL_41
;
#endif
if
(
thd
->
client_capabilities
&
CLIENT_PROTOCOL_41
)
{
thd
->
client_capabilities
|=
((
ulong
)
uint2korr
(
net
->
read_pos
+
2
))
<<
16
;
...
...
@@ -1351,36 +1340,15 @@ int end_trans_and_send_ok(THD *thd, enum enum_mysql_completiontype completion)
case
ROLLBACK
:
case
ROLLBACK_AND_CHAIN
:
{
bool
warn
=
0
;
thd
->
server_status
&=
~
SERVER_STATUS_IN_TRANS
;
if
(
!
ha_rollback
(
thd
))
{
/*
If a non-transactional table was updated, warn; don't warn if this is a
slave thread (because when a slave thread executes a ROLLBACK, it has
been read from the binary log, so it's 100% sure and normal to produce
error ER_WARNING_NOT_COMPLETE_ROLLBACK. If we sent the warning to the
slave SQL thread, it would not stop the thread but just be printed in
the error log; but we don't want users to wonder why they have this
message in the error log, so we don't send it.
*/
warn
=
(
thd
->
options
&
OPTION_STATUS_NO_TRANS_UPDATE
)
&&
!
thd
->
slave_thread
;
}
else
if
(
ha_rollback
(
thd
))
res
=
-
1
;
thd
->
options
&=
~
(
ulong
)
(
OPTION_BEGIN
|
OPTION_STATUS_NO_TRANS_UPDATE
);
if
(
!
res
&&
(
completion
==
ROLLBACK_AND_CHAIN
))
res
=
begin_trans
(
thd
);
if
(
!
res
)
{
if
(
warn
)
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_WARNING_NOT_COMPLETE_ROLLBACK
,
ER
(
ER_WARNING_NOT_COMPLETE_ROLLBACK
));
send_ok
(
thd
);
}
break
;
}
default:
...
...
@@ -3886,16 +3854,16 @@ mysql_execute_command(THD *thd)
break
;
case
SQLCOM_COMMIT
:
if
(
end_trans_and_send_ok
(
thd
,
lex
->
tx_release
?
COMMIT_RELEASE
:
lex
->
tx_chain
?
COMMIT_AND_CHAIN
:
COMMIT
,
0
))
lex
->
tx_chain
?
COMMIT_AND_CHAIN
:
COMMIT
))
goto
error
;
break
;
case
SQLCOM_ROLLBACK
:
if
(
end_trans_and_send_ok
(
thd
,
lex
->
tx_release
?
ROLLBACK_RELEASE
:
lex
->
tx_chain
?
ROLLBACK_AND_CHAIN
:
ROLLBACK
,
0
))
lex
->
tx_chain
?
ROLLBACK_AND_CHAIN
:
ROLLBACK
))
goto
error
;
break
;
case
SQLCOM_RELEASE_SAVEPOINT
:
{
SAVEPOINT
**
sv
;
for
(
sv
=&
thd
->
transaction
.
savepoints
;
*
sv
;
sv
=&
(
*
sv
)
->
prev
)
{
...
...
@@ -3908,7 +3876,9 @@ mysql_execute_command(THD *thd)
{
if
(
ha_release_savepoint
(
thd
,
*
sv
))
res
=
TRUE
;
// cannot happen
*
sv
=
0
;
else
send_ok
(
thd
);
*
sv
=
(
*
sv
)
->
prev
;
}
else
{
...
...
@@ -3918,6 +3888,7 @@ mysql_execute_command(THD *thd)
break
;
}
case
SQLCOM_ROLLBACK_TO_SAVEPOINT
:
{
SAVEPOINT
**
sv
;
for
(
sv
=&
thd
->
transaction
.
savepoints
;
*
sv
;
sv
=&
(
*
sv
)
->
prev
)
{
...
...
@@ -3939,7 +3910,7 @@ mysql_execute_command(THD *thd)
ER
(
ER_WARNING_NOT_COMPLETE_ROLLBACK
));
send_ok
(
thd
);
}
*
sv
=
0
;
*
sv
=
(
*
sv
)
->
prev
;
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment