diff options
author | monty@mysql.com <> | 2005-03-16 22:59:06 +0200 |
---|---|---|
committer | monty@mysql.com <> | 2005-03-16 22:59:06 +0200 |
commit | f42941073d4e96355b547912c1c19f72244b9c2f (patch) | |
tree | 119cb9dbad08d53c1b012a9b6a5a4b37020923e4 /mysql-test | |
parent | 594ef41b2d981bac7dc18ffaaf3e78c970ae4d65 (diff) | |
parent | d8d507926ddf7b5f805a3fa73b3da6cb6250d058 (diff) | |
download | mariadb-git-f42941073d4e96355b547912c1c19f72244b9c2f.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
Diffstat (limited to 'mysql-test')
66 files changed, 639 insertions, 455 deletions
diff --git a/mysql-test/r/binlog.result b/mysql-test/r/binlog.result index d59ea7e1340..5d5b78abe29 100644 --- a/mysql-test/r/binlog.result +++ b/mysql-test/r/binlog.result @@ -8,128 +8,128 @@ commit; begin; insert t2 values (5); commit; -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 194 use `test`; create table t1 (a int) engine=bdb -master-bin.000001 194 Query 1 295 use `test`; create table t2 (a int) engine=innodb -master-bin.000001 295 Query 1 364 use `test`; BEGIN -master-bin.000001 364 Query 1 84 use `test`; insert t1 values (5) -master-bin.000001 448 Query 1 518 use `test`; COMMIT -master-bin.000001 518 Query 1 587 use `test`; BEGIN -master-bin.000001 587 Query 1 84 use `test`; insert t2 values (5) -master-bin.000001 671 Xid 1 698 COMMIT /* xid=11 */ +master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=bdb +master-bin.000001 # Query 1 # use `test`; create table t2 (a int) engine=innodb +master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # use `test`; insert t1 values (5) +master-bin.000001 # Query 1 # use `test`; COMMIT +master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # use `test`; insert t2 values (5) +master-bin.000001 # Xid 1 # COMMIT /* xid=11 */ drop table t1,t2; reset master; create table t1 (n int) engine=innodb; begin; commit; drop table t1; -show binlog events in 'master-bin.000001' from 96; +show binlog events in 'master-bin.000001' from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 197 use `test`; create table t1 (n int) engine=innodb -master-bin.000001 197 Query 1 266 use `test`; BEGIN -master-bin.000001 266 Query 1 94 use `test`; insert into t1 values(100 + 4) -master-bin.000001 360 Query 1 187 use `test`; insert into t1 values(99 + 4) -master-bin.000001 453 Query 1 280 use `test`; insert into t1 values(98 + 4) -master-bin.000001 546 Query 1 373 use `test`; insert into t1 values(97 + 4) -master-bin.000001 639 Query 1 466 use `test`; insert into t1 values(96 + 4) -master-bin.000001 732 Query 1 559 use `test`; insert into t1 values(95 + 4) -master-bin.000001 825 Query 1 652 use `test`; insert into t1 values(94 + 4) -master-bin.000001 918 Query 1 745 use `test`; insert into t1 values(93 + 4) -master-bin.000001 1011 Query 1 838 use `test`; insert into t1 values(92 + 4) -master-bin.000001 1104 Query 1 931 use `test`; insert into t1 values(91 + 4) -master-bin.000001 1197 Query 1 1024 use `test`; insert into t1 values(90 + 4) -master-bin.000001 1290 Query 1 1117 use `test`; insert into t1 values(89 + 4) -master-bin.000001 1383 Query 1 1210 use `test`; insert into t1 values(88 + 4) -master-bin.000001 1476 Query 1 1303 use `test`; insert into t1 values(87 + 4) -master-bin.000001 1569 Query 1 1396 use `test`; insert into t1 values(86 + 4) -master-bin.000001 1662 Query 1 1489 use `test`; insert into t1 values(85 + 4) -master-bin.000001 1755 Query 1 1582 use `test`; insert into t1 values(84 + 4) -master-bin.000001 1848 Query 1 1675 use `test`; insert into t1 values(83 + 4) -master-bin.000001 1941 Query 1 1768 use `test`; insert into t1 values(82 + 4) -master-bin.000001 2034 Query 1 1861 use `test`; insert into t1 values(81 + 4) -master-bin.000001 2127 Query 1 1954 use `test`; insert into t1 values(80 + 4) -master-bin.000001 2220 Query 1 2047 use `test`; insert into t1 values(79 + 4) -master-bin.000001 2313 Query 1 2140 use `test`; insert into t1 values(78 + 4) -master-bin.000001 2406 Query 1 2233 use `test`; insert into t1 values(77 + 4) -master-bin.000001 2499 Query 1 2326 use `test`; insert into t1 values(76 + 4) -master-bin.000001 2592 Query 1 2419 use `test`; insert into t1 values(75 + 4) -master-bin.000001 2685 Query 1 2512 use `test`; insert into t1 values(74 + 4) -master-bin.000001 2778 Query 1 2605 use `test`; insert into t1 values(73 + 4) -master-bin.000001 2871 Query 1 2698 use `test`; insert into t1 values(72 + 4) -master-bin.000001 2964 Query 1 2791 use `test`; insert into t1 values(71 + 4) -master-bin.000001 3057 Query 1 2884 use `test`; insert into t1 values(70 + 4) -master-bin.000001 3150 Query 1 2977 use `test`; insert into t1 values(69 + 4) -master-bin.000001 3243 Query 1 3070 use `test`; insert into t1 values(68 + 4) -master-bin.000001 3336 Query 1 3163 use `test`; insert into t1 values(67 + 4) -master-bin.000001 3429 Query 1 3256 use `test`; insert into t1 values(66 + 4) -master-bin.000001 3522 Query 1 3349 use `test`; insert into t1 values(65 + 4) -master-bin.000001 3615 Query 1 3442 use `test`; insert into t1 values(64 + 4) -master-bin.000001 3708 Query 1 3535 use `test`; insert into t1 values(63 + 4) -master-bin.000001 3801 Query 1 3628 use `test`; insert into t1 values(62 + 4) -master-bin.000001 3894 Query 1 3721 use `test`; insert into t1 values(61 + 4) -master-bin.000001 3987 Query 1 3814 use `test`; insert into t1 values(60 + 4) -master-bin.000001 4080 Query 1 3907 use `test`; insert into t1 values(59 + 4) -master-bin.000001 4173 Query 1 4000 use `test`; insert into t1 values(58 + 4) -master-bin.000001 4266 Query 1 4093 use `test`; insert into t1 values(57 + 4) -master-bin.000001 4359 Query 1 4186 use `test`; insert into t1 values(56 + 4) -master-bin.000001 4452 Query 1 4279 use `test`; insert into t1 values(55 + 4) -master-bin.000001 4545 Query 1 4372 use `test`; insert into t1 values(54 + 4) -master-bin.000001 4638 Query 1 4465 use `test`; insert into t1 values(53 + 4) -master-bin.000001 4731 Query 1 4558 use `test`; insert into t1 values(52 + 4) -master-bin.000001 4824 Query 1 4651 use `test`; insert into t1 values(51 + 4) -master-bin.000001 4917 Query 1 4744 use `test`; insert into t1 values(50 + 4) -master-bin.000001 5010 Query 1 4837 use `test`; insert into t1 values(49 + 4) -master-bin.000001 5103 Query 1 4930 use `test`; insert into t1 values(48 + 4) -master-bin.000001 5196 Query 1 5023 use `test`; insert into t1 values(47 + 4) -master-bin.000001 5289 Query 1 5116 use `test`; insert into t1 values(46 + 4) -master-bin.000001 5382 Query 1 5209 use `test`; insert into t1 values(45 + 4) -master-bin.000001 5475 Query 1 5302 use `test`; insert into t1 values(44 + 4) -master-bin.000001 5568 Query 1 5395 use `test`; insert into t1 values(43 + 4) -master-bin.000001 5661 Query 1 5488 use `test`; insert into t1 values(42 + 4) -master-bin.000001 5754 Query 1 5581 use `test`; insert into t1 values(41 + 4) -master-bin.000001 5847 Query 1 5674 use `test`; insert into t1 values(40 + 4) -master-bin.000001 5940 Query 1 5767 use `test`; insert into t1 values(39 + 4) -master-bin.000001 6033 Query 1 5860 use `test`; insert into t1 values(38 + 4) -master-bin.000001 6126 Query 1 5953 use `test`; insert into t1 values(37 + 4) -master-bin.000001 6219 Query 1 6046 use `test`; insert into t1 values(36 + 4) -master-bin.000001 6312 Query 1 6139 use `test`; insert into t1 values(35 + 4) -master-bin.000001 6405 Query 1 6232 use `test`; insert into t1 values(34 + 4) -master-bin.000001 6498 Query 1 6325 use `test`; insert into t1 values(33 + 4) -master-bin.000001 6591 Query 1 6418 use `test`; insert into t1 values(32 + 4) -master-bin.000001 6684 Query 1 6511 use `test`; insert into t1 values(31 + 4) -master-bin.000001 6777 Query 1 6604 use `test`; insert into t1 values(30 + 4) -master-bin.000001 6870 Query 1 6697 use `test`; insert into t1 values(29 + 4) -master-bin.000001 6963 Query 1 6790 use `test`; insert into t1 values(28 + 4) -master-bin.000001 7056 Query 1 6883 use `test`; insert into t1 values(27 + 4) -master-bin.000001 7149 Query 1 6976 use `test`; insert into t1 values(26 + 4) -master-bin.000001 7242 Query 1 7069 use `test`; insert into t1 values(25 + 4) -master-bin.000001 7335 Query 1 7162 use `test`; insert into t1 values(24 + 4) -master-bin.000001 7428 Query 1 7255 use `test`; insert into t1 values(23 + 4) -master-bin.000001 7521 Query 1 7348 use `test`; insert into t1 values(22 + 4) -master-bin.000001 7614 Query 1 7441 use `test`; insert into t1 values(21 + 4) -master-bin.000001 7707 Query 1 7534 use `test`; insert into t1 values(20 + 4) -master-bin.000001 7800 Query 1 7627 use `test`; insert into t1 values(19 + 4) -master-bin.000001 7893 Query 1 7720 use `test`; insert into t1 values(18 + 4) -master-bin.000001 7986 Query 1 7813 use `test`; insert into t1 values(17 + 4) -master-bin.000001 8079 Query 1 7906 use `test`; insert into t1 values(16 + 4) -master-bin.000001 8172 Query 1 7999 use `test`; insert into t1 values(15 + 4) -master-bin.000001 8265 Query 1 8092 use `test`; insert into t1 values(14 + 4) -master-bin.000001 8358 Query 1 8185 use `test`; insert into t1 values(13 + 4) -master-bin.000001 8451 Query 1 8278 use `test`; insert into t1 values(12 + 4) -master-bin.000001 8544 Query 1 8371 use `test`; insert into t1 values(11 + 4) -master-bin.000001 8637 Query 1 8464 use `test`; insert into t1 values(10 + 4) -master-bin.000001 8730 Query 1 8556 use `test`; insert into t1 values(9 + 4) -master-bin.000001 8822 Query 1 8648 use `test`; insert into t1 values(8 + 4) -master-bin.000001 8914 Query 1 8740 use `test`; insert into t1 values(7 + 4) -master-bin.000001 9006 Query 1 8832 use `test`; insert into t1 values(6 + 4) -master-bin.000001 9098 Query 1 8924 use `test`; insert into t1 values(5 + 4) -master-bin.000001 9190 Query 1 9016 use `test`; insert into t1 values(4 + 4) -master-bin.000001 9282 Query 1 9108 use `test`; insert into t1 values(3 + 4) -master-bin.000001 9374 Query 1 9200 use `test`; insert into t1 values(2 + 4) -master-bin.000001 9466 Query 1 9292 use `test`; insert into t1 values(1 + 4) -master-bin.000001 9558 Xid 1 9585 COMMIT /* xid=18 */ -master-bin.000001 9585 Rotate 1 9629 master-bin.000002;pos=4 -show binlog events in 'master-bin.000002' from 96; +master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb +master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # use `test`; insert into t1 values(100 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(99 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(98 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(97 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(96 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(95 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(94 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(93 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(92 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(91 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(90 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(89 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(88 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(87 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(86 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(85 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(84 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(83 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(82 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(81 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(80 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(79 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(78 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(77 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(76 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(75 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(74 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(73 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(72 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(71 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(70 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(69 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(68 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(67 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(66 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(65 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(64 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(63 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(62 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(61 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(60 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(59 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(58 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(57 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(56 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(55 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(54 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(53 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(52 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(51 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(50 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(49 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(48 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(47 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(46 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(45 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(44 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(43 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(42 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(41 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(40 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(39 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(38 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(37 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(36 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(35 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(34 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(33 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(32 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(31 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(30 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(29 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(28 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(27 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(26 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(25 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(24 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(23 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(22 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(21 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(20 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(19 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(18 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(17 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(16 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(15 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(14 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(13 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(12 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(11 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(10 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(9 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(8 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(7 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(6 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(5 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(4 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(3 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(2 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(1 + 4) +master-bin.000001 # Xid 1 # COMMIT /* xid=18 */ +master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 +show binlog events in 'master-bin.000002' from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 96 Query 1 173 use `test`; drop table t1 +master-bin.000002 # Query 1 # use `test`; drop table t1 diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index 78672c7fd7b..a734ad78e04 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -523,10 +523,10 @@ create table t2 (c char(30)) charset=ucs2; set @v=convert('abc' using ucs2); reset master; insert into t2 values (@v); -show binlog events from 96; +show binlog events from 98; 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 226 use `test`; insert into t2 values (@v) +master-bin.000001 # User var 1 # @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci +master-bin.000001 # Query 1 # use `test`; insert into t2 values (@v) /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; ROLLBACK; diff --git a/mysql-test/r/endspace.result b/mysql-test/r/endspace.result index b1942409c91..e9396c9a6ed 100644 --- a/mysql-test/r/endspace.result +++ b/mysql-test/r/endspace.result @@ -178,7 +178,7 @@ teststring teststring explain select * from t1 order by text1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL key1 32 NULL 3 Using index +1 SIMPLE t1 index NULL key1 34 NULL 3 Using index alter table t1 modify text1 char(32) binary not null; select * from t1 order by text1; text1 diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index be73f6986ac..1c991478ab6 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1466,13 +1466,13 @@ Error 1146 Table 'test.t4' doesn't exist checksum table t1, t2, t3; Table Checksum test.t1 2948697075 -test.t2 968604391 -test.t3 968604391 +test.t2 1157260244 +test.t3 1157260244 checksum table t1, t2, t3 extended; Table Checksum test.t1 3092701434 -test.t2 968604391 -test.t3 968604391 +test.t2 1157260244 +test.t3 1157260244 drop table t1,t2,t3; create table t1 (id int, name char(10) not null, name2 char(10) not null) engine=innodb; insert into t1 values(1,'first','fff'),(2,'second','sss'),(3,'third','ttt'); @@ -1809,6 +1809,6 @@ 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 +drop table t1; create table t1 (a bit, key(a)) engine=innodb; ERROR 42000: The storage engine for the table doesn't support BIT FIELD diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index 47f1b18d8a4..13d4b0e22bc 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -74,8 +74,8 @@ insert into t1 select * from t2; 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 191 use `test`; insert into t1 select * from t2 +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; insert into t1 select * from t2 select * from t1; a 1 @@ -88,7 +88,7 @@ create table t2(unique(a)) select a from t1; ERROR 23000: Duplicate entry '1' 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 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 drop table t1; create table t1 (a int not null); create table t2 (a int not null); diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index c17b96ee60c..d76fff372f5 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -1,4 +1,4 @@ -drop table if exists t1; +drop table if exists t1, t2; create table t1 (a date, b date, c date not null, d date); load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; Warnings: @@ -66,3 +66,57 @@ a b 3 row 3 0 drop table t1; +create table t1 (a int default 100, b int, c varchar(60)); +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (a, @b) set b=@b+10, c=concat("b=",@b); +select * from t1; +a b c +NULL 20 b=10 +NULL 25 b=15 +truncate table t1; +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (a, @b) set c= if(a is null,"oops",a); +select * from t1; +a b c +NULL NULL oops +NULL NULL oops +truncate table t1; +set @c:=123; +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@a, b) set c= if(@a is null,@c,b); +select * from t1; +a b c +100 10 123 +100 15 123 +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@a, @b); +select * from t1; +a b c +100 10 123 +100 15 123 +100 NULL NULL +100 NULL NULL +select @a, @b; +@a @b +NULL 15 +truncate table t1; +load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, b) set c="Wow"; +select * from t1; +a b c +1 2 Wow +3 4 Wow +5 6 Wow +truncate table t1; +load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, b) set c=concat(a,"+",b,"+",@c,"+",b,"+",if(c is null,"NIL",c)); +select * from t1; +a b c +1 2 1+2+123+2+NIL +3 4 3+4+123+4+NIL +5 6 5+6+123+6+NIL +load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, @b); +ERROR HY000: Can't load value from file with fixed size rows to variable +create table t2 (num int primary key, str varchar(10)); +insert into t2 values (10,'Ten'), (15,'Fifteen'); +truncate table t1; +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@dummy,@n) set a= @n, c= (select str from t2 where num=@n); +select * from t1; +a b c +10 NULL Ten +15 NULL Fifteen +drop table t1, t2; diff --git a/mysql-test/r/mix_innodb_myisam_binlog.result b/mysql-test/r/mix_innodb_myisam_binlog.result index 53cd61f8a2e..a5f4915384d 100644 --- a/mysql-test/r/mix_innodb_myisam_binlog.result +++ b/mysql-test/r/mix_innodb_myisam_binlog.result @@ -6,12 +6,12 @@ begin; insert into t1 values(1); insert into t2 select * from t1; commit; -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 # use `test`; BEGIN -master-bin.000001 165 Query 1 # use `test`; insert into t1 values(1) -master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 348 Xid 1 # COMMIT /* xid=7 */ +master-bin.000001 98 Query 1 # use `test`; BEGIN +master-bin.000001 167 Query 1 # use `test`; insert into t1 values(1) +master-bin.000001 255 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 350 Xid 1 # COMMIT /* xid=7 */ delete from t1; delete from t2; reset master; @@ -21,12 +21,12 @@ insert into t2 select * from t1; rollback; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 # use `test`; BEGIN -master-bin.000001 165 Query 1 # use `test`; insert into t1 values(2) -master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 348 Query 1 # use `test`; ROLLBACK +master-bin.000001 98 Query 1 # use `test`; BEGIN +master-bin.000001 167 Query 1 # use `test`; insert into t1 values(2) +master-bin.000001 255 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 350 Query 1 # use `test`; ROLLBACK delete from t1; delete from t2; reset master; @@ -39,15 +39,15 @@ rollback to savepoint my_savepoint; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back commit; -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 # use `test`; BEGIN -master-bin.000001 165 Query 1 # use `test`; insert into t1 values(3) -master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint -master-bin.000001 339 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 */ +master-bin.000001 98 Query 1 # use `test`; BEGIN +master-bin.000001 167 Query 1 # use `test`; insert into t1 values(3) +master-bin.000001 255 Query 1 # use `test`; savepoint my_savepoint +master-bin.000001 341 Query 1 # use `test`; insert into t1 values(4) +master-bin.000001 429 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 524 Query 1 # use `test`; rollback to savepoint my_savepoint +master-bin.000001 622 Xid 1 # COMMIT /* xid=24 */ delete from t1; delete from t2; reset master; @@ -65,16 +65,16 @@ select a from t1 order by a; a 5 7 -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 # use `test`; BEGIN -master-bin.000001 165 Query 1 # use `test`; insert into t1 values(5) -master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint -master-bin.000001 339 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 */ +master-bin.000001 98 Query 1 # use `test`; BEGIN +master-bin.000001 167 Query 1 # use `test`; insert into t1 values(5) +master-bin.000001 255 Query 1 # use `test`; savepoint my_savepoint +master-bin.000001 341 Query 1 # use `test`; insert into t1 values(6) +master-bin.000001 429 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 524 Query 1 # use `test`; rollback to savepoint my_savepoint +master-bin.000001 622 Query 1 # use `test`; insert into t1 values(7) +master-bin.000001 710 Xid 1 # COMMIT /* xid=36 */ delete from t1; delete from t2; reset master; @@ -87,43 +87,43 @@ insert into t2 select * from t1; select get_lock("a",10); get_lock("a",10) 1 -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 # use `test`; BEGIN -master-bin.000001 165 Query 1 # use `test`; insert into t1 values(8) -master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 348 Query 1 # use `test`; ROLLBACK +master-bin.000001 98 Query 1 # use `test`; BEGIN +master-bin.000001 167 Query 1 # use `test`; insert into t1 values(8) +master-bin.000001 255 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 350 Query 1 # use `test`; ROLLBACK delete from t1; delete from t2; reset master; insert into t1 values(9); insert into t2 select * from t1; -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 # use `test`; insert into t1 values(9) -master-bin.000001 184 Xid 1 # COMMIT /* xid=59 */ -master-bin.000001 211 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 98 Query 1 # use `test`; insert into t1 values(9) +master-bin.000001 186 Xid 1 # COMMIT /* xid=59 */ +master-bin.000001 213 Query 1 # use `test`; insert into t2 select * from t1 delete from t1; delete from t2; reset master; insert into t1 values(10); begin; insert into t2 select * from t1; -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 # use `test`; insert into t1 values(10) -master-bin.000001 185 Xid 1 # COMMIT /* xid=65 */ -master-bin.000001 212 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 98 Query 1 # use `test`; insert into t1 values(10) +master-bin.000001 187 Xid 1 # COMMIT /* xid=65 */ +master-bin.000001 214 Query 1 # use `test`; insert into t2 select * from t1 insert into t1 values(11); commit; -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 # use `test`; insert into t1 values(10) -master-bin.000001 185 Xid 1 # COMMIT /* xid=65 */ -master-bin.000001 212 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 307 Query 1 # use `test`; BEGIN -master-bin.000001 376 Query 1 # use `test`; insert into t1 values(11) -master-bin.000001 465 Xid 1 # COMMIT /* xid=67 */ +master-bin.000001 98 Query 1 # use `test`; insert into t1 values(10) +master-bin.000001 187 Xid 1 # COMMIT /* xid=65 */ +master-bin.000001 214 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 309 Query 1 # use `test`; BEGIN +master-bin.000001 378 Query 1 # use `test`; insert into t1 values(11) +master-bin.000001 467 Xid 1 # COMMIT /* xid=67 */ alter table t2 engine=INNODB; delete from t1; delete from t2; @@ -132,12 +132,12 @@ begin; insert into t1 values(12); insert into t2 select * from t1; commit; -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 # use `test`; BEGIN -master-bin.000001 165 Query 1 # use `test`; insert into t1 values(12) -master-bin.000001 254 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 349 Xid 1 # COMMIT /* xid=77 */ +master-bin.000001 98 Query 1 # use `test`; BEGIN +master-bin.000001 167 Query 1 # use `test`; insert into t1 values(12) +master-bin.000001 256 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 351 Xid 1 # COMMIT /* xid=77 */ delete from t1; delete from t2; reset master; @@ -145,7 +145,7 @@ begin; insert into t1 values(13); insert into t2 select * from t1; rollback; -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info delete from t1; delete from t2; @@ -157,11 +157,11 @@ insert into t1 values(15); insert into t2 select * from t1; rollback to savepoint my_savepoint; commit; -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 # use `test`; BEGIN -master-bin.000001 165 Query 1 # use `test`; insert into t1 values(14) -master-bin.000001 254 Xid 1 # COMMIT /* xid=93 */ +master-bin.000001 98 Query 1 # use `test`; BEGIN +master-bin.000001 167 Query 1 # use `test`; insert into t1 values(14) +master-bin.000001 256 Xid 1 # COMMIT /* xid=93 */ delete from t1; delete from t2; reset master; @@ -177,12 +177,12 @@ select a from t1 order by a; a 16 18 -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 # use `test`; BEGIN -master-bin.000001 165 Query 1 # use `test`; insert into t1 values(16) -master-bin.000001 254 Query 1 # use `test`; insert into t1 values(18) -master-bin.000001 343 Xid 1 # COMMIT /* xid=104 */ +master-bin.000001 98 Query 1 # use `test`; BEGIN +master-bin.000001 167 Query 1 # use `test`; insert into t1 values(16) +master-bin.000001 256 Query 1 # use `test`; insert into t1 values(18) +master-bin.000001 345 Xid 1 # COMMIT /* xid=104 */ delete from t1; delete from t2; alter table t2 type=MyISAM; diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 6fb2f7f2fb4..8765e65f11b 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -9,7 +9,6 @@ load data infile '../../std_data/words.dat' into table t1; load data infile '../../std_data/words.dat' into table t1; load data infile '../../std_data/words.dat' into table t1; load data infile '../../std_data/words.dat' into table t1; -load data infile '../../std_data/words.dat' into table t1; insert into t1 values ("Alas"); flush logs; @@ -32,11 +31,14 @@ insert into t1 values ("abirvalg"); SET INSERT_ID=1; SET TIMESTAMP=1000000000; insert into t2 values (); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-1-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-2-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-3-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-4-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-5-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); +SET TIMESTAMP=1000000000; +load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-1-0' INTO table t1; +SET TIMESTAMP=1000000000; +load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-2-0' INTO table t1; +SET TIMESTAMP=1000000000; +load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-3-0' INTO table t1; +SET TIMESTAMP=1000000000; +load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-4-0' INTO table t1; ROLLBACK; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -91,11 +93,14 @@ insert into t1 values ("abirvalg"); SET INSERT_ID=1; SET TIMESTAMP=1000000000; insert into t2 values (); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-1-1' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-2-1' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-3-1' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-4-1' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-5-1' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); +SET TIMESTAMP=1000000000; +load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-1-2' INTO table t1; +SET TIMESTAMP=1000000000; +load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-2-2' INTO table t1; +SET TIMESTAMP=1000000000; +load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-3-2' INTO table t1; +SET TIMESTAMP=1000000000; +load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-4-2' INTO table t1; ROLLBACK; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 3c99e22cb10..130bda3e5bb 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS t1, `"t"1`, t1aa,t2aa; +DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa; drop database if exists mysqldump_test_db; drop view if exists v1; CREATE TABLE t1(a int); diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index 940f5e8cbac..9a0927a9a5c 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -70,7 +70,7 @@ def test t9 t9 c18 c18 1 4 1 Y 32768 0 63 def test t9 t9 c19 c19 1 1 1 Y 32768 0 63 def test t9 t9 c20 c20 254 1 1 Y 0 0 8 def test t9 t9 c21 c21 254 10 10 Y 0 0 8 -def test t9 t9 c22 c22 254 30 30 Y 0 0 8 +def test t9 t9 c22 c22 253 30 30 Y 0 0 8 def test t9 t9 c23 c23 252 255 8 Y 144 0 63 def test t9 t9 c24 c24 252 255 8 Y 16 0 8 def test t9 t9 c25 c25 252 65535 4 Y 144 0 63 @@ -1691,8 +1691,8 @@ affected rows: 3 info: Records: 3 Duplicates: 0 Warnings: 0 select a,b from t2 order by a ; a b -3 duplicate -4 duplicate +3 duplicate +4 duplicate 103 three delete from t2 ; prepare stmt1 from ' insert into t2 (b,a) @@ -1710,8 +1710,8 @@ affected rows: 3 info: Records: 3 Duplicates: 0 Warnings: 0 select a,b from t2 order by a ; a b -3 duplicate -4 duplicate +3 duplicate +4 duplicate 103 three drop table t2; drop table if exists t5 ; diff --git a/mysql-test/r/rowid_order_innodb.result b/mysql-test/r/rowid_order_innodb.result index f76002e9cb2..d55029f9064 100644 --- a/mysql-test/r/rowid_order_innodb.result +++ b/mysql-test/r/rowid_order_innodb.result @@ -178,9 +178,9 @@ insert into t1 values ('','empt',2,2), ('dddd','d--d',2,2); select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3; pk1 pk2 key1 key2 - empt 2 2 a a--a 2 2 bb b--b 2 2 ccc c--c 2 2 dddd d--d 2 2 + empt 2 2 drop table t1; diff --git a/mysql-test/r/rpl000015.result b/mysql-test/r/rpl000015.result index 44d3a844c74..e33201ced93 100644 --- a/mysql-test/r/rpl000015.result +++ b/mysql-test/r/rpl000015.result @@ -1,7 +1,7 @@ reset master; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 96 +master-bin.000001 98 reset 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 @@ -17,7 +17,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File 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 7 master-bin.000001 96 # # master-bin.000001 Yes Yes 0 0 96 # None 0 No # +# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 98 # # master-bin.000001 Yes Yes 0 0 98 # None 0 No # drop table if exists t1; create table t1 (n int); insert into t1 values (10),(45),(90); diff --git a/mysql-test/r/rpl_change_master.result b/mysql-test/r/rpl_change_master.result index 6ffdb15fcf8..6366a2d0f8f 100644 --- a/mysql-test/r/rpl_change_master.result +++ b/mysql-test/r/rpl_change_master.result @@ -13,11 +13,11 @@ insert into t1 values(2); stop 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_MYPORT 1 master-bin.000001 358 # # master-bin.000001 No No 0 0 182 # None 0 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 360 # # master-bin.000001 No No 0 0 184 # 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 182 # # master-bin.000001 No No 0 0 182 # None 0 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 184 # # master-bin.000001 No No 0 0 184 # None 0 No # start slave; select * from t1; n diff --git a/mysql-test/r/rpl_charset.result b/mysql-test/r/rpl_charset.result index ce958c15ece..b27acc0972e 100644 --- a/mysql-test/r/rpl_charset.result +++ b/mysql-test/r/rpl_charset.result @@ -103,7 +103,7 @@ a b 1 cp850_general_ci drop database mysqltest2; drop database mysqltest3; -show binlog events from 96; +show binlog events from 98; 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 diff --git a/mysql-test/r/rpl_deadlock.result b/mysql-test/r/rpl_deadlock.result index fd9853a9e5f..809b7950add 100644 --- a/mysql-test/r/rpl_deadlock.result +++ b/mysql-test/r/rpl_deadlock.result @@ -39,9 +39,9 @@ a 22 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 19116 # # master-bin.000001 Yes Yes 0 0 19116 # None 0 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 19118 # # master-bin.000001 Yes Yes 0 0 19118 # None 0 No # stop slave; -change master to master_log_pos=534; +change master to master_log_pos=536; begin; select * from t2 for update; a @@ -57,10 +57,10 @@ a 22 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 19116 # # master-bin.000001 Yes Yes 0 0 19116 # None 0 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 19118 # # master-bin.000001 Yes Yes 0 0 19118 # None 0 No # set global max_relay_log_size=0; stop slave; -change master to master_log_pos=534; +change master to master_log_pos=536; begin; select * from t2 for update; a @@ -77,5 +77,5 @@ a 22 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 19116 # # master-bin.000001 Yes Yes 0 0 19116 # None 0 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 19118 # # master-bin.000001 Yes Yes 0 0 19118 # None 0 No # drop table t1,t2; diff --git a/mysql-test/r/rpl_error_ignored_table.result b/mysql-test/r/rpl_error_ignored_table.result index cf207270ca8..a5e025078b9 100644 --- a/mysql-test/r/rpl_error_ignored_table.result +++ b/mysql-test/r/rpl_error_ignored_table.result @@ -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 288 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 288 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 290 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 290 # None 0 No # show tables like 't1'; Tables_in_test (t1) drop table t1; @@ -26,14 +26,14 @@ select (@id := id) - id from t3; 0 kill @id; drop table t2,t3; -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 195 use `test`; create table t1 (a int primary key) -master-bin.000001 195 Query 1 288 use `test`; insert into t1 values (1),(1) -master-bin.000001 288 Query 1 365 use `test`; drop table t1 -master-bin.000001 365 Query 1 464 use `test`; create table t2 (a int primary key) -master-bin.000001 464 Query 1 552 use `test`; insert into t2 values(1) -master-bin.000001 552 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 862 Query 1 942 use `test`; drop table t2,t3 +master-bin.000001 # Query 1 # use `test`; create table t1 (a int primary key) +master-bin.000001 # Query 1 # use `test`; insert into t1 values (1),(1) +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Query 1 # use `test`; create table t2 (a int primary key) +master-bin.000001 # Query 1 # use `test`; insert into t2 values(1) +master-bin.000001 # Query 1 # use `test`; create table t3 (id int) +master-bin.000001 # Query 1 # use `test`; insert into t3 values(connection_id()) +master-bin.000001 # Query 1 # use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10) +master-bin.000001 # Query 1 # use `test`; drop table t2,t3 diff --git a/mysql-test/r/rpl_flush_log_loop.result b/mysql-test/r/rpl_flush_log_loop.result index d0e1c975312..083db5f440d 100644 --- a/mysql-test/r/rpl_flush_log_loop.result +++ b/mysql-test/r/rpl_flush_log_loop.result @@ -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 207 # # slave-bin.000001 Yes Yes 0 0 207 # None 0 No # +# 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 209 # # slave-bin.000001 Yes Yes 0 0 209 # None 0 No # diff --git a/mysql-test/r/rpl_flush_tables.result b/mysql-test/r/rpl_flush_tables.result index 0c52344e8a2..ca2e77cac66 100644 --- a/mysql-test/r/rpl_flush_tables.result +++ b/mysql-test/r/rpl_flush_tables.result @@ -14,27 +14,27 @@ rename table t1 to t5, t2 to t1; 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 183 use `test`; create table t1 (a int) -master-bin.000001 183 Query 1 273 use `test`; insert into t1 values (10) -master-bin.000001 273 Query 1 360 use `test`; create table t2 (a int) -master-bin.000001 360 Query 1 470 use `test`; create table t3 (a int) engine=merge union(t1) -master-bin.000001 470 Query 1 557 use `test`; create table t4 (a int) -master-bin.000001 557 Query 1 652 use `test`; insert into t4 select * from t3 -master-bin.000001 652 Query 1 747 use `test`; rename table t1 to t5, t2 to t1 +master-bin.000001 # Format_desc 1 # Server ver: SERVER_VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; create table t1 (a int) +master-bin.000001 # Query 1 # use `test`; insert into t1 values (10) +master-bin.000001 # Query 1 # use `test`; create table t2 (a int) +master-bin.000001 # Query 1 # use `test`; create table t3 (a int) engine=merge union(t1) +master-bin.000001 # Query 1 # use `test`; create table t4 (a int) +master-bin.000001 # Query 1 # use `test`; insert into t4 select * from t3 +master-bin.000001 # Query 1 # 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 183 use `test`; create table t1 (a int) -master-bin.000001 183 Query 1 273 use `test`; insert into t1 values (10) -master-bin.000001 273 Query 1 360 use `test`; create table t2 (a int) -master-bin.000001 360 Query 1 470 use `test`; create table t3 (a int) engine=merge union(t1) -master-bin.000001 470 Query 1 557 use `test`; create table t4 (a int) -master-bin.000001 557 Query 1 652 use `test`; insert into t4 select * from t3 -master-bin.000001 652 Query 1 747 use `test`; rename table t1 to t5, t2 to t1 -master-bin.000001 747 Query 1 823 use `test`; flush tables +master-bin.000001 # Format_desc 1 # Server ver: SERVER_VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; create table t1 (a int) +master-bin.000001 # Query 1 # use `test`; insert into t1 values (10) +master-bin.000001 # Query 1 # use `test`; create table t2 (a int) +master-bin.000001 # Query 1 # use `test`; create table t3 (a int) engine=merge union(t1) +master-bin.000001 # Query 1 # use `test`; create table t4 (a int) +master-bin.000001 # Query 1 # use `test`; insert into t4 select * from t3 +master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 +master-bin.000001 # Query 1 # use `test`; flush tables select * from t3; a diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result index 32aa02c31e1..4060910c079 100644 --- a/mysql-test/r/rpl_loaddata.result +++ b/mysql-test/r/rpl_loaddata.result @@ -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 1097 +slave-bin.000001 1292 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 1560 # # master-bin.000001 Yes Yes 0 0 1560 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1800 # # master-bin.000001 Yes Yes 0 0 1800 # 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 1668 # # master-bin.000001 No No 0 0 1668 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1835 # # master-bin.000001 No No 0 0 1835 # 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 537 +master-bin.000001 441 drop table t2; diff --git a/mysql-test/r/rpl_loaddata_rule_m.result b/mysql-test/r/rpl_loaddata_rule_m.result index 86165d5a2f9..3571c9973ea 100644 --- a/mysql-test/r/rpl_loaddata_rule_m.result +++ b/mysql-test/r/rpl_loaddata_rule_m.result @@ -10,8 +10,10 @@ create database mysqltest; create table t1(a int, b int, unique(b)); use mysqltest; load data infile '../../std_data/rpl_loaddata.dat' into table test.t1; -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 198 drop database if exists mysqltest -master-bin.000001 198 Query 1 292 create database mysqltest +master-bin.000001 # Query 1 # drop database if exists mysqltest +master-bin.000001 # Query 1 # create database mysqltest +master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=12 +master-bin.000001 # Execute_load_query 1 # use `mysqltest`; load data infile '../../std_data/rpl_loaddata.dat' into table test.t1 ;file_id=1 drop database mysqltest; diff --git a/mysql-test/r/rpl_loaddata_rule_s.result b/mysql-test/r/rpl_loaddata_rule_s.result index 6cd91ea5bf5..16720c81374 100644 --- a/mysql-test/r/rpl_loaddata_rule_s.result +++ b/mysql-test/r/rpl_loaddata_rule_s.result @@ -10,5 +10,5 @@ load data infile '../../std_data/rpl_loaddata.dat' into table test.t1; select count(*) from t1; count(*) 2 -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info diff --git a/mysql-test/r/rpl_loaddatalocal.result b/mysql-test/r/rpl_loaddatalocal.result index b49ea842485..c29825c3c98 100644 --- a/mysql-test/r/rpl_loaddatalocal.result +++ b/mysql-test/r/rpl_loaddatalocal.result @@ -12,3 +12,20 @@ select a,count(*) from t1 group by a; a count(*) 1 10000 drop table t1; +create table t1(a int); +insert into t1 values (1), (2), (2), (3); +select * into outfile '../../var/master-data/rpl_loaddatalocal.select_outfile' from t1; +drop table t1; +create table t1(a int primary key); +load data local infile './var/master-data/rpl_loaddatalocal.select_outfile' into table t1; +select * from t1; +a +1 +2 +3 +select * from t1; +a +1 +2 +3 +drop table t1; diff --git a/mysql-test/r/rpl_log.result b/mysql-test/r/rpl_log.result index 383c13a4747..85b27dcad34 100644 --- a/mysql-test/r/rpl_log.result +++ b/mysql-test/r/rpl_log.result @@ -19,25 +19,25 @@ count(*) 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 218 use `test`; create table t1(n int not null auto_increment primary key) -master-bin.000001 218 Intvar 1 246 INSERT_ID=1 -master-bin.000001 246 Query 1 338 use `test`; insert into t1 values (NULL) -master-bin.000001 338 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 1189 Exec_load 1 1212 ;file_id=1 -master-bin.000001 1212 Query 1 1289 use `test`; drop table t1 -show binlog events from 96 limit 1; +master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4 +master-bin.000001 98 Query 1 220 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 220 Intvar 1 248 INSERT_ID=1 +master-bin.000001 248 Query 1 340 use `test`; insert into t1 values (NULL) +master-bin.000001 340 Query 1 417 use `test`; drop table t1 +master-bin.000001 417 Query 1 521 use `test`; create table t1 (word char(20) not null) +master-bin.000001 521 Begin_load_query 1 1125 ;file_id=1;block_len=581 +master-bin.000001 1125 Execute_load_query 1 1274 use `test`; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines ;file_id=1 +master-bin.000001 1274 Query 1 1351 use `test`; drop table t1 +show binlog events from 98 limit 1; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 218 use `test`; create table t1(n int not null auto_increment primary key) -show binlog events from 96 limit 2; +master-bin.000001 98 Query 1 220 use `test`; create table t1(n int not null auto_increment primary key) +show binlog events from 98 limit 2; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 Query 1 218 use `test`; create table t1(n int not null auto_increment primary key) -master-bin.000001 218 Intvar 1 246 INSERT_ID=1 -show binlog events from 96 limit 2,1; +master-bin.000001 98 Query 1 220 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 220 Intvar 1 248 INSERT_ID=1 +show binlog events from 98 limit 2,1; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 246 Query 1 338 use `test`; insert into t1 values (NULL) +master-bin.000001 248 Query 1 340 use `test`; insert into t1 values (NULL) flush logs; create table t5 (a int); drop table t5; @@ -49,24 +49,24 @@ insert into t1 values (1); 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 218 use `test`; create table t1(n int not null auto_increment primary key) -master-bin.000001 218 Intvar 1 246 INSERT_ID=1 -master-bin.000001 246 Query 1 338 use `test`; insert into t1 values (NULL) -master-bin.000001 338 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 1189 Exec_load 1 1212 ;file_id=1 -master-bin.000001 1212 Query 1 1289 use `test`; drop table t1 -master-bin.000001 1289 Rotate 1 1333 master-bin.000002;pos=4 +master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4 +master-bin.000001 98 Query 1 220 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 220 Intvar 1 248 INSERT_ID=1 +master-bin.000001 248 Query 1 340 use `test`; insert into t1 values (NULL) +master-bin.000001 340 Query 1 417 use `test`; drop table t1 +master-bin.000001 417 Query 1 521 use `test`; create table t1 (word char(20) not null) +master-bin.000001 521 Begin_load_query 1 1125 ;file_id=1;block_len=581 +master-bin.000001 1125 Execute_load_query 1 1274 use `test`; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines ;file_id=1 +master-bin.000001 1274 Query 1 1351 use `test`; drop table t1 +master-bin.000001 1351 Rotate 1 1395 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 183 use `test`; create table t5 (a int) -master-bin.000002 183 Query 1 260 use `test`; drop table t5 -master-bin.000002 260 Query 1 347 use `test`; create table t1 (n int) -master-bin.000002 347 Query 1 436 use `test`; insert into t1 values (1) -master-bin.000002 436 Query 1 513 use `test`; drop table t1 +master-bin.000002 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4 +master-bin.000002 98 Query 1 185 use `test`; create table t5 (a int) +master-bin.000002 185 Query 1 262 use `test`; drop table t5 +master-bin.000002 262 Query 1 349 use `test`; create table t1 (n int) +master-bin.000002 349 Query 1 438 use `test`; insert into t1 values (1) +master-bin.000002 438 Query 1 515 use `test`; drop table t1 show binary logs; Log_name master-bin.000001 @@ -78,26 +78,26 @@ slave-bin.000001 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 218 use `test`; create table t1(n int not null auto_increment primary key) -slave-bin.000001 218 Intvar 1 246 INSERT_ID=1 -slave-bin.000001 246 Query 1 338 use `test`; insert into t1 values (NULL) -slave-bin.000001 338 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 1198 Exec_load 1 1221 ;file_id=1 -slave-bin.000001 1221 Query 1 1298 use `test`; drop table t1 -slave-bin.000001 1298 Query 1 1385 use `test`; create table t5 (a int) -slave-bin.000001 1385 Query 1 1462 use `test`; drop table t5 -slave-bin.000001 1462 Rotate 2 1505 slave-bin.000002;pos=4 +slave-bin.000001 4 Format_desc 2 98 Server ver: VERSION, Binlog ver: 4 +slave-bin.000001 98 Query 1 220 use `test`; create table t1(n int not null auto_increment primary key) +slave-bin.000001 220 Intvar 1 248 INSERT_ID=1 +slave-bin.000001 248 Query 1 340 use `test`; insert into t1 values (NULL) +slave-bin.000001 340 Query 1 417 use `test`; drop table t1 +slave-bin.000001 417 Query 1 521 use `test`; create table t1 (word char(20) not null) +slave-bin.000001 521 Begin_load_query 1 1125 ;file_id=1;block_len=581 +slave-bin.000001 1125 Execute_load_query 1 1283 use `test`; load data INFILE '../../var/tmp/SQL_LOAD-2-1-1.data' INTO table t1 ignore 1 lines ;file_id=1 +slave-bin.000001 1283 Query 1 1360 use `test`; drop table t1 +slave-bin.000001 1360 Query 1 1447 use `test`; create table t5 (a int) +slave-bin.000001 1447 Query 1 1524 use `test`; drop table t5 +slave-bin.000001 1524 Rotate 2 1567 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 183 use `test`; create table t1 (n int) -slave-bin.000002 183 Query 1 272 use `test`; insert into t1 values (1) -slave-bin.000002 272 Query 1 349 use `test`; drop table t1 +slave-bin.000002 4 Format_desc 2 98 Server ver: VERSION, Binlog ver: 4 +slave-bin.000002 98 Query 1 185 use `test`; create table t1 (n int) +slave-bin.000002 185 Query 1 274 use `test`; insert into t1 values (1) +slave-bin.000002 274 Query 1 351 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 513 # # master-bin.000002 Yes Yes 0 0 513 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 515 # # master-bin.000002 Yes Yes 0 0 515 # 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 diff --git a/mysql-test/r/rpl_log_pos.result b/mysql-test/r/rpl_log_pos.result index 60262c5e227..cf13756966e 100644 --- a/mysql-test/r/rpl_log_pos.result +++ b/mysql-test/r/rpl_log_pos.result @@ -6,10 +6,10 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 96 +master-bin.000001 98 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 96 # # master-bin.000001 Yes Yes 0 0 96 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 98 # # master-bin.000001 Yes Yes 0 0 98 # None 0 No # stop slave; change master to master_log_pos=73; start slave; @@ -30,13 +30,13 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File # 127.0.0.1 root MASTER_PORT 1 master-bin.000001 173 # # master-bin.000001 No Yes 0 0 173 # None 0 No # show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 96 +master-bin.000001 98 create table if not exists t1 (n int); drop table if exists t1; create table t1 (n int); insert into t1 values (1),(2),(3); stop slave; -change master to master_log_pos=96; +change master to master_log_pos=98; start slave; select * from t1; n diff --git a/mysql-test/r/rpl_max_relay_size.result b/mysql-test/r/rpl_max_relay_size.result index d56dedbbdca..56cbe4d5ac8 100644 --- a/mysql-test/r/rpl_max_relay_size.result +++ b/mysql-test/r/rpl_max_relay_size.result @@ -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 73752 # # master-bin.000001 Yes Yes 0 0 73752 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73754 # # master-bin.000001 Yes Yes 0 0 73754 # 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 73752 # # master-bin.000001 Yes Yes 0 0 73752 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73754 # # master-bin.000001 Yes Yes 0 0 73754 # 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 73752 # # master-bin.000001 Yes Yes 0 0 73752 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73754 # # master-bin.000001 Yes Yes 0 0 73754 # None 0 No # stop slave; reset slave; flush logs; @@ -49,13 +49,13 @@ 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 73839 # # master-bin.000001 Yes Yes 0 0 73839 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73841 # # master-bin.000001 Yes Yes 0 0 73841 # 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 73916 # # master-bin.000001 Yes Yes 0 0 73916 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73918 # # master-bin.000001 Yes Yes 0 0 73918 # None 0 No # flush logs; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000002 96 +master-bin.000002 98 diff --git a/mysql-test/r/rpl_multi_query.result b/mysql-test/r/rpl_multi_query.result index e5883ac9299..f2d8ea77536 100644 --- a/mysql-test/r/rpl_multi_query.result +++ b/mysql-test/r/rpl_multi_query.result @@ -19,7 +19,7 @@ n 3 4 5 -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # drop database if exists mysqltest master-bin.000001 # Query 1 # create database mysqltest diff --git a/mysql-test/r/rpl_relayrotate.result b/mysql-test/r/rpl_relayrotate.result index 581efe52d7c..0135e90dce9 100644 --- a/mysql-test/r/rpl_relayrotate.result +++ b/mysql-test/r/rpl_relayrotate.result @@ -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 743186 # # master-bin.000001 Yes Yes 0 0 743186 # None 0 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 743188 # # master-bin.000001 Yes Yes 0 0 743188 # None 0 No # drop table t1; diff --git a/mysql-test/r/rpl_replicate_do.result b/mysql-test/r/rpl_replicate_do.result index ec065c10e48..469504d06b4 100644 --- a/mysql-test/r/rpl_replicate_do.result +++ b/mysql-test/r/rpl_replicate_do.result @@ -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 1618 # # master-bin.000001 Yes Yes test.t1 0 0 1618 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1668 # # master-bin.000001 Yes Yes test.t1 0 0 1668 # None 0 No # diff --git a/mysql-test/r/rpl_reset_slave.result b/mysql-test/r/rpl_reset_slave.result index 82e518c355c..ab55423b773 100644 --- a/mysql-test/r/rpl_reset_slave.result +++ b/mysql-test/r/rpl_reset_slave.result @@ -6,12 +6,12 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; 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 96 # # master-bin.000001 Yes Yes 0 0 96 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 98 # # master-bin.000001 Yes Yes 0 0 98 # None 0 No # stop slave; change master to master_user='test'; 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 test MASTER_PORT 1 master-bin.000001 96 # # master-bin.000001 No No 0 0 96 # None 0 No # +# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 98 # # master-bin.000001 No No 0 0 98 # None 0 No # reset 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 @@ -19,7 +19,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File 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 96 # # master-bin.000001 Yes Yes 0 0 96 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 98 # # master-bin.000001 Yes Yes 0 0 98 # None 0 No # stop slave; reset slave; start slave; diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result index ec29a01db10..bd2e6dd685f 100644 --- a/mysql-test/r/rpl_rotate_logs.result +++ b/mysql-test/r/rpl_rotate_logs.result @@ -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 550 # # master-bin.000001 Yes Yes 0 0 550 # None 0 No # +# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 552 # # master-bin.000001 Yes Yes 0 0 552 # 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 498 # # master-bin.000003 Yes Yes 0 0 498 # None 0 No # +# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 500 # # master-bin.000003 Yes Yes 0 0 500 # 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 2051 +master-bin.000005 2146 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 2051 # # master-bin.000005 Yes Yes 0 0 2051 # None 0 No # +# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2146 # # master-bin.000005 Yes Yes 0 0 2146 # None 0 No # lock tables t3 read; select count(*) from t3 where n >= 4; count(*) diff --git a/mysql-test/r/rpl_server_id1.result b/mysql-test/r/rpl_server_id1.result index fd8d73d5444..a3ab6672f69 100644 --- a/mysql-test/r/rpl_server_id1.result +++ b/mysql-test/r/rpl_server_id1.result @@ -10,7 +10,7 @@ stop slave; change master to master_port=SLAVE_PORT; 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 1 4 slave-relay-bin.000001 4 No No # 0 0 0 96 None 0 No NULL + 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 98 None 0 No NULL start slave; insert into t1 values (1); show status like "slave_running"; diff --git a/mysql-test/r/rpl_server_id2.result b/mysql-test/r/rpl_server_id2.result index 7ca88521b22..b196646aecc 100644 --- a/mysql-test/r/rpl_server_id2.result +++ b/mysql-test/r/rpl_server_id2.result @@ -10,7 +10,7 @@ stop slave; change master to master_port=SLAVE_PORT; 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 1 4 slave-relay-bin.000001 4 No No # 0 0 0 96 None 0 No NULL + 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 98 None 0 No NULL start slave; insert into t1 values (1); select * from t1; diff --git a/mysql-test/r/rpl_temporary.result b/mysql-test/r/rpl_temporary.result index 9394c40c77f..445a330f196 100644 --- a/mysql-test/r/rpl_temporary.result +++ b/mysql-test/r/rpl_temporary.result @@ -38,19 +38,19 @@ f 7 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 186 use `test`; drop table if exists t1,t2 -master-bin.000001 186 Query 1 272 use `test`; create table t1(f int) -master-bin.000001 272 Query 1 358 use `test`; create table t2(f int) -master-bin.000001 358 Query 1 484 use `test`; insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10) -master-bin.000001 484 Query 1 580 use `test`; create temporary table t3(f int) -master-bin.000001 580 Query 1 685 use `test`; insert into t3 select * from t1 where f<6 -master-bin.000001 685 Query 1 781 use `test`; create temporary table t3(f int) -master-bin.000001 781 Query 1 883 use `test`; insert into t2 select count(*) from t3 -master-bin.000001 883 Query 1 989 use `test`; insert into t3 select * from t1 where f>=4 -master-bin.000001 989 Query 1 1076 use `test`; drop temporary table t3 -master-bin.000001 1076 Query 1 1178 use `test`; insert into t2 select count(*) from t3 -master-bin.000001 1178 Query 1 1265 use `test`; drop temporary table t3 +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; drop table if exists t1,t2 +master-bin.000001 # Query 1 # use `test`; create table t1(f int) +master-bin.000001 # Query 1 # use `test`; create table t2(f int) +master-bin.000001 # Query 1 # use `test`; insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10) +master-bin.000001 # Query 1 # use `test`; create temporary table t3(f int) +master-bin.000001 # Query 1 # use `test`; insert into t3 select * from t1 where f<6 +master-bin.000001 # Query 1 # use `test`; create temporary table t3(f int) +master-bin.000001 # Query 1 # use `test`; insert into t2 select count(*) from t3 +master-bin.000001 # Query 1 # use `test`; insert into t3 select * from t1 where f>=4 +master-bin.000001 # Query 1 # use `test`; drop temporary table t3 +master-bin.000001 # Query 1 # use `test`; insert into t2 select count(*) from t3 +master-bin.000001 # Query 1 # use `test`; drop temporary table t3 drop table t1, t2; use test; SET TIMESTAMP=1040323920; diff --git a/mysql-test/r/rpl_timezone.result b/mysql-test/r/rpl_timezone.result index d39b9f242bc..cd2c4d099be 100644 --- a/mysql-test/r/rpl_timezone.result +++ b/mysql-test/r/rpl_timezone.result @@ -32,13 +32,13 @@ t 2004-06-11 09:39:02 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 189 use `test`; create table t1 (t timestamp) -master-bin.000001 189 Query 1 281 use `test`; create table t2 (t char(32)) -master-bin.000001 281 Query 1 373 use `test`; SET ONE_SHOT TIME_ZONE='UTC' -master-bin.000001 373 Query 1 497 use `test`; insert into t1 values ('20040101000000'), ('20040611093902') -master-bin.000001 497 Query 1 575 use `test`; delete from t1 -master-bin.000001 575 Query 1 699 use `test`; insert into t1 values ('20040101000000'), ('20040611093902') +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; create table t1 (t timestamp) +master-bin.000001 # Query 1 # use `test`; create table t2 (t char(32)) +master-bin.000001 # Query 1 # use `test`; SET ONE_SHOT TIME_ZONE='UTC' +master-bin.000001 # Query 1 # use `test`; insert into t1 values ('20040101000000'), ('20040611093902') +master-bin.000001 # Query 1 # use `test`; delete from t1 +master-bin.000001 # Query 1 # use `test`; insert into t1 values ('20040101000000'), ('20040611093902') set time_zone='MET'; insert into t2 (select t from t1); select * from t1; diff --git a/mysql-test/r/rpl_until.result b/mysql-test/r/rpl_until.result index 1e1b1bbd44a..c9f9aa7b029 100644 --- a/mysql-test/r/rpl_until.result +++ b/mysql-test/r/rpl_until.result @@ -14,15 +14,15 @@ insert into t2 values (3),(4); 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 218 use `test`; create table t1(n int not null auto_increment primary key) -master-bin.000001 218 Query 1 319 use `test`; insert into t1 values (1),(2),(3),(4) -master-bin.000001 319 Query 1 396 use `test`; drop table t1 -master-bin.000001 396 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; +master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4 +master-bin.000001 98 Query 1 220 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 220 Query 1 321 use `test`; insert into t1 values (1),(2),(3),(4) +master-bin.000001 321 Query 1 398 use `test`; drop table t1 +master-bin.000001 398 Query 1 520 use `test`; create table t2(n int not null auto_increment primary key) +master-bin.000001 520 Query 1 613 use `test`; insert into t2 values (1),(2) +master-bin.000001 613 Query 1 706 use `test`; insert into t2 values (3),(4) +master-bin.000001 706 Query 1 783 use `test`; drop table t2 +start slave until master_log_file='master-bin.000001', master_log_pos=321; select * from t1; n 1 @@ -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 781 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 319 # Master master-bin.000001 304 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 783 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 321 # Master master-bin.000001 321 No # start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; select * from t1; n @@ -41,21 +41,21 @@ 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 781 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; +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 783 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 321 # Master master-no-such-bin.000001 291 No # +start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=751; select * from t2; n 1 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 781 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 611 # Relay slave-relay-bin.000004 710 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 783 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 613 # Relay slave-relay-bin.000004 751 No # start slave; stop slave; -start slave until master_log_file='master-bin.000001', master_log_pos=710; +start slave until master_log_file='master-bin.000001', master_log_pos=783; 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 781 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 781 # Master master-bin.000001 710 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 783 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 783 # Master master-bin.000001 783 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; @@ -67,6 +67,6 @@ ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UN start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL start slave sql_thread; -start slave until master_log_file='master-bin.000001', master_log_pos=710; +start slave until master_log_file='master-bin.000001', master_log_pos=783; Warnings: Note 1254 Slave is already running diff --git a/mysql-test/r/rpl_user_variables.result b/mysql-test/r/rpl_user_variables.result index 0d6c717442e..4198bbcc154 100644 --- a/mysql-test/r/rpl_user_variables.result +++ b/mysql-test/r/rpl_user_variables.result @@ -76,35 +76,35 @@ abcn1n2 NULL NULL NULL -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -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) +slave-bin.000001 # Query 1 # use `test`; create table t1(n char(30)) +slave-bin.000001 # User var 2 # @`i1`=12345678901234 +slave-bin.000001 # User var 2 # @`i2`=-12345678901234 +slave-bin.000001 # User var 2 # @`i3`=0 +slave-bin.000001 # User var 2 # @`i4`=-1 +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@i1), (@i2), (@i3), (@i4) +slave-bin.000001 # User var 2 # @`r1`=12.5 +slave-bin.000001 # User var 2 # @`r2`=-12.5 +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@r1), (@r2) +slave-bin.000001 # User var 2 # @`s1`=_latin1 0x5468697320697320612074657374 COLLATE latin1_swedish_ci +slave-bin.000001 # User var 2 # @`s2`=_latin1 "" COLLATE latin1_swedish_ci +slave-bin.000001 # User var 2 # @`s3`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci +slave-bin.000001 # User var 2 # @`s4`=_latin1 0x6162635C646566 COLLATE latin1_swedish_ci +slave-bin.000001 # User var 2 # @`s5`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5) +slave-bin.000001 # User var 2 # @`n1`=NULL +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@n1) +slave-bin.000001 # User var 2 # @`n2`=NULL +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@n2) +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1) +slave-bin.000001 # User var 2 # @`a`=2 +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@a+(@b:=@a+1)) +slave-bin.000001 # User var 2 # @`q`=_latin1 0x616263 COLLATE latin1_swedish_ci +slave-bin.000001 # Query 1 # use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2')) +slave-bin.000001 # User var 2 # @`a`=5 +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@a),(@a) +slave-bin.000001 # User var 2 # @`a`=NULL +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@a),(@a),(@a*5) drop table t1; stop slave; diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index b2a88073cce..432a6c3e52b 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2446,3 +2446,12 @@ cast((a - b) as unsigned) 1 18446744073709551615 drop table t1; +create table t1 (a int, b int); +create table t2 like t1; +select t1.a from (t1 inner join t2 on t1.a=t2.a) where t2.a=1; +a +select t1.a from ((t1 inner join t2 on t1.a=t2.a)) where t2.a=1; +a +select x.a, y.a, z.a from ( (t1 x inner join t2 y on x.a=y.a) inner join t2 z on y.a=z.a) WHERE x.a=1; +a a a +drop table t1,t2; diff --git a/mysql-test/r/subselect2.result b/mysql-test/r/subselect2.result index b04fec26c6f..210ac0a8cc3 100644 --- a/mysql-test/r/subselect2.result +++ b/mysql-test/r/subselect2.result @@ -122,10 +122,10 @@ EXPLAIN SELECT t2.*, t4.DOCTYPENAME, t1.CONTENTSIZE,t1.MIMETYPE FROM t2 INNER JO id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system PRIMARY NULL NULL NULL 0 const row not found 1 PRIMARY t2 ALL DDOCTYPEID_IDX NULL NULL NULL 9 Using where -1 PRIMARY t4 eq_ref PRIMARY PRIMARY 32 test.t2.DOCTYPEID 1 -2 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 32 func 1 Using index; Using where -3 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 32 func 1 Using index; Using where -4 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 32 func 1 Using index; Using where -5 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 32 func 1 Using index; Using where -6 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX,CMFLDRPARNT_IDX PRIMARY 32 func 1 Using index; Using where +1 PRIMARY t4 eq_ref PRIMARY PRIMARY 34 test.t2.DOCTYPEID 1 +2 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 34 func 1 Using index; Using where +3 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 34 func 1 Using index; Using where +4 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 34 func 1 Using index; Using where +5 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 34 func 1 Using index; Using where +6 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX,CMFLDRPARNT_IDX PRIMARY 34 func 1 Using index; Using where drop table t1, t2, t3, t4; diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index 4bc85a10638..4b2eef20a6b 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -176,13 +176,13 @@ INSERT INTO t1 VALUES(@`a b`); set @var1= "';aaa"; SET @var2=char(ascii('a')); insert into t1 values (@var1),(@var2); -show binlog events from 96; +show binlog events from 98; 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 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) +master-bin.000001 # User var 1 # @`a b`=_latin1 0x68656C6C6F COLLATE latin1_swedish_ci +master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES(@`a b`) +master-bin.000001 # User var 1 # @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci +master-bin.000001 # User var 1 # @`var2`=_latin1 0x61 COLLATE latin1_swedish_ci +master-bin.000001 # Query 1 # use `test`; insert into t1 values (@var1),(@var2) /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; ROLLBACK; diff --git a/mysql-test/std_data/loaddata5.dat b/mysql-test/std_data/loaddata5.dat new file mode 100644 index 00000000000..6e1881bd8e2 --- /dev/null +++ b/mysql-test/std_data/loaddata5.dat @@ -0,0 +1,3 @@ +1 2 +3 4 +5 6 diff --git a/mysql-test/t/binlog.test b/mysql-test/t/binlog.test index 5862861eaeb..2310e800df7 100644 --- a/mysql-test/t/binlog.test +++ b/mysql-test/t/binlog.test @@ -19,7 +19,8 @@ insert t2 values (5); commit; # first COMMIT must be Query_log_event, second - Xid_log_event --replace_result "xid=18" "xid=11" -show binlog events from 96; +--replace_column 2 # 5 # +show binlog events from 98; drop table t1,t2; # @@ -40,6 +41,8 @@ while ($1) commit; drop table t1; --replace_result "xid=29" "xid=18" -show binlog events in 'master-bin.000001' from 96; -show binlog events in 'master-bin.000002' from 96; +--replace_column 2 # 5 # +show binlog events in 'master-bin.000001' from 98; +--replace_column 2 # 5 # +show binlog events in 'master-bin.000002' from 98; diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test index 7d34c4504bd..151e2cf5464 100644 --- a/mysql-test/t/ctype_ucs.test +++ b/mysql-test/t/ctype_ucs.test @@ -338,7 +338,8 @@ create table t2 (c char(30)) charset=ucs2; set @v=convert('abc' using ucs2); reset master; insert into t2 values (@v); -show binlog events from 96; +--replace_column 2 # 5 # +show binlog events from 98; # more important than SHOW BINLOG EVENTS, mysqlbinlog (where we # absolutely need variables names to be quoted and strings to be # escaped). diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 91a2b5b0e54..057d326eb52 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -1291,8 +1291,8 @@ show variables like "innodb_thread_sleep_delay"; #eval set storage_engine=$default; # InnoDB specific varchar tests ---error 1074 create table t1 (v varchar(16384)) engine=innodb; +drop table t1; # The following should be moved to type_bit.test when innodb will support it --error 1178 diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test index a5b163b3533..371df339b57 100644 --- a/mysql-test/t/insert_select.test +++ b/mysql-test/t/insert_select.test @@ -85,6 +85,7 @@ insert into t1 select * from t2; # verify the binlog : let $VERSION=`select version()`; --replace_result $VERSION VERSION +--replace_column 2 # 5 # show binlog events; select * from t1; drop table t1, t2; @@ -99,6 +100,7 @@ create table t2(unique(a)) select a from t1; # The above should produce an error, *and* not appear in the binlog let $VERSION=`select version()`; --replace_result $VERSION VERSION +--replace_column 2 # 5 # show binlog events; drop table t1; diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index aa0ea0a2f55..14ef749c802 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -3,7 +3,7 @@ # --disable_warnings -drop table if exists t1; +drop table if exists t1, t2; --enable_warnings create table t1 (a date, b date, c date not null, d date); @@ -31,3 +31,46 @@ load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated select * from t1; drop table t1; +# +# Let us test extended LOAD DATA features +# +create table t1 (a int default 100, b int, c varchar(60)); +# we can do something like this +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (a, @b) set b=@b+10, c=concat("b=",@b); +select * from t1; +truncate table t1; +# we can use filled fields in expressions +# we also assigning NULL value to field with non-NULL default here +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (a, @b) set c= if(a is null,"oops",a); +select * from t1; +truncate table t1; +# we even can use variables in set clause, and missed columns will be set +# with default values +set @c:=123; +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@a, b) set c= if(@a is null,@c,b); +select * from t1; +# let us test side-effect of such load +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@a, @b); +select * from t1; +select @a, @b; +truncate table t1; +# now going to test fixed field-row file format +load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, b) set c="Wow"; +select * from t1; +truncate table t1; +# this also should work +load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, b) set c=concat(a,"+",b,"+",@c,"+",b,"+",if(c is null,"NIL",c)); +select * from t1; +# and this should bark +--error 1409 +load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, @b); + +# Now let us test LOAD DATA with subselect +create table t2 (num int primary key, str varchar(10)); +insert into t2 values (10,'Ten'), (15,'Fifteen'); +truncate table t1; +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@dummy,@n) set a= @n, c= (select str from t2 where num=@n); +select * from t1; + +# cleanup +drop table t1, t2; diff --git a/mysql-test/t/mix_innodb_myisam_binlog.test b/mysql-test/t/mix_innodb_myisam_binlog.test index 08a81c850eb..9894359dfc0 100644 --- a/mysql-test/t/mix_innodb_myisam_binlog.test +++ b/mysql-test/t/mix_innodb_myisam_binlog.test @@ -27,7 +27,7 @@ commit; --replace_column 5 # --replace_result "xid=12" "xid=7" -show binlog events from 96; +show binlog events from 98; delete from t1; delete from t2; @@ -40,7 +40,7 @@ insert into t2 select * from t1; rollback; --replace_column 5 # -show binlog events from 96; +show binlog events from 98; delete from t1; delete from t2; @@ -56,7 +56,7 @@ commit; --replace_column 5 # --replace_result "xid=45" "xid=24" -show binlog events from 96; +show binlog events from 98; delete from t1; delete from t2; @@ -74,7 +74,7 @@ select a from t1 order by a; # check that savepoints work :) --replace_column 5 # --replace_result "xid=67" "xid=36" -show binlog events from 96; +show binlog events from 98; # and when ROLLBACK is not explicit? delete from t1; @@ -95,7 +95,7 @@ connection con2; # logging has been done, we use a user lock. select get_lock("a",10); --replace_column 5 # -show binlog events from 96; +show binlog events from 98; # and when not in a transact1on? delete from t1; @@ -107,7 +107,7 @@ insert into t2 select * from t1; --replace_column 5 # --replace_result "xid=116" "xid=59" -show binlog events from 96; +show binlog events from 98; # Check that when the query updat1ng the MyISAM table is the first in the # transaction, we log it immediately. @@ -120,13 +120,13 @@ begin; insert into t2 select * from t1; --replace_column 5 # --replace_result "xid=130" "xid=65" -show binlog events from 96; +show binlog events from 98; insert into t1 values(11); commit; --replace_column 5 # --replace_result "xid=130" "xid=65" "xid=133" "xid=67" -show binlog events from 96; +show binlog events from 98; # Check that things work like before this BEGIN/ROLLBACK code was added, @@ -145,7 +145,7 @@ commit; --replace_column 5 # --replace_result "xid=152" "xid=77" -show binlog events from 96; +show binlog events from 98; delete from t1; delete from t2; @@ -157,7 +157,7 @@ insert into t2 select * from t1; rollback; --replace_column 5 # -show binlog events from 96; +show binlog events from 98; delete from t1; delete from t2; @@ -173,7 +173,7 @@ commit; --replace_column 5 # --replace_result "xid=184" "xid=93" -show binlog events from 96; +show binlog events from 98; delete from t1; delete from t2; @@ -191,7 +191,7 @@ select a from t1 order by a; # check that savepoints work :) --replace_column 5 # --replace_result "xid=205" "xid=104" -show binlog events from 96; +show binlog events from 98; # Test for BUG#5714, where a MyISAM update in the transaction used to # release row-level locks in InnoDB diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index 3f2ab2b31ec..df3b0acaa11 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -24,7 +24,6 @@ load data infile '../../std_data/words.dat' into table t1; load data infile '../../std_data/words.dat' into table t1; load data infile '../../std_data/words.dat' into table t1; load data infile '../../std_data/words.dat' into table t1; -load data infile '../../std_data/words.dat' into table t1; # simple query to show more in second binlog insert into t1 values ("Alas"); flush logs; @@ -61,7 +60,7 @@ select "--- --database --" as ""; select "--- --position --" as ""; --enable_query_log --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --position=119 $MYSQL_TEST_DIR/var/log/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --position=232 $MYSQL_TEST_DIR/var/log/master-bin.000002 # These are tests for remote binlog. # They should return the same as previous test. @@ -93,7 +92,7 @@ select "--- --database --" as ""; select "--- --position --" as ""; --enable_query_log --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --read-from-remote-server --position=119 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --read-from-remote-server --position=232 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 # Bug#7853 (mysqlbinlog does not accept input from stdin) --disable_query_log diff --git a/mysql-test/t/mysqlbinlog2.test b/mysql-test/t/mysqlbinlog2.test index f2360d51c16..74ddf4e2be4 100644 --- a/mysql-test/t/mysqlbinlog2.test +++ b/mysql-test/t/mysqlbinlog2.test @@ -46,11 +46,11 @@ select "--- offset --" as ""; --disable_query_log select "--- start-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=602 $MYSQL_TEST_DIR/var/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --start-position=604 $MYSQL_TEST_DIR/var/log/master-bin.000001 --disable_query_log select "--- stop-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --stop-position=602 $MYSQL_TEST_DIR/var/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --stop-position=604 $MYSQL_TEST_DIR/var/log/master-bin.000001 --disable_query_log select "--- start-datetime --" as ""; --enable_query_log @@ -75,11 +75,11 @@ select "--- offset --" as ""; --disable_query_log select "--- start-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=602 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --start-position=604 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002 --disable_query_log select "--- stop-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --stop-position=124 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --stop-position=126 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002 --disable_query_log select "--- start-datetime --" as ""; --enable_query_log @@ -102,11 +102,11 @@ select "--- offset --" as ""; --disable_query_log select "--- start-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=602 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 +--exec $MYSQL_BINLOG --short-form --start-position=604 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 --disable_query_log select "--- stop-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --stop-position=602 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 +--exec $MYSQL_BINLOG --short-form --stop-position=604 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 --disable_query_log select "--- start-datetime --" as ""; --enable_query_log @@ -129,11 +129,11 @@ select "--- offset --" as ""; --disable_query_log select "--- start-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=602 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 +--exec $MYSQL_BINLOG --short-form --start-position=604 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 --disable_query_log select "--- stop-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --stop-position=124 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 +--exec $MYSQL_BINLOG --short-form --stop-position=126 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 --disable_query_log select "--- start-datetime --" as ""; --enable_query_log diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 89f578dbb20..7264e6bbc3e 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1,5 +1,5 @@ --disable_warnings -DROP TABLE IF EXISTS t1, `"t"1`, t1aa,t2aa; +DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa; drop database if exists mysqldump_test_db; drop view if exists v1; --enable_warnings diff --git a/mysql-test/t/rpl_charset.test b/mysql-test/t/rpl_charset.test index d2c195dfdbf..ee54bc72a65 100644 --- a/mysql-test/t/rpl_charset.test +++ b/mysql-test/t/rpl_charset.test @@ -107,7 +107,7 @@ connection master; drop database mysqltest2; drop database mysqltest3; --replace_column 2 # 5 # -show binlog events from 96; +show binlog events from 98; sync_slave_with_master; # Check that we can change global.collation_server (since 5.0.3) diff --git a/mysql-test/t/rpl_deadlock.test b/mysql-test/t/rpl_deadlock.test index aa474f79963..a196495e834 100644 --- a/mysql-test/t/rpl_deadlock.test +++ b/mysql-test/t/rpl_deadlock.test @@ -68,7 +68,7 @@ show slave status; # 2) Test lock wait timeout stop slave; -change master to master_log_pos=534; # the BEGIN log event +change master to master_log_pos=536; # the BEGIN log event begin; select * from t2 for update; # hold lock start slave; @@ -89,7 +89,7 @@ set global max_relay_log_size=0; # This is really copy-paste of 2) of above stop slave; -change master to master_log_pos=534; +change master to master_log_pos=536; begin; select * from t2 for update; start slave; diff --git a/mysql-test/t/rpl_error_ignored_table.test b/mysql-test/t/rpl_error_ignored_table.test index a520024b7da..5388b6af8d4 100644 --- a/mysql-test/t/rpl_error_ignored_table.test +++ b/mysql-test/t/rpl_error_ignored_table.test @@ -48,7 +48,8 @@ connection master; --error 0,1053; reap; connection master1; -show binlog events from 96; +--replace_column 2 # 5 # +show binlog events from 98; save_master_pos; connection slave; # SQL slave thread should not have stopped (because table of the killed diff --git a/mysql-test/t/rpl_flush_tables.test b/mysql-test/t/rpl_flush_tables.test index b98235fbed8..eb16ddcd8de 100644 --- a/mysql-test/t/rpl_flush_tables.test +++ b/mysql-test/t/rpl_flush_tables.test @@ -18,6 +18,7 @@ rename table t1 to t5, t2 to t1; flush no_write_to_binlog tables; # Check that it's not in the binlog. --replace_result $SERVER_VERSION SERVER_VERSION +--replace_column 2 # 5 # show binlog events; # Check that the master is not confused. select * from t3; @@ -25,6 +26,7 @@ select * from t3; flush tables; # Check that it's in the binlog. --replace_result $SERVER_VERSION SERVER_VERSION +--replace_column 2 # 5 # show binlog events; save_master_pos; connection slave; diff --git a/mysql-test/t/rpl_loaddata.test b/mysql-test/t/rpl_loaddata.test index 487ad4a7aa6..d1404dea211 100644 --- a/mysql-test/t/rpl_loaddata.test +++ b/mysql-test/t/rpl_loaddata.test @@ -36,8 +36,7 @@ select * from t3; # But we can't simply read this binlog, because as the slave has not been # restarted for this test, the file_id is uncertain (would cause test # failures). So instead, we test if the binlog looks long enough to -# contain LOAD DATA. That is, I (Guilhem) have done SHOW BINLOG EVENTS on my -# machine, saw that the binlog is of size 1068 (in 5.0.0) when things go fine. +# contain LOAD DATA. Since 5.0.3 we assume that binlog of 1292 is ok. # If LOAD DATA was not logged, the binlog would be shorter. show master status; @@ -84,7 +83,9 @@ set sql_log_bin=1; load data infile '../../std_data/rpl_loaddata.dat' into table t1; save_master_pos; connection slave; -# The SQL slave thread should be stopped now. +# The SQL slave thread should be stopped now. +# Exec_Master_Log_Pos should point to the start of Execute event +# for last load data. wait_for_slave_to_stop; # CHANGE MASTER and see if error is cleared in SHOW SLAVE STATUS. diff --git a/mysql-test/t/rpl_loaddata_rule_m.test b/mysql-test/t/rpl_loaddata_rule_m.test index ff00e8f4925..97c984c4369 100644 --- a/mysql-test/t/rpl_loaddata_rule_m.test +++ b/mysql-test/t/rpl_loaddata_rule_m.test @@ -19,5 +19,9 @@ create database mysqltest; create table t1(a int, b int, unique(b)); use mysqltest; load data infile '../../std_data/rpl_loaddata.dat' into table test.t1; -show binlog events from 96; # should be nothing +# Starting from 5.0.3 LOAD DATA is replicated much in the same way as ordinary +# query so "show binlog ..." should show two events (before 5.0.3 no events +# were returned). +--replace_column 2 # 5 # +show binlog events from 98; drop database mysqltest; diff --git a/mysql-test/t/rpl_loaddata_rule_s.test b/mysql-test/t/rpl_loaddata_rule_s.test index 71a3929da32..9802c00d35f 100644 --- a/mysql-test/t/rpl_loaddata_rule_s.test +++ b/mysql-test/t/rpl_loaddata_rule_s.test @@ -17,4 +17,4 @@ save_master_pos; connection slave; sync_with_master; select count(*) from t1; # check that LOAD was replicated -show binlog events from 96; # should be nothing +show binlog events from 98; # should be nothing diff --git a/mysql-test/t/rpl_loaddatalocal.test b/mysql-test/t/rpl_loaddatalocal.test index 70f4ab96b6a..f9325b39af6 100644 --- a/mysql-test/t/rpl_loaddatalocal.test +++ b/mysql-test/t/rpl_loaddatalocal.test @@ -34,3 +34,27 @@ drop table t1; save_master_pos; connection slave; sync_with_master; + +# +# Now let us test how well we replicate LOAD DATA LOCAL in situation when +# we met duplicates in tables to which we are adding rows. +# (It supposed that LOAD DATA LOCAL ignores such errors) +# +connection master; +create table t1(a int); +insert into t1 values (1), (2), (2), (3); +select * into outfile '../../var/master-data/rpl_loaddatalocal.select_outfile' from t1; +drop table t1; +create table t1(a int primary key); +load data local infile './var/master-data/rpl_loaddatalocal.select_outfile' into table t1; +system rm ./var/master-data/rpl_loaddatalocal.select_outfile ; +select * from t1; +save_master_pos; +connection slave; +sync_with_master; +select * from t1; +connection master; +drop table t1; +save_master_pos; +connection slave; +sync_with_master; diff --git a/mysql-test/t/rpl_log.test b/mysql-test/t/rpl_log.test index 055c1a7c93a..8cb99d5432e 100644 --- a/mysql-test/t/rpl_log.test +++ b/mysql-test/t/rpl_log.test @@ -38,9 +38,9 @@ select count(*) from t1; drop table t1; --replace_result $VERSION VERSION show binlog events; -show binlog events from 96 limit 1; -show binlog events from 96 limit 2; -show binlog events from 96 limit 2,1; +show binlog events from 98 limit 1; +show binlog events from 98 limit 2; +show binlog events from 98 limit 2,1; flush logs; # We need an extra update before doing save_master_pos. diff --git a/mysql-test/t/rpl_log_pos.test b/mysql-test/t/rpl_log_pos.test index c9d7056924f..2a03497846b 100644 --- a/mysql-test/t/rpl_log_pos.test +++ b/mysql-test/t/rpl_log_pos.test @@ -38,7 +38,7 @@ insert into t1 values (1),(2),(3); save_master_pos; connection slave; stop slave; -change master to master_log_pos=96; +change master to master_log_pos=98; start slave; sync_with_master; select * from t1; diff --git a/mysql-test/t/rpl_multi_query.test b/mysql-test/t/rpl_multi_query.test index fbe6d8057f5..2ddd61ce7ba 100644 --- a/mysql-test/t/rpl_multi_query.test +++ b/mysql-test/t/rpl_multi_query.test @@ -24,6 +24,6 @@ sync_slave_with_master; select * from mysqltest.t1; connection master; --replace_column 2 # 5 # -show binlog events from 96; +show binlog events from 98; drop database mysqltest; sync_slave_with_master; diff --git a/mysql-test/t/rpl_temporary.test b/mysql-test/t/rpl_temporary.test index f84c9b09aef..e65469de7e0 100644 --- a/mysql-test/t/rpl_temporary.test +++ b/mysql-test/t/rpl_temporary.test @@ -82,6 +82,7 @@ drop temporary table t3; select * from t2; --replace_result $VERSION VERSION +--replace_column 2 # 5 # show binlog events; drop table t1, t2; diff --git a/mysql-test/t/rpl_timezone.test b/mysql-test/t/rpl_timezone.test index ebb58a9c880..3c180ca8849 100644 --- a/mysql-test/t/rpl_timezone.test +++ b/mysql-test/t/rpl_timezone.test @@ -32,6 +32,7 @@ select * from t1; connection master; # We should not see SET ONE_SHOT time_zone before second insert --replace_result $VERSION VERSION +--replace_column 2 # 5 # show binlog events; # diff --git a/mysql-test/t/rpl_until.test b/mysql-test/t/rpl_until.test index 318cca600a3..9ee1dca9c11 100644 --- a/mysql-test/t/rpl_until.test +++ b/mysql-test/t/rpl_until.test @@ -24,7 +24,7 @@ show binlog events; # try to replicate all queries until drop of t1 connection slave; -start slave until master_log_file='master-bin.000001', master_log_pos=304; +start slave until master_log_file='master-bin.000001', master_log_pos=321; sleep 2; # here table should be still not deleted select * from t1; @@ -42,7 +42,7 @@ sleep 2; show slave status; # try replicate all until second insert to t2; -start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=710; +start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=751; sleep 4; select * from t2; --replace_result $MASTER_MYPORT MASTER_MYPORT @@ -58,7 +58,7 @@ sync_with_master; stop slave; # this should stop immediately as we are already there -start slave until master_log_file='master-bin.000001', master_log_pos=710; +start slave until master_log_file='master-bin.000001', master_log_pos=783; # 2 is not enough when running with valgrind real_sleep 4 # here the sql slave thread should be stopped @@ -77,6 +77,6 @@ start slave until master_log_file='master-bin.000001'; start slave until relay_log_file='slave-relay-bin.000002'; --error 1277 start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; - +# Warning should be given for second command start slave sql_thread; -start slave until master_log_file='master-bin.000001', master_log_pos=710; +start slave until master_log_file='master-bin.000001', master_log_pos=783; diff --git a/mysql-test/t/rpl_user_variables.test b/mysql-test/t/rpl_user_variables.test index 47bc9de37ba..711d83219a6 100644 --- a/mysql-test/t/rpl_user_variables.test +++ b/mysql-test/t/rpl_user_variables.test @@ -46,7 +46,8 @@ save_master_pos; connection slave; sync_with_master; select * from t1; -show binlog events from 96; +--replace_column 2 # 5 # +show binlog events from 98; connection master; drop table t1; save_master_pos; diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index 376a23c06e5..ae800590917 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -2015,3 +2015,13 @@ select a-b , (a-b < 0) from t1 order by 1; select a-b as d, (a-b >= 0), b from t1 group by b having d >= 0; select cast((a - b) as unsigned) from t1 order by 1; drop table t1; + +# +# Bug#8670 +# +create table t1 (a int, b int); +create table t2 like t1; +select t1.a from (t1 inner join t2 on t1.a=t2.a) where t2.a=1; +select t1.a from ((t1 inner join t2 on t1.a=t2.a)) where t2.a=1; +select x.a, y.a, z.a from ( (t1 x inner join t2 y on x.a=y.a) inner join t2 z on y.a=z.a) WHERE x.a=1; +drop table t1,t2; diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test index 07076f1f6f4..d8dfc10bfe4 100644 --- a/mysql-test/t/user_var.test +++ b/mysql-test/t/user_var.test @@ -108,7 +108,8 @@ INSERT INTO t1 VALUES(@`a b`); set @var1= "';aaa"; SET @var2=char(ascii('a')); insert into t1 values (@var1),(@var2); -show binlog events from 96; +--replace_column 2 # 5 # +show binlog events from 98; # more important than SHOW BINLOG EVENTS, mysqlbinlog (where we # absolutely need variables names to be quoted and strings to be # escaped). |