Commit 0aae3cd5 authored by unknown's avatar unknown
Browse files

Merge svlasenko@bk-internal.mysql.com:/home/bk/mysql-5.0

into  selena.:H:/MYSQL/src/#15943-mysql-5.0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
parents a431e912 fefdd728
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -2529,3 +2529,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`
+15 −0
Original line number Diff line number Diff line
@@ -2370,3 +2370,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 ;//
+3 −0
Original line number Diff line number Diff line
@@ -365,12 +365,15 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list)
  {
    if (!table_list->view || thd->net.last_errno != ER_VIEW_INVALID)
      DBUG_RETURN(TRUE);

    /*
      Clear all messages with 'error' level status and
      issue a warning with 'warning' level status in 
      case of invalid view and last error is ER_VIEW_INVALID
    */
    mysql_reset_errors(thd, true);
    thd->clear_error();

    push_warning_printf(thd,MYSQL_ERROR::WARN_LEVEL_WARN,
                        ER_VIEW_INVALID,
                        ER(ER_VIEW_INVALID),