[MDEV-7207] ALTER VIEW does not change ALGORITM Created: 2014-11-25  Updated: 2015-06-05  Resolved: 2015-06-05

Status: Closed
Project: MariaDB Server
Component/s: Views
Affects Version/s: 5.5.40
Fix Version/s: 5.5.44, 10.0.20, 10.1.6

Type: Bug Priority: Major
Reporter: Oleksandr Byelkin Assignee: Sergey Vojtovich
Resolution: Fixed Votes: 0
Labels: None

Sprint: 5.5.44

 Description   

create table t1 (a int, b int);
create algorithm=temptable view v2 (c) as select b+1 from t1;
show create view v2;
View	Create View	character_set_client	collation_connection
v2	CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select (`t1`.`b` + 1) AS `c` from `t1`	latin1	latin1_swedish_ci
alter algorithm=undefined view v2 (c) as select b+1 from t1;
show create view v2;
View	Create View	character_set_client	collation_connection
v2	CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select (`t1`.`b` + 1) AS `c` from `t1`	latin1	latin1_swedish_ci
alter algorithm=merge view v2 (c) as select b+1 from t1;
show create view v2;
View	Create View	character_set_client	collation_connection
v2	CREATE ALGORITHM=MERGE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select (`t1`.`b` + 1) AS `c` from `t1`	latin1	latin1_swedish_ci
drop view v2;
drop table t1;

test suite:

create table t1 (a int, b int);
create algorithm=temptable view v2 (c) as select b+1 from t1;
show create view v2;
alter algorithm=undefined view v2 (c) as select b+1 from t1;
show create view v2;
alter algorithm=merge view v2 (c) as select b+1 from t1;
show create view v2;
drop view v2;
drop table t1;



 Comments   
Comment by Sergey Vojtovich [ 2015-06-03 ]

serg, please review fix for this bug.

Generated at Thu Feb 08 07:17:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.