List:Commits« Previous MessageNext Message »
From:msvensson Date:October 7 2006 5:09pm
Subject:bk commit into 4.1 tree (msvensson:1.2565)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 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@stripped, 2006-10-07 19:09:40+02:00, msvensson@neptunus.(none) +1 -0
  Two implementations of "get_err_code_from_name", one use if mysqld_ername.h is available and oe if it's not
  Declare "to_ptr" first in block 

  client/mysqltest.c@stripped, 2006-10-07 19:09:38+02:00, msvensson@neptunus.(none) +12 -11
    Two implementations of "get_err_code_from_name", one use if mysqld_ername.h is available and oe if it's not
    Declare "to_ptr" first in block 

# 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/mysql-4.1-maint

--- 1.205/client/mysqltest.c	2006-10-07 19:09:44 +02:00
+++ 1.206/client/mysqltest.c	2006-10-07 19:09:44 +02:00
@@ -2472,17 +2472,13 @@
 #include <mysqld_ername.h>
   { 0, 0 }
 };
-#define HAVE_MYSQLD_ERNAME
-#endif
-
 
 uint get_errcode_from_name(char *error_name, char *error_end)
 {
-  DBUG_ENTER("get_errcode_from_name");
-#ifdef HAVE_MYSQLD_ERNAME
-
   /* SQL error as string */
   st_error *e= global_error_names;
+
+  DBUG_ENTER("get_errcode_from_name");
   DBUG_PRINT("enter", ("error_name: %s", error_name));
 
   /* Loop through the array of known error names */
@@ -2501,13 +2497,17 @@
   }
   if (!e->name)
     die("Unknown SQL error name '%s'", error_name);
+  DBUG_RETURN(0);
+}
 #else
-  LINT_INIT(error_name);
-  LINT_INIT(error_end);
+uint get_errcode_from_name(char *error_name __attribute__((unused)),
+                           char *error_end __attribute__((unused)))
+{
   abort_not_in_this_version();
-#endif
-  DBUG_RETURN(0);;
+  return 0; /* Never reached */
 }
+#endif
+
 
 
 void do_get_errcodes(struct st_command *command)
@@ -2536,6 +2536,8 @@
 
     if (*p == 'S')
     {
+      char *to_ptr= to->code.sqlstate;
+
       /*
         SQLSTATE string
         - Must be SQLSTATE_LENGTH long
@@ -2546,7 +2548,6 @@
         die("The sqlstate must be exactly %d chars long", SQLSTATE_LENGTH);
 
       /* Check sqlstate string validity */
-      char *to_ptr= to->code.sqlstate;
       while (*p && p != end)
       {
         if (my_isdigit(charset_info, *p) || my_isupper(charset_info, *p))
Thread
bk commit into 4.1 tree (msvensson:1.2565)msvensson7 Oct