diff --git a/mysql-test/main/alias.result b/mysql-test/main/alias.result index e6387de50a7..17150913761 100644 --- a/mysql-test/main/alias.result +++ b/mysql-test/main/alias.result @@ -59,7 +59,7 @@ SELECT ELT(FIELD(kundentyp,'PP','PPA','PG','PGA','FK','FKA','FP','FPA','K','KA', Kundentyp kategorie Privat (Private Nutzung) Mobilfunk Warnings: -Warning 1052 Column 'kundentyp' in group statement is ambiguous +Warning 1052 Column 'kundentyp' in GROUP BY is ambiguous drop table t1; CREATE TABLE t1 ( AUFNR varchar(12) NOT NULL default '', diff --git a/mysql-test/main/alter_table.result b/mysql-test/main/alter_table.result index c3d364b8edb..f23166ca82b 100644 --- a/mysql-test/main/alter_table.result +++ b/mysql-test/main/alter_table.result @@ -712,7 +712,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp alter table table_24562 order by (select 12 from dual); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(select 12 from dual)' at line 1 alter table table_24562 order by no_such_col; -ERROR 42S22: Unknown column 'no_such_col' in 'order clause' +ERROR 42S22: Unknown column 'no_such_col' in 'ORDER BY' drop table table_24562; create table t1 (mycol int(10) not null); alter table t1 alter column mycol set default 0; diff --git a/mysql-test/main/alter_table_combinations.result b/mysql-test/main/alter_table_combinations.result index e050fe6655d..08cf6c4707c 100644 --- a/mysql-test/main/alter_table_combinations.result +++ b/mysql-test/main/alter_table_combinations.result @@ -228,7 +228,7 @@ ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function UPDATE t2 SET f = f + 10; ERROR 42S22: Unknown column 'd' in 'OLD' CALL sp1(); -ERROR 42S22: Unknown column 'd' in 'field list' +ERROR 42S22: Unknown column 'd' in 'INSERT INTO' DROP TRIGGER trg1; DROP PROCEDURE sp1; CREATE TABLE t_gen(a INT, b DOUBLE GENERATED ALWAYS AS (SQRT(a))); diff --git a/mysql-test/main/analyze_stmt.result b/mysql-test/main/analyze_stmt.result index c5d35759c9c..2db78ec75d0 100644 --- a/mysql-test/main/analyze_stmt.result +++ b/mysql-test/main/analyze_stmt.result @@ -204,17 +204,17 @@ drop table t0, t1; create table t1 (i int); insert into t1 values (1),(2); analyze select a from t1; -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'SELECT' analyze delete from t1 where a=2; -ERROR 42S22: Unknown column 'a' in 'where clause' +ERROR 42S22: Unknown column 'a' in 'WHERE' analyze update t1 set a=2; -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'SET' create table t2 like t1; insert into t2 select * from t1; analyze update t2,t1 set t2.i=5 where t2.a=t1.a; -ERROR 42S22: Unknown column 't2.a' in 'where clause' +ERROR 42S22: Unknown column 't2.a' in 'WHERE' analyze delete t1 from t2,t1 where t2.a=t1.a; -ERROR 42S22: Unknown column 't2.a' in 'where clause' +ERROR 42S22: Unknown column 't2.a' in 'WHERE' drop table t1, t2; # # MDEV-6395: ANALYZE UPDATE/DELETE with impossible where does not produce any output diff --git a/mysql-test/main/compress.result b/mysql-test/main/compress.result index 24979346149..0e555b9fa70 100644 --- a/mysql-test/main/compress.result +++ b/mysql-test/main/compress.result @@ -2162,7 +2162,7 @@ SELECT ELT(FIELD(kundentyp,'PP','PPA','PG','PGA','FK','FKA','FP','FPA','K','KA', Kundentyp kategorie Privat (Private Nutzung) Mobilfunk Warnings: -Warning 1052 Column 'kundentyp' in group statement is ambiguous +Warning 1052 Column 'kundentyp' in GROUP BY is ambiguous drop table t1; SHOW STATUS LIKE 'Compression'; Variable_name Value diff --git a/mysql-test/main/cte_nonrecursive.result b/mysql-test/main/cte_nonrecursive.result index 552be4ad03c..01b984ceb70 100644 --- a/mysql-test/main/cte_nonrecursive.result +++ b/mysql-test/main/cte_nonrecursive.result @@ -750,7 +750,7 @@ ERROR HY000: No anchors for recursive WITH element 's' #erroneous definition of unreferenced with table t with t as (select count(*) from t1 where d>='f' group by a) select t1.b from t2,t1 where t1.a = t2.c; -ERROR 42S22: Unknown column 'd' in 'where clause' +ERROR 42S22: Unknown column 'd' in 'WHERE' with t as (select count(*) from t1 where b>='f' group by a) select t1.b from t2,t1 where t1.a = t2.c; b @@ -762,11 +762,11 @@ ggg with t(d) as (select count(*) from t1 where b<='ccc' group by b), s as (select * from t1 where a in (select t2.d from t2,t where t2.c=t.d)) select t1.b from t1,t2 where t1.a=t2.c; -ERROR 42S22: Unknown column 't2.d' in 'field list' +ERROR 42S22: Unknown column 't2.d' in 'SELECT' with t(d) as (select count(*) from t1 where b<='ccc' group by b), s as (select * from t1 where a in (select t2.c from t2,t where t2.c=t.c)) select t1.b from t1,t2 where t1.a=t2.c; -ERROR 42S22: Unknown column 't.c' in 'where clause' +ERROR 42S22: Unknown column 't.c' in 'WHERE' with t(d) as (select count(*) from t1 where b<='ccc' group by b), s as (select * from t1 where a in (select t2.c from t2,t where t2.c=t.d)) select t1.b from t1,t2 where t1.a=t2.c; @@ -1889,13 +1889,13 @@ cte1(a) as (select * from t1 where c1 <= 2), cte2(b) as (select * from cte1 where c1 >= 2), cte3 as (select * from cte1,cte2 where cte1.a < cte2.b) select * from t2; -ERROR 42S22: Unknown column 'c1' in 'where clause' +ERROR 42S22: Unknown column 'c1' in 'WHERE' with cte1(a) as (select * from t1 where c1 <= 2), cte2(b) as (select * from cte1 where a >= 2), cte3 as (select * from cte1,cte2 where cte1.a < cte2.c1) select * from t2; -ERROR 42S22: Unknown column 'cte2.c1' in 'where clause' +ERROR 42S22: Unknown column 'cte2.c1' in 'WHERE' with cte1 as (select * from t1 where c1 <= 2), cte2(a,b) as (select * from cte1 as s1, cte1 as s2 where s1.c1=s2.c1) @@ -1914,7 +1914,7 @@ with cte1 as (select * from t1 where c1 <= 2), cte2(a,b) as (select * from cte1 as s1, cte1 as s2 where s1.c1=c1) select * from t2; -ERROR 23000: Column 'c1' in where clause is ambiguous +ERROR 23000: Column 'c1' in WHERE is ambiguous with cte3 as ( with cte2(a,b) as ( with cte1 as (select * from t1 where c1 <= 2) @@ -1941,7 +1941,7 @@ with cte3 as select * from cte1 as s1, cte1 as s2 where s1.c1=s2.c1) select r1.c1,r2.c1 from cte2 as r1, cte2 as r2) select * from t2; -ERROR 42S22: Unknown column 'r1.c1' in 'field list' +ERROR 42S22: Unknown column 'r1.c1' in 'SELECT' create procedure p1() begin insert into t2 @@ -1962,7 +1962,7 @@ with cte1 as (select a from t1) select * from t1 as s, t1 as t where s.c1=t.c1 and s.c1 <= 2 and t.c1 >= 2; end | call p1(); -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'SELECT' drop procedure p1; drop table t1,t2; # diff --git a/mysql-test/main/cte_recursive.result b/mysql-test/main/cte_recursive.result index 9a28e5c222f..415ab7129c8 100644 --- a/mysql-test/main/cte_recursive.result +++ b/mysql-test/main/cte_recursive.result @@ -4543,33 +4543,33 @@ insert into t1 values (3), (7), (1); with recursive r as (select * from t1 union select s1.* from t1 as s1, r where s1.a = r.b) select * from t1 as t; -ERROR 42S22: Unknown column 'r.b' in 'where clause' +ERROR 42S22: Unknown column 'r.b' in 'WHERE' explain with recursive r as (select * from t1 union select s1.* from t1 as s1, r where s1.a = r.b) select * from t1 as t; -ERROR 42S22: Unknown column 'r.b' in 'where clause' +ERROR 42S22: Unknown column 'r.b' in 'WHERE' create procedure sp1() with recursive r as (select * from t1 union select s1.* from t1 as s1, r where s1.a = r.b) select * from t1 as t; call sp1(); -ERROR 42S22: Unknown column 'r.b' in 'where clause' +ERROR 42S22: Unknown column 'r.b' in 'WHERE' call sp1(); -ERROR 42S22: Unknown column 'r.b' in 'where clause' +ERROR 42S22: Unknown column 'r.b' in 'WHERE' with recursive r as (select * from t1 union select s1.* from t1 as s1, r where s1.b = r.a) select * from t1 as t; -ERROR 42S22: Unknown column 's1.b' in 'where clause' +ERROR 42S22: Unknown column 's1.b' in 'WHERE' explain with recursive r as (select * from t1 union select s1.* from t1 as s1, r where s1.b = r.a) select * from t1 as t; -ERROR 42S22: Unknown column 's1.b' in 'where clause' +ERROR 42S22: Unknown column 's1.b' in 'WHERE' create procedure sp2() with recursive r as (select * from t1 union select s1.* from t1 as s1, r where s1.b = r.a) select * from t1 as t; call sp2(); -ERROR 42S22: Unknown column 's1.b' in 'where clause' +ERROR 42S22: Unknown column 's1.b' in 'WHERE' call sp2(); -ERROR 42S22: Unknown column 's1.b' in 'where clause' +ERROR 42S22: Unknown column 's1.b' in 'WHERE' drop procedure sp1; drop procedure sp2; drop table t1; diff --git a/mysql-test/main/delayed.result b/mysql-test/main/delayed.result index 6113e2deb53..613ffa93424 100644 --- a/mysql-test/main/delayed.result +++ b/mysql-test/main/delayed.result @@ -253,7 +253,7 @@ CREATE TABLE t1 (a INT); INSERT DELAYED INTO t1 SET a= b(); ERROR 42000: FUNCTION test.b does not exist INSERT DELAYED INTO t1 SET b= 1; -ERROR 42S22: Unknown column 'b' in 'field list' +ERROR 42S22: Unknown column 'b' in 'INSERT INTO' INSERT DELAYED INTO t1 SET b= b(); ERROR 42000: FUNCTION test.b does not exist DROP TABLE t1; diff --git a/mysql-test/main/delete.result b/mysql-test/main/delete.result index 7a9963abc71..a36bc7ae50f 100644 --- a/mysql-test/main/delete.result +++ b/mysql-test/main/delete.result @@ -53,7 +53,7 @@ CREATE TABLE `t1` ( PRIMARY KEY (`i`) ); DELETE FROM t1 USING t1 WHERE post='1'; -ERROR 42S22: Unknown column 'post' in 'where clause' +ERROR 42S22: Unknown column 'post' in 'WHERE' drop table t1; CREATE TABLE t1 ( bool char(0) default NULL, @@ -229,11 +229,11 @@ drop table t1; CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1); DELETE FROM t1 ORDER BY x; -ERROR 42S22: Unknown column 'x' in 'order clause' +ERROR 42S22: Unknown column 'x' in 'ORDER BY' DELETE FROM t1 ORDER BY t2.x; -ERROR 42S22: Unknown column 't2.x' in 'order clause' +ERROR 42S22: Unknown column 't2.x' in 'ORDER BY' DELETE FROM t1 ORDER BY (SELECT x); -ERROR 42S22: Unknown column 'x' in 'field list' +ERROR 42S22: Unknown column 'x' in 'SELECT' DROP TABLE t1; CREATE TABLE t1 ( a INT diff --git a/mysql-test/main/delete_returning.result b/mysql-test/main/delete_returning.result index 3a95de0cdca..fc6e61fce83 100644 --- a/mysql-test/main/delete_returning.result +++ b/mysql-test/main/delete_returning.result @@ -42,7 +42,7 @@ a b 5 EEEEE 7 GGGGGGG DELETE FROM t1 WHERE a=2 RETURNING c; -ERROR 42S22: Unknown column 'c' in 'field list' +ERROR 42S22: Unknown column 'c' in 'RETURNING' INSERT INTO t1 VALUES (2,'BB'), (2,'bb'); DELETE FROM t1 WHERE a=2 RETURNING a, UPPER(b); a UPPER(b) diff --git a/mysql-test/main/derived.result b/mysql-test/main/derived.result index cda21e275ae..09f273fced5 100644 --- a/mysql-test/main/derived.result +++ b/mysql-test/main/derived.result @@ -5,9 +5,9 @@ select * from (select 2 from DUAL) b; 2 2 SELECT 1 as a FROM (SELECT 1 UNION SELECT a) b; -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'SELECT' SELECT 1 as a FROM (SELECT a UNION SELECT 1) b; -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'SELECT' CREATE TABLE t1 (a int not null, b char (10) not null); insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c'); CREATE TABLE t2 (a int not null, b char (10) not null); @@ -27,18 +27,18 @@ a y 3 3 3 3 SELECT a FROM (SELECT 1 FROM (SELECT 1) a HAVING a=1) b; -ERROR 42S22: Unknown column 'a' in 'having clause' +ERROR 42S22: Unknown column 'a' in 'HAVING' SELECT a,b as a FROM (SELECT '1' as a,'2' as b) b HAVING a=1; -ERROR 23000: Column 'a' in having clause is ambiguous +ERROR 23000: Column 'a' in HAVING is ambiguous SELECT a,2 as a FROM (SELECT '1' as a) b HAVING a=2; a a 1 2 SELECT a,2 as a FROM (SELECT '1' as a) b HAVING a=1; a a SELECT 1 FROM (SELECT 1) a WHERE a=2; -ERROR 42S22: Unknown column 'a' in 'where clause' +ERROR 42S22: Unknown column 'a' in 'WHERE' SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1 HAVING a=1) as a; -ERROR 42S22: Unknown column 'a' in 'having clause' +ERROR 42S22: Unknown column 'a' in 'HAVING' select * from t1 as x1, (select * from t1) as x2; a b a b 1 a 1 a @@ -154,13 +154,13 @@ select * from (select 1 as a) b left join (select 2 as a) c using(a); a 1 SELECT * FROM (SELECT 1 UNION SELECT a) b; -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'SELECT' SELECT 1 as a FROM (SELECT a UNION SELECT 1) b; -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'SELECT' SELECT 1 as a FROM (SELECT 1 UNION SELECT a) b; -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'SELECT' select 1 from (select 2) a order by 0; -ERROR 42S22: Unknown column '0' in 'order clause' +ERROR 42S22: Unknown column '0' in 'ORDER BY' create table t1 (id int); insert into t1 values (1),(2),(3); describe select * from (select * from t1 group by id) bar; @@ -276,7 +276,7 @@ N M UPDATE `t1` AS P1 INNER JOIN (SELECT N FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N SET P1.M = 2, P2.N = 2; ERROR HY000: The target table P2 of the UPDATE is not updatable UPDATE `t1` AS P1 INNER JOIN (SELECT aaaa FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N SET P1.M = 2; -ERROR 42S22: Unknown column 'aaaa' in 'field list' +ERROR 42S22: Unknown column 'aaaa' in 'SELECT' delete P1.* from `t1` AS P1 INNER JOIN (SELECT N FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N; select * from t1; N M @@ -284,7 +284,7 @@ N M delete P1.*,p2.* from `t1` AS P1 INNER JOIN (SELECT N FROM `t1` GROUP BY N HAVING Count(M) > 1) AS p2 ON P1.N = p2.N; ERROR HY000: The target table p2 of the DELETE is not updatable delete P1.* from `t1` AS P1 INNER JOIN (SELECT aaa FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N; -ERROR 42S22: Unknown column 'aaa' in 'field list' +ERROR 42S22: Unknown column 'aaa' in 'SELECT' drop table t1; CREATE TABLE t1 ( OBJECTID int(11) NOT NULL default '0', @@ -467,7 +467,7 @@ t1.id=t3.val set t1.val=t3.val ; -ERROR 42S22: Unknown column 'v.val' in 'field list' +ERROR 42S22: Unknown column 'v.val' in 'SELECT' drop table t1, t2; # # MDEV-5353: server crash on subselect if WHERE applied to some @@ -1336,7 +1336,7 @@ DROP TABLE t1; SELECT 1 FROM ( SELECT 1 UNION SELECT 2 ORDER BY (SELECT 1 FROM DUAL WHERE xxx = 0) ) dt; -ERROR 42S22: Unknown column 'xxx' in 'where clause' +ERROR 42S22: Unknown column 'xxx' in 'WHERE' create table t1 (a int, b int); insert into t1 values (3,8), (7,2), (1,4), (5,9); create table t2 (a int, b int); @@ -1350,7 +1350,7 @@ union select a,b from t2 where t2.b < 6 order by (a - b / (select a + max(c) from t3 where d = x)) ) dt; -ERROR 42S22: Unknown column 'x' in 'where clause' +ERROR 42S22: Unknown column 'x' in 'WHERE' drop table t1,t2,t3; # # End of 10.3 tests diff --git a/mysql-test/main/dyncol.result b/mysql-test/main/dyncol.result index 5c4772a1947..13c0e18f63a 100644 --- a/mysql-test/main/dyncol.result +++ b/mysql-test/main/dyncol.result @@ -1621,7 +1621,7 @@ ex # as a dynamic column name # select COLUMN_CREATE(color, "black"); -ERROR 42S22: Unknown column 'color' in 'field list' +ERROR 42S22: Unknown column 'color' in 'SELECT' # # MDEV-489 Assertion `offset < 0x1f' failed in # type_and_offset_store on COLUMN_ADD diff --git a/mysql-test/main/errors.result b/mysql-test/main/errors.result index baa2e0ad3c0..3f5827c16ed 100644 --- a/mysql-test/main/errors.result +++ b/mysql-test/main/errors.result @@ -7,21 +7,21 @@ update t1 set a=1; ERROR 42S02: Table 'test.t1' doesn't exist create table t1 (a int); select count(test.t1.b) from t1; -ERROR 42S22: Unknown column 'test.t1.b' in 'field list' +ERROR 42S22: Unknown column 'test.t1.b' in 'SELECT' select count(not_existing_database.t1) from t1; -ERROR 42S22: Unknown column 'not_existing_database.t1' in 'field list' +ERROR 42S22: Unknown column 'not_existing_database.t1' in 'SELECT' select count(not_existing_database.t1.a) from t1; -ERROR 42S22: Unknown column 'not_existing_database.t1.a' in 'field list' +ERROR 42S22: Unknown column 'not_existing_database.t1.a' in 'SELECT' select count(not_existing_database.t1.a) from not_existing_database.t1; Got one of the listed errors select 1 from t1 order by 2; -ERROR 42S22: Unknown column '2' in 'order clause' +ERROR 42S22: Unknown column '2' in 'ORDER BY' select 1 from t1 group by 2; -ERROR 42S22: Unknown column '2' in 'group statement' +ERROR 42S22: Unknown column '2' in 'GROUP BY' select 1 from t1 order by t1.b; -ERROR 42S22: Unknown column 't1.b' in 'order clause' +ERROR 42S22: Unknown column 't1.b' in 'ORDER BY' select count(*),b from t1; -ERROR 42S22: Unknown column 'b' in 'field list' +ERROR 42S22: Unknown column 'b' in 'SELECT' drop table t1; create table t1 (a int(256)); ERROR 42000: Display width out of range for 'a' (max = 255) @@ -45,17 +45,17 @@ Warning 1365 Division by 0 DROP TABLE t1; CREATE TABLE t1( a INT ); SELECT b FROM t1; -ERROR 42S22: Unknown column 'b' in 'field list' +ERROR 42S22: Unknown column 'b' in 'SELECT' SHOW ERRORS; Level Code Message -Error 1054 Unknown column 'b' in 'field list' +Error 1054 Unknown column 'b' in 'SELECT' CREATE TABLE t2 SELECT b FROM t1; -ERROR 42S22: Unknown column 'b' in 'field list' +ERROR 42S22: Unknown column 'b' in 'SELECT' SHOW ERRORS; Level Code Message -Error 1054 Unknown column 'b' in 'field list' +Error 1054 Unknown column 'b' in 'SELECT' INSERT INTO t1 SELECT b FROM t1; -ERROR 42S22: Unknown column 'b' in 'field list' +ERROR 42S22: Unknown column 'b' in 'SELECT' DROP TABLE t1; flush status; drop table if exists t1, t2; diff --git a/mysql-test/main/explain.result b/mysql-test/main/explain.result index 75d46110c35..ab69ea174ba 100644 --- a/mysql-test/main/explain.result +++ b/mysql-test/main/explain.result @@ -205,7 +205,7 @@ INSERT INTO t1 VALUES (repeat('b',@@global.max_allowed_packet)); EXPLAIN SELECT DISTINCT 1 FROM t1, (SELECT DISTINCTROW a AS away FROM t1 GROUP BY a WITH ROLLUP) as d1 WHERE t1.a = d1.a; -ERROR 42S22: Unknown column 'd1.a' in 'where clause' +ERROR 42S22: Unknown column 'd1.a' in 'WHERE' DROP TABLE t1; # # Bug#48295: diff --git a/mysql-test/main/fulltext_order_by.result b/mysql-test/main/fulltext_order_by.result index 35ae8789c7d..e3476bd2f5e 100644 --- a/mysql-test/main/fulltext_order_by.result +++ b/mysql-test/main/fulltext_order_by.result @@ -126,7 +126,7 @@ group by a.text, b.id, b.betreff order by match(b.betreff) against ('+abc' in boolean mode) desc; -ERROR 42000: Table 'b' from one of the SELECTs cannot be used in order clause +ERROR 42000: Table 'b' from one of the SELECTs cannot be used in ORDER BY select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join @@ -142,7 +142,7 @@ where match(c.beitrag) against ('+abc' in boolean mode) order by match(b.betreff) against ('+abc' in boolean mode) desc; -ERROR 42000: Table 'b' from one of the SELECTs cannot be used in order clause +ERROR 42000: Table 'b' from one of the SELECTs cannot be used in ORDER BY select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join diff --git a/mysql-test/main/func_gconcat.result b/mysql-test/main/func_gconcat.result index 6226f95df23..d725029a533 100644 --- a/mysql-test/main/func_gconcat.result +++ b/mysql-test/main/func_gconcat.result @@ -160,7 +160,7 @@ set group_concat_max_len = 1024; select group_concat(sum(c)) from t1 group by grp; ERROR HY000: Invalid use of group function select grp,group_concat(c order by 2) from t1 group by grp; -ERROR 42S22: Unknown column '2' in 'order clause' +ERROR 42S22: Unknown column '2' in 'ORDER BY' drop table t1; create table t1 ( URL_ID int(11), URL varchar(80)); create table t2 ( REQ_ID int(11), URL_ID int(11)); diff --git a/mysql-test/main/func_math.result b/mysql-test/main/func_math.result index 4296a983d71..405bcc45ddb 100644 --- a/mysql-test/main/func_math.result +++ b/mysql-test/main/func_math.result @@ -154,7 +154,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra Warnings: Note 1003 select degrees(pi()) AS `degrees(pi())`,radians(360) AS `radians(360)` select rand(rand); -ERROR 42S22: Unknown column 'rand' in 'field list' +ERROR 42S22: Unknown column 'rand' in 'SELECT' create table t1 (col1 int, col2 decimal(60,30)); insert into t1 values(1,1234567890.12345); select format(col2,7) from t1; diff --git a/mysql-test/main/get_diagnostics.result b/mysql-test/main/get_diagnostics.result index b00378d4ee9..6ea8d483da1 100644 --- a/mysql-test/main/get_diagnostics.result +++ b/mysql-test/main/get_diagnostics.result @@ -134,7 +134,7 @@ DROP PROCEDURE p1; GET DIAGNOSTICS CONDITION; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 GET DIAGNOSTICS CONDITION a; -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'GET DIAGNOSTICS' GET DIAGNOSTICS CONDITION 1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 GET DIAGNOSTICS CONDITION 1 @var; @@ -213,9 +213,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp GET DIAGNOSTICS CONDITION (1) @var = CLASS_ORIGIN; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(1) @var = CLASS_ORIGIN' at line 1 GET DIAGNOSTICS CONDITION p1() @var = CLASS_ORIGIN; -ERROR 42S22: Unknown column 'p1' in 'field list' +ERROR 42S22: Unknown column 'p1' in 'GET DIAGNOSTICS' GET DIAGNOSTICS CONDITION ABS(2) @var = CLASS_ORIGIN; -ERROR 42S22: Unknown column 'ABS' in 'field list' +ERROR 42S22: Unknown column 'ABS' in 'GET DIAGNOSTICS' GET DIAGNOSTICS CONDITION 1.1 @var = CLASS_ORIGIN; GET DIAGNOSTICS CONDITION "1" @var = CLASS_ORIGIN; SELECT COUNT(max_questions) INTO @var FROM mysql.user; @@ -227,7 +227,7 @@ Warnings: Error 1758 Invalid condition number Error 1758 Invalid condition number GET DIAGNOSTICS CONDITION a @var = CLASS_ORIGIN; -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'GET DIAGNOSTICS' SELECT COUNT(max_questions) INTO @var FROM mysql.user; SET @cond = 1; GET DIAGNOSTICS CONDITION @cond @var1 = CLASS_ORIGIN; diff --git a/mysql-test/main/group_by.result b/mysql-test/main/group_by.result index b7bbab6dd47..897e684936f 100644 --- a/mysql-test/main/group_by.result +++ b/mysql-test/main/group_by.result @@ -790,7 +790,7 @@ SELECT n+1 AS n FROM t1 GROUP BY n; n 2 Warnings: -Warning 1052 Column 'n' in group statement is ambiguous +Warning 1052 Column 'n' in GROUP BY is ambiguous DROP TABLE t1; create table t1(f1 varchar(5) key); insert into t1 values (1),(2); @@ -877,10 +877,10 @@ c2 aaa aaa Warnings: -Warning 1052 Column 'c2' in group statement is ambiguous +Warning 1052 Column 'c2' in GROUP BY is ambiguous show warnings; Level Code Message -Warning 1052 Column 'c2' in group statement is ambiguous +Warning 1052 Column 'c2' in GROUP BY is ambiguous select t1.c1 as c2 from t1, t2 where t1.c2 = t2.c4 group by t1.c1; c2 @@ -1028,7 +1028,7 @@ FROM t1 AS t1_outer GROUP BY t1_outer.b; ERROR 42000: 'test.t1_outer.a' isn't in GROUP BY SELECT 1 FROM t1 as t1_outer GROUP BY a HAVING (SELECT t1_outer.b FROM t1 AS t1_inner LIMIT 1); -ERROR 42S22: Unknown column 'test.t1_outer.b' in 'field list' +ERROR 42S22: Unknown column 'test.t1_outer.b' in 'SELECT' SELECT (SELECT SUM(t1_inner.a) FROM t1 AS t1_inner LIMIT 1) FROM t1 AS t1_outer GROUP BY t1_outer.b; (SELECT SUM(t1_inner.a) FROM t1 AS t1_inner LIMIT 1) @@ -1070,7 +1070,7 @@ SELECT 1 FROM t1 GROUP BY b HAVING ROW (b,b) = ROW (1,1); 1 1 SELECT 1 FROM t1 GROUP BY b HAVING a = 2; -ERROR 42S22: Unknown column 'a' in 'having clause' +ERROR 42S22: Unknown column 'a' in 'HAVING' SELECT 1 FROM t1 GROUP BY SUM(b); ERROR HY000: Invalid use of group function SELECT b FROM t1 AS t1_outer GROUP BY a HAVING t1_outer.a IN @@ -2559,7 +2559,7 @@ DROP TABLE t1,t2; # MDEV-5104 crash in Item_field::used_tables with broken order by # (select 1 order by x(y)) order by 1; -ERROR 42S22: Unknown column 'y' in 'order clause' +ERROR 42S22: Unknown column 'y' in 'ORDER BY' # End of 5.3 tests # # Bug#49771: Incorrect MIN (date) when minimum value is 0000-00-00 diff --git a/mysql-test/main/having.result b/mysql-test/main/having.result index 3e69b3bf2c8..f1f3190a08e 100644 --- a/mysql-test/main/having.result +++ b/mysql-test/main/having.result @@ -200,7 +200,7 @@ select count(*) from t1 group by col2 having col2 = 'hello'; count(*) 3 select count(*) from t1 group by col2 having col1 = 10; -ERROR 42S22: Unknown column 'col1' in 'having clause' +ERROR 42S22: Unknown column 'col1' in 'HAVING' select col1 as count_col1 from t1 as tmp1 group by col1 having col1 = 10; count_col1 10 @@ -241,7 +241,7 @@ select sum(col1) as co2, count(col2) as cc from t1 group by col1 having col1 =10 co2 cc 40 4 select t2.col2 from t2 group by t2.col1, t2.col2 having t1.col1 <= 10; -ERROR 42S22: Unknown column 't1.col1' in 'having clause' +ERROR 42S22: Unknown column 't1.col1' in 'HAVING' select t1.col1 from t1 where t1.col2 in (select t2.col2 from t2 @@ -279,7 +279,7 @@ select t1.col1 as tmp_col from t1 where t1.col2 in (select t2.col2 from t2 group by t2.col1, t2.col2 having tmp_col <= 10); -ERROR 42S22: Unknown column 'tmp_col' in 'having clause' +ERROR 42S22: Unknown column 'tmp_col' in 'HAVING' select t1.col1 from t1 where t1.col2 in (select t2.col2 from t2 @@ -301,7 +301,7 @@ where t1.col2 in (select t2.col2 from t2 group by t2.col1, t2.col2 having col_t1 <= 10) having col_t1 <= 20; -ERROR 42S22: Unknown column 'col_t1' in 'having clause' +ERROR 42S22: Unknown column 'col_t1' in 'HAVING' select t1.col1 from t1 where t1.col2 in (select t2.col2 from t2 @@ -322,7 +322,7 @@ select sum(col1) from t1 group by col_t1 having col_t1 in (select sum(t2.col1) from t2 group by t2.col2, t2.col1 having t2.col1 = t1.col1); -ERROR 42S22: Unknown column 't1.col1' in 'having clause' +ERROR 42S22: Unknown column 't1.col1' in 'HAVING' select sum(col1) from t1 group by col_t1 having col_t1 in (select sum(t2.col1) from t2 @@ -333,10 +333,10 @@ sum(col1) 30 select t1.col1, t2.col1 from t1, t2 where t1.col1 = t2.col1 group by t1.col1, t2.col1 having col1 = 2; -ERROR 23000: Column 'col1' in having clause is ambiguous +ERROR 23000: Column 'col1' in HAVING is ambiguous select t1.col1*10+t2.col1 from t1,t2 where t1.col1=t2.col1 group by t1.col1, t2.col1 having col1 = 2; -ERROR 23000: Column 'col1' in having clause is ambiguous +ERROR 23000: Column 'col1' in HAVING is ambiguous drop table t1, t2, t3; create table t1 (s1 int); insert into t1 values (1),(2),(3); @@ -348,8 +348,8 @@ s1 0 0 Warnings: -Warning 1052 Column 's1' in group statement is ambiguous -Warning 1052 Column 's1' in having clause is ambiguous +Warning 1052 Column 's1' in GROUP BY is ambiguous +Warning 1052 Column 's1' in HAVING is ambiguous select s1*0 from t1 group by s1 having s1 = 0; s1*0 select s1 from t1 group by 1 having 1 = 0; @@ -362,7 +362,7 @@ count(s1) 1 1 select * from t1 a, t1 b group by a.s1 having s1 is null; -ERROR 23000: Column 's1' in having clause is ambiguous +ERROR 23000: Column 's1' in HAVING is ambiguous drop table t1; create table t1 (s1 char character set latin1 collate latin1_german1_ci); insert ignore into t1 values ('ü'),('y'); diff --git a/mysql-test/main/host_cache_size_functionality.result b/mysql-test/main/host_cache_size_functionality.result index f5d7e7ee109..844339acea7 100644 --- a/mysql-test/main/host_cache_size_functionality.result +++ b/mysql-test/main/host_cache_size_functionality.result @@ -68,6 +68,6 @@ COUNT(@@GLOBAL.Host_Cache_Size) 1 1 Expected SELECT Host_Cache_Size = @@SESSION.Host_Cache_Size; -ERROR 42S22: Unknown column 'Host_Cache_Size' in 'field list' +ERROR 42S22: Unknown column 'Host_Cache_Size' in 'SELECT' Expected error 'Unknown column Host_Cache_Size in field list' SET @@GLOBAL.Host_Cache_Size=DEFAULT; diff --git a/mysql-test/main/insert.result b/mysql-test/main/insert.result index 586dbbff153..f1eb9801e2a 100644 --- a/mysql-test/main/insert.result +++ b/mysql-test/main/insert.result @@ -766,14 +766,14 @@ create table t3 (c int); create table t4 (d1 int, d2 int); insert into t4 select * from t1 left join t2 on (select t1.i from t3); -ERROR 42S22: Unknown column 't1.i' in 'field list' +ERROR 42S22: Unknown column 't1.i' in 'SELECT' replace t4 select * from t1 left join t2 on (select t1.i from t3); -ERROR 42S22: Unknown column 't1.i' in 'field list' +ERROR 42S22: Unknown column 't1.i' in 'SELECT' drop table t1,t2,t3,t4; create table t (a int); select 1 in (select count(*) from t t1 join (t t2 join t t3 on (t1.a != 0))); -ERROR 42S22: Unknown column 't1.a' in 'on clause' +ERROR 42S22: Unknown column 't1.a' in 'ON' drop table t; # # MDEV-28578 Server crashes in Item_field::fix_outer_field after CREATE SELECT @@ -781,7 +781,7 @@ drop table t; create table t1 (i int) ; create table t2 (j int) ; create table t4 select * from t1 join t2 on (select t3.i); -ERROR 42S22: Unknown column 't3.i' in 'field list' +ERROR 42S22: Unknown column 't3.i' in 'SELECT' drop table t1, t2; # # End of 10.4 tests diff --git a/mysql-test/main/insert_returning.result b/mysql-test/main/insert_returning.result index b2ed9c90e51..b35fd3bf35f 100644 --- a/mysql-test/main/insert_returning.result +++ b/mysql-test/main/insert_returning.result @@ -482,7 +482,7 @@ INSERT INTO t1 VALUES(1,'a'),(2,'b'),(3,'c'); # SIMLPE INSERT STATEMENT # INSERT INTO t2(id2,val2) VALUES(1,'a') RETURNING id1; -ERROR 42S22: Unknown column 'id1' in 'field list' +ERROR 42S22: Unknown column 'id1' in 'RETURNING' INSERT INTO t2(id2,val2) values(2,'b') RETURNING SUM(id2); ERROR HY000: Invalid use of group function INSERT INTO t2(id2,val2) VALUES(3,'c') RETURNING (SELECT id1 FROM t1); @@ -504,7 +504,7 @@ ERROR 42S02: Unknown table 'test.t1' # Multiple rows in single insert statement # INSERT INTO t2 VALUES(1,'a'),(2,'b') RETURNING id1; -ERROR 42S22: Unknown column 'id1' in 'field list' +ERROR 42S22: Unknown column 'id1' in 'RETURNING' INSERT INTO t2 VALUES(3,'c'),(4,'d') RETURNING MAX(id2); ERROR HY000: Invalid use of group function INSERT INTO t2 VALUES(5,'c'),(6,'f') RETURNING (SELECT id1 FROM t1); @@ -527,7 +527,7 @@ ERROR 42S02: Unknown table 'test.t1' # INSERT ... SET # INSERT INTO t2 SET id2=1, val2='a' RETURNING id1; -ERROR 42S22: Unknown column 'id1' in 'field list' +ERROR 42S22: Unknown column 'id1' in 'RETURNING' INSERT INTO t2 SET id2=2, val2='b' RETURNING COUNT(id2); ERROR HY000: Invalid use of group function INSERT INTO t2 SET id2=3, val2='c' RETURNING (SELECT id1 FROM t1); @@ -550,7 +550,7 @@ ERROR 42S02: Unknown table 'test.t1' # INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='b' RETURNING id1; -ERROR 42S22: Unknown column 'id1' in 'field list' +ERROR 42S22: Unknown column 'id1' in 'RETURNING' INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='b' RETURNING MAX(id); ERROR HY000: Invalid use of group function @@ -565,7 +565,7 @@ RETURNING (SELECT * FROM ins_duplicate); ERROR 21000: Operand should contain 1 column(s) INSERT INTO ins_duplicate VALUES(2,'b') ON DUPLICATE KEY UPDATE val='b' RETURNING id2, (SELECT id1+id FROM t1 WHERE id1=1); -ERROR 42S22: Unknown column 'id2' in 'field list' +ERROR 42S22: Unknown column 'id2' in 'RETURNING' INSERT INTO ins_duplicate VALUES(2,'b') ON DUPLICATE KEY UPDATE val='b' RETURNING (SELECT id FROM ins_duplicate); ERROR HY000: Table 'ins_duplicate' is specified twice, both as a target for 'INSERT' and as a separate source for data @@ -576,7 +576,7 @@ ERROR 42S02: Unknown table 'test.t1' # INSERT...SELECT # INSERT INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=1 RETURNING id1; -ERROR 42S22: Unknown column 'id1' in 'field list' +ERROR 42S22: Unknown column 'id1' in 'RETURNING' INSERT INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING MAX(id2); ERROR HY000: Invalid use of group function INSERT INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING (SELECT diff --git a/mysql-test/main/insert_select.result b/mysql-test/main/insert_select.result index 463f571b096..eba5d4bbf9e 100644 --- a/mysql-test/main/insert_select.result +++ b/mysql-test/main/insert_select.result @@ -666,11 +666,11 @@ a 10 insert into t1 select t2.a from t2 group by t2.a on duplicate key update a= a + 10; insert into t1 select t2.a from t2 on duplicate key update a= a + t2.b; -ERROR 23000: Column 'a' in field list is ambiguous +ERROR 23000: Column 'a' in UPDATE is ambiguous insert into t1 select t2.a from t2 on duplicate key update t2.a= a + t2.b; -ERROR 42S22: Unknown column 't2.a' in 'field list' +ERROR 42S22: Unknown column 't2.a' in 'UPDATE' insert into t1 select t2.a from t2 group by t2.a on duplicate key update a= t1.a + t2.b; -ERROR 42S22: Unknown column 't2.b' in 'field list' +ERROR 42S22: Unknown column 't2.b' in 'UPDATE' drop table t1,t2,t3; create table t1(f1 varchar(5) key); insert into t1(f1) select if(max(f1) is null, '2000',max(f1)+1) from t1; @@ -686,9 +686,9 @@ create table t1(x int, y int); create table t2(x int, z int); insert into t1(x,y) select x,z from t2 on duplicate key update x=values(x); insert into t1(x,y) select x,z from t2 on duplicate key update x=values(z); -ERROR 42S22: Unknown column 'z' in 'field list' +ERROR 42S22: Unknown column 'z' in 'UPDATE' insert into t1(x,y) select x,z from t2 on duplicate key update x=values(t2.x); -ERROR 42S22: Unknown column 't2.x' in 'field list' +ERROR 42S22: Unknown column 't2.x' in 'UPDATE' drop table t1,t2; CREATE TABLE t1 (a int PRIMARY KEY); INSERT INTO t1 values (1), (2); diff --git a/mysql-test/main/insert_update.result b/mysql-test/main/insert_update.result index 83344971c59..b075a9f27b3 100644 --- a/mysql-test/main/insert_update.result +++ b/mysql-test/main/insert_update.result @@ -158,7 +158,7 @@ a b c 5 0 30 8 9 60 INSERT t1 SELECT a,b,c FROM t2 WHERE d=2 ON DUPLICATE KEY UPDATE c=c+VALUES(a); -ERROR 23000: Column 'c' in field list is ambiguous +ERROR 23000: Column 'c' in UPDATE is ambiguous INSERT t1 SELECT a,b,c FROM t2 WHERE d=2 ON DUPLICATE KEY UPDATE c=t1.c+VALUES(t1.a); SELECT *, VALUE(a) FROM t1; a b c VALUE(a) @@ -191,9 +191,9 @@ a 2 3 insert into t1 select a from t1 on duplicate key update a=a+1 ; -ERROR 23000: Column 'a' in field list is ambiguous +ERROR 23000: Column 'a' in UPDATE is ambiguous insert ignore into t1 select a from t1 on duplicate key update a=t1.a+1 ; -ERROR 23000: Column 't1.a' in field list is ambiguous +ERROR 23000: Column 't1.a' in UPDATE is ambiguous drop table t1; CREATE TABLE t1 ( a BIGINT(20) NOT NULL DEFAULT 0, @@ -225,7 +225,7 @@ a b DROP TABLE t1; CREATE TABLE t1 (i INT PRIMARY KEY, j INT); INSERT INTO t1 SELECT 1, j; -ERROR 42S22: Unknown column 'j' in 'field list' +ERROR 42S22: Unknown column 'j' in 'SELECT' DROP TABLE t1; CREATE TABLE t1 (i INT PRIMARY KEY, j INT); CREATE TABLE t2 (a INT, b INT); @@ -238,7 +238,7 @@ CREATE TABLE t2 (a INT); INSERT INTO t1 VALUES (1, 1); INSERT INTO t2 VALUES (1), (3); INSERT INTO t1 SELECT 1, COUNT(*) FROM t2 ON DUPLICATE KEY UPDATE j= a; -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'UPDATE' DROP TABLE t1,t2; SET SQL_MODE = 'TRADITIONAL'; CREATE TABLE t1 (a INT PRIMARY KEY, b INT NOT NULL); diff --git a/mysql-test/main/invisible_field.result b/mysql-test/main/invisible_field.result index 7aa88e7787e..30f0564a34b 100644 --- a/mysql-test/main/invisible_field.result +++ b/mysql-test/main/invisible_field.result @@ -234,7 +234,7 @@ a d e f 1 d blob 3 1 1 d blob 41 1 select a,b,c,d,e,f from t2; -ERROR 42S22: Unknown column 'b' in 'field list' +ERROR 42S22: Unknown column 'b' in 'SELECT' drop table t2; #now this will copy invisible fields create table t2 as select a,b,c,d,e,f from t1; @@ -310,7 +310,7 @@ a d e f 1 d blob 41 1 #v does not have invisible column; select a,b,c,d,e,f from v; -ERROR 42S22: Unknown column 'b' in 'field list' +ERROR 42S22: Unknown column 'b' in 'SELECT' insert into v values(1,21,32,4); select * from v; a d e f @@ -321,7 +321,7 @@ a d e f 1 d blob 41 1 1 21 32 4 insert into v(a,b,c,d,e,f) values(1,12,3,4,5,6); -ERROR 42S22: Unknown column 'b' in 'field list' +ERROR 42S22: Unknown column 'b' in 'INSERT INTO' drop view v; create view v as select a,b,c,d,e,f from t1; desc v; diff --git a/mysql-test/main/invisible_field_debug.result b/mysql-test/main/invisible_field_debug.result index 344a0b860fc..882b7404ea8 100644 --- a/mysql-test/main/invisible_field_debug.result +++ b/mysql-test/main/invisible_field_debug.result @@ -16,16 +16,16 @@ select a , invisible from t1; a invisible 1 9 insert into t1(a, invisible) values(99,99); -ERROR 42S22: Unknown column 'invisible' in 'field list' +ERROR 42S22: Unknown column 'invisible' in 'INSERT INTO' select default(invisible) from t1; -ERROR 42S22: Unknown column 'invisible' in 'field list' +ERROR 42S22: Unknown column 'invisible' in 'SELECT' insert into t1(invisible) values(99); -ERROR 42S22: Unknown column 'invisible' in 'field list' +ERROR 42S22: Unknown column 'invisible' in 'INSERT INTO' insert into t_tmp select a, invisible from t1; insert into t1 select * from t_tmp; ERROR 21S01: Column count doesn't match value count at row 1 insert into t1(a,invisible) select * from t_tmp; -ERROR 42S22: Unknown column 'invisible' in 'field list' +ERROR 42S22: Unknown column 'invisible' in 'INSERT INTO' select a , invisible from t1; a invisible 1 9 @@ -45,22 +45,22 @@ select a , invisible from t1; a invisible 109 9 update t1 set invisible = 23 where a=(select a from t1 limit 1); -ERROR 42S22: Unknown column 'invisible' in 'field list' +ERROR 42S22: Unknown column 'invisible' in 'SET' update t1 set invisible = 101 where a=(select a from t1 limit 1); -ERROR 42S22: Unknown column 'invisible' in 'field list' +ERROR 42S22: Unknown column 'invisible' in 'SET' update t1 set invisible = (select invisible+100 from t1 limit 1) where a=(select invisible from t1 limit 1); -ERROR 42S22: Unknown column 'invisible' in 'field list' +ERROR 42S22: Unknown column 'invisible' in 'SET' select a , invisible from t1; a invisible 109 9 set @a=12; update t1 set invisible = (select @a from dual) where a=(select a from t1 limit 1); -ERROR 42S22: Unknown column 'invisible' in 'field list' +ERROR 42S22: Unknown column 'invisible' in 'SET' select a , invisible from t1; a invisible 109 9 update t1 set invisible = (select invisible+100 from t1 limit 1) where a=(select a from t1 limit 1); -ERROR 42S22: Unknown column 'invisible' in 'field list' +ERROR 42S22: Unknown column 'invisible' in 'SET' select a , invisible from t1; a invisible 109 9 @@ -100,7 +100,7 @@ select * from t1; a 1 select invisible ,a from t1; -ERROR 42S22: Unknown column 'invisible' in 'field list' +ERROR 42S22: Unknown column 'invisible' in 'SELECT' set debug_dbug= "+d,test_completely_invisible"; select invisible ,a from t1; invisible a @@ -108,9 +108,9 @@ invisible a set debug_dbug=@old_debug; create table t2 (invisible int); select * from t1 join t2 using (invisible); -ERROR 42S22: Unknown column 'invisible' in 'from clause' +ERROR 42S22: Unknown column 'invisible' in 'FROM' select * from t2 join t1 using (invisible); -ERROR 42S22: Unknown column 'invisible' in 'from clause' +ERROR 42S22: Unknown column 'invisible' in 'FROM' insert t2 values (8),(9); select * from t1 natural join t2; a invisible diff --git a/mysql-test/main/invisible_field_grant_completely.result b/mysql-test/main/invisible_field_grant_completely.result index b1b313072b2..520d608ef71 100644 --- a/mysql-test/main/invisible_field_grant_completely.result +++ b/mysql-test/main/invisible_field_grant_completely.result @@ -40,7 +40,7 @@ a 2 3 select invisible,a from t1; -ERROR 42S22: Unknown column 'invisible' in 'field list' +ERROR 42S22: Unknown column 'invisible' in 'SELECT' delete from t1 where a =1; update t1 set a=1 where a=3; select * from t1; diff --git a/mysql-test/main/join.result b/mysql-test/main/join.result index 9f843a7e722..44be0bcd9f8 100644 --- a/mysql-test/main/join.result +++ b/mysql-test/main/join.result @@ -727,31 +727,31 @@ b c a c b y 1 10 2 3 1 2 1 3 2 3 1 2 select * from t1 natural join (t3 cross join t4); -ERROR 23000: Column 'c' in from clause is ambiguous +ERROR 23000: Column 'c' in FROM is ambiguous select * from (t3 cross join t4) natural join t1; -ERROR 23000: Column 'c' in from clause is ambiguous +ERROR 23000: Column 'c' in FROM is ambiguous select * from t1 join (t2, t3) using (b); -ERROR 23000: Column 'b' in from clause is ambiguous +ERROR 23000: Column 'b' in FROM is ambiguous select * from ((t1 natural join t2), (t3 natural join t4)) natural join t6; -ERROR 23000: Column 'c' in from clause is ambiguous +ERROR 23000: Column 'c' in FROM is ambiguous select * from ((t1 natural join t2), (t3 natural join t4)) natural join t6; -ERROR 23000: Column 'c' in from clause is ambiguous +ERROR 23000: Column 'c' in FROM is ambiguous select * from t6 natural join ((t1 natural join t2), (t3 natural join t4)); -ERROR 23000: Column 'c' in from clause is ambiguous +ERROR 23000: Column 'c' in FROM is ambiguous select * from (t1 join t2 on t1.b=t2.b) natural join (t3 natural join t4); -ERROR 23000: Column 'b' in from clause is ambiguous +ERROR 23000: Column 'b' in FROM is ambiguous select * from (t3 natural join t4) natural join (t1 join t2 on t1.b=t2.b); -ERROR 23000: Column 'b' in from clause is ambiguous +ERROR 23000: Column 'b' in FROM is ambiguous select * from (t3 join (t4 natural join t5) on (b < z)) natural join (t1 natural join t2); -ERROR 23000: Column 'c' in from clause is ambiguous +ERROR 23000: Column 'c' in FROM is ambiguous select * from (t1 natural join t2) natural join (t3 join (t4 natural join t5) on (b < z)); -ERROR 23000: Column 'c' in from clause is ambiguous +ERROR 23000: Column 'c' in FROM is ambiguous select t1.b from v1a; -ERROR 42S22: Unknown column 't1.b' in 'field list' +ERROR 42S22: Unknown column 't1.b' in 'SELECT' select * from v1a join v1b on t1.b = t2.b; -ERROR 42S22: Unknown column 't1.b' in 'on clause' +ERROR 42S22: Unknown column 't1.b' in 'ON' select statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statistics.TABLE_SCHEMA, statistics.NON_UNIQUE, statistics.INDEX_SCHEMA, statistics.INDEX_NAME, statistics.SEQ_IN_INDEX, statistics.COLLATION, statistics.SUB_PART, statistics.PACKED, statistics.NULLABLE, statistics.INDEX_TYPE, statistics.COMMENT, columns.TABLE_CATALOG, columns.TABLE_SCHEMA, columns.COLUMN_DEFAULT, columns.IS_NULLABLE, columns.DATA_TYPE, columns.CHARACTER_MAXIMUM_LENGTH, columns.CHARACTER_OCTET_LENGTH, columns.NUMERIC_PRECISION, columns.NUMERIC_SCALE, columns.CHARACTER_SET_NAME, columns.COLLATION_NAME, columns.COLUMN_TYPE, columns.COLUMN_KEY, columns.EXTRA, columns.COLUMN_COMMENT @@ -1519,12 +1519,12 @@ SET optimizer_switch=@save_optimizer_switch; CREATE TABLE t (i INT); CREATE PROCEDURE p() SELECT t1.f FROM t AS t1 JOIN t AS t2 USING (f); CALL p; -ERROR 42S22: Unknown column 'f' in 'from clause' +ERROR 42S22: Unknown column 'f' in 'FROM' CALL p; -ERROR 42S22: Unknown column 'f' in 'from clause' +ERROR 42S22: Unknown column 'f' in 'FROM' FLUSH TABLES; CALL p; -ERROR 42S22: Unknown column 'f' in 'from clause' +ERROR 42S22: Unknown column 'f' in 'FROM' DROP TABLE t; CREATE TABLE t (f INT); CALL p; @@ -1532,9 +1532,9 @@ f DROP TABLE t; CREATE TABLE t (i INT); CALL p; -ERROR 42S22: Unknown column 't1.f' in 'field list' +ERROR 42S22: Unknown column 't1.f' in 'SELECT' CALL p; -ERROR 42S22: Unknown column 't1.f' in 'field list' +ERROR 42S22: Unknown column 't1.f' in 'SELECT' DROP PROCEDURE p; DROP TABLE t; CREATE TABLE t1 (a INT, b INT); @@ -1545,9 +1545,9 @@ CREATE TABLE t5 (a INT, c INT); CREATE PROCEDURE p1() SELECT c FROM t1 JOIN (t2 LEFT JOIN t3 USING (a) LEFT JOIN t4 USING (a) LEFT JOIN t5 USING (a)) USING (a); CALL p1; -ERROR 23000: Column 'c' in field list is ambiguous +ERROR 23000: Column 'c' in SELECT is ambiguous CALL p1; -ERROR 23000: Column 'c' in field list is ambiguous +ERROR 23000: Column 'c' in SELECT is ambiguous DROP PROCEDURE p1; DROP TABLE t1,t2,t3,t4,t5; # diff --git a/mysql-test/main/join_nested.result b/mysql-test/main/join_nested.result index 4db15f2f5a8..74a395b7271 100644 --- a/mysql-test/main/join_nested.result +++ b/mysql-test/main/join_nested.result @@ -1401,19 +1401,19 @@ SELECT e FROM t5 NATURAL JOIN t6; SELECT t1.a FROM t1 JOIN t2 ON a=b JOIN t3 ON a=c JOIN t4 USING(d); a SELECT t1.x FROM t1 JOIN t2 ON a=b JOIN t3 ON a=c JOIN t4 USING(d); -ERROR 42S22: Unknown column 't1.x' in 'field list' +ERROR 42S22: Unknown column 't1.x' in 'SELECT' SELECT t1.a FROM t1 JOIN t2 ON a=b JOIN t3 ON a=c NATURAL JOIN t4; a SELECT t1.x FROM t1 JOIN t2 ON a=b JOIN t3 ON a=c NATURAL JOIN t4; -ERROR 42S22: Unknown column 't1.x' in 'field list' +ERROR 42S22: Unknown column 't1.x' in 'SELECT' SELECT v1.e FROM v1 JOIN t2 ON e=b JOIN t3 ON e=c JOIN t4 USING(d); e SELECT v1.x FROM v1 JOIN t2 ON e=b JOIN t3 ON e=c JOIN t4 USING(d); -ERROR 42S22: Unknown column 'v1.x' in 'field list' +ERROR 42S22: Unknown column 'v1.x' in 'SELECT' SELECT v2.e FROM v2 JOIN t2 ON e=b JOIN t3 ON e=c JOIN t4 USING(d); e SELECT v2.x FROM v2 JOIN t2 ON e=b JOIN t3 ON e=c JOIN t4 USING(d); -ERROR 42S22: Unknown column 'v2.x' in 'field list' +ERROR 42S22: Unknown column 'v2.x' in 'SELECT' DROP VIEW v1, v2; DROP TABLE t1, t2, t3, t4, t5, t6; create table t1 (id1 int(11) not null); @@ -1628,13 +1628,13 @@ LEFT JOIN t5 USING (a)) USING (a); b SELECT c FROM t1 JOIN (t2 LEFT JOIN t3 USING (a) LEFT JOIN t4 USING (a) LEFT JOIN t5 USING (a)) USING (a); -ERROR 23000: Column 'c' in field list is ambiguous +ERROR 23000: Column 'c' in SELECT is ambiguous SELECT b FROM t1 JOIN (t2 JOIN t3 USING (a) JOIN t4 USING (a) JOIN t5 USING (a)) USING (a); b SELECT c FROM t1 JOIN (t2 JOIN t3 USING (a) JOIN t4 USING (a) JOIN t5 USING (a)) USING (a); -ERROR 23000: Column 'c' in field list is ambiguous +ERROR 23000: Column 'c' in SELECT is ambiguous DROP TABLE t1,t2,t3,t4,t5; CREATE TABLE t1 (a INT, b INT); CREATE TABLE t2 (a INT, b INT); @@ -1643,7 +1643,7 @@ INSERT INTO t1 VALUES (1,1); INSERT INTO t2 VALUES (1,1); INSERT INTO t3 VALUES (1,1); SELECT * FROM t1 JOIN (t2 JOIN t3 USING (b)) USING (a); -ERROR 23000: Column 'a' in from clause is ambiguous +ERROR 23000: Column 'a' in FROM is ambiguous DROP TABLE t1,t2,t3; CREATE TABLE t1 ( carrier char(2) default NULL, diff --git a/mysql-test/main/join_nested_jcl6.result b/mysql-test/main/join_nested_jcl6.result index 26081382368..3223eb5203f 100644 --- a/mysql-test/main/join_nested_jcl6.result +++ b/mysql-test/main/join_nested_jcl6.result @@ -1410,19 +1410,19 @@ SELECT e FROM t5 NATURAL JOIN t6; SELECT t1.a FROM t1 JOIN t2 ON a=b JOIN t3 ON a=c JOIN t4 USING(d); a SELECT t1.x FROM t1 JOIN t2 ON a=b JOIN t3 ON a=c JOIN t4 USING(d); -ERROR 42S22: Unknown column 't1.x' in 'field list' +ERROR 42S22: Unknown column 't1.x' in 'SELECT' SELECT t1.a FROM t1 JOIN t2 ON a=b JOIN t3 ON a=c NATURAL JOIN t4; a SELECT t1.x FROM t1 JOIN t2 ON a=b JOIN t3 ON a=c NATURAL JOIN t4; -ERROR 42S22: Unknown column 't1.x' in 'field list' +ERROR 42S22: Unknown column 't1.x' in 'SELECT' SELECT v1.e FROM v1 JOIN t2 ON e=b JOIN t3 ON e=c JOIN t4 USING(d); e SELECT v1.x FROM v1 JOIN t2 ON e=b JOIN t3 ON e=c JOIN t4 USING(d); -ERROR 42S22: Unknown column 'v1.x' in 'field list' +ERROR 42S22: Unknown column 'v1.x' in 'SELECT' SELECT v2.e FROM v2 JOIN t2 ON e=b JOIN t3 ON e=c JOIN t4 USING(d); e SELECT v2.x FROM v2 JOIN t2 ON e=b JOIN t3 ON e=c JOIN t4 USING(d); -ERROR 42S22: Unknown column 'v2.x' in 'field list' +ERROR 42S22: Unknown column 'v2.x' in 'SELECT' DROP VIEW v1, v2; DROP TABLE t1, t2, t3, t4, t5, t6; create table t1 (id1 int(11) not null); @@ -1637,13 +1637,13 @@ LEFT JOIN t5 USING (a)) USING (a); b SELECT c FROM t1 JOIN (t2 LEFT JOIN t3 USING (a) LEFT JOIN t4 USING (a) LEFT JOIN t5 USING (a)) USING (a); -ERROR 23000: Column 'c' in field list is ambiguous +ERROR 23000: Column 'c' in SELECT is ambiguous SELECT b FROM t1 JOIN (t2 JOIN t3 USING (a) JOIN t4 USING (a) JOIN t5 USING (a)) USING (a); b SELECT c FROM t1 JOIN (t2 JOIN t3 USING (a) JOIN t4 USING (a) JOIN t5 USING (a)) USING (a); -ERROR 23000: Column 'c' in field list is ambiguous +ERROR 23000: Column 'c' in SELECT is ambiguous DROP TABLE t1,t2,t3,t4,t5; CREATE TABLE t1 (a INT, b INT); CREATE TABLE t2 (a INT, b INT); @@ -1652,7 +1652,7 @@ INSERT INTO t1 VALUES (1,1); INSERT INTO t2 VALUES (1,1); INSERT INTO t3 VALUES (1,1); SELECT * FROM t1 JOIN (t2 JOIN t3 USING (b)) USING (a); -ERROR 23000: Column 'a' in from clause is ambiguous +ERROR 23000: Column 'a' in FROM is ambiguous DROP TABLE t1,t2,t3; CREATE TABLE t1 ( carrier char(2) default NULL, diff --git a/mysql-test/main/join_outer.result b/mysql-test/main/join_outer.result index 9722211fadf..03793cd81c5 100644 --- a/mysql-test/main/join_outer.result +++ b/mysql-test/main/join_outer.result @@ -110,11 +110,11 @@ grp a c id a c d a 3 6 D 3 6 C 6 6 NULL NULL NULL NULL NULL NULL NULL explain select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a); -ERROR 42S22: Unknown column 't3.a' in 'on clause' +ERROR 42S22: Unknown column 't3.a' in 'ON' select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a); -ERROR 42S22: Unknown column 't3.a' in 'on clause' +ERROR 42S22: Unknown column 't3.a' in 'ON' select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t2.a=t3.a); -ERROR 42S22: Unknown column 't3.a' in 'on clause' +ERROR 42S22: Unknown column 't3.a' in 'ON' select t1.*,t2.* from t1 inner join t2 using (a); grp a c id a c d 1 1 a 1 1 a 1 @@ -404,7 +404,7 @@ insert into t3 values (1); insert into t4 values (1,1); insert into t5 values (1,1); explain select * from t3 left join t4 on t4.seq_1_id = t2.t2_id left join t1 on t1.t1_id = t4.seq_0_id left join t5 on t5.seq_0_id = t1.t1_id left join t2 on t2.t2_id = t5.seq_1_id where t3.t3_id = 23; -ERROR 42S22: Unknown column 't2.t2_id' in 'on clause' +ERROR 42S22: Unknown column 't2.t2_id' in 'ON' drop table t1,t2,t3,t4,t5; create table t1 (n int, m int, o int, key(n)); create table t2 (n int not null, m int, o int, primary key(n)); @@ -2703,7 +2703,7 @@ join t3 on (t3.f=t1.a) ) on (t2.c=t1.a ); -ERROR 42S22: Unknown column 't1.a' in 'on clause' +ERROR 42S22: Unknown column 't1.a' in 'ON' explain select * from @@ -2713,7 +2713,7 @@ join t3 on (t3.f=(select max(g) from t4 where t4.h=t1.a)) ) on (t2.c=t1.a ); -ERROR 42S22: Unknown column 't1.a' in 'where clause' +ERROR 42S22: Unknown column 't1.a' in 'WHERE' drop table t1,t2,t3,t4; create table t1 (a int); insert into t1 values (1),(2); @@ -2724,7 +2724,7 @@ insert into t3 values (1),(2); select * from ( select * from t1 left join t2 on b in (select x from t3 as sq1) ) as sq2; -ERROR 42S22: Unknown column 'x' in 'field list' +ERROR 42S22: Unknown column 'x' in 'SELECT' drop table t1,t2,t3; # end of 10.2 tests # diff --git a/mysql-test/main/join_outer_jcl6.result b/mysql-test/main/join_outer_jcl6.result index 26865a72d47..e11434c2ea7 100644 --- a/mysql-test/main/join_outer_jcl6.result +++ b/mysql-test/main/join_outer_jcl6.result @@ -117,11 +117,11 @@ grp a c id a c d a 3 6 D 3 6 C 6 6 NULL NULL NULL NULL NULL NULL NULL explain select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a); -ERROR 42S22: Unknown column 't3.a' in 'on clause' +ERROR 42S22: Unknown column 't3.a' in 'ON' select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a); -ERROR 42S22: Unknown column 't3.a' in 'on clause' +ERROR 42S22: Unknown column 't3.a' in 'ON' select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t2.a=t3.a); -ERROR 42S22: Unknown column 't3.a' in 'on clause' +ERROR 42S22: Unknown column 't3.a' in 'ON' select t1.*,t2.* from t1 inner join t2 using (a); grp a c id a c d 1 1 a 1 1 a 1 @@ -411,7 +411,7 @@ insert into t3 values (1); insert into t4 values (1,1); insert into t5 values (1,1); explain select * from t3 left join t4 on t4.seq_1_id = t2.t2_id left join t1 on t1.t1_id = t4.seq_0_id left join t5 on t5.seq_0_id = t1.t1_id left join t2 on t2.t2_id = t5.seq_1_id where t3.t3_id = 23; -ERROR 42S22: Unknown column 't2.t2_id' in 'on clause' +ERROR 42S22: Unknown column 't2.t2_id' in 'ON' drop table t1,t2,t3,t4,t5; create table t1 (n int, m int, o int, key(n)); create table t2 (n int not null, m int, o int, primary key(n)); @@ -2710,7 +2710,7 @@ join t3 on (t3.f=t1.a) ) on (t2.c=t1.a ); -ERROR 42S22: Unknown column 't1.a' in 'on clause' +ERROR 42S22: Unknown column 't1.a' in 'ON' explain select * from @@ -2720,7 +2720,7 @@ join t3 on (t3.f=(select max(g) from t4 where t4.h=t1.a)) ) on (t2.c=t1.a ); -ERROR 42S22: Unknown column 't1.a' in 'where clause' +ERROR 42S22: Unknown column 't1.a' in 'WHERE' drop table t1,t2,t3,t4; create table t1 (a int); insert into t1 values (1),(2); @@ -2731,7 +2731,7 @@ insert into t3 values (1),(2); select * from ( select * from t1 left join t2 on b in (select x from t3 as sq1) ) as sq2; -ERROR 42S22: Unknown column 'x' in 'field list' +ERROR 42S22: Unknown column 'x' in 'SELECT' drop table t1,t2,t3; # end of 10.2 tests # diff --git a/mysql-test/main/keywords.result b/mysql-test/main/keywords.result index 4e246e38299..8f4ba9bb03c 100644 --- a/mysql-test/main/keywords.result +++ b/mysql-test/main/keywords.result @@ -579,62 +579,62 @@ SELECT test.year(); -- FUNCTION test.year does not exist. Check SELECT test.create(); -- FUNCTION test.create does not exist. Che CALL p2('SELECT $(VAR) FROM t1'); -------- -SELECT non_keyword FROM t1; -- Unknown column 'non_keyword' in 'field l +SELECT non_keyword FROM t1; -- Unknown column 'non_keyword' in 'SELECT' -------- -SELECT lpad FROM t1; -- Unknown column 'lpad' in 'field list' +SELECT lpad FROM t1; -- Unknown column 'lpad' in 'SELECT' -------- -SELECT rpad FROM t1; -- Unknown column 'rpad' in 'field list' +SELECT rpad FROM t1; -- Unknown column 'rpad' in 'SELECT' -------- -SELECT adddate FROM t1; -- Unknown column 'adddate' in 'field list' +SELECT adddate FROM t1; -- Unknown column 'adddate' in 'SELECT' -------- -SELECT substr FROM t1; -- Unknown column 'substr' in 'field list' +SELECT substr FROM t1; -- Unknown column 'substr' in 'SELECT' -------- -SELECT substring FROM t1; -- Unknown column 'substring' in 'field lis +SELECT substring FROM t1; -- Unknown column 'substring' in 'SELECT' -------- -SELECT trim_oracle FROM t1; -- Unknown column 'trim_oracle' in 'field l +SELECT trim_oracle FROM t1; -- Unknown column 'trim_oracle' in 'SELECT' -------- -SELECT ascii FROM t1; -- Unknown column 'ascii' in 'field list' +SELECT ascii FROM t1; -- Unknown column 'ascii' in 'SELECT' -------- SELECT replace FROM t1; -- ..syntax.. near 'FROM t1' at line 1 -------- -SELECT weight_string FROM t1; -- Unknown column 'weight_string' in 'field +SELECT weight_string FROM t1; -- Unknown column 'weight_string' in 'SELEC -------- SELECT char FROM t1; -- ..syntax.. near 'FROM t1' at line 1 -------- -SELECT trim FROM t1; -- Unknown column 'trim' in 'field list' +SELECT trim FROM t1; -- Unknown column 'trim' in 'SELECT' -------- -SELECT year FROM t1; -- Unknown column 'year' in 'field list' +SELECT year FROM t1; -- Unknown column 'year' in 'SELECT' -------- SELECT create FROM t1; -- ..syntax.. near 'create FROM t1' at line CALL p2('SELECT t1.$(VAR) FROM t1'); -------- -SELECT t1.non_keyword FROM t1; -- Unknown column 't1.non_keyword' in 'fiel +SELECT t1.non_keyword FROM t1; -- Unknown column 't1.non_keyword' in 'SELE -------- -SELECT t1.lpad FROM t1; -- Unknown column 't1.lpad' in 'field list' +SELECT t1.lpad FROM t1; -- Unknown column 't1.lpad' in 'SELECT' -------- -SELECT t1.rpad FROM t1; -- Unknown column 't1.rpad' in 'field list' +SELECT t1.rpad FROM t1; -- Unknown column 't1.rpad' in 'SELECT' -------- -SELECT t1.adddate FROM t1; -- Unknown column 't1.adddate' in 'field li +SELECT t1.adddate FROM t1; -- Unknown column 't1.adddate' in 'SELECT' -------- -SELECT t1.substr FROM t1; -- Unknown column 't1.substr' in 'field lis +SELECT t1.substr FROM t1; -- Unknown column 't1.substr' in 'SELECT' -------- -SELECT t1.substring FROM t1; -- Unknown column 't1.substring' in 'field +SELECT t1.substring FROM t1; -- Unknown column 't1.substring' in 'SELECT -------- -SELECT t1.trim_oracle FROM t1; -- Unknown column 't1.trim_oracle' in 'fiel +SELECT t1.trim_oracle FROM t1; -- Unknown column 't1.trim_oracle' in 'SELE -------- -SELECT t1.ascii FROM t1; -- Unknown column 't1.ascii' in 'field list +SELECT t1.ascii FROM t1; -- Unknown column 't1.ascii' in 'SELECT' -------- -SELECT t1.replace FROM t1; -- Unknown column 't1.replace' in 'field li +SELECT t1.replace FROM t1; -- Unknown column 't1.replace' in 'SELECT' -------- -SELECT t1.weight_string FROM t1; -- Unknown column 't1.weight_string' in 'fi +SELECT t1.weight_string FROM t1; -- Unknown column 't1.weight_string' in 'SE -------- -SELECT t1.char FROM t1; -- Unknown column 't1.char' in 'field list' +SELECT t1.char FROM t1; -- Unknown column 't1.char' in 'SELECT' -------- -SELECT t1.trim FROM t1; -- Unknown column 't1.trim' in 'field list' +SELECT t1.trim FROM t1; -- Unknown column 't1.trim' in 'SELECT' -------- -SELECT t1.year FROM t1; -- Unknown column 't1.year' in 'field list' +SELECT t1.year FROM t1; -- Unknown column 't1.year' in 'SELECT' -------- -SELECT t1.create FROM t1; -- Unknown column 't1.create' in 'field lis +SELECT t1.create FROM t1; -- Unknown column 't1.create' in 'SELECT' CALL p2('DROP TABLE $(VAR)'); -------- DROP TABLE non_keyword; -- Unknown table 'test.non_keyword' diff --git a/mysql-test/main/kill.result b/mysql-test/main/kill.result index 797052710e8..0f14698ef3d 100644 --- a/mysql-test/main/kill.result +++ b/mysql-test/main/kill.result @@ -184,4 +184,4 @@ DROP TABLE t1, t2; # KILL QUERY ID USER # kill query id user 'foo'; -ERROR 42S22: Unknown column 'user' in 'field list' +ERROR 42S22: Unknown column 'user' in 'KILL' diff --git a/mysql-test/main/locale.result b/mysql-test/main/locale.result index 3e632aaead5..22987f1ddc8 100644 --- a/mysql-test/main/locale.result +++ b/mysql-test/main/locale.result @@ -311,7 +311,7 @@ date_format('2001-09-01', '%c %b %M', 'de_CH') # SET lc_messages=ZH_CN; SELECT x; -ERROR 42S22: 未知列'x'在'field list' +ERROR 42S22: 未知列'x'在'SELECT' SET lc_messages=DEFAULT; # # End of 10.4 tests diff --git a/mysql-test/main/long_unique.result b/mysql-test/main/long_unique.result index 7f8110a283e..81af999f07f 100644 --- a/mysql-test/main/long_unique.result +++ b/mysql-test/main/long_unique.result @@ -81,7 +81,7 @@ NULL maria sachin select db_row_hash_1 from t1; -ERROR 42S22: Unknown column 'db_row_hash_1' in 'field list' +ERROR 42S22: Unknown column 'db_row_hash_1' in 'SELECT' #duplicate entry test; insert into t1 values(2); ERROR 23000: Duplicate entry '2' for key 'a' @@ -154,7 +154,7 @@ ERROR 23000: Duplicate entry '1' for key 'a' insert into t1 values(2,2); ERROR 23000: Duplicate entry '2' for key 'a' select db_row_hash_1 from t1; -ERROR 42S22: Unknown column 'db_row_hash_1' in 'field list' +ERROR 42S22: Unknown column 'db_row_hash_1' in 'SELECT' #now try to change db_row_hash_1 column; alter table t1 drop column db_row_hash_1; ERROR 42000: Can't DROP COLUMN `db_row_hash_1`; check that it exists @@ -405,11 +405,11 @@ a b c d e maria 345 frter dasd utyuty sachin 341 fdf gfgfgfg hghgr select db_row_hash_1 from t1; -ERROR 42S22: Unknown column 'db_row_hash_1' in 'field list' +ERROR 42S22: Unknown column 'db_row_hash_1' in 'SELECT' select db_row_hash_2 from t1; -ERROR 42S22: Unknown column 'db_row_hash_2' in 'field list' +ERROR 42S22: Unknown column 'db_row_hash_2' in 'SELECT' select db_row_hash_3 from t1; -ERROR 42S22: Unknown column 'db_row_hash_3' in 'field list' +ERROR 42S22: Unknown column 'db_row_hash_3' in 'SELECT' #duplicate entry test; insert into t1 values(21,2,3,42,51); ERROR 23000: Duplicate entry '3' for key 'c' @@ -462,7 +462,7 @@ t1 CREATE TABLE `t1` ( insert into t1 values(1,2,3,4,5,6); ERROR 23000: Duplicate entry '1' for key 'a' select db_row_hash_1 , db_row_hash_2, db_row_hash_3 from t1; -ERROR 42S22: Unknown column 'db_row_hash_1' in 'field list' +ERROR 42S22: Unknown column 'db_row_hash_1' in 'SELECT' #now try to change db_row_hash_1 column; alter table t1 drop column db_row_hash_1, drop column db_row_hash_2, drop column db_row_hash_3; ERROR 42000: Can't DROP COLUMN `db_row_hash_1`; check that it exists @@ -786,11 +786,11 @@ NULL NULL NULL NULL NULL NULL NULL NULL maria 6 maria maria maria maria 6 maria mariadb 7 mariadb mariadb mariadb mariadb 8 mariadb select db_row_hash_1 from t1; -ERROR 42S22: Unknown column 'db_row_hash_1' in 'field list' +ERROR 42S22: Unknown column 'db_row_hash_1' in 'SELECT' select db_row_hash_2 from t1; -ERROR 42S22: Unknown column 'db_row_hash_2' in 'field list' +ERROR 42S22: Unknown column 'db_row_hash_2' in 'SELECT' select db_row_hash_3 from t1; -ERROR 42S22: Unknown column 'db_row_hash_3' in 'field list' +ERROR 42S22: Unknown column 'db_row_hash_3' in 'SELECT' #duplicate entry test; #duplicate keys entry; insert into t1 values(1,1,1,0,0,0,0,0); @@ -806,7 +806,7 @@ ERROR 23000: Duplicate entry '1-1-1-1' for key 'e' insert into t1 values(1,1,1,1,1,1,1,1); ERROR 23000: Duplicate entry '1-1-1' for key 'a' select db_row_hash_1,db_row_hash_2,db_row_hash_3,db_row_hash_4,db_row_hash_5 from t1; -ERROR 42S22: Unknown column 'db_row_hash_1' in 'field list' +ERROR 42S22: Unknown column 'db_row_hash_1' in 'SELECT' alter table t1 drop column db_row_hash_1, drop column db_row_hash_2, drop column db_row_hash_3; ERROR 42000: Can't DROP COLUMN `db_row_hash_1`; check that it exists alter table t1 add column dg int , add column ef int , drop column db_row_hash_1; @@ -1170,7 +1170,7 @@ DB_ROW_HASH_1 DB_ROW_HASH_2 33 3 44 4 select DB_ROW_HASH_1, DB_ROW_HASH_2 from t1; -ERROR 42S22: Unknown column 'DB_ROW_HASH_1' in 'field list' +ERROR 42S22: Unknown column 'DB_ROW_HASH_1' in 'SELECT' #bug select DB_ROW_HASH_1, DB_ROW_HASH_2 from t1,t2; DB_ROW_HASH_1 DB_ROW_HASH_2 @@ -1191,7 +1191,7 @@ DB_ROW_HASH_1 DB_ROW_HASH_2 44 4 44 4 select * from t1 where DB_ROW_HASH_1 in (select DB_ROW_HASH_1 from t2); -ERROR 42S22: Unknown column 'DB_ROW_HASH_1' in 'IN/ALL/ANY subquery' +ERROR 42S22: Unknown column 'DB_ROW_HASH_1' in 'IN/ALL/ANY' select DB_ROW_HASH_1, DB_ROW_HASH_2 from t1,t2 where DB_ROW_HASH_1 in (select DB_ROW_HASH_1 from t2); DB_ROW_HASH_1 DB_ROW_HASH_2 11 1 @@ -1217,7 +1217,7 @@ DB_ROW_HASH_1 DB_ROW_HASH_2 33 3 44 4 select DB_ROW_HASH_1 from t1,t2 where t1.DB_ROW_HASH_1 = t2.DB_ROW_HASH_2; -ERROR 42S22: Unknown column 't1.DB_ROW_HASH_1' in 'where clause' +ERROR 42S22: Unknown column 't1.DB_ROW_HASH_1' in 'WHERE' select DB_ROW_HASH_1 from t1 inner join t2 on t1.a = t2.DB_ROW_HASH_2; DB_ROW_HASH_1 11 diff --git a/mysql-test/main/mdev6830.result b/mysql-test/main/mdev6830.result index 0048aa174bc..e0e181334e0 100644 --- a/mysql-test/main/mdev6830.result +++ b/mysql-test/main/mdev6830.result @@ -42,7 +42,7 @@ CREATE TABLE t4 (f1 VARCHAR(10), f2 INT) ENGINE=MyISAM; SELECT * FROM t1; pk SELECT non_existing FROM v2; -ERROR 42S22: Unknown column 'non_existing' in 'field list' +ERROR 42S22: Unknown column 'non_existing' in 'SELECT' SELECT * FROM t1, v3, t4 WHERE v3.f1 = t4.f1 AND t4.f2 = 6 AND t1.pk = v3.f5; pk f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f1 f2 drop table t1,t2,t3,t4; diff --git a/mysql-test/main/multi_update.result b/mysql-test/main/multi_update.result index 222c592cbce..b13cc8b73ca 100644 --- a/mysql-test/main/multi_update.result +++ b/mysql-test/main/multi_update.result @@ -993,19 +993,19 @@ create view v2 as select * from t2; create view v3 as select * from t2 where c0 < 3; create procedure sp0() update t1, v2 set v2.pk = 1 where v2.c0 = t1.c1; call sp0(); -ERROR 42S22: Unknown column 't1.c1' in 'where clause' +ERROR 42S22: Unknown column 't1.c1' in 'WHERE' call sp0(); -ERROR 42S22: Unknown column 't1.c1' in 'where clause' +ERROR 42S22: Unknown column 't1.c1' in 'WHERE' create procedure sp1() update (t1 join v2 on v2.c0 = t1.c1) set v2.pk = 1; call sp1(); -ERROR 42S22: Unknown column 't1.c1' in 'on clause' +ERROR 42S22: Unknown column 't1.c1' in 'ON' call sp1(); -ERROR 42S22: Unknown column 't1.c1' in 'on clause' +ERROR 42S22: Unknown column 't1.c1' in 'ON' create procedure sp2() update (t1 join v3 on v3.c0 = t1.c1) set v3.pk = 1; call sp2(); -ERROR 42S22: Unknown column 't1.c1' in 'on clause' +ERROR 42S22: Unknown column 't1.c1' in 'ON' call sp2(); -ERROR 42S22: Unknown column 't1.c1' in 'on clause' +ERROR 42S22: Unknown column 't1.c1' in 'ON' create procedure sp3() update (t1 join v2 on v2.c0 = t1.id) set v2.c0 = v2.c0+1; select * from t2; @@ -1024,9 +1024,9 @@ pk c0 2 3 create procedure sp4() delete t1 from t1 join v2 on v2.c0 = t1.c1; call sp4(); -ERROR 42S22: Unknown column 't1.c1' in 'on clause' +ERROR 42S22: Unknown column 't1.c1' in 'ON' call sp4(); -ERROR 42S22: Unknown column 't1.c1' in 'on clause' +ERROR 42S22: Unknown column 't1.c1' in 'ON' drop procedure sp0; drop procedure sp1; drop procedure sp2; diff --git a/mysql-test/main/myisam_explain_non_select_all.result b/mysql-test/main/myisam_explain_non_select_all.result index e28c2a0fec3..193c58a9787 100644 --- a/mysql-test/main/myisam_explain_non_select_all.result +++ b/mysql-test/main/myisam_explain_non_select_all.result @@ -2927,16 +2927,16 @@ DROP TABLE t1; CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1), (2), (3); DELETE FROM t1 USING t1 WHERE uknown_column = 12345; -ERROR 42S22: Unknown column 'uknown_column' in 'where clause' +ERROR 42S22: Unknown column 'uknown_column' in 'WHERE' EXPLAIN EXTENDED DELETE FROM t1 USING t1 WHERE uknown_column = 12345; -ERROR 42S22: Unknown column 'uknown_column' in 'where clause' +ERROR 42S22: Unknown column 'uknown_column' in 'WHERE' DROP TABLE t1; #57 CREATE TABLE t1(f1 INT); EXPLAIN EXTENDED UPDATE t1 SET f2=1 ORDER BY f2; -ERROR 42S22: Unknown column 'f2' in 'order clause' +ERROR 42S22: Unknown column 'f2' in 'ORDER BY' UPDATE t1 SET f2=1 ORDER BY f2; -ERROR 42S22: Unknown column 'f2' in 'order clause' +ERROR 42S22: Unknown column 'f2' in 'ORDER BY' DROP TABLE t1; #62 CREATE TABLE t1 (a INT); diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result index 8850e9564e0..2735c196166 100644 --- a/mysql-test/main/mysqldump.result +++ b/mysql-test/main/mysqldump.result @@ -67,7 +67,7 @@ SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ANSI_QUOTES'; INSERT INTO t1 VALUES (1.2345, 2.3456); INSERT INTO t1 VALUES ('1.2345', 2.3456); INSERT INTO t1 VALUES ("1.2345", 2.3456); -ERROR 42S22: Unknown column '1.2345' in 'field list' +ERROR 42S22: Unknown column '1.2345' in 'VALUES' SET SQL_MODE=@OLD_SQL_MODE; /*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; diff --git a/mysql-test/main/mysqldump_restore.result b/mysql-test/main/mysqldump_restore.result index cc4a5cd5965..315da72ddf9 100644 --- a/mysql-test/main/mysqldump_restore.result +++ b/mysql-test/main/mysqldump_restore.result @@ -34,7 +34,7 @@ SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ANSI_QUOTES'; INSERT INTO t1 VALUES (1.2345, 2.3456); INSERT INTO t1 VALUES ('1.2345', 2.3456); INSERT INTO t1 VALUES ("1.2345", 2.3456); -ERROR 42S22: Unknown column '1.2345' in 'field list' +ERROR 42S22: Unknown column '1.2345' in 'VALUES' SET SQL_MODE=@OLD_SQL_MODE; # Begin testing mysqldump output + restore # Create 'original table name - _orig diff --git a/mysql-test/main/mysqltest.result b/mysql-test/main/mysqltest.result index 73f2c8851f9..478ef82ca1f 100644 --- a/mysql-test/main/mysqltest.result +++ b/mysql-test/main/mysqltest.result @@ -8,9 +8,9 @@ select otto from (select 1 as otto) as t1; otto 1 select friedrich from (select 1 as otto) as t1; -mysqltest: At line 1: query 'select friedrich from (select 1 as otto) as t1' failed: ER_BAD_FIELD_ERROR (1054): Unknown column 'friedrich' in 'field list' +mysqltest: At line 1: query 'select friedrich from (select 1 as otto) as t1' failed: ER_BAD_FIELD_ERROR (1054): Unknown column 'friedrich' in 'SELECT' select friedrich from (select 1 as otto) as t1; -ERROR 42S22: Unknown column 'friedrich' in 'field list' +ERROR 42S22: Unknown column 'friedrich' in 'SELECT' select otto from (select 1 as otto) as t1; otto 1 @@ -18,9 +18,9 @@ select otto from (select 1 as otto) as t1; mysqltest: At line 1: query 'select otto from (select 1 as otto) as t1' succeeded - should have failed with sqlstate 42S22... mysqltest: At line 1: expecting a SQL-state (00000) from query 'remove_file MYSQLTEST_VARDIR/tmp/test_nonexistent.tmp' which cannot produce one... select friedrich from (select 1 as otto) as t1; -ERROR 42S22: Unknown column 'friedrich' in 'field list' +ERROR 42S22: Unknown column 'friedrich' in 'SELECT' select friedrich from (select 1 as otto) as t1; -mysqltest: At line 1: query 'select friedrich from (select 1 as otto) as t1' failed with wrong sqlstate 42S22: 'Unknown column 'friedrich' in 'field list'', instead of 00000... +mysqltest: At line 1: query 'select friedrich from (select 1 as otto) as t1' failed with wrong sqlstate 42S22: 'Unknown column 'friedrich' in 'SELECT'', instead of 00000... select otto from (select 1 as otto) as t1; otto 1 diff --git a/mysql-test/main/mysqltest_cont_on_error.result b/mysql-test/main/mysqltest_cont_on_error.result index 352799deb06..32c6bfce4b9 100644 --- a/mysql-test/main/mysqltest_cont_on_error.result +++ b/mysql-test/main/mysqltest_cont_on_error.result @@ -1,7 +1,7 @@ select error; -mysqltest: At line 1: query 'select error' failed: ER_BAD_FIELD_ERROR (1054): Unknown column 'error' in 'field list' +mysqltest: At line 1: query 'select error' failed: ER_BAD_FIELD_ERROR (1054): Unknown column 'error' in 'SELECT' SELECT ERROR; -mysqltest: At line 1: query 'SELECT ERROR' failed: ER_BAD_FIELD_ERROR (1054): Unknown column 'ERROR' in 'field list' +mysqltest: At line 1: query 'SELECT ERROR' failed: ER_BAD_FIELD_ERROR (1054): Unknown column 'ERROR' in 'SELECT' SELECT 2; 2 2 diff --git a/mysql-test/main/mysqltest_ps.result b/mysql-test/main/mysqltest_ps.result index 153098ff088..d6266964e3d 100644 --- a/mysql-test/main/mysqltest_ps.result +++ b/mysql-test/main/mysqltest_ps.result @@ -7,7 +7,7 @@ create table t (a int primary key, b blob default ''); select a, (2*a) AS a from t group by a; a a Warnings: -Warning 1052 Column 'a' in group statement is ambiguous +Warning 1052 Column 'a' in GROUP BY is ambiguous drop table t; select 1 + "2 a"; 1 + "2 a" @@ -18,8 +18,8 @@ create table t (a int primary key, b blob default ''); select a, (2*a) AS a from t group by a; a a Warnings: -Warning 1052 Column 'a' in group statement is ambiguous -Warning 1052 Column 'a' in group statement is ambiguous +Warning 1052 Column 'a' in GROUP BY is ambiguous +Warning 1052 Column 'a' in GROUP BY is ambiguous drop table t; select 1 + "2 a"; 1 + "2 a" @@ -30,5 +30,5 @@ create table t (a int primary key, b blob default ''); select a, (2*a) AS a from t group by a; a a Warnings: -Warning 1052 Column 'a' in group statement is ambiguous +Warning 1052 Column 'a' in GROUP BY is ambiguous drop table t; diff --git a/mysql-test/main/named_pipe.result b/mysql-test/main/named_pipe.result index 2baa3471ec9..06315d21a9d 100644 --- a/mysql-test/main/named_pipe.result +++ b/mysql-test/main/named_pipe.result @@ -2156,7 +2156,7 @@ SELECT ELT(FIELD(kundentyp,'PP','PPA','PG','PGA','FK','FKA','FP','FPA','K','KA', Kundentyp kategorie Privat (Private Nutzung) Mobilfunk Warnings: -Warning 1052 Column 'kundentyp' in group statement is ambiguous +Warning 1052 Column 'kundentyp' in GROUP BY is ambiguous drop table t1; connection default; disconnect pipe_con; diff --git a/mysql-test/main/order_by.result b/mysql-test/main/order_by.result index 0d80f2325b6..3f52f276001 100644 --- a/mysql-test/main/order_by.result +++ b/mysql-test/main/order_by.result @@ -796,18 +796,18 @@ col1 col t2_col 2 2 2 3 3 1 select col1 as col, col from t1 order by col; -ERROR 23000: Column 'col' in order clause is ambiguous +ERROR 23000: Column 'col' in ORDER BY is ambiguous select t1.col as c1, t2.col as c2 from t1, t2 where t1.col1=t2.col2 order by col; -ERROR 23000: Column 'col' in order clause is ambiguous +ERROR 23000: Column 'col' in ORDER BY is ambiguous select t1.col as c1, t2.col as c2 from t1, t2 where t1.col1=t2.col2 order by col; -ERROR 23000: Column 'col' in order clause is ambiguous +ERROR 23000: Column 'col' in ORDER BY is ambiguous select col1 from t1, t2 where t1.col1=t2.col2 order by col; -ERROR 23000: Column 'col' in order clause is ambiguous +ERROR 23000: Column 'col' in ORDER BY is ambiguous select t1.col as t1_col, t2.col2 from t1, t2 where t1.col1=t2.col2 order by col; -ERROR 23000: Column 'col' in order clause is ambiguous +ERROR 23000: Column 'col' in ORDER BY is ambiguous select t1.col as t1_col, t2.col from t1, t2 where t1.col1=t2.col2 order by col; t1_col col @@ -958,45 +958,45 @@ num 2 3 SELECT a + 1 AS num, num + 1 FROM t1; -ERROR 42S22: Unknown column 'num' in 'field list' +ERROR 42S22: Unknown column 'num' in 'SELECT' SELECT a + 1 AS num, (select num + 2 FROM t1 LIMIT 1) FROM t1; num (select num + 2 FROM t1 LIMIT 1) 2 4 3 5 SELECT a.a + 1 AS num FROM t1 a JOIN t1 b ON num = b.a; -ERROR 42S22: Unknown column 'num' in 'on clause' +ERROR 42S22: Unknown column 'num' in 'ON' DROP TABLE t1; CREATE TABLE bug25126 ( val int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY ); UPDATE bug25126 SET MissingCol = MissingCol; -ERROR 42S22: Unknown column 'MissingCol' in 'field list' +ERROR 42S22: Unknown column 'MissingCol' in 'SET' UPDATE bug25126 SET val = val ORDER BY MissingCol; -ERROR 42S22: Unknown column 'MissingCol' in 'order clause' +ERROR 42S22: Unknown column 'MissingCol' in 'ORDER BY' UPDATE bug25126 SET val = val ORDER BY val; UPDATE bug25126 SET val = 1 ORDER BY val; UPDATE bug25126 SET val = 1 ORDER BY MissingCol; -ERROR 42S22: Unknown column 'MissingCol' in 'order clause' +ERROR 42S22: Unknown column 'MissingCol' in 'ORDER BY' UPDATE bug25126 SET val = 1 ORDER BY val, MissingCol; -ERROR 42S22: Unknown column 'MissingCol' in 'order clause' +ERROR 42S22: Unknown column 'MissingCol' in 'ORDER BY' UPDATE bug25126 SET val = MissingCol ORDER BY MissingCol; -ERROR 42S22: Unknown column 'MissingCol' in 'order clause' +ERROR 42S22: Unknown column 'MissingCol' in 'ORDER BY' UPDATE bug25126 SET MissingCol = 1 ORDER BY val, MissingCol; -ERROR 42S22: Unknown column 'MissingCol' in 'order clause' +ERROR 42S22: Unknown column 'MissingCol' in 'ORDER BY' UPDATE bug25126 SET MissingCol = 1 ORDER BY MissingCol; -ERROR 42S22: Unknown column 'MissingCol' in 'order clause' +ERROR 42S22: Unknown column 'MissingCol' in 'ORDER BY' UPDATE bug25126 SET MissingCol = val ORDER BY MissingCol; -ERROR 42S22: Unknown column 'MissingCol' in 'order clause' +ERROR 42S22: Unknown column 'MissingCol' in 'ORDER BY' UPDATE bug25126 SET MissingCol = MissingCol ORDER BY MissingCol; -ERROR 42S22: Unknown column 'MissingCol' in 'order clause' +ERROR 42S22: Unknown column 'MissingCol' in 'ORDER BY' DROP TABLE bug25126; CREATE TABLE t1 (a int); SELECT p.a AS val, q.a AS val1 FROM t1 p, t1 q ORDER BY val > 1; val val1 SELECT p.a AS val, q.a AS val FROM t1 p, t1 q ORDER BY val; -ERROR 23000: Column 'val' in order clause is ambiguous +ERROR 23000: Column 'val' in ORDER BY is ambiguous SELECT p.a AS val, q.a AS val FROM t1 p, t1 q ORDER BY val > 1; -ERROR 23000: Column 'val' in order clause is ambiguous +ERROR 23000: Column 'val' in ORDER BY is ambiguous DROP TABLE t1; CREATE TABLE t1 (a int); INSERT INTO t1 VALUES (3), (2), (4), (1); diff --git a/mysql-test/main/parser.result b/mysql-test/main/parser.result index 1cdf89a2739..b52af23eb49 100644 --- a/mysql-test/main/parser.result +++ b/mysql-test/main/parser.result @@ -2231,11 +2231,11 @@ drop table t1; # MDEV-19682 sql_mode="oracle" does not support sysdate # SELECT sysdate LIKE '____-__-__ __:__:__'; -ERROR 42S22: Unknown column 'sysdate' in 'field list' +ERROR 42S22: Unknown column 'sysdate' in 'SELECT' SELECT sysdate = sysdate(); -ERROR 42S22: Unknown column 'sysdate' in 'field list' +ERROR 42S22: Unknown column 'sysdate' in 'SELECT' SELECT sysdate = sysdate(0); -ERROR 42S22: Unknown column 'sysdate' in 'field list' +ERROR 42S22: Unknown column 'sysdate' in 'SELECT' CREATE DATABASE sysdate; DROP DATABASE sysdate; CREATE TABLE sysdate (a INT); diff --git a/mysql-test/main/partition.result b/mysql-test/main/partition.result index 687c287bd34..a9a19cf7748 100644 --- a/mysql-test/main/partition.result +++ b/mysql-test/main/partition.result @@ -2018,7 +2018,7 @@ PARTITION BY RANGE (t2.b) ( PARTITION p1 VALUES LESS THAN (10), PARTITION p2 VALUES LESS THAN (20) ) select * from t2; -ERROR 42S22: Unknown column 't2.b' in 'partition function' +ERROR 42S22: Unknown column 't2.b' in 'PARTITION BY' create table t1 (a int) PARTITION BY RANGE (b) ( PARTITION p1 VALUES LESS THAN (10), diff --git a/mysql-test/main/partition_column.result b/mysql-test/main/partition_column.result index c3a2ce872ce..c3fcd05443e 100644 --- a/mysql-test/main/partition_column.result +++ b/mysql-test/main/partition_column.result @@ -572,7 +572,7 @@ create table t1 (a char(6)) partition by range columns(a) (partition p0 values less than (H23456), partition p1 values less than (M23456)); -ERROR 42S22: Unknown column 'H23456' in 'field list' +ERROR 42S22: Unknown column 'H23456' in 'PARTITION BY' create table t1 (a char(6)) partition by range columns(a) (partition p0 values less than (23456), diff --git a/mysql-test/main/partition_error.result b/mysql-test/main/partition_error.result index 350e8733220..ae41c28d8f8 100644 --- a/mysql-test/main/partition_error.result +++ b/mysql-test/main/partition_error.result @@ -934,7 +934,7 @@ partitions 3 (partition x1 tablespace ts1, partition x2 tablespace ts2, partition x3 tablespace ts3); -ERROR 42S22: Unknown column 'd' in 'partition function' +ERROR 42S22: Unknown column 'd' in 'PARTITION BY' CREATE TABLE t1 ( a int not null, b int not null, @@ -1156,7 +1156,7 @@ partition by range (a) subpartition by hash (a+d) (partition x1 values less than (1) (subpartition x11, subpartition x12), partition x2 values less than (2) (subpartition x21, subpartition x22)); -ERROR 42S22: Unknown column 'd' in 'partition function' +ERROR 42S22: Unknown column 'd' in 'PARTITION BY' CREATE TABLE t1 ( a int not null, b int not null, @@ -1176,7 +1176,7 @@ partition by range (a+d) partitions 2 (partition x1 values less than (4) tablespace ts1, partition x2 values less than (8) tablespace ts2); -ERROR 42S22: Unknown column 'd' in 'partition function' +ERROR 42S22: Unknown column 'd' in 'PARTITION BY' CREATE TABLE t1 ( a int not null, b int not null, @@ -1375,7 +1375,7 @@ partition by list (a+d) partitions 2 (partition x1 values in (4) tablespace ts1, partition x2 values in (8) tablespace ts2); -ERROR 42S22: Unknown column 'd' in 'partition function' +ERROR 42S22: Unknown column 'd' in 'PARTITION BY' CREATE TABLE t1 ( a int not null, b int not null, @@ -1440,7 +1440,7 @@ partition x2 values in (5))' at line 8 CREATE TABLE t1 (a int) PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (x1)); -ERROR 42S22: Unknown column 'x1' in 'partition function' +ERROR 42S22: Unknown column 'x1' in 'PARTITION BY' CREATE TABLE t1(a int) PARTITION BY RANGE (a) (PARTITION p1 VALUES LESS THAN(5)); insert into t1 values (10); diff --git a/mysql-test/main/partition_mgm_err.result b/mysql-test/main/partition_mgm_err.result index 2d523998985..6e8914fd13d 100644 --- a/mysql-test/main/partition_mgm_err.result +++ b/mysql-test/main/partition_mgm_err.result @@ -166,6 +166,6 @@ alter table t1 check partition all for upgrade; Table Op Msg_type Msg_text test.t1 check status OK alter table t1 order by nonexistent; -ERROR 42S22: Unknown column 'nonexistent' in 'order clause' +ERROR 42S22: Unknown column 'nonexistent' in 'ORDER BY' drop table t1; # End of 10.5 tests diff --git a/mysql-test/main/pool_of_threads.result b/mysql-test/main/pool_of_threads.result index 91ad7ab098f..ba74e74cb37 100644 --- a/mysql-test/main/pool_of_threads.result +++ b/mysql-test/main/pool_of_threads.result @@ -2156,7 +2156,7 @@ SELECT ELT(FIELD(kundentyp,'PP','PPA','PG','PGA','FK','FKA','FP','FPA','K','KA', Kundentyp kategorie Privat (Private Nutzung) Mobilfunk Warnings: -Warning 1052 Column 'kundentyp' in group statement is ambiguous +Warning 1052 Column 'kundentyp' in GROUP BY is ambiguous drop table t1; SET optimizer_switch=default; connection default; diff --git a/mysql-test/main/ps.result b/mysql-test/main/ps.result index 9f99d613539..775ada34653 100644 --- a/mysql-test/main/ps.result +++ b/mysql-test/main/ps.result @@ -1737,15 +1737,15 @@ create table t1 (id int primary key auto_increment, value varchar(10)); insert into t1 (id, value) values (1, 'FIRST'), (2, 'SECOND'), (3, 'THIRD'); prepare stmt from "insert into t1 (id, value) select * from (select 4 as i, 'FOURTH' as v) as y on duplicate key update v = 'DUP'"; execute stmt; -ERROR 42S22: Unknown column 'v' in 'field list' +ERROR 42S22: Unknown column 'v' in 'UPDATE' execute stmt; -ERROR 42S22: Unknown column 'v' in 'field list' +ERROR 42S22: Unknown column 'v' in 'UPDATE' deallocate prepare stmt; prepare stmt from "insert into t1 (id, value) select * from (select 4 as id, 'FOURTH' as value) as y on duplicate key update y.value = 'DUP'"; execute stmt; -ERROR 42S22: Unknown column 'y.value' in 'field list' +ERROR 42S22: Unknown column 'y.value' in 'UPDATE' execute stmt; -ERROR 42S22: Unknown column 'y.value' in 'field list' +ERROR 42S22: Unknown column 'y.value' in 'UPDATE' deallocate prepare stmt; drop tables t1; prepare stmt from "create table t1 select ?"; @@ -4933,9 +4933,9 @@ ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions PREPARE stmt FROM (SELECT 'SELECT 1'); ERROR 42000: PREPARE..FROM does not support subqueries or stored functions EXECUTE IMMEDIATE a; -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'EXECUTE IMMEDIATE' PREPARE stmt FROM a; -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'PREPARE..FROM' EXECUTE IMMEDIATE NULL; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NULL' at line 1 PREPARE stmt FROM NULL; @@ -4955,9 +4955,9 @@ ERROR 21000: Operand should contain 1 column(s) EXECUTE IMMEDIATE MAX('SELECT 1 AS c'); ERROR HY000: Invalid use of group function EXECUTE IMMEDIATE DEFAULT(a); -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'EXECUTE IMMEDIATE' EXECUTE IMMEDIATE VALUE(a); -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'EXECUTE IMMEDIATE' CREATE FUNCTION f1() RETURNS VARCHAR(64) RETURN 't1'; EXECUTE IMMEDIATE f1(); ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions diff --git a/mysql-test/main/ps_1general.result b/mysql-test/main/ps_1general.result index ca2447b6b26..cb53ae68823 100644 --- a/mysql-test/main/ps_1general.result +++ b/mysql-test/main/ps_1general.result @@ -91,11 +91,11 @@ prepare stmt1 from @arg01; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NULL' at line 1 prepare stmt1 from ' select * from t1 where a <= 2 ' ; prepare stmt1 from ' select * from t1 where x <= 2 ' ; -ERROR 42S22: Unknown column 'x' in 'where clause' +ERROR 42S22: Unknown column 'x' in 'WHERE' prepare stmt1 from ' insert into t1(a,x) values(?,?) ' ; -ERROR 42S22: Unknown column 'x' in 'field list' +ERROR 42S22: Unknown column 'x' in 'INSERT INTO' prepare stmt1 from ' insert into t1(x,a) values(?,?) ' ; -ERROR 42S22: Unknown column 'x' in 'field list' +ERROR 42S22: Unknown column 'x' in 'INSERT INTO' drop table if exists not_exist ; prepare stmt1 from ' select * from not_exist where a <= 2 ' ; ERROR 42S02: Table 'test.not_exist' doesn't exist diff --git a/mysql-test/main/ps_2myisam.result b/mysql-test/main/ps_2myisam.result index ec365498833..d6552d81cb9 100644 --- a/mysql-test/main/ps_2myisam.result +++ b/mysql-test/main/ps_2myisam.result @@ -440,7 +440,7 @@ a b 4 four set @arg00=0 ; execute stmt1 using @arg00; -ERROR 42S22: Unknown column '?' in 'order clause' +ERROR 42S22: Unknown column '?' in 'ORDER BY' set @arg00=1; prepare stmt1 from ' select a,b from t1 order by a limit 1 '; diff --git a/mysql-test/main/ps_3innodb.result b/mysql-test/main/ps_3innodb.result index 1c98a59cff5..320d767fecd 100644 --- a/mysql-test/main/ps_3innodb.result +++ b/mysql-test/main/ps_3innodb.result @@ -440,7 +440,7 @@ a b 4 four set @arg00=0 ; execute stmt1 using @arg00; -ERROR 42S22: Unknown column '?' in 'order clause' +ERROR 42S22: Unknown column '?' in 'ORDER BY' set @arg00=1; prepare stmt1 from ' select a,b from t1 order by a limit 1 '; diff --git a/mysql-test/main/ps_4heap.result b/mysql-test/main/ps_4heap.result index db182536e93..6c81e1cb0fd 100644 --- a/mysql-test/main/ps_4heap.result +++ b/mysql-test/main/ps_4heap.result @@ -441,7 +441,7 @@ a b 4 four set @arg00=0 ; execute stmt1 using @arg00; -ERROR 42S22: Unknown column '?' in 'order clause' +ERROR 42S22: Unknown column '?' in 'ORDER BY' set @arg00=1; prepare stmt1 from ' select a,b from t1 order by a limit 1 '; diff --git a/mysql-test/main/ps_5merge.result b/mysql-test/main/ps_5merge.result index 963a3a60359..16c68a3872d 100644 --- a/mysql-test/main/ps_5merge.result +++ b/mysql-test/main/ps_5merge.result @@ -484,7 +484,7 @@ a b 4 four set @arg00=0 ; execute stmt1 using @arg00; -ERROR 42S22: Unknown column '?' in 'order clause' +ERROR 42S22: Unknown column '?' in 'ORDER BY' set @arg00=1; prepare stmt1 from ' select a,b from t1 order by a limit 1 '; @@ -3852,7 +3852,7 @@ a b 4 four set @arg00=0 ; execute stmt1 using @arg00; -ERROR 42S22: Unknown column '?' in 'order clause' +ERROR 42S22: Unknown column '?' in 'ORDER BY' set @arg00=1; prepare stmt1 from ' select a,b from t1 order by a limit 1 '; diff --git a/mysql-test/main/ps_ddl1.result b/mysql-test/main/ps_ddl1.result index 5178ee64f16..16776325934 100644 --- a/mysql-test/main/ps_ddl1.result +++ b/mysql-test/main/ps_ddl1.result @@ -165,7 +165,7 @@ call p_verify_reprepare_count(1); SUCCESS execute stmt7; -ERROR 42S22: Unknown column 'b' in 'field list' +ERROR 42S22: Unknown column 'b' in 'INSERT INTO' call p_verify_reprepare_count(1); SUCCESS @@ -185,17 +185,17 @@ call p_verify_reprepare_count(1); SUCCESS execute stmt3; -ERROR 42S22: Unknown column 'b' in 'where clause' +ERROR 42S22: Unknown column 'b' in 'WHERE' call p_verify_reprepare_count(1); SUCCESS execute stmt2; -ERROR 42S22: Unknown column 'b' in 'field list' +ERROR 42S22: Unknown column 'b' in 'SELECT' call p_verify_reprepare_count(1); SUCCESS execute stmt1; -ERROR 42S22: Unknown column 'b' in 'field list' +ERROR 42S22: Unknown column 'b' in 'SELECT' call p_verify_reprepare_count(1); SUCCESS @@ -205,7 +205,7 @@ call p_verify_reprepare_count(1); ERROR Expected: 1, actual: 0 execute stmt7; -ERROR 42S22: Unknown column 'b' in 'field list' +ERROR 42S22: Unknown column 'b' in 'INSERT INTO' call p_verify_reprepare_count(1); SUCCESS @@ -225,17 +225,17 @@ call p_verify_reprepare_count(1); SUCCESS execute stmt3; -ERROR 42S22: Unknown column 'b' in 'where clause' +ERROR 42S22: Unknown column 'b' in 'WHERE' call p_verify_reprepare_count(1); SUCCESS execute stmt2; -ERROR 42S22: Unknown column 'b' in 'field list' +ERROR 42S22: Unknown column 'b' in 'SELECT' call p_verify_reprepare_count(1); SUCCESS execute stmt1; -ERROR 42S22: Unknown column 'b' in 'field list' +ERROR 42S22: Unknown column 'b' in 'SELECT' call p_verify_reprepare_count(1); SUCCESS diff --git a/mysql-test/main/query_cache_with_views.result b/mysql-test/main/query_cache_with_views.result index 8cb3d8cb297..9cefa0cc6c1 100644 --- a/mysql-test/main/query_cache_with_views.result +++ b/mysql-test/main/query_cache_with_views.result @@ -205,7 +205,7 @@ CREATE TABLE t2 LIKE t1; SET AUTOCOMMIT=OFF; CREATE VIEW t1_view AS SELECT c1 FROM t1 NATURAL JOIN t2 ; INSERT INTO t1_view (c1, c2) SELECT c1, c2 FROM t1; -ERROR 42S22: Unknown column 'c2' in 'field list' +ERROR 42S22: Unknown column 'c2' in 'INSERT INTO' DROP TABLE t1; DROP TABLE t2; DROP VIEW t1_view; diff --git a/mysql-test/main/replace_returning.result b/mysql-test/main/replace_returning.result index 1bc9bbd4cc5..fef7aaddaa3 100644 --- a/mysql-test/main/replace_returning.result +++ b/mysql-test/main/replace_returning.result @@ -175,7 +175,7 @@ REPLACE INTO t1 VALUES(1,'a'),(2,'b'),(3,'c'); # SIMLPE REPLACE STATEMENT # REPLACE INTO t2(id2,val2) VALUES(1,'a') RETURNING id1; -ERROR 42S22: Unknown column 'id1' in 'field list' +ERROR 42S22: Unknown column 'id1' in 'RETURNING' REPLACE INTO t2(id2,val2) values(2,'b') RETURNING SUM(id2); ERROR HY000: Invalid use of group function REPLACE INTO t2(id2,val2) VALUES(3,'c') RETURNING (SELECT id1 FROM t1); @@ -197,7 +197,7 @@ ERROR 42S02: Unknown table 'test.t1' # Multiple rows in single insert statement # REPLACE INTO t2 VALUES(1,'a'),(2,'b') RETURNING id1; -ERROR 42S22: Unknown column 'id1' in 'field list' +ERROR 42S22: Unknown column 'id1' in 'RETURNING' REPLACE INTO t2 VALUES(3,'c'),(4,'d') RETURNING MAX(id2); ERROR HY000: Invalid use of group function REPLACE INTO t2 VALUES(5,'c'),(6,'f') RETURNING (SELECT id1 FROM t1); @@ -220,7 +220,7 @@ ERROR 42S02: Unknown table 'test.t1' # REPLACE ... SET # REPLACE INTO t2 SET id2=1, val2='a' RETURNING id1; -ERROR 42S22: Unknown column 'id1' in 'field list' +ERROR 42S22: Unknown column 'id1' in 'RETURNING' REPLACE INTO t2 SET id2=2, val2='b' RETURNING COUNT(id2); ERROR HY000: Invalid use of group function REPLACE INTO t2 SET id2=3, val2='c' RETURNING (SELECT id1 FROM t1); @@ -242,7 +242,7 @@ ERROR 42S02: Unknown table 'test.t1' # REPLACE...SELECT # REPLACE INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=1 RETURNING id1; -ERROR 42S22: Unknown column 'id1' in 'field list' +ERROR 42S22: Unknown column 'id1' in 'RETURNING' REPLACE INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING MAX(id2); ERROR HY000: Invalid use of group function REPLACE INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING (SELECT diff --git a/mysql-test/main/replace_returning_err.result b/mysql-test/main/replace_returning_err.result index 04ccdb6c5a5..dd9d309d336 100644 --- a/mysql-test/main/replace_returning_err.result +++ b/mysql-test/main/replace_returning_err.result @@ -5,7 +5,7 @@ INSERT INTO t1 VALUES(1, 'a'), (2, 'b'), (3, 'c'); # SIMLPE REPLACE STATEMENT # REPLACE INTO t2(id2, val2) VALUES(1, 'a') RETURNING id1; -ERROR 42S22: Unknown column 'id1' in 'field list' +ERROR 42S22: Unknown column 'id1' in 'RETURNING' REPLACE INTO t2(id2, val2) values(2, 'b') RETURNING SUM(id2); ERROR HY000: Invalid use of group function REPLACE INTO t2(id2, val2) VALUES(3, 'c') RETURNING(SELECT id1 FROM t1); @@ -20,7 +20,7 @@ ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as # Multiple rows in single replace statement # REPLACE INTO t2 VALUES(1, 'a'), (2, 'b') RETURNING id1; -ERROR 42S22: Unknown column 'id1' in 'field list' +ERROR 42S22: Unknown column 'id1' in 'RETURNING' REPLACE INTO t2 VALUES(3, 'c'), (4, 'd') RETURNING MAX(id2); ERROR HY000: Invalid use of group function REPLACE INTO t2 VALUES(5, 'c'), (6, 'f') RETURNING(SELECT id1 FROM t1); @@ -35,7 +35,7 @@ ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as # REPLACE ... SET # REPLACE INTO t2 SET id2 = 1, val2 = 'a' RETURNING id1; -ERROR 42S22: Unknown column 'id1' in 'field list' +ERROR 42S22: Unknown column 'id1' in 'RETURNING' REPLACE INTO t2 SET id2 = 2, val2 = 'b' RETURNING COUNT(id2); ERROR HY000: Invalid use of group function REPLACE INTO t2 SET id2 = 3, val2 = 'c' RETURNING(SELECT id1 FROM t1); @@ -50,7 +50,7 @@ ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as # REPLACE...SELECT # REPLACE INTO t2(id2, val2) SELECT* FROM t1 WHERE id1 = 1 RETURNING id1; -ERROR 42S22: Unknown column 'id1' in 'field list' +ERROR 42S22: Unknown column 'id1' in 'RETURNING' REPLACE INTO t2(id2, val2) SELECT* FROM t1 WHERE id1 = 2 RETURNING MAX(id2); ERROR HY000: Invalid use of group function REPLACE INTO t2(id2, val2) SELECT* FROM t1 WHERE id1 = 2 RETURNING(SELECT id1 diff --git a/mysql-test/main/select.result b/mysql-test/main/select.result index 18602caacc1..cfa31f50718 100644 --- a/mysql-test/main/select.result +++ b/mysql-test/main/select.result @@ -2098,7 +2098,7 @@ DO benchmark(100,1+1),1,1; do default; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 do foobar; -ERROR 42S22: Unknown column 'foobar' in 'field list' +ERROR 42S22: Unknown column 'foobar' in 'DO' CREATE TABLE t1 ( id mediumint(8) unsigned NOT NULL auto_increment, pseudo varchar(35) NOT NULL default '', @@ -3090,13 +3090,13 @@ INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t2 VALUES (2); INSERT INTO t3 VALUES (3); SELECT t1.id,t3.id FROM t1 JOIN t2 ON (t2.id=t1.id) LEFT JOIN t3 USING (id); -ERROR 23000: Column 'id' in from clause is ambiguous +ERROR 23000: Column 'id' in FROM is ambiguous SELECT t1.id,t3.id FROM t1 JOIN t2 ON (t2.notacolumn=t1.id) LEFT JOIN t3 USING (id); -ERROR 23000: Column 'id' in from clause is ambiguous +ERROR 23000: Column 'id' in FROM is ambiguous SELECT id,t3.id FROM t1 JOIN t2 ON (t2.id=t1.id) LEFT JOIN t3 USING (id); -ERROR 23000: Column 'id' in from clause is ambiguous +ERROR 23000: Column 'id' in FROM is ambiguous SELECT id,t3.id FROM (t1 JOIN t2 ON (t2.id=t1.id)) LEFT JOIN t3 USING (id); -ERROR 23000: Column 'id' in from clause is ambiguous +ERROR 23000: Column 'id' in FROM is ambiguous drop table t1, t2, t3; create table t1 (a int(10),b int(10)); create table t2 (a int(10),b int(10)); @@ -3121,7 +3121,7 @@ select * from t1 join t2 join t3 on (t2.b = t3.b and t1.a = t3.a); a c b b a 1 1 1 1 1 select * from t1, t2 join t3 on (t2.b = t3.b and t1.a = t3.a); -ERROR 42S22: Unknown column 't1.a' in 'on clause' +ERROR 42S22: Unknown column 't1.a' in 'ON' select * from t1 join t2 join t3 join t4 on (t1.a = t4.c and t2.b = t4.c); a c b b a c 1 1 1 1 1 1 @@ -5597,7 +5597,7 @@ drop table t1; CREATE TABLE t1 (a INT, b INT); INSERT INTO t1 VALUES (1,10),(2,20); SELECT b, GROUP_CONCAT(b ORDER BY 2), MIN(a) AS f FROM t1 GROUP BY b ORDER BY f; -ERROR 42S22: Unknown column '2' in 'order clause' +ERROR 42S22: Unknown column '2' in 'ORDER BY' DROP TABLE t1; # # Bug MDEV-24560 SIGSEGV in st_join_table::cleanup + server and client diff --git a/mysql-test/main/select_jcl6.result b/mysql-test/main/select_jcl6.result index 4ec370c08ed..cf8f4f26ae0 100644 --- a/mysql-test/main/select_jcl6.result +++ b/mysql-test/main/select_jcl6.result @@ -2109,7 +2109,7 @@ DO benchmark(100,1+1),1,1; do default; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 do foobar; -ERROR 42S22: Unknown column 'foobar' in 'field list' +ERROR 42S22: Unknown column 'foobar' in 'DO' CREATE TABLE t1 ( id mediumint(8) unsigned NOT NULL auto_increment, pseudo varchar(35) NOT NULL default '', @@ -3101,13 +3101,13 @@ INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t2 VALUES (2); INSERT INTO t3 VALUES (3); SELECT t1.id,t3.id FROM t1 JOIN t2 ON (t2.id=t1.id) LEFT JOIN t3 USING (id); -ERROR 23000: Column 'id' in from clause is ambiguous +ERROR 23000: Column 'id' in FROM is ambiguous SELECT t1.id,t3.id FROM t1 JOIN t2 ON (t2.notacolumn=t1.id) LEFT JOIN t3 USING (id); -ERROR 23000: Column 'id' in from clause is ambiguous +ERROR 23000: Column 'id' in FROM is ambiguous SELECT id,t3.id FROM t1 JOIN t2 ON (t2.id=t1.id) LEFT JOIN t3 USING (id); -ERROR 23000: Column 'id' in from clause is ambiguous +ERROR 23000: Column 'id' in FROM is ambiguous SELECT id,t3.id FROM (t1 JOIN t2 ON (t2.id=t1.id)) LEFT JOIN t3 USING (id); -ERROR 23000: Column 'id' in from clause is ambiguous +ERROR 23000: Column 'id' in FROM is ambiguous drop table t1, t2, t3; create table t1 (a int(10),b int(10)); create table t2 (a int(10),b int(10)); @@ -3132,7 +3132,7 @@ select * from t1 join t2 join t3 on (t2.b = t3.b and t1.a = t3.a); a c b b a 1 1 1 1 1 select * from t1, t2 join t3 on (t2.b = t3.b and t1.a = t3.a); -ERROR 42S22: Unknown column 't1.a' in 'on clause' +ERROR 42S22: Unknown column 't1.a' in 'ON' select * from t1 join t2 join t3 join t4 on (t1.a = t4.c and t2.b = t4.c); a c b b a c 1 1 1 1 1 1 @@ -5608,7 +5608,7 @@ drop table t1; CREATE TABLE t1 (a INT, b INT); INSERT INTO t1 VALUES (1,10),(2,20); SELECT b, GROUP_CONCAT(b ORDER BY 2), MIN(a) AS f FROM t1 GROUP BY b ORDER BY f; -ERROR 42S22: Unknown column '2' in 'order clause' +ERROR 42S22: Unknown column '2' in 'ORDER BY' DROP TABLE t1; # # Bug MDEV-24560 SIGSEGV in st_join_table::cleanup + server and client diff --git a/mysql-test/main/select_pkeycache.result b/mysql-test/main/select_pkeycache.result index 18602caacc1..cfa31f50718 100644 --- a/mysql-test/main/select_pkeycache.result +++ b/mysql-test/main/select_pkeycache.result @@ -2098,7 +2098,7 @@ DO benchmark(100,1+1),1,1; do default; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 do foobar; -ERROR 42S22: Unknown column 'foobar' in 'field list' +ERROR 42S22: Unknown column 'foobar' in 'DO' CREATE TABLE t1 ( id mediumint(8) unsigned NOT NULL auto_increment, pseudo varchar(35) NOT NULL default '', @@ -3090,13 +3090,13 @@ INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t2 VALUES (2); INSERT INTO t3 VALUES (3); SELECT t1.id,t3.id FROM t1 JOIN t2 ON (t2.id=t1.id) LEFT JOIN t3 USING (id); -ERROR 23000: Column 'id' in from clause is ambiguous +ERROR 23000: Column 'id' in FROM is ambiguous SELECT t1.id,t3.id FROM t1 JOIN t2 ON (t2.notacolumn=t1.id) LEFT JOIN t3 USING (id); -ERROR 23000: Column 'id' in from clause is ambiguous +ERROR 23000: Column 'id' in FROM is ambiguous SELECT id,t3.id FROM t1 JOIN t2 ON (t2.id=t1.id) LEFT JOIN t3 USING (id); -ERROR 23000: Column 'id' in from clause is ambiguous +ERROR 23000: Column 'id' in FROM is ambiguous SELECT id,t3.id FROM (t1 JOIN t2 ON (t2.id=t1.id)) LEFT JOIN t3 USING (id); -ERROR 23000: Column 'id' in from clause is ambiguous +ERROR 23000: Column 'id' in FROM is ambiguous drop table t1, t2, t3; create table t1 (a int(10),b int(10)); create table t2 (a int(10),b int(10)); @@ -3121,7 +3121,7 @@ select * from t1 join t2 join t3 on (t2.b = t3.b and t1.a = t3.a); a c b b a 1 1 1 1 1 select * from t1, t2 join t3 on (t2.b = t3.b and t1.a = t3.a); -ERROR 42S22: Unknown column 't1.a' in 'on clause' +ERROR 42S22: Unknown column 't1.a' in 'ON' select * from t1 join t2 join t3 join t4 on (t1.a = t4.c and t2.b = t4.c); a c b b a c 1 1 1 1 1 1 @@ -5597,7 +5597,7 @@ drop table t1; CREATE TABLE t1 (a INT, b INT); INSERT INTO t1 VALUES (1,10),(2,20); SELECT b, GROUP_CONCAT(b ORDER BY 2), MIN(a) AS f FROM t1 GROUP BY b ORDER BY f; -ERROR 42S22: Unknown column '2' in 'order clause' +ERROR 42S22: Unknown column '2' in 'ORDER BY' DROP TABLE t1; # # Bug MDEV-24560 SIGSEGV in st_join_table::cleanup + server and client diff --git a/mysql-test/main/sp-dynamic.result b/mysql-test/main/sp-dynamic.result index ad11763b523..c4f6f8cb0f9 100644 --- a/mysql-test/main/sp-dynamic.result +++ b/mysql-test/main/sp-dynamic.result @@ -228,9 +228,9 @@ prepare stmt from "select 'dynamic sql:', @a, a"; execute stmt; end| call p1()| -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'SELECT' call p1()| -ERROR 42S22: Unknown column 'a' in 'field list' +ERROR 42S22: Unknown column 'a' in 'SELECT' set sql_mode= DEFAULT| drop procedure p1| create procedure p1() diff --git a/mysql-test/main/sp-error.result b/mysql-test/main/sp-error.result index 3832d63c073..f6f2c95f714 100644 --- a/mysql-test/main/sp-error.result +++ b/mysql-test/main/sp-error.result @@ -1,4 +1,3 @@ -drop table if exists t1, t2; SELECT * FROM mysql.proc INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/proc.txt'; Warnings: Warning 1287 ' INTO FROM...' instead @@ -9,7 +8,6 @@ create procedure syntaxerror(t int)| ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 create procedure syntaxerror(t int)| ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 -drop table if exists t3| create table t3 ( x int )| insert into t3 values (2), (3)| create procedure bad_into(out param int) @@ -166,7 +164,6 @@ open cc; close c; end| ERROR 42000: Undefined CURSOR: cc -drop table if exists t1| create table t1 (val int)| create procedure p() begin @@ -191,7 +188,6 @@ drop procedure p| alter procedure bar3 sql security invoker| ERROR 42000: PROCEDURE test.bar3 does not exist drop table t1| -drop table if exists t1| create table t1 (val int, x float)| insert into t1 values (42, 3.1), (19, 1.2)| create procedure p() @@ -276,7 +272,6 @@ declare continue handler for sqlstate '42S99' set x = 1; declare c cursor for select * from t1; end| ERROR 42000: Cursor declaration after handler declaration -drop procedure if exists p| create procedure p(in x int, inout y int, out z int) begin set y = x+y; @@ -307,7 +302,6 @@ lock tables t1 read, mysql.proc read| unlock tables| lock tables mysql.proc write| unlock tables| -drop function if exists f1| create function f1(i int) returns int begin insert into t1 (val) values (i); @@ -344,16 +338,15 @@ open c; close c; end| call bug1965()| -ERROR 42S22: Unknown column 'valname' in 'order clause' +ERROR 42S22: Unknown column 'valname' in 'ORDER BY' drop procedure bug1965| select 1 into a| ERROR 42000: Undeclared variable: a -drop table if exists t3| create table t3 (column_1_0 int)| create procedure bug1653() update t3 set column_1 = 0| call bug1653()| -ERROR 42S22: Unknown column 'column_1' in 'field list' +ERROR 42S22: Unknown column 'column_1' in 'SET' drop table t3| create table t3 (column_1 int)| call bug1653()| @@ -375,7 +368,7 @@ update t1 set v = 42; end| insert into t1 values (666, 51.3)| call bug2272()| -ERROR 42S22: Unknown column 'v' in 'field list' +ERROR 42S22: Unknown column 'v' in 'SET' truncate table t1| drop procedure bug2272| create procedure bug2329_1() @@ -389,9 +382,9 @@ declare v int; replace t1 set v = 5; end| call bug2329_1()| -ERROR 42S22: Unknown column 'v' in 'field list' +ERROR 42S22: Unknown column 'v' in 'INSERT INTO' call bug2329_2()| -ERROR 42S22: Unknown column 'v' in 'field list' +ERROR 42S22: Unknown column 'v' in 'INSERT INTO' drop procedure bug2329_1| drop procedure bug2329_2| create function bug3287() returns int @@ -415,7 +408,6 @@ end case| call bug3287(2)| ERROR 20000: Case not found for CASE statement drop procedure bug3287| -drop table if exists t3| create table t3 (s1 int, primary key (s1))| insert into t3 values (5),(6)| create procedure bug3279(out y int) @@ -457,7 +449,6 @@ create procedure bug4344() drop procedure bug4344| ERROR HY000: Can't drop or alter a PROCEDURE from within another stored routine create procedure bug4344() drop function bug4344| ERROR HY000: Can't drop or alter a FUNCTION from within another stored routine -drop procedure if exists bug3294| create procedure bug3294() begin declare continue handler for sqlexception drop table t5; @@ -468,10 +459,6 @@ create table t5 (x int)| call bug3294()| ERROR 42S02: Unknown table 'test.t5' drop procedure bug3294| -drop procedure if exists bug8776_1| -drop procedure if exists bug8776_2| -drop procedure if exists bug8776_3| -drop procedure if exists bug8776_4| create procedure bug8776_1() begin declare continue handler for sqlstate '42S0200test' begin end; @@ -505,7 +492,6 @@ ERROR 0A000: LOCK is not allowed in stored procedures create procedure bug6600() unlock table t1| ERROR 0A000: UNLOCK is not allowed in stored procedures -drop procedure if exists bug9566| create procedure bug9566() begin select * from t1; @@ -515,7 +501,6 @@ alter procedure bug9566 comment 'Some comment'| ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction unlock tables| drop procedure bug9566| -drop procedure if exists bug7299| create procedure bug7299() begin declare v int; @@ -556,7 +541,6 @@ declare exit handler for condname1 select 1; declare exit handler for sqlstate '42000' select 2; end| ERROR 42000: Duplicate handler declared in the same block -drop procedure if exists bug9073| create procedure bug9073() begin declare condname1 condition for sqlstate '42000'; @@ -597,8 +581,6 @@ select b; return b; end| ERROR 0A000: Not allowed to return a result set from a function -drop function if exists bug8408_f| -drop procedure if exists bug8408_p| create function bug8408_f() returns int begin call bug8408_p(); @@ -626,11 +608,9 @@ val x bug8408() 7 7 3 drop function bug8408| truncate table t1| -drop procedure if exists bug10537| create procedure bug10537() load data local infile '/tmp/somefile' into table t1| ERROR 0A000: LOAD DATA is not allowed in stored procedures -drop function if exists bug8409| create function bug8409() returns int begin @@ -681,7 +661,6 @@ create procedure bug9529_9012345678901234567890123456789012345678901234567890123 begin end| ERROR 42000: Identifier name 'bug9529_901234567890123456789012345678901234567890123456789012345' is too long -drop procedure if exists bug17015_0123456789012345678901234567890123456789012345678901234| create procedure bug17015_0123456789012345678901234567890123456789012345678901234() begin end| @@ -689,7 +668,6 @@ show procedure status like 'bug17015%'| Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation test bug17015_0123456789012345678901234567890123456789012345678901234 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER latin1 latin1_swedish_ci latin1_swedish_ci drop procedure bug17015_0123456789012345678901234567890123456789012345678901234| -drop procedure if exists bug10969| create procedure bug10969() begin declare s1 int default 0; @@ -733,10 +711,6 @@ TEMP_SUM ERROR 24000: Cursor is not open drop procedure SP001; drop table t1, t2; -drop function if exists bug11394| -drop function if exists bug11394_1| -drop function if exists bug11394_2| -drop procedure if exists bug11394| create function bug11394(i int) returns int begin if i <= 0 then @@ -784,8 +758,6 @@ CREATE TABLE t_bug_12490(a int); CREATE TRIGGER BUG_12490 BEFORE UPDATE ON t_bug_12490 FOR EACH ROW HELP CONTENTS; ERROR 0A000: HELP is not allowed in stored procedures DROP TABLE t_bug_12490; -drop function if exists bug11834_1; -drop function if exists bug11834_2; create function bug11834_1() returns int return 10; create function bug11834_2() returns int return bug11834_1(); prepare stmt from "select bug11834_2()"; @@ -800,14 +772,12 @@ execute stmt; ERROR 42000: FUNCTION test.bug11834_1 does not exist deallocate prepare stmt; drop function bug11834_2; -DROP FUNCTION IF EXISTS bug12953| CREATE FUNCTION bug12953() RETURNS INT BEGIN OPTIMIZE TABLE t1; RETURN 1; END| ERROR 0A000: Not allowed to return a result set from a function -DROP FUNCTION IF EXISTS bug12995| CREATE FUNCTION bug12995() RETURNS INT BEGIN HANDLER t1 OPEN; @@ -828,8 +798,6 @@ END| ERROR 0A000: HANDLER is not allowed in stored procedures SELECT bug12995()| ERROR 42000: FUNCTION test.bug12995 does not exist -drop procedure if exists bug12712; -drop function if exists bug12712; create procedure bug12712() set session autocommit = 0; select @@autocommit; @@ -875,10 +843,6 @@ ERROR HY000: Not allowed to set autocommit from a stored function or trigger create trigger bug12712 before insert on t1 for each row set session autocommit = 0; ERROR HY000: Not allowed to set autocommit from a stored function or trigger -drop procedure if exists bug13510_1| -drop procedure if exists bug13510_2| -drop procedure if exists bug13510_3| -drop procedure if exists bug13510_4| create procedure bug13510_1() begin declare password varchar(10); @@ -915,7 +879,6 @@ names foo4 drop procedure bug13510_3| drop procedure bug13510_4| -drop function if exists bug_13627_f| CREATE TABLE t1 (a int)| CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN DROP TRIGGER test1; END | ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger @@ -1058,9 +1021,6 @@ select count(*) into param1 from t3; end| ERROR 3D000: No database selected use test; -DROP PROCEDURE IF EXISTS bug13037_p1; -DROP PROCEDURE IF EXISTS bug13037_p2; -DROP PROCEDURE IF EXISTS bug13037_p3; CREATE PROCEDURE bug13037_p1() BEGIN IF bug13037_foo THEN @@ -1078,13 +1038,13 @@ SELECT bug13037_foo; END| CALL bug13037_p2(); -ERROR 42S22: Unknown column 'bug13037_bar' in 'field list' +ERROR 42S22: Unknown column 'bug13037_bar' in 'SET' CALL bug13037_p3(); -ERROR 42S22: Unknown column 'bug13037_foo' in 'field list' +ERROR 42S22: Unknown column 'bug13037_foo' in 'SELECT' CALL bug13037_p2(); -ERROR 42S22: Unknown column 'bug13037_bar' in 'field list' +ERROR 42S22: Unknown column 'bug13037_bar' in 'SET' CALL bug13037_p3(); -ERROR 42S22: Unknown column 'bug13037_foo' in 'field list' +ERROR 42S22: Unknown column 'bug13037_foo' in 'SELECT' DROP PROCEDURE bug13037_p2; DROP PROCEDURE bug13037_p3; create database mysqltest1; @@ -1100,7 +1060,6 @@ Db Name Type Definer Modified Created Security_type Comment character_set_client mysqltest2 p1 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER latin1 latin1_swedish_ci latin1_swedish_ci drop database mysqltest2; use test; -DROP FUNCTION IF EXISTS bug13012| CREATE FUNCTION bug13012() RETURNS INT BEGIN REPAIR TABLE t1; @@ -1119,9 +1078,6 @@ ERROR 0A000: Not allowed to return a result set from a function drop table t1| drop procedure bug13012_1| drop function bug13012_2| -drop function if exists bug11555_1; -drop function if exists bug11555_2; -drop view if exists v1, v2, v3, v4; create function bug11555_1() returns int return (select max(i) from t1); create function bug11555_2() returns int return bug11555_1(); create view v1 as select bug11555_1(); @@ -1158,7 +1114,6 @@ ERROR 42S02: Table 'test.t2' doesn't exist drop function bug11555_1; drop table t1; drop view v1; -drop procedure if exists ` bug15658`; create procedure ``() select 1; ERROR 42000: Incorrect routine name '' create procedure ` `() select 1; @@ -1177,8 +1132,6 @@ show procedure status; Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation test bug15658 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER latin1 latin1_swedish_ci latin1_swedish_ci drop procedure ` bug15658`; -drop function if exists bug14270; -drop table if exists t1; create table t1 (s1 int primary key); create function bug14270() returns int begin @@ -1193,7 +1146,6 @@ return 1; end| ERROR 0A000: Not allowed to return a result set from a function drop table t1; -drop procedure if exists bug15091; create procedure bug15091() begin declare selectstr varchar(6000) default ' '; @@ -1204,10 +1156,8 @@ c.operatorid, 'in (',conditionstr, ')'); end| ERROR 42000: Undeclared variable: c -drop function if exists bug16896; create aggregate function bug16896() returns int return 1; ERROR HY000: Aggregate specific instruction(FETCH GROUP NEXT ROW) missing from the aggregate function -DROP PROCEDURE IF EXISTS bug14702; CREATE IF NOT EXISTS PROCEDURE bug14702() BEGIN END; @@ -1218,7 +1168,6 @@ CREATE PROCEDURE IF NOT EXISTS bug14702() BEGIN END; DROP PROCEDURE IF EXISTS bug14702; -DROP TABLE IF EXISTS t1; CREATE TABLE t1 (i INT); CREATE PROCEDURE bug20953() CREATE VIEW v AS SELECT 1 INTO @a; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @a' at line 1 @@ -1242,30 +1191,23 @@ ERROR HY000: View's SELECT contains a variable or parameter PREPARE stmt FROM "CREATE VIEW v AS SELECT ?"; ERROR HY000: View's SELECT contains a variable or parameter DROP TABLE t1; -drop tables if exists t1; -drop procedure if exists bug24491; create table t1 (id int primary key auto_increment, value varchar(10)); insert into t1 (id, value) values (1, 'FIRST'), (2, 'SECOND'), (3, 'THIRD'); create procedure bug24491() insert into t1 (id, value) select * from (select 4 as i, 'FOURTH' as v) as y on duplicate key update v = 'DUP'; call bug24491(); -ERROR 42S22: Unknown column 'v' in 'field list' +ERROR 42S22: Unknown column 'v' in 'UPDATE' call bug24491(); -ERROR 42S22: Unknown column 'v' in 'field list' +ERROR 42S22: Unknown column 'v' in 'UPDATE' drop procedure bug24491; create procedure bug24491() insert into t1 (id, value) select * from (select 4 as id, 'FOURTH' as value) as y on duplicate key update y.value = 'DUP'; call bug24491(); -ERROR 42S22: Unknown column 'y.value' in 'field list' +ERROR 42S22: Unknown column 'y.value' in 'UPDATE' call bug24491(); -ERROR 42S22: Unknown column 'y.value' in 'field list' +ERROR 42S22: Unknown column 'y.value' in 'UPDATE' drop procedure bug24491; drop tables t1; -DROP FUNCTION IF EXISTS bug18914_f1; -DROP FUNCTION IF EXISTS bug18914_f2; -DROP PROCEDURE IF EXISTS bug18914_p1; -DROP PROCEDURE IF EXISTS bug18914_p2; -DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 (i INT); CREATE PROCEDURE bug18914_p1() CREATE TABLE t2 (i INT); CREATE PROCEDURE bug18914_p2() DROP TABLE IF EXISTS no_such_table; @@ -1294,9 +1236,6 @@ DROP FUNCTION bug18914_f2; DROP PROCEDURE bug18914_p1; DROP PROCEDURE bug18914_p2; DROP TABLE t1; -drop table if exists bogus_table_20713; -drop function if exists func_20713_a; -drop function if exists func_20713_b; create table bogus_table_20713( id int(10) not null primary key); insert into bogus_table_20713 values (1), (2), (3); create function func_20713_a() returns int(11) @@ -1348,11 +1287,6 @@ select @in_func; 2 drop function if exists func_20713_a; drop function if exists func_20713_b; -drop table if exists table_25345_a; -drop table if exists table_25345_b; -drop procedure if exists proc_25345; -drop function if exists func_25345; -drop function if exists func_25345_b; create table table_25345_a (a int); create table table_25345_b (b int); create procedure proc_25345() @@ -1394,14 +1328,12 @@ drop procedure proc_25345; drop function func_25345; drop function func_25345_b; End of 5.0 tests -drop function if exists bug16164; create function bug16164() returns int begin show authors; return 42; end| ERROR 0A000: Not allowed to return a result set from a function -drop function if exists bug20701; create function bug20701() returns varchar(25) binary return "test"; drop function bug20701; create function bug20701() returns varchar(25) return "test"; @@ -1458,8 +1390,6 @@ end until true end repeat retry; end// ERROR 42000: LEAVE with no matching label: retry -drop procedure if exists proc_28360; -drop function if exists func_28360; CREATE PROCEDURE proc_28360() BEGIN ALTER DATABASE `#mysql50#upgrade-me` UPGRADE DATA DIRECTORY NAME; @@ -1471,7 +1401,6 @@ ALTER DATABASE `#mysql50#upgrade-me` UPGRADE DATA DIRECTORY NAME; RETURN 0; END// ERROR HY000: Can't drop or alter a DATABASE from within another stored routine -DROP PROCEDURE IF EXISTS p1; CREATE PROCEDURE p1() BEGIN DECLARE c char(100); @@ -1487,7 +1416,6 @@ FETCH cur1 INTO c; select c; CLOSE cur1; END' at line 4 -DROP DATABASE IF EXISTS mysqltest; CREATE DATABASE mysqltest; USE mysqltest; DROP DATABASE mysqltest; @@ -1509,9 +1437,6 @@ ERROR HY000: Not allowed to set autocommit from a stored function or trigger create trigger t1 before insert on t2 for each row set password = password('foo');| ERROR HY000: Not allowed to set autocommit from a stored function or trigger -drop function if exists f1; -drop function if exists f2; -drop table if exists t1, t2; create function f1() returns int begin drop temporary table t1; @@ -1557,10 +1482,6 @@ drop function f2; drop table t2; ERROR 42S02: Unknown table 'test.t2' End of 5.1 tests -drop procedure if exists proc_33983_a; -drop procedure if exists proc_33983_b; -drop procedure if exists proc_33983_c; -drop procedure if exists proc_33983_d; create procedure proc_33983_a() begin label1: @@ -1612,7 +1533,6 @@ CALL p1((SELECT * FROM t1))| ERROR 21000: Subquery returns more than 1 row DROP PROCEDURE IF EXISTS p1| DROP TABLE t1| -drop procedure if exists p1; create procedure p1() begin create table t1 (a int) engine=MyISAM; @@ -1621,7 +1541,6 @@ end| call p1(); call p1(); drop procedure p1; -drop procedure if exists proc_8759; create procedure proc_8759() begin declare should_be_illegal condition for sqlstate '00000'; @@ -1633,7 +1552,6 @@ begin declare continue handler for sqlstate '00000' set @x=0; end$$ ERROR 42000: Bad SQLSTATE: '00000' -drop procedure if exists proc_36510; create procedure proc_36510() begin declare should_be_illegal condition for sqlstate '00123'; @@ -1656,7 +1574,6 @@ begin declare continue handler for 0 set @x=0; end$$ ERROR HY000: Incorrect CONDITION value: '0' -drop procedure if exists p1; set @old_recursion_depth = @@max_sp_recursion_depth; set @@max_sp_recursion_depth = 255; create procedure p1(a int) @@ -1728,12 +1645,6 @@ End of 5.1 tests # - Case 1 -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; -DROP PROCEDURE IF EXISTS p4; -DROP PROCEDURE IF EXISTS p5; -DROP PROCEDURE IF EXISTS p6; CREATE PROCEDURE p1() BEGIN SELECT CAST('10 ' as unsigned integer); @@ -1827,7 +1738,6 @@ DROP PROCEDURE p6; # - Case 3: check that "Exception trumps No Data". -DROP TABLE IF EXISTS t1; CREATE TABLE t1(a INT); INSERT INTO t1 VALUES (1), (2), (3); CREATE PROCEDURE p1() @@ -1856,8 +1766,6 @@ DROP TABLE t1; # # Bug#36185: Incorrect precedence for warning and exception handlers # -DROP TABLE IF EXISTS t1; -DROP PROCEDURE IF EXISTS p1; CREATE TABLE t1 (a INT, b INT NOT NULL); CREATE PROCEDURE p1() BEGIN @@ -1929,9 +1837,6 @@ SET sql_mode = @sql_mode_saved; # # Bug#55850: Trigger warnings not cleared. # -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP PROCEDURE IF EXISTS p1; CREATE TABLE t1(x SMALLINT, y SMALLINT, z SMALLINT); CREATE TABLE t2(a SMALLINT, b SMALLINT, c SMALLINT, d SMALLINT, e SMALLINT, f SMALLINT); @@ -2551,8 +2456,6 @@ DROP PROCEDURE p13; # Bug#12731619: NESTED SP HANDLERS CAN TRIGGER ASSERTION -DROP FUNCTION IF EXISTS f1; -DROP TABLE IF EXISTS t1; CREATE TABLE t1(msg VARCHAR(255)); CREATE FUNCTION f1() RETURNS INT BEGIN @@ -2593,13 +2496,6 @@ DROP TABLE t1; # Check that handled SQL-conditions are properly cleared from DA. -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; -DROP PROCEDURE IF EXISTS p4; -DROP PROCEDURE IF EXISTS p5; CREATE TABLE t1(a CHAR, b CHAR, c CHAR); CREATE TABLE t2(a SMALLINT, b SMALLINT, c SMALLINT); @@ -2769,8 +2665,6 @@ DROP TABLE t2; # Check DECLARE statements that raise conditions before handlers # are declared. -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; SET sql_mode = ''| CREATE PROCEDURE p1() BEGIN @@ -2798,8 +2692,6 @@ DROP PROCEDURE p2; # # Bug#13113222 RQG_SIGNAL_RESIGNAL FAILED WITH ASSERTION. # -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; CREATE PROCEDURE p1() BEGIN DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SELECT 'triggered p1'; @@ -2825,9 +2717,6 @@ DROP PROCEDURE p2; # Bug#12652873: 61392: Continue handler for NOT FOUND being triggered # from internal stored function. -DROP FUNCTION IF EXISTS f1; -DROP FUNCTION IF EXISTS f2; -DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a INT, b INT); INSERT INTO t1 VALUES (1, 2); diff --git a/mysql-test/main/sp-error.test b/mysql-test/main/sp-error.test index bb9868be1a1..d8c265335e4 100644 --- a/mysql-test/main/sp-error.test +++ b/mysql-test/main/sp-error.test @@ -4,10 +4,6 @@ --source include/default_charset.inc ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - --disable_ps2_protocol # Backup the mysql.proc table --enable_prepare_warnings @@ -25,11 +21,11 @@ delimiter |; # This should give three syntax errors (sometimes crashed; bug #643) # (Unfortunately, this is not a 100% test, on some platforms this # passed despite the bug.) ---error 1064 +--error ER_PARSE_ERROR create procedure syntaxerror(t int)| ---error 1064 +--error ER_PARSE_ERROR create procedure syntaxerror(t int)| ---error 1064 +--error ER_PARSE_ERROR create procedure syntaxerror(t int)| # Check that we get the right error, i.e. UDF declaration parses correctly, @@ -37,13 +33,10 @@ create procedure syntaxerror(t int)| # This generates an error message containing a misleading errno which # might vary between systems (it usually doesn't have anything to do with # the actual failing dlopen()). -#--error 1126 +#--error ER_CANT_OPEN_LIBRARY #create function foo returns real soname "foo.so"| ---disable_warnings -drop table if exists t3| ---enable_warnings create table t3 ( x int )| insert into t3 values (2), (3)| @@ -52,7 +45,7 @@ create procedure bad_into(out param int) select x from t3 into param| --disable_prepare_warnings ---error 1172 +--error ER_TOO_MANY_ROWS call bad_into(@x)| drop procedure bad_into| @@ -66,18 +59,18 @@ create function func1() returns int return 42| # Can't create recursively ---error 1303 +--error ER_SP_NO_RECURSIVE_CREATE create procedure foo() create procedure bar() set @x=3| ---error 1303 +--error ER_SP_NO_RECURSIVE_CREATE create procedure foo() create function bar() returns double return 2.3| # Already exists ---error 1304 +--error ER_SP_ALREADY_EXISTS create procedure proc1() set @x = 42| ---error 1304 +--error ER_SP_ALREADY_EXISTS create function func1() returns int return 42| @@ -85,41 +78,41 @@ drop procedure proc1| drop function func1| # Does not exist ---error 1305 +--error ER_SP_DOES_NOT_EXIST alter procedure foo| ---error 1305 +--error ER_SP_DOES_NOT_EXIST alter function foo| ---error 1305 +--error ER_SP_DOES_NOT_EXIST drop procedure foo| ---error 1305 +--error ER_SP_DOES_NOT_EXIST drop function foo| ---error 1305 +--error ER_SP_DOES_NOT_EXIST call foo()| drop procedure if exists foo| ---error 1305 +--error ER_SP_DOES_NOT_EXIST show create procedure foo| ---error 1305 +--error ER_SP_DOES_NOT_EXIST show create function foo| # LEAVE/ITERATE with no match ---error 1308 +--error ER_SP_LILABEL_MISMATCH create procedure foo() foo: loop leave bar; end loop| ---error 1308 +--error ER_SP_LILABEL_MISMATCH create procedure foo() foo: loop iterate bar; end loop| ---error 1308 +--error ER_SP_LILABEL_MISMATCH create procedure foo() foo: begin iterate foo; end| # Redefining label ---error 1309 +--error ER_SP_LABEL_REDEFINE create procedure foo() foo: loop foo: loop @@ -128,14 +121,14 @@ foo: loop end loop foo| # End label mismatch ---error 1310 +--error ER_SP_LABEL_MISMATCH create procedure foo() foo: loop set @x=2; end loop bar| # RETURN in FUNCTION only ---error 1313 +--error ER_SP_BADRETURN create procedure foo() return 42| @@ -145,19 +138,19 @@ create procedure p(x int) create function f(x int) returns int return x+42| ---error 1318 +--error ER_SP_WRONG_NO_OF_ARGS call p()| ---error 1318 +--error ER_SP_WRONG_NO_OF_ARGS call p(1, 2)| ---error 1318 +--error ER_SP_WRONG_NO_OF_ARGS select f()| ---error 1318 +--error ER_SP_WRONG_NO_OF_ARGS select f(1, 2)| drop procedure p| drop function f| ---error 1319 +--error ER_SP_COND_MISMATCH create procedure p(val int, out res int) begin declare x int default 0; @@ -171,7 +164,7 @@ begin end if; end| ---error 1319 +--error ER_SP_COND_MISMATCH create procedure p(val int, out res int) begin declare x int default 0; @@ -186,7 +179,7 @@ begin end if; end| ---error 1320 +--error ER_SP_NORETURN create function f(val int) returns int begin declare x int; @@ -204,7 +197,7 @@ begin end if; end| ---error 1321 +--error ER_SP_NORETURNEND select f(10)| drop function f| @@ -218,7 +211,7 @@ begin close c; end| ---error 1323 +--error ER_SP_BAD_CURSOR_SELECT create procedure p() begin declare x int; @@ -228,7 +221,7 @@ begin close c; end| ---error 1324 +--error ER_SP_CURSOR_MISMATCH create procedure p() begin declare c cursor for select * from test.t; @@ -237,9 +230,6 @@ begin close c; end| ---disable_warnings -drop table if exists t1| ---enable_warnings create table t1 (val int)| create procedure p() @@ -250,7 +240,7 @@ begin open c; close c; end| ---error 1325 +--error ER_SP_CURSOR_ALREADY_OPEN call p()| drop procedure p| @@ -262,22 +252,19 @@ begin close c; close c; end| ---error 1326 +--error ER_SP_CURSOR_NOT_OPEN call p()| drop procedure p| ---error 1305 +--error ER_SP_DOES_NOT_EXIST alter procedure bar3 sql security invoker| drop table t1| ---disable_warnings -drop table if exists t1| ---enable_warnings create table t1 (val int, x float)| insert into t1 values (42, 3.1), (19, 1.2)| ---error 1327 +--error ER_SP_UNDECLARED_VAR create procedure p() begin declare x int; @@ -297,7 +284,7 @@ begin fetch c into x; close c; end| ---error 1328 +--error ER_SP_WRONG_NO_OF_FETCH_ARGS call p()| drop procedure p| @@ -312,34 +299,34 @@ begin fetch c into x, y, z; close c; end| ---error 1328 +--error ER_SP_WRONG_NO_OF_FETCH_ARGS call p()| drop procedure p| ---error 1330 +--error ER_SP_DUP_PARAM create procedure p(in x int, x char(10)) begin end| ---error 1330 +--error ER_SP_DUP_PARAM create function p(x int, x char(10)) begin end| ---error 1331 +--error ER_SP_DUP_VAR create procedure p() begin declare x float; declare x int; end| ---error 1332 +--error ER_SP_DUP_COND create procedure p() begin declare c condition for 1064; declare c condition for 1065; end| ---error 1333 +--error ER_SP_DUP_CURS create procedure p() begin declare c cursor for select * from t1; @@ -352,13 +339,13 @@ create procedure u() use sptmp| # Enforced standard order of declarations ---error 1337 +--error ER_SP_VARCOND_AFTER_CURSHNDLR create procedure p() begin declare c cursor for select * from t1; declare x int; end| ---error 1337 +--error ER_SP_VARCOND_AFTER_CURSHNDLR create procedure p() begin declare x int; @@ -366,7 +353,7 @@ begin declare foo condition for sqlstate '42S99'; end| ---error 1338 +--error ER_SP_CURSOR_AFTER_HANDLER create procedure p() begin declare x int; @@ -375,9 +362,6 @@ begin end| # Check in and inout arguments. ---disable_warnings -drop procedure if exists p| ---enable_warnings create procedure p(in x int, inout y int, out z int) begin set y = x+y; @@ -427,9 +411,6 @@ unlock tables| # are used by statements which invoke these functions. # --disable_ps2_protocol ---disable_warnings -drop function if exists f1| ---enable_warnings create function f1(i int) returns int begin insert into t1 (val) values (i); @@ -462,28 +443,25 @@ begin close c; end| ---error 1054 +--error ER_BAD_FIELD_ERROR call bug1965()| drop procedure bug1965| # # BUG#1966 # ---error 1327 +--error ER_SP_UNDECLARED_VAR select 1 into a| # # BUG#1653 # ---disable_warnings -drop table if exists t3| ---enable_warnings create table t3 (column_1_0 int)| create procedure bug1653() update t3 set column_1 = 0| ---error 1054 +--error ER_BAD_FIELD_ERROR call bug1653()| drop table t3| create table t3 (column_1 int)| @@ -505,7 +483,7 @@ begin fetch c1 into v1; end| ---error 1326 +--error ER_SP_CURSOR_NOT_OPEN call bug2259()| drop procedure bug2259| @@ -520,7 +498,7 @@ begin end| insert into t1 values (666, 51.3)| ---error 1054 +--error ER_BAD_FIELD_ERROR call bug2272()| truncate table t1| drop procedure bug2272| @@ -542,9 +520,9 @@ begin replace t1 set v = 5; end| ---error 1054 +--error ER_BAD_FIELD_ERROR call bug2329_1()| ---error 1054 +--error ER_BAD_FIELD_ERROR call bug2329_2()| drop procedure bug2329_1| drop procedure bug2329_2| @@ -561,7 +539,7 @@ begin end case; return 2; end| ---error 1339 +--error ER_SP_CASE_NOT_FOUND select bug3287()| drop function bug3287| @@ -572,16 +550,13 @@ when 0 then when 1 then insert into test.t1 values (x, 1.1); end case| ---error 1339 +--error ER_SP_CASE_NOT_FOUND call bug3287(2)| drop procedure bug3287| # # BUG#3297 # ---disable_warnings -drop table if exists t3| ---enable_warnings create table t3 (s1 int, primary key (s1))| insert into t3 values (5),(6)| @@ -609,7 +584,7 @@ drop table t3| # # BUG#3339 # ---error 1049 +--error ER_BAD_DB_ERROR create procedure nodb.bug3339() begin end| # @@ -634,17 +609,14 @@ end| # # BUG#4344 # ---error 1357 +--error ER_SP_NO_DROP_SP create procedure bug4344() drop procedure bug4344| ---error 1357 +--error ER_SP_NO_DROP_SP create procedure bug4344() drop function bug4344| # # BUG#3294: Stored procedure crash if table dropped before use # (Actually, when an error occurs within an error handler.) ---disable_warnings -drop procedure if exists bug3294| ---enable_warnings create procedure bug3294() begin declare continue handler for sqlexception drop table t5; @@ -653,7 +625,7 @@ begin end| create table t5 (x int)| ---error 1051 +--error ER_BAD_TABLE_ERROR call bug3294()| drop procedure bug3294| @@ -661,12 +633,6 @@ drop procedure bug3294| # BUG#876: Stored Procedures: Invalid SQLSTATE is allowed in # a DECLARE ? HANDLER FOR stmt. # ---disable_warnings -drop procedure if exists bug8776_1| -drop procedure if exists bug8776_2| -drop procedure if exists bug8776_3| -drop procedure if exists bug8776_4| ---enable_warnings --error ER_SP_BAD_SQLSTATE create procedure bug8776_1() begin @@ -718,9 +684,6 @@ create procedure bug6600() # We should not think that mysql.proc table does not exist if we are unable # to open it under LOCK TABLE or in prelocked mode. # ---disable_warnings -drop procedure if exists bug9566| ---enable_warnings create procedure bug9566() begin select * from t1; @@ -739,9 +702,6 @@ drop procedure bug9566| # # BUG#7299: Stored procedures: exception handler catches not-found conditions # ---disable_warnings -drop procedure if exists bug7299| ---enable_warnings create procedure bug7299() begin declare v int; @@ -791,9 +751,6 @@ begin end| # This should still work. ---disable_warnings -drop procedure if exists bug9073| ---enable_warnings create procedure bug9073() begin declare condname1 condition for sqlstate '42000'; @@ -848,11 +805,6 @@ begin return b; end| ---disable_warnings -drop function if exists bug8408_f| -drop procedure if exists bug8408_p| ---enable_warnings - # Some things must be caught at invokation time create function bug8408_f() returns int begin @@ -888,9 +840,6 @@ truncate table t1| # BUG#10537: Server crashes while loading data file into table through # procedure. # Disable load until it's PS and SP safe ---disable_warnings -drop procedure if exists bug10537| ---enable_warnings --error ER_SP_BADSTATEMENT create procedure bug10537() load data local infile '/tmp/somefile' into table t1| @@ -899,9 +848,6 @@ create procedure bug10537() # # BUG#8409: Stored procedure crash if function contains FLUSH # ---disable_warnings -drop function if exists bug8409| ---enable_warnings --error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG create function bug8409() returns int @@ -961,9 +907,6 @@ create procedure bug9529_9012345678901234567890123456789012345678901234567890123 begin end| ---disable_warnings -drop procedure if exists bug17015_0123456789012345678901234567890123456789012345678901234| ---enable_warnings # Check the upper limit, just to make sure. create procedure bug17015_0123456789012345678901234567890123456789012345678901234() begin @@ -977,9 +920,6 @@ drop procedure bug17015_0123456789012345678901234567890123456789012345678901234| # # BUG#10969: Stored procedures: crash if default() function # ---disable_warnings -drop procedure if exists bug10969| ---enable_warnings --error ER_WRONG_COLUMN_NAME create procedure bug10969() begin @@ -1032,7 +972,7 @@ P1: BEGIN SELECT 'end of proc'; END P1| delimiter ;| ---error 1326 +--error ER_SP_CURSOR_NOT_OPEN call SP001(); drop procedure SP001; drop table t1, t2; @@ -1042,12 +982,6 @@ drop table t1, t2; # We have to disable recursion since in many cases LEX and many # Item's can't be used in reentrant way nowdays. delimiter |; ---disable_warnings -drop function if exists bug11394| -drop function if exists bug11394_1| -drop function if exists bug11394_2| -drop procedure if exists bug11394| ---enable_warnings create function bug11394(i int) returns int begin if i <= 0 then @@ -1058,7 +992,7 @@ begin end| # If we allow recursive functions without additional modifications # this will crash server since Item for "IN" is not reenterable. ---error 1424 +--error ER_SP_NO_RECURSION select bug11394(2)| drop function bug11394| create function bug11394_1(i int) returns int @@ -1071,7 +1005,7 @@ begin end| # The following statement will crash because some LEX members responsible # for selects cannot be used in reentrant fashion. ---error 1424 +--error ER_SP_NO_RECURSION select bug11394_1(2)| drop function bug11394_1| # Note that the following should be allowed since it does not contains @@ -1111,10 +1045,6 @@ DROP TABLE t_bug_12490; # crashes server". Also tests handling of prepared stmts which use # stored functions but does not require prelocking. # ---disable_warnings -drop function if exists bug11834_1; -drop function if exists bug11834_2; ---enable_warnings create function bug11834_1() returns int return 10; create function bug11834_2() returns int return bug11834_1(); prepare stmt from "select bug11834_2()"; @@ -1137,9 +1067,6 @@ drop function bug11834_2; # Bug#12953 "Stored procedures: crash if OPTIMIZE TABLE in function" # delimiter |; ---disable_warnings -DROP FUNCTION IF EXISTS bug12953| ---enable_warnings --error ER_SP_NO_RETSET CREATE FUNCTION bug12953() RETURNS INT BEGIN @@ -1152,9 +1079,6 @@ delimiter ;| # Bug##12995 "Inside function "Table 't4' was not locked with LOCK TABLES" # delimiter |; ---disable_warnings -DROP FUNCTION IF EXISTS bug12995| ---enable_warnings --error ER_SP_BADSTATEMENT CREATE FUNCTION bug12995() RETURNS INT BEGIN @@ -1173,7 +1097,7 @@ BEGIN HANDLER t1 CLOSE; RETURN 1; END| ---error 1305 +--error ER_SP_DOES_NOT_EXIST SELECT bug12995()| delimiter ;| @@ -1181,10 +1105,6 @@ delimiter ;| # # BUG#12712: SET AUTOCOMMIT should fail within SP/functions/triggers # ---disable_warnings -drop procedure if exists bug12712; -drop function if exists bug12712; ---enable_warnings # Can... create procedure bug12712() set session autocommit = 0; @@ -1238,9 +1158,6 @@ create trigger bug12712 # BUG#9367: Stored procedures: client hang after "show warnings" # --disable_parsing ---disable_warnings -drop procedure if exists bug9367; ---enable_warnings create table t1 (s1 int); select s1 from t1; delimiter |; @@ -1263,13 +1180,6 @@ drop table t1; # BUG#13510: Setting password local variable changes current password # delimiter |; ---disable_warnings -drop procedure if exists bug13510_1| -drop procedure if exists bug13510_2| -drop procedure if exists bug13510_3| -drop procedure if exists bug13510_4| ---enable_warnings - --error ER_SP_BAD_VAR_SHADOW create procedure bug13510_1() begin @@ -1321,10 +1231,6 @@ drop procedure bug13510_4| # containing such statement should produce error (includes test for # bug #13627). # ---disable_warnings -drop function if exists bug_13627_f| ---enable_warnings - CREATE TABLE t1 (a int)| -- error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN DROP TRIGGER test1; END | @@ -1505,12 +1411,6 @@ use test; # BUG#13037: undefined variable in IF cause erroneous error-message # ---disable_warnings -DROP PROCEDURE IF EXISTS bug13037_p1; -DROP PROCEDURE IF EXISTS bug13037_p2; -DROP PROCEDURE IF EXISTS bug13037_p3; ---enable_warnings - delimiter |; --error ER_SP_UNDECLARED_VAR @@ -1535,14 +1435,14 @@ delimiter ;| --echo ---error 1054 +--error ER_BAD_FIELD_ERROR CALL bug13037_p2(); ---error 1054 +--error ER_BAD_FIELD_ERROR CALL bug13037_p3(); ---error 1054 +--error ER_BAD_FIELD_ERROR CALL bug13037_p2(); ---error 1054 +--error ER_BAD_FIELD_ERROR CALL bug13037_p3(); DROP PROCEDURE bug13037_p2; @@ -1568,9 +1468,6 @@ use test; # Bug#13012 "SP: REPAIR/BACKUP/RESTORE TABLE crashes the server" # delimiter |; ---disable_warnings -DROP FUNCTION IF EXISTS bug13012| ---enable_warnings --error ER_SP_NO_RETSET CREATE FUNCTION bug13012() RETURNS INT BEGIN @@ -1602,11 +1499,6 @@ delimiter ;| # dropped simultaneously with table (DROP TABLE with CASCADE clause). # So these tests probably should go away once we will implement standard # behavior. ---disable_warnings -drop function if exists bug11555_1; -drop function if exists bug11555_2; -drop view if exists v1, v2, v3, v4; ---enable_warnings create function bug11555_1() returns int return (select max(i) from t1); create function bug11555_2() returns int return bug11555_1(); # It is OK to report name of implicitly used table which is missing @@ -1660,10 +1552,6 @@ drop view v1; # # BUG#15658: Server crashes after creating function as empty string # ---disable_warnings -drop procedure if exists ` bug15658`; ---enable_warnings - --error ER_SP_WRONG_NAME create procedure ``() select 1; --error ER_SP_WRONG_NAME @@ -1686,11 +1574,6 @@ drop procedure ` bug15658`; # # BUG#14270: Stored procedures: crash if load index # ---disable_warnings -drop function if exists bug14270; -drop table if exists t1; ---enable_warnings - create table t1 (s1 int primary key); delimiter |; @@ -1716,10 +1599,6 @@ drop table t1; # BUG#15091: Sp Returns Unknown error in order clause....and # there is no order by clause # ---disable_warnings -drop procedure if exists bug15091; ---enable_warnings - delimiter |; --error ER_SP_UNDECLARED_VAR create procedure bug15091() @@ -1738,9 +1617,6 @@ delimiter ;| # # BUG#16896: Stored function: unused AGGREGATE-clause in CREATE FUNCTION # ---disable_warnings -drop function if exists bug16896; ---enable_warnings --error ER_INVALID_AGGREGATE_FUNCTION create aggregate function bug16896() returns int return 1; @@ -1753,10 +1629,6 @@ create aggregate function bug16896() returns int return 1; # Misleading error message was given when IF NOT EXISTS was used in # CREATE PROCEDURE. # ---disable_warnings -DROP PROCEDURE IF EXISTS bug14702; ---enable_warnings - --error ER_PARSE_ERROR CREATE IF NOT EXISTS PROCEDURE bug14702() BEGIN @@ -1773,10 +1645,6 @@ DROP PROCEDURE IF EXISTS bug14702; # # See test case for what syntax is forbidden in a view. # ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - CREATE TABLE t1 (i INT); # We do not have to drop this procedure and view because they won't be @@ -1811,10 +1679,6 @@ DROP TABLE t1; # # BUG#24491 "using alias from source table in insert ... on duplicate key" # ---disable_warnings -drop tables if exists t1; -drop procedure if exists bug24491; ---enable_warnings create table t1 (id int primary key auto_increment, value varchar(10)); insert into t1 (id, value) values (1, 'FIRST'), (2, 'SECOND'), (3, 'THIRD'); # Let us create routine with INSERT ... SELECT ... ON DUPLICATE KEY UPDATE @@ -1848,14 +1712,6 @@ drop tables t1; # DROP TABLE IF EXISTS is also fixed to give correct error instead of # "Table doesn't exist". # ---disable_warnings -DROP FUNCTION IF EXISTS bug18914_f1; -DROP FUNCTION IF EXISTS bug18914_f2; -DROP PROCEDURE IF EXISTS bug18914_p1; -DROP PROCEDURE IF EXISTS bug18914_p2; -DROP TABLE IF EXISTS t1, t2; ---enable_warnings - CREATE TABLE t1 (i INT); CREATE PROCEDURE bug18914_p1() CREATE TABLE t2 (i INT); @@ -1900,12 +1756,6 @@ DROP TABLE t1; # Bug#20713 (Functions will not not continue for SQLSTATE VALUE '42S02') # ---disable_warnings -drop table if exists bogus_table_20713; -drop function if exists func_20713_a; -drop function if exists func_20713_b; ---enable_warnings - create table bogus_table_20713( id int(10) not null primary key); insert into bogus_table_20713 values (1), (2), (3); @@ -1964,14 +1814,6 @@ drop function if exists func_20713_b; # Bug#25345 (Cursors from Functions) # ---disable_warnings -drop table if exists table_25345_a; -drop table if exists table_25345_b; -drop procedure if exists proc_25345; -drop function if exists func_25345; -drop function if exists func_25345_b; ---enable_warnings - create table table_25345_a (a int); create table table_25345_b (b int); @@ -2027,9 +1869,6 @@ drop function func_25345_b; # Bug#16164 "Easter egg": check that SHOW AUTHORS is disabled in # stored functions/triggers # ---disable_warnings -drop function if exists bug16164; ---enable_warnings delimiter |; --error ER_SP_NO_RETSET create function bug16164() returns int @@ -2043,9 +1882,6 @@ delimiter ;| # # BUG#20701: BINARY keyword should be forbidden in stored routines # ---disable_warnings -drop function if exists bug20701; ---enable_warnings create function bug20701() returns varchar(25) binary return "test"; drop function bug20701; create function bug20701() returns varchar(25) return "test"; @@ -2124,11 +1960,6 @@ delimiter ;// # Bug#28360 (RENAME DATABASE destroys routines) # ---disable_warnings -drop procedure if exists proc_28360; -drop function if exists func_28360; ---enable_warnings - delimiter //; --error ER_SP_NO_DROP_SP @@ -2151,9 +1982,6 @@ delimiter ;// # Bug#29223 declare cursor c for SHOW ..... # ---disable_warnings -DROP PROCEDURE IF EXISTS p1; ---enable_warnings --delimiter | --error ER_PARSE_ERROR CREATE PROCEDURE p1() @@ -2172,9 +2000,6 @@ END| # Bug#29816 Syntactically wrong query fails with misleading error message # ---disable_warnings -DROP DATABASE IF EXISTS mysqltest; ---enable_warnings CREATE DATABASE mysqltest; USE mysqltest; DROP DATABASE mysqltest; @@ -2214,12 +2039,6 @@ delimiter ;| # Bug#30882 Dropping a temporary table inside a stored function may cause a server crash # ---disable_warnings -drop function if exists f1; -drop function if exists f2; -drop table if exists t1, t2; ---enable_warnings - delimiter |; create function f1() returns int begin @@ -2284,13 +2103,6 @@ drop table t2; # Bug#33983 (Stored Procedures: wrong end