summaryrefslogtreecommitdiff
path: root/mysql-test/main/view.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/view.result')
-rw-r--r--mysql-test/main/view.result16
1 files changed, 10 insertions, 6 deletions
diff --git a/mysql-test/main/view.result b/mysql-test/main/view.result
index b3a45bf4483..241a2f9fe7e 100644
--- a/mysql-test/main/view.result
+++ b/mysql-test/main/view.result
@@ -436,12 +436,19 @@ create view v1 (a,c) as select a, b+1 from t1;
create algorithm=temptable view v2 (a,c) as select a, b+1 from t1;
delete v2 from t2,v2 where t2.x=v2.a;
ERROR HY000: The target table v2 of the DELETE is not updatable
-delete v1 from t2,v1 where t2.x=v1.a;
select * from v1;
a c
+1 3
+2 4
+3 5
+4 6
5 11
select * from t1;
a b
+1 2
+2 3
+3 4
+4 5
5 10
drop table t1,t2;
drop view v1,v2;
@@ -457,16 +464,13 @@ update v2 set x=x+1 limit 1;
ERROR HY000: The target table v2 of the UPDATE is not updatable
set updatable_views_with_limit=YES;
update v1 set x=x+1 limit 1;
-update v2 set x=x+1 limit 1;
-Warnings:
-Note 1355 View being updated does not have complete key of underlying table in it
set updatable_views_with_limit=DEFAULT;
show variables like "updatable_views_with_limit";
Variable_name Value
updatable_views_with_limit YES
select * from t1;
a b c
-15 2 -1
+14 2 -1
22 3 -2
32 4 -3
42 5 -4
@@ -2864,6 +2868,7 @@ CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT x FROM t1;
GRANT INSERT, UPDATE ON v1 TO 'user21261'@'localhost';
GRANT INSERT, UPDATE ON t1 TO 'user21261'@'localhost';
CREATE TABLE t2 (y INT);
+GRANT SELECT ON t1 TO 'user21261'@'localhost';
GRANT SELECT ON t2 TO 'user21261'@'localhost';
connect user21261, localhost, user21261,, bug21261DB;
connection user21261;
@@ -4071,7 +4076,6 @@ a
20
CREATE OR REPLACE ALGORITHM = MERGE VIEW v2 AS SELECT * FROM t2;
DELETE from v1 where a=11;
-DELETE v1 from v1,t1 where v1.a=t1.a;
select * from t1;
a
1