Below is the list of changes that have just been committed into a local
5.0 repository of bell. When bell does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1992 05/08/17 22:42:53 bell@stripped +3 -0
sql_view.cc:
correct exit from mysql_create_view to restore ennvironment (BUG#12468)
view.result, view.test:
test of CRETE VIEW in SP
sql/sql_view.cc
1.58 05/08/17 22:41:11 bell@stripped +16 -5
correct exit from mysql_create_view to restore ennvironment
mysql-test/r/view.result
1.104 05/08/17 22:40:49 bell@stripped +8 -0
test of CRETE VIEW in SP
mysql-test/t/view.test
1.98 05/08/17 22:40:11 bell@stripped +12 -0
test of CRETE VIEW in SP
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: bell
# Host: sanja.is.com.ua
# Root: /home/bell/mysql/bk/work-bug1-5.0
--- 1.103/mysql-test/r/view.result 2005-08-12 21:08:29 +03:00
+++ 1.104/mysql-test/r/view.result 2005-08-17 22:40:49 +03:00
@@ -2097,3 +2097,11 @@
f1
1
drop view v1;
+create table t1(a int);
+create procedure p1() create view v1 as select * from t1;
+drop table t1;
+call p1();
+ERROR 42S02: Table 'test.t1' doesn't exist
+call p1();
+ERROR 42S02: Table 'test.t1' doesn't exist
+drop procedure p1;
--- 1.97/mysql-test/t/view.test 2005-08-12 21:08:20 +03:00
+++ 1.98/mysql-test/t/view.test 2005-08-17 22:40:11 +03:00
@@ -1942,3 +1942,15 @@
create view v1 as select timestampdiff(day,'1997-01-01 00:00:00','1997-01-02 00:00:00')
as f1;
select * from v1;
drop view v1;
+
+#
+# repeatable CREATE VIEW statement BUG#12468
+#
+create table t1(a int);
+create procedure p1() create view v1 as select * from t1;
+drop table t1;
+-- error 1146
+call p1();
+-- error 1146
+call p1();
+drop procedure p1;
--- 1.57/sql/sql_view.cc 2005-08-15 12:21:53 +03:00
+++ 1.58/sql/sql_view.cc 2005-08-17 22:41:11 +03:00
@@ -234,7 +234,10 @@
(check_access(thd, DROP_ACL, view->db, &view->grant.privilege,
0, 0) ||
grant_option && check_grant(thd, DROP_ACL, view, 0, 1, 0))))
- DBUG_RETURN(TRUE);
+ {
+ res= TRUE;
+ goto err;
+ }
for (sl= select_lex; sl; sl= sl->next_select())
{
for (tbl= sl->get_table_list(); tbl; tbl= tbl->next_local)
@@ -247,7 +250,8 @@
{
my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0),
"ANY", thd->priv_user, thd->host_or_ip, tbl->table_name);
- DBUG_RETURN(TRUE);
+ res= TRUE;
+ goto err;
}
/*
Mark this table as a table which will be checked after the prepare
@@ -306,7 +310,10 @@
#endif
if (open_and_lock_tables(thd, tables))
- DBUG_RETURN(TRUE);
+ {
+ res= TRUE;
+ goto err;
+ }
/*
check that tables are not temporary and this VIEW do not used in query
@@ -374,7 +381,10 @@
}
if (check_duplicate_names(select_lex->item_list, 1))
- DBUG_RETURN(TRUE);
+ {
+ res= TRUE;
+ goto err;
+ }
#ifndef NO_EMBEDDED_ACCESS_CHECKS
/*
@@ -404,7 +414,8 @@
my_error(ER_COLUMNACCESS_DENIED_ERROR, MYF(0),
"create view", thd->priv_user, thd->host_or_ip, item->name,
view->table_name);
- DBUG_RETURN(TRUE);
+ res= TRUE;
+ goto err;
}
}
}
| Thread |
|---|
| • bk commit into 5.0 tree (bell:1.1992) BUG#12468 | sanja | 17 Aug |