Below is the list of changes that have just been committed into a local
5.0 repository of tomash. When tomash 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@stripped, 2006-09-27 12:22:16+04:00, kroki@stripped +5 -0
Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug21414
MERGE: 1.1810.2057.2
mysql-test/r/sp.result@stripped, 2006-09-27 12:22:12+04:00, kroki@stripped +8 -8
Manual merge.
MERGE: 1.170.22.1
mysql-test/t/sp.test@stripped, 2006-09-27 12:22:12+04:00, kroki@stripped +2 -0
Manual merge.
MERGE: 1.174.17.1
sql/mysql_priv.h@stripped, 2006-09-27 12:00:37+04:00, kroki@stripped +0 -0
Auto merged
MERGE: 1.290.59.3
sql/sp.cc@stripped, 2006-09-27 12:00:37+04:00, kroki@stripped +0 -1
Auto merged
MERGE: 1.82.1.35
sql/sql_acl.cc@stripped, 2006-09-27 12:00:37+04:00, kroki@stripped +0 -0
Auto merged
MERGE: 1.128.33.2
# 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: kroki
# Host: moonlight.intranet
# Root: /home/tomash/src/mysql_ab/mysql-5.1-bug21414/RESYNC
--- 1.436/sql/mysql_priv.h 2006-09-27 12:22:25 +04:00
+++ 1.437/sql/mysql_priv.h 2006-09-27 12:22:25 +04:00
@@ -1553,7 +1553,6 @@ extern my_bool opt_log_queries_not_using
extern bool opt_disable_networking, opt_skip_show_db;
extern my_bool opt_character_set_client_handshake;
extern bool volatile abort_loop, shutdown_in_progress, grant_option;
-extern bool mysql_proc_table_exists;
extern uint volatile thread_count, thread_running, global_read_lock;
extern my_bool opt_sql_bin_update, opt_safe_user_create, opt_no_mix_types;
extern my_bool opt_safe_show_db, opt_local_infile, opt_myisam_use_mmap;
--- 1.212/sql/sql_acl.cc 2006-09-27 12:22:25 +04:00
+++ 1.213/sql/sql_acl.cc 2006-09-27 12:22:25 +04:00
@@ -317,7 +317,6 @@ static my_bool acl_load(THD *thd, TABLE_
DBUG_ENTER("acl_load");
grant_version++; /* Privileges updated */
- mysql_proc_table_exists= 1; // Assume mysql.proc exists
acl_cache->clear(1); // Clear locked hostname cache
--- 1.223/mysql-test/r/sp.result 2006-09-27 12:22:25 +04:00
+++ 1.224/mysql-test/r/sp.result 2006-09-27 12:22:25 +04:00
@@ -5379,5 +5379,13 @@ Procedure sql_mode Create Procedure
bug21416 CREATE DEFINER=`root`@`localhost` PROCEDURE `bug21416`()
show create procedure bug21416
drop procedure bug21416|
+DROP PROCEDURE IF EXISTS bug21414|
+CREATE PROCEDURE bug21414() SELECT 1|
+FLUSH TABLES WITH READ LOCK|
+DROP PROCEDURE bug21414|
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+UNLOCK TABLES|
+The following should succeed.
+DROP PROCEDURE bug21414|
End of 5.0 tests
drop table t1,t2;
--- 1.203/mysql-test/t/sp.test 2006-09-27 12:22:25 +04:00
+++ 1.204/mysql-test/t/sp.test 2006-09-27 12:22:25 +04:00
@@ -1,13 +1,9 @@
#
# Basic stored PROCEDURE tests
#
-# Please keep this file free of --error cases and other
-# things that will not run in a single debugged mysqld
-# process (e.g. master-slave things).
-#
# Test cases for bugs are added at the end. See template there.
#
-# Tests that require --error go into sp-error.test
+# Some tests that require --error go into sp-error.test
# Tests that require inndb go into sp_trans.test
# Tests that check privilege and security issues go to sp-security.test.
# Tests that require multiple connections, except security/privilege tests,
@@ -6295,7 +6291,30 @@ create procedure bug21416() show create
call bug21416()|
drop procedure bug21416|
+
+#
+# BUG#21414: SP: Procedure undroppable, to some extent
+#
+--disable_warnings
+DROP PROCEDURE IF EXISTS bug21414|
+--enable_warnings
+
+CREATE PROCEDURE bug21414() SELECT 1|
+
+FLUSH TABLES WITH READ LOCK|
+
+--error ER_CANT_UPDATE_WITH_READLOCK
+DROP PROCEDURE bug21414|
+
+UNLOCK TABLES|
+
+--echo The following should succeed.
+DROP PROCEDURE bug21414|
+
+
--echo End of 5.0 tests
+
+
#
# BUG#NNNN: New bug synopsis
#
--- 1.120/sql/sp.cc 2006-09-27 12:22:25 +04:00
+++ 1.121/sql/sp.cc 2006-09-27 12:22:25 +04:00
@@ -65,8 +65,6 @@ enum
MYSQL_PROC_FIELD_COUNT
};
-bool mysql_proc_table_exists= 1;
-
/* Tells what SP_DEFAULT_ACCESS should be mapped to */
#define SP_DEFAULT_ACCESS_MAPPING SP_CONTAINS_SQL
@@ -118,13 +116,6 @@ TABLE *open_proc_table_for_read(THD *thd
bool not_used;
DBUG_ENTER("open_proc_table");
- /*
- Speed up things if mysql.proc doesn't exists. mysql_proc_table_exists
- is set when we create or read stored procedure or on flush privileges.
- */
- if (!mysql_proc_table_exists)
- DBUG_RETURN(0);
-
thd->reset_n_backup_open_tables_state(backup);
bzero((char*) &tables, sizeof(tables));
@@ -134,7 +125,6 @@ TABLE *open_proc_table_for_read(THD *thd
MYSQL_LOCK_IGNORE_FLUSH)))
{
thd->restore_backup_open_tables_state(backup);
- mysql_proc_table_exists= 0;
DBUG_RETURN(0);
}
table->use_all_columns();
@@ -186,15 +176,6 @@ static TABLE *open_proc_table_for_update
if (table)
table->use_all_columns();
- /*
- Under explicit LOCK TABLES or in prelocked mode we should not
- say that mysql.proc table does not exist if we are unable to
- open and lock it for writing since this condition may be
- transient.
- */
- if (!(thd->locked_tables || thd->prelocked_mode) || table)
- mysql_proc_table_exists= test(table);
-
DBUG_RETURN(table);
}
@@ -1609,14 +1590,6 @@ sp_cache_routines_and_add_tables_aux(THD
case SP_KEY_NOT_FOUND:
ret= SP_OK;
break;
- case SP_OPEN_TABLE_FAILED:
- /*
- Force it to attempt opening it again on subsequent calls;
- otherwise we will get one error message the first time, and
- then ER_SP_PROC_TABLE_CORRUPT (below) on subsequent tries.
- */
- mysql_proc_table_exists= 1;
- /* Fall through */
default:
/*
Any error when loading an existing routine is either some problem
| Thread |
|---|
| • bk commit into 5.0 tree (kroki:1.2320) | kroki | 27 Sep |