List:Internals« Previous MessageNext Message »
From:msvensson Date:April 14 2005 11:56am
Subject:bk commit into 5.0 tree (msvensson:1.1820) BUG#9455
View as plain text  
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.1820 05/04/14 11:56:13 msvensson@neptunus.(none) +2 -0
  BUG#9455 mysqladmin status crash the server
   - Send error to client when mysql_change_db fails.

  sql/sql_parse.cc
    1.441 05/04/14 11:56:08 msvensson@neptunus.(none) +6 -2
    Call net_send_error(thd) if mysql_change_db fails.
    Remove comments claiming that mysql_change_db sends error the the client.

  sql/sql_db.cc
    1.108 05/04/14 11:56:08 msvensson@neptunus.(none) +3 -0
    Added a note to comment for mysql_change_db that it will not send any error to the
client.

# 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/bug9454

--- 1.107/sql/sql_db.cc	2005-03-19 01:12:22 +01:00
+++ 1.108/sql/sql_db.cc	2005-04-14 11:56:08 +02:00
@@ -1009,6 +1009,9 @@
     replication slave SQL thread (for that thread, setting of thd->db is done
     in ::exec_event() methods of log_event.cc).
 
+    This function does not send the error message to the client, if that
+    should be sent to the client, call net_send_error after this function 
+
   RETURN VALUES
     0	ok
     1	error

--- 1.440/sql/sql_parse.cc	2005-04-12 23:12:14 +02:00
+++ 1.441/sql/sql_parse.cc	2005-04-14 11:56:08 +02:00
@@ -260,13 +260,15 @@
   
 #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;
     thd->db_length= 0;
     if (mysql_change_db(thd, db))
     {
+      /* Send the error to the client */
+      net_send_error(thd);
       if (thd->user_connect)
 	decrease_user_connections(thd->user_connect);
       DBUG_RETURN(-1);
@@ -395,11 +397,13 @@
 	  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))
         {
+          /* Send error to the client */
+          net_send_error(thd);
           if (thd->user_connect)
             decrease_user_connections(thd->user_connect);
           DBUG_RETURN(-1);
Thread
bk commit into 5.0 tree (msvensson:1.1820) BUG#9455msvensson14 Apr