From 61f0e69cb60b9db858bad3b6de6fa0b8b2f03899 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Feb 2004 14:44:03 +0200 Subject: ufter revview fix (BUG#2120) mysql-test/r/derived.result: test of error handling in derived tables with UPDATE & DELETE mysql-test/t/derived.test: test of error handling in derived tables with UPDATE & DELETE sql/mysql_priv.h: opened tables counter added to avoid loop of tables calculating in lock_tables sql/sql_acl.cc: opened tables counter added to avoid loop of tables calculating in lock_tables, here it is just for compatibility sql/sql_base.cc: removed unneeded assignment opened tables counter added to avoid loop of tables calculating in lock_tables commentary fixed sql/sql_derived.cc: mysql_derived made static variable res moved in place where it used priveleges written in correct place sql/sql_handler.cc: opened tables counter added to avoid loop of tables calculating in lock_tables sql/sql_parse.cc: mistyping in commentary fixed --- mysql-test/r/derived.result | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mysql-test/r/derived.result') diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index dea4dd9b4c2..6f35097e2b8 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -267,12 +267,16 @@ N M 3 0 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' 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 3 0 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' drop table t1; CREATE TABLE t1 ( OBJECTID int(11) NOT NULL default '0', -- cgit v1.2.1