Loading mysql-test/r/flush.result +21 −0 Original line number Diff line number Diff line Loading @@ -27,3 +27,24 @@ select * from t1; n 345 drop table t1; create table t1 (c1 int); lock table t1 write; flush tables with read lock; ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction lock table t1 read; flush tables with read lock; lock table t1 write; ERROR HY000: Can't execute the query because you have a conflicting read lock lock table t1 read; lock table t1 write; ERROR HY000: Can't execute the query because you have a conflicting read lock unlock tables; create table t2 (c1 int); create table t3 (c1 int); lock table t1 read, t2 read, t3 write; flush tables with read lock; ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction lock table t1 read, t2 read, t3 read; flush tables with read lock; unlock tables; drop table t1, t2, t3; mysql-test/r/fulltext_order_by.result +16 −2 Original line number Diff line number Diff line DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1,t2,t3; CREATE TABLE t1 ( a INT AUTO_INCREMENT PRIMARY KEY, message CHAR(20), Loading Loading @@ -158,5 +158,19 @@ where match(c.beitrag) against ('+abc' in boolean mode) order by match(betreff) against ('+abc' in boolean mode) desc; ERROR HY000: The used table type doesn't support FULLTEXT indexes text id betreff (select b.id, b.betreff from t3 b) union (select b.id, b.betreff from t3 b) order by match(betreff) against ('+abc' in boolean mode) desc; id betreff (select b.id, b.betreff from t3 b) union (select b.id, b.betreff from t3 b) order by match(betreff) against ('+abc') desc; ERROR HY000: Can't find FULLTEXT index matching the column list select distinct b.id, b.betreff from t3 b order by match(betreff) against ('+abc' in boolean mode) desc; id betreff select b.id, b.betreff from t3 b group by b.id+1 order by match(betreff) against ('+abc' in boolean mode) desc; id betreff drop table t1,t2,t3; mysql-test/r/grant.result +3 −0 Original line number Diff line number Diff line Loading @@ -591,3 +591,6 @@ insert into tables_priv values ('','test_db','mysqltest_1','test_table','test_gr flush privileges; delete from tables_priv where host = '' and user = 'mysqltest_1'; flush privileges; set @user123="non-existent"; select * from mysql.db where user=@user123; Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv mysql-test/r/group_by.result +7 −0 Original line number Diff line number Diff line Loading @@ -751,6 +751,13 @@ COUNT(DISTINCT(t1.id)) comment 1 NULL 1 a problem DROP TABLE t1, t2; create table t1 (f1 date); insert into t1 values('2005-06-06'); insert into t1 values('2005-06-06'); select date(left(f1+0,8)) from t1 group by 1; date(left(f1+0,8)) 2005-06-06 drop table t1; CREATE TABLE t1 (n int); INSERT INTO t1 VALUES (1); SELECT n+1 AS n FROM t1 GROUP BY n; Loading mysql-test/r/join_nested.result +55 −0 Original line number Diff line number Diff line Loading @@ -1343,3 +1343,58 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 0 1 SIMPLE t3 ALL NULL NULL NULL NULL 0 DROP TABLE t1,t2,t3; CREATE TABLE t1 (goods int(12) NOT NULL, price varchar(128) NOT NULL); INSERT INTO t1 VALUES (23, 2340), (26, 9900); CREATE TABLE t2 (goods int(12), name varchar(50), shop char(2)); INSERT INTO t2 VALUES (23, 'as300', 'fr'), (26, 'as600', 'fr'); create table t3 (groupid int(12) NOT NULL, goodsid int(12) NOT NULL); INSERT INTO t3 VALUES (3,23), (6,26); CREATE TABLE t4 (groupid int(12)); INSERT INTO t4 VALUES (1), (2), (3), (4), (5), (6); SELECT * FROM (SELECT DISTINCT gl.groupid, gp.price FROM t4 gl LEFT JOIN (t3 g INNER JOIN t2 p ON g.goodsid = p.goods INNER JOIN t1 gp ON p.goods = gp.goods) ON gl.groupid = g.groupid and p.shop = 'fr') t; groupid price 1 NULL 2 NULL 3 2340 4 NULL 5 NULL 6 9900 CREATE VIEW v1 AS SELECT g.groupid groupid, p.goods goods, p.name name, p.shop shop, gp.price price FROM t3 g INNER JOIN t2 p ON g.goodsid = p.goods INNER JOIN t1 gp on p.goods = gp.goods; CREATE VIEW v2 AS SELECT DISTINCT g.groupid, fr.price FROM t4 g LEFT JOIN v1 fr on g.groupid = fr.groupid and fr.shop = 'fr'; SELECT * FROM v2; groupid price 1 NULL 2 NULL 3 2340 4 NULL 5 NULL 6 9900 SELECT * FROM (SELECT DISTINCT g.groupid, fr.price FROM t4 g LEFT JOIN v1 fr on g.groupid = fr.groupid and fr.shop = 'fr') t; groupid price 1 NULL 2 NULL 3 2340 4 NULL 5 NULL 6 9900 DROP VIEW v1,v2; DROP TABLE t1,t2,t3,t4; Loading
mysql-test/r/flush.result +21 −0 Original line number Diff line number Diff line Loading @@ -27,3 +27,24 @@ select * from t1; n 345 drop table t1; create table t1 (c1 int); lock table t1 write; flush tables with read lock; ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction lock table t1 read; flush tables with read lock; lock table t1 write; ERROR HY000: Can't execute the query because you have a conflicting read lock lock table t1 read; lock table t1 write; ERROR HY000: Can't execute the query because you have a conflicting read lock unlock tables; create table t2 (c1 int); create table t3 (c1 int); lock table t1 read, t2 read, t3 write; flush tables with read lock; ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction lock table t1 read, t2 read, t3 read; flush tables with read lock; unlock tables; drop table t1, t2, t3;
mysql-test/r/fulltext_order_by.result +16 −2 Original line number Diff line number Diff line DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1,t2,t3; CREATE TABLE t1 ( a INT AUTO_INCREMENT PRIMARY KEY, message CHAR(20), Loading Loading @@ -158,5 +158,19 @@ where match(c.beitrag) against ('+abc' in boolean mode) order by match(betreff) against ('+abc' in boolean mode) desc; ERROR HY000: The used table type doesn't support FULLTEXT indexes text id betreff (select b.id, b.betreff from t3 b) union (select b.id, b.betreff from t3 b) order by match(betreff) against ('+abc' in boolean mode) desc; id betreff (select b.id, b.betreff from t3 b) union (select b.id, b.betreff from t3 b) order by match(betreff) against ('+abc') desc; ERROR HY000: Can't find FULLTEXT index matching the column list select distinct b.id, b.betreff from t3 b order by match(betreff) against ('+abc' in boolean mode) desc; id betreff select b.id, b.betreff from t3 b group by b.id+1 order by match(betreff) against ('+abc' in boolean mode) desc; id betreff drop table t1,t2,t3;
mysql-test/r/grant.result +3 −0 Original line number Diff line number Diff line Loading @@ -591,3 +591,6 @@ insert into tables_priv values ('','test_db','mysqltest_1','test_table','test_gr flush privileges; delete from tables_priv where host = '' and user = 'mysqltest_1'; flush privileges; set @user123="non-existent"; select * from mysql.db where user=@user123; Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv
mysql-test/r/group_by.result +7 −0 Original line number Diff line number Diff line Loading @@ -751,6 +751,13 @@ COUNT(DISTINCT(t1.id)) comment 1 NULL 1 a problem DROP TABLE t1, t2; create table t1 (f1 date); insert into t1 values('2005-06-06'); insert into t1 values('2005-06-06'); select date(left(f1+0,8)) from t1 group by 1; date(left(f1+0,8)) 2005-06-06 drop table t1; CREATE TABLE t1 (n int); INSERT INTO t1 VALUES (1); SELECT n+1 AS n FROM t1 GROUP BY n; Loading
mysql-test/r/join_nested.result +55 −0 Original line number Diff line number Diff line Loading @@ -1343,3 +1343,58 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 0 1 SIMPLE t3 ALL NULL NULL NULL NULL 0 DROP TABLE t1,t2,t3; CREATE TABLE t1 (goods int(12) NOT NULL, price varchar(128) NOT NULL); INSERT INTO t1 VALUES (23, 2340), (26, 9900); CREATE TABLE t2 (goods int(12), name varchar(50), shop char(2)); INSERT INTO t2 VALUES (23, 'as300', 'fr'), (26, 'as600', 'fr'); create table t3 (groupid int(12) NOT NULL, goodsid int(12) NOT NULL); INSERT INTO t3 VALUES (3,23), (6,26); CREATE TABLE t4 (groupid int(12)); INSERT INTO t4 VALUES (1), (2), (3), (4), (5), (6); SELECT * FROM (SELECT DISTINCT gl.groupid, gp.price FROM t4 gl LEFT JOIN (t3 g INNER JOIN t2 p ON g.goodsid = p.goods INNER JOIN t1 gp ON p.goods = gp.goods) ON gl.groupid = g.groupid and p.shop = 'fr') t; groupid price 1 NULL 2 NULL 3 2340 4 NULL 5 NULL 6 9900 CREATE VIEW v1 AS SELECT g.groupid groupid, p.goods goods, p.name name, p.shop shop, gp.price price FROM t3 g INNER JOIN t2 p ON g.goodsid = p.goods INNER JOIN t1 gp on p.goods = gp.goods; CREATE VIEW v2 AS SELECT DISTINCT g.groupid, fr.price FROM t4 g LEFT JOIN v1 fr on g.groupid = fr.groupid and fr.shop = 'fr'; SELECT * FROM v2; groupid price 1 NULL 2 NULL 3 2340 4 NULL 5 NULL 6 9900 SELECT * FROM (SELECT DISTINCT g.groupid, fr.price FROM t4 g LEFT JOIN v1 fr on g.groupid = fr.groupid and fr.shop = 'fr') t; groupid price 1 NULL 2 NULL 3 2340 4 NULL 5 NULL 6 9900 DROP VIEW v1,v2; DROP TABLE t1,t2,t3,t4;