Bug #4601 Views: A view based on a view is not updatable

Submitted: 18 Jul 2004 22:01 Modified: 23 Jul 2004 2:46
Reporter: Trudy Pelzer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.1-alpha-debug OS:Linux (SuSE 8.2)
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[18 Jul 2004 22:01] Trudy Pelzer
Description:
If one creates a view (e.g. vt1) based on a single underlying table (e.g. t1), then creates another view (vt2) based upon the first view, the second view is not updatable even though it follows the rule that a view based upon a single underlying table should be updatable. At UPDATE, MySQL returns this error:
ERROR 1288 (HY000): The target table vt2 of the UPDATE is not updatable

How to repeat:
create table t1 (col1 int,col2 char(22));
insert into t1 values(5,'Hello, world of views');
create view vt1 as select * from t1;
create view vt2 as select * from vt1;
update vt2 set col2='Hello, view world';
[22 Jul 2004 16:53] Oleksandr Byelkin
ChangeSet 
  1.1726 04/07/22 17:52:04 bell@sanja.is.com.ua +5 -0 
  made different fields for view updatebility in principle and updatability during this 
execution (BUG#4601)
[23 Jul 2004 2:46] Oleksandr Byelkin
Thank you for bug report! bugfix is pushed in our source repository.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.