Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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.1839 05/05/26 16:44:46 msvensson@neptunus.(none) +6 -0
BUG#9993 2 unexpected warnings when dropping a routine and --skip-grant-tables
- Dont perform automatic privilege handling for stored procedures when server is
started --skip-grant-tables
- Renamed view_skip_grants to skip_grants and added test cases for this
sql/sql_parse.cc
1.431 05/05/26 16:44:42 msvensson@neptunus.(none) +2 -2
On ly perform automatic privilege add/revoke if server is not started with
--skip-grant-tables
sql/mysqld.cc
1.454 05/05/26 16:44:42 msvensson@neptunus.(none) +2 -1
Make opt_noacl global
sql/mysql_priv.h
1.296 05/05/26 16:44:42 msvensson@neptunus.(none) +1 -1
Make opt_noacl global
mysql-test/t/skip_grants.test
1.3 05/05/26 16:44:42 msvensson@neptunus.(none) +9 -1
Added test for create and drop procedure with --skip-grant-tables
mysql-test/r/skip_grants.result
1.3 05/05/26 16:44:42 msvensson@neptunus.(none) +4 -0
Added test for create and drop procedure with --skip-grant-tables
mysql-test/t/skip_grants-master.opt
1.2 05/05/26 10:40:47 msvensson@neptunus.(none) +0 -0
Rename: mysql-test/t/view_skip_grants-master.opt ->
mysql-test/t/skip_grants-master.opt
mysql-test/r/skip_grants.result
1.2 05/05/26 10:40:23 msvensson@neptunus.(none) +0 -0
Rename: mysql-test/r/view_skip_grants.result -> mysql-test/r/skip_grants.result
mysql-test/t/skip_grants.test
1.2 05/05/26 10:40:04 msvensson@neptunus.(none) +0 -0
Rename: mysql-test/t/view_skip_grants.test -> mysql-test/t/skip_grants.test
# 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: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/bug9993
--- 1.295/sql/mysql_priv.h 2005-05-09 18:44:21 +02:00
+++ 1.296/sql/mysql_priv.h 2005-05-26 16:44:42 +02:00
@@ -1095,7 +1095,7 @@
extern my_bool opt_readonly, lower_case_file_system;
extern my_bool opt_enable_named_pipe, opt_sync_frm, opt_allow_suspicious_udfs;
extern my_bool opt_secure_auth;
-extern my_bool sp_automatic_privileges;
+extern my_bool sp_automatic_privileges, opt_noacl;
extern my_bool opt_old_style_user_limits, trust_routine_creators;
extern uint opt_crash_binlog_innodb;
extern char *shared_memory_base_name, *mysqld_unix_port;
--- 1.453/sql/mysqld.cc 2005-05-16 08:12:32 +02:00
+++ 1.454/sql/mysqld.cc 2005-05-26 16:44:42 +02:00
@@ -310,6 +310,7 @@
changed). False otherwise.
*/
volatile bool mqh_used = 0;
+my_bool opt_noacl;
my_bool sp_automatic_privileges= 1;
#ifdef HAVE_INITGROUPS
@@ -445,7 +446,7 @@
/* Static variables */
static bool kill_in_progress, segfaulted;
-static my_bool opt_do_pstack, opt_noacl, opt_bootstrap, opt_myisam_log;
+static my_bool opt_do_pstack, opt_bootstrap, opt_myisam_log;
static int cleanup_done;
static ulong opt_specialflag, opt_myisam_block_size;
static char *opt_logname, *opt_update_logname, *opt_binlog_index_name;
--- 1.430/sql/sql_parse.cc 2005-05-16 08:12:32 +02:00
+++ 1.431/sql/sql_parse.cc 2005-05-26 16:44:42 +02:00
@@ -3982,7 +3982,7 @@
lex->sphead= 0;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
/* only add privileges if really neccessary */
- if (sp_automatic_privileges &&
+ if (sp_automatic_privileges && !opt_noacl &&
check_procedure_access(thd, DEFAULT_CREATE_PROC_ACLS,
db, name, 1))
{
@@ -4247,7 +4247,7 @@
if (check_procedure_access(thd, ALTER_PROC_ACL, db, name, 0))
goto error;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
- if (sp_automatic_privileges &&
+ if (sp_automatic_privileges && !opt_noacl &&
sp_revoke_privileges(thd, db, name))
{
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
--- 1.1/mysql-test/r/view_skip_grants.result 2004-07-20 00:00:59 +02:00
+++ 1.3/mysql-test/r/skip_grants.result 2005-05-26 16:44:42 +02:00
@@ -1,6 +1,10 @@
drop table if exists t1,v1;
drop view if exists t1,v1;
+drop procedure if exists f1;
use test;
create table t1 (field1 INT);
CREATE VIEW v1 AS SELECT field1 FROM t1;
drop view v1;
+drop table t1;
+create procedure f1() select 1;
+drop procedure f1;
--- 1.1/mysql-test/t/view_skip_grants.test 2004-07-20 00:00:59 +02:00
+++ 1.3/mysql-test/t/skip_grants.test 2005-05-26 16:44:42 +02:00
@@ -1,6 +1,7 @@
--disable_warnings
drop table if exists t1,v1;
drop view if exists t1,v1;
+drop procedure if exists f1;
--enable_warnings
use test;
@@ -11,4 +12,11 @@
CREATE VIEW v1 AS SELECT field1 FROM t1;
drop view v1;
-drop table t1
+drop table t1;
+
+#
+# Test that we can create and drop procedure without warnings
+# see bug#9993
+#
+create procedure f1() select 1;
+drop procedure f1;
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.1839) BUG#9993 | msvensson | 27 May |