List:Internals« Previous MessageNext Message »
From:Sergei Golubchik Date:March 30 2005 10:43am
Subject:bk commit into 4.0 tree (serg:1.2077)
View as plain text  
Below is the list of changes that have just been committed into a local
4.0 repository of serg. When serg 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.2077 05/03/30 10:43:24 serg@stripped +1 -0
  don't strcmp db if it's a pattern

  sql/sql_parse.cc
    1.392 05/03/30 10:43:16 serg@stripped +5 -4
    don't strcmp db if it's a pattern

# 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:	serg
# Host:	serg.mylan
# Root:	/usr/home/serg/Abk/mysql-4.0

--- 1.391/sql/sql_parse.cc	Sat Mar 26 19:46:38 2005
+++ 1.392/sql/sql_parse.cc	Wed Mar 30 10:43:16 2005
@@ -2704,6 +2704,7 @@
   DBUG_PRINT("enter",("want_access: %lu  master_access: %lu", want_access,
 		      thd->master_access));
   ulong db_access,dummy;
+  bool  db_is_pattern= test(want_access & GRANT_ACL);
   if (save_priv)
     *save_priv=0;
   else
@@ -2725,9 +2726,9 @@
     */
     db_access= thd->db_access;
     if (!(thd->master_access & SELECT_ACL) &&
-	(db && (!thd->db || strcmp(db,thd->db))))
+	(db && (!thd->db || db_is_pattern || strcmp(db,thd->db))))
       db_access=acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr,
-			thd->priv_user, db, test(want_access & GRANT_ACL));
+			thd->priv_user, db, db_is_pattern);
     *save_priv=thd->master_access | db_access;
     DBUG_RETURN(FALSE);
   }
@@ -2745,9 +2746,9 @@
   if (db == any_db)
     DBUG_RETURN(FALSE);				// Allow select on anything
 
-  if (db && (!thd->db || strcmp(db,thd->db)))
+  if (db && (!thd->db || db_is_pattern || strcmp(db,thd->db)))
     db_access=acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr,
-		      thd->priv_user, db, test(want_access & GRANT_ACL));
+		      thd->priv_user, db, db_is_pattern);
   else
     db_access=thd->db_access;
   // Remove SHOW attribute and access rights we already have
Thread
bk commit into 4.0 tree (serg:1.2077)Sergei Golubchik30 Mar