Loading mysql-test/extra/binlog_tests/blackhole.test +12 −0 Original line number Diff line number Diff line Loading @@ -147,3 +147,15 @@ set autocommit=1; --replace_column 2 # 5 # --replace_regex /table_id: [0-9]+/table_id: #/ show binlog events; # # BUG#10952 - alter table ... lost data without errors and warnings # drop table if exists t1; create table t1 (c char(20)) engine=MyISAM; insert into t1 values ("Monty"),("WAX"),("Walrus"); --error 1031 alter table t1 engine=blackhole; drop table t1; # End of 5.0 tests mysql-test/r/binlog_row_blackhole.result +6 −0 Original line number Diff line number Diff line Loading @@ -156,3 +156,9 @@ master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `test`; COMMIT drop table if exists t1; create table t1 (c char(20)) engine=MyISAM; insert into t1 values ("Monty"),("WAX"),("Walrus"); alter table t1 engine=blackhole; ERROR HY000: Table storage engine for 't1' doesn't have this option drop table t1; mysql-test/r/binlog_stm_blackhole.result +6 −0 Original line number Diff line number Diff line Loading @@ -149,3 +149,9 @@ master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=blackho master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # use `test`; insert into t1 values(1) master-bin.000001 # Query 1 # use `test`; COMMIT drop table if exists t1; create table t1 (c char(20)) engine=MyISAM; insert into t1 values ("Monty"),("WAX"),("Walrus"); alter table t1 engine=blackhole; ERROR HY000: Table storage engine for 't1' doesn't have this option drop table t1; mysql-test/r/merge.result +8 −0 Original line number Diff line number Diff line Loading @@ -771,3 +771,11 @@ Table Op Msg_type Msg_text test.t1 check status OK test.t2 check status OK drop table t1, t2, t3; drop table if exists t1; Warnings: Note 1051 Unknown table 't1' create table t1 (c char(20)) engine=MyISAM; insert into t1 values ("Monty"),("WAX"),("Walrus"); alter table t1 engine=MERGE; ERROR HY000: Table storage engine for 't1' doesn't have this option drop table t1; mysql-test/r/ndb_blob_partition.resultdeleted 100644 → 0 +0 −104 Original line number Diff line number Diff line drop table if exists t1; create table t1 ( a mediumint not null, b text not null, c int not null, d longblob, primary key using hash (a,c), unique key (c) ) engine=ndb partition by range (c) partitions 3 ( partition p1 values less than (200), partition p2 values less than (300), partition p3 values less than (400)); insert into t1 values (1, @v1, 101, @v2); insert into t1 values (1, @v2, 102, @v3); insert into t1 values (1, @v3, 103, @v4); insert into t1 values (2, @v4, 201, @v5); insert into t1 values (2, @v5, 202, @v6); insert into t1 values (2, @v6, 203, @v7); insert into t1 values (3, @v7, 301, @v8); insert into t1 values (3, @v8, 302, @v9); insert into t1 values (3, @v9, 303, @v1); select a, sha1(b), c, sha1(d) from t1 order by a; a sha1(b) c sha1(d) 1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 1 10d3c783026b310218d10b7188da96a2401648c6 102 a33549d9844092289a58ac348dd59f09fc28406a 1 a33549d9844092289a58ac348dd59f09fc28406a 103 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d 2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 202 090565c580809efed3d369481a4bbb168b20713e 2 090565c580809efed3d369481a4bbb168b20713e 203 1e0070bec426871a46291de27b9bd6e4255ab4e5 3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e 3 acbaba01bc2e682f015f40e79d9cbe475db3002e 302 9ee30d99162574f79c66ae95cdf132dcf9cbc259 3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 303 1d42dd9090cf78314a06665d4ea938c35cc760f4 select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101; a sha1(b) c sha1(d) 1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201; a sha1(b) c sha1(d) 2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301; a sha1(b) c sha1(d) 3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e update t1 set b = @v3, d = @v4 where a = 1 and c = 102; update t1 set b = @v6, d = @v7 where a = 2 and c = 202; update t1 set b = @v9, d = @v1 where a = 3 and c = 302; select a, sha1(b), c, sha1(d) from t1 order by a; a sha1(b) c sha1(d) 1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 1 a33549d9844092289a58ac348dd59f09fc28406a 102 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 1 a33549d9844092289a58ac348dd59f09fc28406a 103 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d 2 090565c580809efed3d369481a4bbb168b20713e 202 1e0070bec426871a46291de27b9bd6e4255ab4e5 2 090565c580809efed3d369481a4bbb168b20713e 203 1e0070bec426871a46291de27b9bd6e4255ab4e5 3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e 3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 302 1d42dd9090cf78314a06665d4ea938c35cc760f4 3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 303 1d42dd9090cf78314a06665d4ea938c35cc760f4 update t1 set b = @v4, d = @v5 where c = 103; update t1 set b = @v7, d = @v8 where c = 203; update t1 set b = @v1, d = @v2 where c = 303; select a, sha1(b), c, sha1(d) from t1 order by a; a sha1(b) c sha1(d) 1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 1 a33549d9844092289a58ac348dd59f09fc28406a 102 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 1 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 103 70fc9a7d08beebc522258bfb02000a30c77a8f1d 2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d 2 090565c580809efed3d369481a4bbb168b20713e 202 1e0070bec426871a46291de27b9bd6e4255ab4e5 2 1e0070bec426871a46291de27b9bd6e4255ab4e5 203 acbaba01bc2e682f015f40e79d9cbe475db3002e 3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e 3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 302 1d42dd9090cf78314a06665d4ea938c35cc760f4 3 1d42dd9090cf78314a06665d4ea938c35cc760f4 303 10d3c783026b310218d10b7188da96a2401648c6 update t1 set b = @v5, d = @v6; select a, sha1(b), c, sha1(d) from t1 order by a; a sha1(b) c sha1(d) 1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 101 090565c580809efed3d369481a4bbb168b20713e 1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 102 090565c580809efed3d369481a4bbb168b20713e 1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 103 090565c580809efed3d369481a4bbb168b20713e 2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 201 090565c580809efed3d369481a4bbb168b20713e 2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 202 090565c580809efed3d369481a4bbb168b20713e 2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 203 090565c580809efed3d369481a4bbb168b20713e 3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 301 090565c580809efed3d369481a4bbb168b20713e 3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 302 090565c580809efed3d369481a4bbb168b20713e 3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 303 090565c580809efed3d369481a4bbb168b20713e update t1 set b = @v1, d = @v2 where 100 < c and c < 200; update t1 set b = @v4, d = @v5 where 200 < c and c < 300; update t1 set b = @v7, d = @v8 where 300 < c and c < 400; select a, sha1(b), c, sha1(d) from t1 order by a; a sha1(b) c sha1(d) 1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 1 1d42dd9090cf78314a06665d4ea938c35cc760f4 102 10d3c783026b310218d10b7188da96a2401648c6 1 1d42dd9090cf78314a06665d4ea938c35cc760f4 103 10d3c783026b310218d10b7188da96a2401648c6 2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d 2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 202 70fc9a7d08beebc522258bfb02000a30c77a8f1d 2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 203 70fc9a7d08beebc522258bfb02000a30c77a8f1d 3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e 3 1e0070bec426871a46291de27b9bd6e4255ab4e5 302 acbaba01bc2e682f015f40e79d9cbe475db3002e 3 1e0070bec426871a46291de27b9bd6e4255ab4e5 303 acbaba01bc2e682f015f40e79d9cbe475db3002e delete from t1 where a = 1 and c = 101; delete from t1 where c = 102; delete from t1; select a, sha1(b), c, sha1(d) from t1 order by a; a sha1(b) c sha1(d) drop table t1; Loading
mysql-test/extra/binlog_tests/blackhole.test +12 −0 Original line number Diff line number Diff line Loading @@ -147,3 +147,15 @@ set autocommit=1; --replace_column 2 # 5 # --replace_regex /table_id: [0-9]+/table_id: #/ show binlog events; # # BUG#10952 - alter table ... lost data without errors and warnings # drop table if exists t1; create table t1 (c char(20)) engine=MyISAM; insert into t1 values ("Monty"),("WAX"),("Walrus"); --error 1031 alter table t1 engine=blackhole; drop table t1; # End of 5.0 tests
mysql-test/r/binlog_row_blackhole.result +6 −0 Original line number Diff line number Diff line Loading @@ -156,3 +156,9 @@ master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `test`; COMMIT drop table if exists t1; create table t1 (c char(20)) engine=MyISAM; insert into t1 values ("Monty"),("WAX"),("Walrus"); alter table t1 engine=blackhole; ERROR HY000: Table storage engine for 't1' doesn't have this option drop table t1;
mysql-test/r/binlog_stm_blackhole.result +6 −0 Original line number Diff line number Diff line Loading @@ -149,3 +149,9 @@ master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=blackho master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # use `test`; insert into t1 values(1) master-bin.000001 # Query 1 # use `test`; COMMIT drop table if exists t1; create table t1 (c char(20)) engine=MyISAM; insert into t1 values ("Monty"),("WAX"),("Walrus"); alter table t1 engine=blackhole; ERROR HY000: Table storage engine for 't1' doesn't have this option drop table t1;
mysql-test/r/merge.result +8 −0 Original line number Diff line number Diff line Loading @@ -771,3 +771,11 @@ Table Op Msg_type Msg_text test.t1 check status OK test.t2 check status OK drop table t1, t2, t3; drop table if exists t1; Warnings: Note 1051 Unknown table 't1' create table t1 (c char(20)) engine=MyISAM; insert into t1 values ("Monty"),("WAX"),("Walrus"); alter table t1 engine=MERGE; ERROR HY000: Table storage engine for 't1' doesn't have this option drop table t1;
mysql-test/r/ndb_blob_partition.resultdeleted 100644 → 0 +0 −104 Original line number Diff line number Diff line drop table if exists t1; create table t1 ( a mediumint not null, b text not null, c int not null, d longblob, primary key using hash (a,c), unique key (c) ) engine=ndb partition by range (c) partitions 3 ( partition p1 values less than (200), partition p2 values less than (300), partition p3 values less than (400)); insert into t1 values (1, @v1, 101, @v2); insert into t1 values (1, @v2, 102, @v3); insert into t1 values (1, @v3, 103, @v4); insert into t1 values (2, @v4, 201, @v5); insert into t1 values (2, @v5, 202, @v6); insert into t1 values (2, @v6, 203, @v7); insert into t1 values (3, @v7, 301, @v8); insert into t1 values (3, @v8, 302, @v9); insert into t1 values (3, @v9, 303, @v1); select a, sha1(b), c, sha1(d) from t1 order by a; a sha1(b) c sha1(d) 1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 1 10d3c783026b310218d10b7188da96a2401648c6 102 a33549d9844092289a58ac348dd59f09fc28406a 1 a33549d9844092289a58ac348dd59f09fc28406a 103 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d 2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 202 090565c580809efed3d369481a4bbb168b20713e 2 090565c580809efed3d369481a4bbb168b20713e 203 1e0070bec426871a46291de27b9bd6e4255ab4e5 3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e 3 acbaba01bc2e682f015f40e79d9cbe475db3002e 302 9ee30d99162574f79c66ae95cdf132dcf9cbc259 3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 303 1d42dd9090cf78314a06665d4ea938c35cc760f4 select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101; a sha1(b) c sha1(d) 1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201; a sha1(b) c sha1(d) 2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301; a sha1(b) c sha1(d) 3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e update t1 set b = @v3, d = @v4 where a = 1 and c = 102; update t1 set b = @v6, d = @v7 where a = 2 and c = 202; update t1 set b = @v9, d = @v1 where a = 3 and c = 302; select a, sha1(b), c, sha1(d) from t1 order by a; a sha1(b) c sha1(d) 1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 1 a33549d9844092289a58ac348dd59f09fc28406a 102 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 1 a33549d9844092289a58ac348dd59f09fc28406a 103 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d 2 090565c580809efed3d369481a4bbb168b20713e 202 1e0070bec426871a46291de27b9bd6e4255ab4e5 2 090565c580809efed3d369481a4bbb168b20713e 203 1e0070bec426871a46291de27b9bd6e4255ab4e5 3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e 3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 302 1d42dd9090cf78314a06665d4ea938c35cc760f4 3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 303 1d42dd9090cf78314a06665d4ea938c35cc760f4 update t1 set b = @v4, d = @v5 where c = 103; update t1 set b = @v7, d = @v8 where c = 203; update t1 set b = @v1, d = @v2 where c = 303; select a, sha1(b), c, sha1(d) from t1 order by a; a sha1(b) c sha1(d) 1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 1 a33549d9844092289a58ac348dd59f09fc28406a 102 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 1 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 103 70fc9a7d08beebc522258bfb02000a30c77a8f1d 2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d 2 090565c580809efed3d369481a4bbb168b20713e 202 1e0070bec426871a46291de27b9bd6e4255ab4e5 2 1e0070bec426871a46291de27b9bd6e4255ab4e5 203 acbaba01bc2e682f015f40e79d9cbe475db3002e 3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e 3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 302 1d42dd9090cf78314a06665d4ea938c35cc760f4 3 1d42dd9090cf78314a06665d4ea938c35cc760f4 303 10d3c783026b310218d10b7188da96a2401648c6 update t1 set b = @v5, d = @v6; select a, sha1(b), c, sha1(d) from t1 order by a; a sha1(b) c sha1(d) 1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 101 090565c580809efed3d369481a4bbb168b20713e 1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 102 090565c580809efed3d369481a4bbb168b20713e 1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 103 090565c580809efed3d369481a4bbb168b20713e 2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 201 090565c580809efed3d369481a4bbb168b20713e 2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 202 090565c580809efed3d369481a4bbb168b20713e 2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 203 090565c580809efed3d369481a4bbb168b20713e 3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 301 090565c580809efed3d369481a4bbb168b20713e 3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 302 090565c580809efed3d369481a4bbb168b20713e 3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 303 090565c580809efed3d369481a4bbb168b20713e update t1 set b = @v1, d = @v2 where 100 < c and c < 200; update t1 set b = @v4, d = @v5 where 200 < c and c < 300; update t1 set b = @v7, d = @v8 where 300 < c and c < 400; select a, sha1(b), c, sha1(d) from t1 order by a; a sha1(b) c sha1(d) 1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 1 1d42dd9090cf78314a06665d4ea938c35cc760f4 102 10d3c783026b310218d10b7188da96a2401648c6 1 1d42dd9090cf78314a06665d4ea938c35cc760f4 103 10d3c783026b310218d10b7188da96a2401648c6 2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d 2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 202 70fc9a7d08beebc522258bfb02000a30c77a8f1d 2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 203 70fc9a7d08beebc522258bfb02000a30c77a8f1d 3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e 3 1e0070bec426871a46291de27b9bd6e4255ab4e5 302 acbaba01bc2e682f015f40e79d9cbe475db3002e 3 1e0070bec426871a46291de27b9bd6e4255ab4e5 303 acbaba01bc2e682f015f40e79d9cbe475db3002e delete from t1 where a = 1 and c = 101; delete from t1 where c = 102; delete from t1; select a, sha1(b), c, sha1(d) from t1 order by a; a sha1(b) c sha1(d) drop table t1;