List:Internals« Previous MessageNext Message »
From:gluh Date:April 15 2005 10:22am
Subject:bk commit into 5.0 tree (gluh:1.1831) BUG#6837
View as plain text  
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
  1.1831 05/04/15 15:22:23 gluh@stripped +1 -0
  Fix for bug#6837: Wrong error message
      function check_user(): send error message to user if mysql_change_db() returns error

  sql/sql_parse.cc
    1.441 05/04/15 15:21:23 gluh@stripped +9 -4
    Fix for bug#6837: Wrong error message
        function check_user(): send error message to user if mysql_change_db() returns error

# 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.intranet.mysql.r18.ru
# Root:	/home/gluh/MySQL/Bugs/mysql-5.0.6837

--- 1.440/sql/sql_parse.cc	Wed Apr 13 02:12:14 2005
+++ 1.441/sql/sql_parse.cc	Fri Apr 15 15:21:23 2005
@@ -260,7 +260,7 @@
   
 #ifdef NO_EMBEDDED_ACCESS_CHECKS
   thd->master_access= GLOBAL_ACLS;			// Full rights
-  /* Change database if necessary: OK or FAIL is sent in mysql_change_db */
+  /* Change database if necessary */
   if (db && db[0])
   {
     thd->db= 0;
@@ -269,6 +269,8 @@
     {
       if (thd->user_connect)
 	decrease_user_connections(thd->user_connect);
+      /* Error message is formed by mysql_change_db */
+      net_send_error(thd);
       DBUG_RETURN(-1);
     }
   }
@@ -395,13 +397,15 @@
 	  check_for_max_user_connections(thd, thd->user_connect))
 	DBUG_RETURN(-1);
 
-      /* Change database if necessary: OK or FAIL is sent in mysql_change_db */
+      /* Change database if necessary */
       if (db && db[0])
       {
         if (mysql_change_db(thd, db))
         {
           if (thd->user_connect)
             decrease_user_connections(thd->user_connect);
+          /* Error message is formed by mysql_change_db */
+          net_send_error(thd);
           DBUG_RETURN(-1);
         }
       }
@@ -734,8 +738,9 @@
 
   RETURN
      0  success, OK is sent to user, thd is updated.
-    -1  error, which is sent to user
-   > 0  error code (not sent to user)
+    -1  error, do not send the message to user later 
+   > 0  error number to be sent to user later
+
 */
 
 #ifndef EMBEDDED_LIBRARY
Thread
bk commit into 5.0 tree (gluh:1.1831) BUG#6837gluh15 Apr