List:Commits« Previous MessageNext Message »
From:serg Date:May 24 2006 12:37pm
Subject:bk commit into 5.1 tree (serg:1.2185)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mysqldev. When mysqldev 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.2185 06/05/24 14:37:18 serg@stripped +6 -0
  Merge mysql.com:/data0/mysqldev/my/mysql-5.0.22-release
  into  mysql.com:/data0/mysqldev/my/mysql-5.1-release

  configure.in
    1.355 06/05/24 14:37:05 serg@stripped +0 -2
    merged

  tests/mysql_client_test.c
    1.190 06/05/24 14:33:38 serg@stripped +0 -0
    Auto merged

  sql/sql_parse.cc
    1.551 06/05/24 14:33:37 serg@stripped +0 -0
    Auto merged

  sql/sql_lex.cc
    1.181 06/05/24 14:33:37 serg@stripped +0 -0
    Auto merged

  mysql-test/r/ctype_sjis.result
    1.10 06/05/24 14:33:37 serg@stripped +0 -0
    Auto merged

  extra/comp_err.c
    1.24 06/05/24 14:33:37 serg@stripped +0 -0
    Auto merged

# 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:	production.mysql.com
# Root:	/data0/mysqldev/my/mysql-5.1-release/RESYNC

--- 1.23/extra/comp_err.c	2006-05-24 14:22:24 +02:00
+++ 1.24/extra/comp_err.c	2006-05-24 14:33:37 +02:00
@@ -188,8 +188,9 @@
       DBUG_RETURN(1);
     }
     clean_up(lang_head, error_head);
+    DBUG_LEAVE;			/* Can't use dbug after my_end() */
     my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
-    DBUG_RETURN(0);
+    return 0;
   }
 }
 
@@ -638,7 +639,7 @@
   DBUG_ENTER("get_word");
 
   *str= find_end_of_word(start);
-  DBUG_RETURN(my_strdup_with_length(start, (uint) (*str - start),
+  DBUG_RETURN(my_strndup(start, (uint) (*str - start),
 				    MYF(MY_WME | MY_FAE)));
 }
 
@@ -672,7 +673,7 @@
   while (*str != ' ' && *str != '\t' && *str)
     str++;
   if (!(new_message->lang_short_name=
-	my_strdup_with_length(start, (uint) (str - start),
+	my_strndup(start, (uint) (str - start),
 			      MYF(MY_WME | MY_FAE))))
     DBUG_RETURN(0);				/* Fatal error */
   DBUG_PRINT("info", ("msg_slang: %s", new_message->lang_short_name));
@@ -692,7 +693,7 @@
   start= str + 1;
   str= parse_text_line(start);
 
-  if (!(new_message->text= my_strdup_with_length(start, (uint) (str - start),
+  if (!(new_message->text= my_strndup(start, (uint) (str - start),
 						 MYF(MY_WME | MY_FAE))))
     DBUG_RETURN(0);				/* Fatal error */
   DBUG_PRINT("info", ("msg_text: %s", new_message->text));

--- 1.180/sql/sql_lex.cc	2006-05-12 10:26:30 +02:00
+++ 1.181/sql/sql_lex.cc	2006-05-24 14:33:37 +02:00
@@ -319,18 +319,7 @@
       found_escape=1;
       if (lex->ptr == lex->end_of_query)
 	return 0;
-#ifdef USE_MB
-      int l;
-      if (use_mb(cs) &&
-          (l = my_ismbchar(cs,
-                           (const char *)lex->ptr,
-                           (const char *)lex->end_of_query))) {
-          lex->ptr += l;
-          continue;
-      }
-      else
-#endif
-        yySkip();
+      yySkip();
     }
     else if (c == sep)
     {
@@ -360,9 +349,6 @@
       {
 	uchar *to;
 
-        /* Re-use found_escape for tracking state of escapes */
-        found_escape= 0;
-
 	for (to=start ; str != end ; str++)
 	{
 #ifdef USE_MB
@@ -376,8 +362,7 @@
 	      continue;
 	  }
 #endif
-	  if (!found_escape &&
-              !(lex->thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) &&
+	  if (!(lex->thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) &&
               *str == '\\' && str+1 != end)
 	  {
 	    switch(*++str) {
@@ -404,20 +389,14 @@
 	      *to++= '\\';		// remember prefix for wildcard
 	      /* Fall through */
 	    default:
-              found_escape= 1;
-              str--;
+              *to++= *str;
 	      break;
 	    }
 	  }
-	  else if (!found_escape && *str == sep)
-          {
-            found_escape= 1;
-          }
+	  else if (*str == sep)
+	    *to++= *str++;		// Two ' or "
 	  else
-          {
 	    *to++ = *str;
-            found_escape= 0;
-          }
 	}
 	*to=0;
 	lex->yytoklen=(uint) (to-start);

--- 1.9/mysql-test/r/ctype_sjis.result	2006-02-22 10:09:48 +01:00
+++ 1.10/mysql-test/r/ctype_sjis.result	2006-05-24 14:33:37 +02:00
@@ -172,6 +172,6 @@
 ab_def
 drop table t1;
 SET NAMES sjis;
 8DB2939181408C5C

--- 1.189/tests/mysql_client_test.c	2006-05-03 16:03:58 +02:00
+++ 1.190/tests/mysql_client_test.c	2006-05-24 14:33:38 +02:00
@@ -12794,25 +12794,26 @@
 static void test_bug8378()
 {
 #if defined(HAVE_CHARSET_gbk) && !defined(EMBEDDED_LIBRARY)
-  MYSQL *lmysql;
+  MYSQL *old_mysql=mysql;
   char out[9]; /* strlen(TEST_BUG8378)*2+1 */
-  int len;
+  char buf[256];
+  int len, rc;
 
   myheader("test_bug8378");
 
   if (!opt_silent)
     fprintf(stdout, "\n Establishing a test connection ...");
-  if (!(lmysql= mysql_init(NULL)))
+  if (!(mysql= mysql_init(NULL)))
   {
     myerror("mysql_init() failed");
     exit(1);
   }
-  if (mysql_options(lmysql, MYSQL_SET_CHARSET_NAME, "gbk"))
+  if (mysql_options(mysql, MYSQL_SET_CHARSET_NAME, "gbk"))
   {
     myerror("mysql_options() failed");
     exit(1);
   }
-  if (!(mysql_real_connect(lmysql, opt_host, opt_user,
+  if (!(mysql_real_connect(mysql, opt_host, opt_user,
                            opt_password, current_db, opt_port,
                            opt_unix_socket, 0)))
   {
@@ -12822,12 +12823,18 @@
   if (!opt_silent)
     fprintf(stdout, " OK");
 
-  len= mysql_real_escape_string(lmysql, out, TEST_BUG8378_IN, 4);
+  len= mysql_real_escape_string(mysql, out, TEST_BUG8378_IN, 4);
 
   /* No escaping should have actually happened. */
   DIE_UNLESS(memcmp(out, TEST_BUG8378_OUT, len) == 0);
 
-  mysql_close(lmysql);
+  sprintf(buf, "SELECT '%s'", out);
+  rc=mysql_real_query(mysql, buf, strlen(buf));
+  myquery(rc);
+
+  mysql_close(mysql);
+
+  mysql=old_mysql;
 #endif
 }
 
Thread
bk commit into 5.1 tree (serg:1.2185)serg24 May