Fixes bug #15943. resets error flag for show create view command, to allow
proper processing of multiple sql statements sent as a single command. mysql-test/r/view.result: result file update for #15943 test case mysql-test/t/view.test: test case added for bug #15943
This commit is contained in:
parent
8e97e9c8c5
commit
559abcf5d9
@ -2538,3 +2538,13 @@ Warnings:
|
||||
Warning 1052 Column 'x' in group statement is ambiguous
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
drop table if exists t1;
|
||||
drop view if exists v1;
|
||||
create table t1 (id int);
|
||||
create view v1 as select * from t1;
|
||||
drop table t1;
|
||||
show create view v1;
|
||||
drop view v1;
|
||||
//
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_no_cache `test`.`t1`.`id` AS `id` from `t1`
|
||||
|
@ -2380,3 +2380,18 @@ SELECT IF(x IS NULL, 'blank', 'not blank') AS x FROM v1 GROUP BY x;
|
||||
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# BUG#15943: mysql_next_result hangs on invalid SHOW CREATE VIEW
|
||||
#
|
||||
|
||||
delimiter //;
|
||||
drop table if exists t1;
|
||||
drop view if exists v1;
|
||||
create table t1 (id int);
|
||||
create view v1 as select * from t1;
|
||||
drop table t1;
|
||||
show create view v1;
|
||||
drop view v1;
|
||||
//
|
||||
delimiter ;//
|
||||
|
@ -365,6 +365,13 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list)
|
||||
{
|
||||
if (!table_list->view || thd->net.last_errno != ER_VIEW_INVALID)
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
/*
|
||||
Need this for proper processing of multiple sql statements
|
||||
sent as single command
|
||||
*/
|
||||
thd->net.report_error= 0;
|
||||
|
||||
/*
|
||||
Clear all messages with 'error' level status and
|
||||
issue a warning with 'warning' level status in
|
||||
|
Loading…
x
Reference in New Issue
Block a user