summaryrefslogtreecommitdiff
path: root/mysql-test/r/derived.result
diff options
context:
space:
mode:
authorunknown <bell@laptop.sanja.is.com.ua>2003-10-05 21:09:50 +0300
committerunknown <bell@laptop.sanja.is.com.ua>2003-10-05 21:09:50 +0300
commitff518b9893097e6282b9dc71f6562b91c2df5bbe (patch)
tree5c9f92fbdcbb92b499a3cc51f7ff58b62a2bdc2f /mysql-test/r/derived.result
parentd52e95164daae07a699bd5485a5c2dd0cbfb5404 (diff)
downloadmariadb-git-ff518b9893097e6282b9dc71f6562b91c2df5bbe.tar.gz
prohibited using derived tables in UPDATE command (BUG#1477)
fixed incorrect table name in test mysql-test/r/derived.result: fixed incorrect table name in test new test of derived table mysql-test/t/derived.test: fixed incorrect table name in test new test of derived table sql/sql_yacc.yy: prohibited using derived tables in UPDATE command
Diffstat (limited to 'mysql-test/r/derived.result')
-rw-r--r--mysql-test/r/derived.result17
1 files changed, 13 insertions, 4 deletions
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result
index 6932e0d5476..d24ac5e898a 100644
--- a/mysql-test/r/derived.result
+++ b/mysql-test/r/derived.result
@@ -196,13 +196,22 @@ drop table t1,t2;
SELECT a.x FROM (SELECT 1 AS x) AS a HAVING a.x = 1;
x
1
-create table a1 select 1 as a;
-select 2 as a from (select * from a1) b;
+create table t1 select 1 as a;
+select 2 as a from (select * from t1) b;
ERROR 3D000: No Database Selected
use test;
-select 2 as a from (select * from a1) b;
+select 2 as a from (select * from t1) b;
a
2
-drop table a1;
+drop table t1;
select mail_id, if(folder.f_description!='', folder.f_description, folder.f_name) as folder_name, date, address_id, phrase, address, subject from folder, (select mail.mail_id as mail_id, date_format(mail.h_date, '%b %e, %Y %h:%i') as date, mail.folder_id, sender.address_id as address_id, sender.phrase as phrase, sender.address as address, mail.h_subject as subject from mail left join mxa as mxa_sender on mail.mail_id=mxa_sender.mail_id and mxa_sender.type='from' left join address as sender on mxa_sender.address_id=sender.address_id mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_recipient.mail_id and mxa_recipient.address_id=recipient.address_id and mxa_recipient.type='to' and match(sender.phrase, sender.address, sender.comment) against ('jeremy' in boolean mode) and match(recipient.phrase, recipient.address, recipient.comment) against ('monty' in boolean mode) order by mail.h_date desc limit 0, 25 ) as query where query.folder_id=folder.folder_id;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_r' at line 1
+create table t1 (a int);
+insert into t1 values (1),(2),(3);
+update (select * from t1) as t1 set a = 5;
+ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use
+delete from (select * from t1);
+ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(select * from t1)' at line 1
+insert into (select * from t1) values (5);
+ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(select * from t1) values (5)' at line 1
+drop table t1;