mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Bug#28266 IS_UPDATABLE field on VIEWS table in I_S database is wrong
IS_UPDATABLE flag is set to 'yes' when the view has at least one updatable column and the algorithm is not 'temporary'. mysql-test/r/information_schema.result: test result mysql-test/r/view.result: test result mysql-test/t/information_schema.test: test case mysql-test/t/view.test: test case sql/sql_show.cc: IS_UPDATABLE flag is set to 'yes' when the view has at least one updatable column and the algorithm is not 'temporary'.
This commit is contained in:
parent
d1a8d7f431
commit
ce4e9f7580
5 changed files with 72 additions and 1 deletions
|
|
@ -32,6 +32,7 @@ create view v1 (c,d) as select a,b from t1
|
|||
# simple view
|
||||
create view v1 (c) as select b+1 from t1;
|
||||
select c from v1;
|
||||
select is_updatable from information_schema.views where table_name='v1';
|
||||
|
||||
# temporary table should not hide table of view
|
||||
create temporary table t1 (a int, b int);
|
||||
|
|
@ -228,6 +229,8 @@ create table t1 (a int, b int, primary key(a));
|
|||
insert into t1 values (10,2), (20,3), (30,4), (40,5), (50,10);
|
||||
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;
|
||||
select is_updatable from information_schema.views where table_name='v2';
|
||||
select is_updatable from information_schema.views where table_name='v1';
|
||||
# try to update expression
|
||||
-- error 1348
|
||||
update v1 set c=a+c;
|
||||
|
|
@ -497,6 +500,7 @@ insert into t1 values(5,'Hello, world of views');
|
|||
create view v1 as select * from t1;
|
||||
create view v2 as select * from v1;
|
||||
update v2 set col2='Hello, view world';
|
||||
select is_updatable from information_schema.views;
|
||||
select * from t1;
|
||||
drop view v2, v1;
|
||||
drop table t1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue