MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Jim Winstead Date:July 11 2006 7:42pm
Subject:bk commit into 5.0 tree (jimw:1.2225) BUG#17485
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of jimw. When jimw 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-07-11 12:42:03-07:00, jimw@rama.(none) +1 -0
  Bug #17485: mysql client crashes when connecting to the Instance Manager
  
    Using \U or \u in a prompt with the mysql command-line client could
    crash when connecting to the instance manager, since it does not return
    information about the user when asked by the client. This is fixed by
    having the client use what it knowns about the user (or giving up and
    saying "(unknown)").

  client/mysql.cc@stripped, 2006-07-11 12:42:01-07:00, jimw@rama.(none) +4 -2
    init_username() may not retrieve a username (such as from the instance
    manager), in which case we fall back to what was specified on the command
    line (or .cnf file) or finally (unknown).

# 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:	jimw
# Host:	rama.(none)
# Root:	/home/jimw/my/mysql-5.0-17485

--- 1.206/client/mysql.cc	2006-07-11 12:42:07 -07:00
+++ 1.207/client/mysql.cc	2006-07-11 12:42:07 -07:00
@@ -3623,12 +3623,14 @@
       case 'U':
 	if (!full_username)
 	  init_username();
-	processed_prompt.append(full_username);
+        processed_prompt.append(full_username ? full_username :
+                                (current_user ?  current_user : "(unknown)"));
 	break;
       case 'u':
 	if (!full_username)
 	  init_username();
-	processed_prompt.append(part_username);
+        processed_prompt.append(part_username ? part_username :
+                                (current_user ?  current_user : "(unknown)"));
 	break;
       case PROMPT_CHAR:
 	processed_prompt.append(PROMPT_CHAR);
Thread
bk commit into 5.0 tree (jimw:1.2225) BUG#17485Jim Winstead11 Jul