2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
8
-------- Test for BUG#9361 --------
10
a int unsigned not null auto_increment primary key,
14
a int unsigned not null auto_increment primary key,
17
INSERT INTO t1 VALUES (NULL, 0);
18
INSERT INTO t1 SELECT NULL, 0 FROM t1;
19
INSERT INTO t2 VALUES (NULL, 0), (NULL,1);
20
SELECT * FROM t1 ORDER BY a;
24
SELECT * FROM t2 ORDER BY a;
28
UPDATE t2, (SELECT a FROM t1 ORDER BY a) AS t SET t2.b = t.a+5 ;
29
SELECT * FROM t1 ORDER BY a;
33
SELECT * FROM t2 ORDER BY a;
37
SELECT * FROM t1 ORDER BY a;
41
SELECT * FROM t2 ORDER BY a;
47
-------- Test 1 for BUG#9361 --------
48
DROP TABLE IF EXISTS t1;
49
DROP TABLE IF EXISTS t2;
61
INSERT INTO t1 VALUES ('Yes', 1, NULL, 'foo', 'bar');
62
INSERT INTO t2 VALUES (1, 'baz');
80
-------- Test 2 for BUG#9361 --------
81
DROP TABLE IF EXISTS t1;
82
DROP TABLE IF EXISTS t2;
83
DROP TABLE IF EXISTS t3;
105
INSERT INTO t1 VALUES ( 1, 2,13,14,15);
106
INSERT INTO t2 VALUES ( 1, 3,23,24,25);
107
INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36);
112
ON a.j = c.j AND b.k = c.k
124
DROP TABLE t1, t2, t3;
125
DROP TABLE IF EXISTS t1;
127
Note 1051 Unknown table 't1'
128
DROP TABLE IF EXISTS t2;
130
Note 1051 Unknown table 't2'
132
idp int(11) NOT NULL default '0',
133
idpro int(11) default NULL,
134
price decimal(19,4) default NULL,
138
idpro int(11) NOT NULL default '0',
139
price decimal(19,4) default NULL,
140
nbprice int(11) default NULL,
143
INSERT INTO t1 VALUES
150
INSERT INTO t2 VALUES
157
( select idpro, min(price) as min_price, count(*) as nbr_price
159
where idpro>0 and price>0
162
on t2.idpro = table_price.idpro
163
set t2.price = table_price.min_price,
164
t2.nbprice = table_price.nbr_price;
165
select "-- MASTER AFTER JOIN --" as "";
167
-- MASTER AFTER JOIN --
181
select "-- SLAVE AFTER JOIN --" as "";
183
-- SLAVE AFTER JOIN --