Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh 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, 2007-03-14 18:23:29+04:00, gluh@stripped +3 -0
Bug#2628 5electing information_schema crahes server
The crash happens when 'skip-grant-tables' is enabled.
We skip the filling of I_S privilege tables
if acl_cache is not initialized.
mysql-test/r/skip_grants.result@stripped, 2007-03-14 18:23:27+04:00, gluh@stripped +12 -0
test case
mysql-test/t/skip_grants.test@stripped, 2007-03-14 18:23:27+04:00, gluh@stripped +8 -0
test case
sql/sql_acl.cc@stripped, 2007-03-14 18:23:27+04:00, gluh@stripped +4 -0
skip filling of I_S privilege tables
if acl_cache is not initialized.
# 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: gluh
# Host: eagle.(none)
# Root: /home/gluh/MySQL/Bugs/5.0.26285
--- 1.217/sql/sql_acl.cc 2007-02-22 18:59:55 +04:00
+++ 1.218/sql/sql_acl.cc 2007-03-14 18:23:27 +04:00
@@ -5882,6 +5882,8 @@ int fill_schema_user_privileges(THD *thd
char *curr_host= thd->security_ctx->priv_host_name();
DBUG_ENTER("fill_schema_user_privileges");
+ if (!initialized)
+ DBUG_RETURN(0);
pthread_mutex_lock(&acl_cache->lock);
for (counter=0 ; counter < acl_users.elements ; counter++)
@@ -5941,6 +5943,8 @@ int fill_schema_schema_privileges(THD *t
char *curr_host= thd->security_ctx->priv_host_name();
DBUG_ENTER("fill_schema_schema_privileges");
+ if (!initialized)
+ DBUG_RETURN(0);
pthread_mutex_lock(&acl_cache->lock);
for (counter=0 ; counter < acl_dbs.elements ; counter++)
--- 1.9/mysql-test/r/skip_grants.result 2006-03-10 15:40:12 +04:00
+++ 1.10/mysql-test/r/skip_grants.result 2007-03-14 18:23:27 +04:00
@@ -58,3 +58,15 @@ DROP PROCEDURE p3;
DROP FUNCTION f1;
DROP FUNCTION f2;
DROP FUNCTION f3;
+select count(*) from information_schema.COLUMN_PRIVILEGES;
+count(*)
+0
+select count(*) from information_schema.SCHEMA_PRIVILEGES;
+count(*)
+0
+select count(*) from information_schema.TABLE_PRIVILEGES;
+count(*)
+0
+select count(*) from information_schema.USER_PRIVILEGES;
+count(*)
+0
--- 1.11/mysql-test/t/skip_grants.test 2006-03-10 15:40:12 +04:00
+++ 1.12/mysql-test/t/skip_grants.test 2007-03-14 18:23:27 +04:00
@@ -108,3 +108,11 @@ DROP PROCEDURE p3;
DROP FUNCTION f1;
DROP FUNCTION f2;
DROP FUNCTION f3;
+
+#
+# Bug#26285 Selecting information_schema crahes server
+#
+select count(*) from information_schema.COLUMN_PRIVILEGES;
+select count(*) from information_schema.SCHEMA_PRIVILEGES;
+select count(*) from information_schema.TABLE_PRIVILEGES;
+select count(*) from information_schema.USER_PRIVILEGES;
| Thread |
|---|
| • bk commit into 5.0 tree (gluh:1.2475) BUG#2628 | gluh | 14 Mar |