Commit 23672778 authored by davi@buzz.(none)'s avatar davi@buzz.(none)

Post-merge fixes for bug 32890

parent d2bb9dd6
...@@ -1745,73 +1745,73 @@ create table t1 (a int, b int); ...@@ -1745,73 +1745,73 @@ create table t1 (a int, b int);
drop view v1; drop view v1;
execute stmt; execute stmt;
show create view v1; show create view v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` latin1 latin1_swedish_ci
drop view v1; drop view v1;
prepare stmt from "create view v1 (c,d) as select a,b from t1"; prepare stmt from "create view v1 (c,d) as select a,b from t1";
execute stmt; execute stmt;
show create view v1; show create view v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d` from `t1` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d` from `t1` latin1 latin1_swedish_ci
select * from v1; select * from v1;
c d c d
drop view v1; drop view v1;
execute stmt; execute stmt;
deallocate prepare stmt; deallocate prepare stmt;
show create view v1; show create view v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d` from `t1` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d` from `t1` latin1 latin1_swedish_ci
select * from v1; select * from v1;
c d c d
drop view v1; drop view v1;
prepare stmt from "create view v1 (c) as select b+1 from t1"; prepare stmt from "create view v1 (c) as select b+1 from t1";
execute stmt; execute stmt;
show create view v1; show create view v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (`t1`.`b` + 1) AS `c` from `t1` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (`t1`.`b` + 1) AS `c` from `t1` latin1 latin1_swedish_ci
select * from v1; select * from v1;
c c
drop view v1; drop view v1;
execute stmt; execute stmt;
deallocate prepare stmt; deallocate prepare stmt;
show create view v1; show create view v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (`t1`.`b` + 1) AS `c` from `t1` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (`t1`.`b` + 1) AS `c` from `t1` latin1 latin1_swedish_ci
select * from v1; select * from v1;
c c
drop view v1; drop view v1;
prepare stmt from "create view v1 (c,d,e,f) as select a,b,a in (select a+2 from t1), a = all (select a from t1) from t1"; prepare stmt from "create view v1 (c,d,e,f) as select a,b,a in (select a+2 from t1), a = all (select a from t1) from t1";
execute stmt; execute stmt;
show create view v1; show create view v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d`,`t1`.`a` in (select (`t1`.`a` + 2) AS `a+2` from `t1`) AS `e`,`t1`.`a` = all (select `t1`.`a` AS `a` from `t1`) AS `f` from `t1` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d`,`t1`.`a` in (select (`t1`.`a` + 2) AS `a+2` from `t1`) AS `e`,`t1`.`a` = all (select `t1`.`a` AS `a` from `t1`) AS `f` from `t1` latin1 latin1_swedish_ci
select * from v1; select * from v1;
c d e f c d e f
drop view v1; drop view v1;
execute stmt; execute stmt;
deallocate prepare stmt; deallocate prepare stmt;
show create view v1; show create view v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d`,`t1`.`a` in (select (`t1`.`a` + 2) AS `a+2` from `t1`) AS `e`,`t1`.`a` = all (select `t1`.`a` AS `a` from `t1`) AS `f` from `t1` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d`,`t1`.`a` in (select (`t1`.`a` + 2) AS `a+2` from `t1`) AS `e`,`t1`.`a` = all (select `t1`.`a` AS `a` from `t1`) AS `f` from `t1` latin1 latin1_swedish_ci
select * from v1; select * from v1;
c d e f c d e f
drop view v1; drop view v1;
prepare stmt from "create or replace view v1 as select 1"; prepare stmt from "create or replace view v1 as select 1";
execute stmt; execute stmt;
show create view v1; show create view v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` latin1 latin1_swedish_ci
select * from v1; select * from v1;
1 1
1 1
execute stmt; execute stmt;
show create view v1; show create view v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` latin1 latin1_swedish_ci
deallocate prepare stmt; deallocate prepare stmt;
show create view v1; show create view v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` latin1 latin1_swedish_ci
select * from v1; select * from v1;
1 1
1 1
...@@ -1819,8 +1819,8 @@ drop view v1; ...@@ -1819,8 +1819,8 @@ drop view v1;
prepare stmt from "create view v1 as select 1, 1"; prepare stmt from "create view v1 as select 1, 1";
execute stmt; execute stmt;
show create view v1; show create view v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1`,1 AS `My_exp_1` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1`,1 AS `My_exp_1` latin1 latin1_swedish_ci
select * from v1; select * from v1;
1 My_exp_1 1 My_exp_1
1 1 1 1
...@@ -1828,8 +1828,8 @@ drop view v1; ...@@ -1828,8 +1828,8 @@ drop view v1;
execute stmt; execute stmt;
deallocate prepare stmt; deallocate prepare stmt;
show create view v1; show create view v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1`,1 AS `My_exp_1` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1`,1 AS `My_exp_1` latin1 latin1_swedish_ci
select * from v1; select * from v1;
1 My_exp_1 1 My_exp_1
1 1 1 1
...@@ -1837,32 +1837,32 @@ drop view v1; ...@@ -1837,32 +1837,32 @@ drop view v1;
prepare stmt from "create view v1 (x) as select a from t1 where a > 1"; prepare stmt from "create view v1 (x) as select a from t1 where a > 1";
execute stmt; execute stmt;
show create view v1; show create view v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `x` from `t1` where (`t1`.`a` > 1) v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `x` from `t1` where (`t1`.`a` > 1) latin1 latin1_swedish_ci
select * from v1; select * from v1;
x x
drop view v1; drop view v1;
execute stmt; execute stmt;
deallocate prepare stmt; deallocate prepare stmt;
show create view v1; show create view v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `x` from `t1` where (`t1`.`a` > 1) v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `x` from `t1` where (`t1`.`a` > 1) latin1 latin1_swedish_ci
select * from v1; select * from v1;
x x
drop view v1; drop view v1;
prepare stmt from "create view v1 as select * from `t1` `b`"; prepare stmt from "create view v1 as select * from `t1` `b`";
execute stmt; execute stmt;
show create view v1; show create view v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `b`.`a` AS `a`,`b`.`b` AS `b` from `t1` `b` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `b`.`a` AS `a`,`b`.`b` AS `b` from `t1` `b` latin1 latin1_swedish_ci
select * from v1; select * from v1;
a b a b
drop view v1; drop view v1;
execute stmt; execute stmt;
deallocate prepare stmt; deallocate prepare stmt;
show create view v1; show create view v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `b`.`a` AS `a`,`b`.`b` AS `b` from `t1` `b` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `b`.`a` AS `a`,`b`.`b` AS `b` from `t1` `b` latin1 latin1_swedish_ci
select * from v1; select * from v1;
a b a b
drop view v1; drop view v1;
......
...@@ -1975,8 +1975,6 @@ public: ...@@ -1975,8 +1975,6 @@ public:
private: private:
bool m_cs_specified; bool m_cs_specified;
// to prevent drop fixed flag (no need parent cleanup call)
void cleanup() {}
}; };
......
...@@ -351,7 +351,7 @@ bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view, ...@@ -351,7 +351,7 @@ bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view,
res= FALSE; res= FALSE;
err: err:
DBUG_RETURN(res || thd->net.report_error); DBUG_RETURN(res || thd->is_error());
} }
#else #else
...@@ -397,7 +397,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, ...@@ -397,7 +397,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
/* This is ensured in the parser. */ /* This is ensured in the parser. */
DBUG_ASSERT(!lex->proc_list.first && !lex->result && DBUG_ASSERT(!lex->proc_list.first && !lex->result &&
!lex->param_list.elements && !lex->derived_tables); !lex->param_list.elements);
if (mode != VIEW_CREATE_NEW) if (mode != VIEW_CREATE_NEW)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment