Commit d9f7c443 authored by gshchepa/uchum@gleb.loc's avatar gshchepa/uchum@gleb.loc
Browse files

Merge gleb.loc:/home/uchum/work/bk/5.0

into  gleb.loc:/home/uchum/work/bk/5.0-opt
parents 81905ee1 e4f4a46f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -136,8 +136,8 @@ update ignore t1 set id=1023 where id=1010;
select * from t1 where parent_id=102 order by parent_id,id;
id	parent_id	level
1008	102	2
1010	102	2
1015	102	2
1010	102	2
explain select level from t1 where level=1;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	level	level	1	const	X	Using index
+23 −0
Original line number Diff line number Diff line
@@ -29,3 +29,26 @@ id name
10	my name
20	is Bond
drop table t1;
CREATE TABLE t1(a int, UNIQUE(a));
INSERT DELAYED IGNORE INTO t1 VALUES(1);
INSERT DELAYED IGNORE INTO t1 VALUES(1);
flush table t1;
show binlog events limit 11,100;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
x	x	x	x	x	use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
x	x	x	x	x	use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
x	x	x	x	x	use `test`; flush table t1
select * from t1;
a
1
On slave
show binlog events limit 12,100;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
x	x	x	x	x	use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
x	x	x	x	x	use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
x	x	x	x	x	use `test`; flush table t1
select * from t1;
a
1
drop table t1;
End of 5.0 tests
+10 −0
Original line number Diff line number Diff line
@@ -41,3 +41,13 @@ select * from t2 order by b;
b	a
1	1
drop table t1,t2;
CREATE TABLE t1 (
`id` int(11) NOT NULL auto_increment,
`data` varchar(100),
PRIMARY KEY  (`id`)
) ENGINE=MyISAM;
INSERT INTO t1(data) VALUES(SESSION_USER());
SELECT * FROM t1;
id	data
1	
drop table t1;
+30 −0
Original line number Diff line number Diff line
@@ -65,3 +65,33 @@ connection master;
drop table t1;
sync_slave_with_master;
connection master;

#
# Bug #29571: INSERT DELAYED IGNORE written to binary log on the master but
# on the slave
#
CREATE TABLE t1(a int, UNIQUE(a));
INSERT DELAYED IGNORE INTO t1 VALUES(1);
INSERT DELAYED IGNORE INTO t1 VALUES(1);
flush table t1; # to wait for INSERT DELAYED to be done

#must show two INSERT DELAYED
--replace_column 1 x 2 x 3 x 4 x 5 x
show binlog events limit 11,100;
select * from t1;

sync_slave_with_master;
echo On slave;
#must show two INSERT DELAYED
--replace_column 1 x 2 x 3 x 4 x 5 x
show binlog events limit 12,100;
select * from t1;


# clean up
connection master;
drop table t1;
sync_slave_with_master;
connection master;

--echo End of 5.0 tests
+22 −0
Original line number Diff line number Diff line
@@ -40,3 +40,25 @@ drop table t1,t2;
save_master_pos;
connection slave;
sync_with_master;

#
# Bug #29878 Garbage data generation when executing SESSION_USER() on a slave. 
#

connection master;
CREATE TABLE t1 (
  `id` int(11) NOT NULL auto_increment,
  `data` varchar(100),
  PRIMARY KEY  (`id`)
 ) ENGINE=MyISAM;

INSERT INTO t1(data) VALUES(SESSION_USER());
save_master_pos;
connection slave;
sync_with_master;
SELECT * FROM t1;
connection master;
drop table t1;
save_master_pos;
connection slave;
sync_with_master;
Loading