List:Commits« Previous MessageNext Message »
From:eugene Date:June 29 2006 10:01pm
Subject:bk commit into 5.0 tree (evgen:1.2200)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen 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.2200 06/06/30 02:01:12 evgen@stripped +2 -0
  Merge moonbone.local:/home/evgen/bk-trees/mysql-5.0-opt
  into moonbone.local:/work/merge-5.0

  strings/ctype-mb.c
    1.50 06/06/30 02:01:11 evgen@stripped +0 -0
    Auto merged

  sql/sql_select.cc
    1.428 06/06/30 02:01:11 evgen@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:	evgen
# Host:	moonbone.local
# Root:	/work/merge-5.0/RESYNC

--- 1.427/sql/sql_select.cc	2006-06-28 16:53:48 +04:00
+++ 1.428/sql/sql_select.cc	2006-06-30 02:01:11 +04:00
@@ -14449,10 +14449,19 @@
     str->append(STRING_WITH_LEN("sql_buffer_result "));
   if (options & OPTION_FOUND_ROWS)
     str->append(STRING_WITH_LEN("sql_calc_found_rows "));
-  if (!thd->lex->safe_to_cache_query)
-    str->append(STRING_WITH_LEN("sql_no_cache "));
-  if (options & OPTION_TO_QUERY_CACHE)
-    str->append(STRING_WITH_LEN("sql_cache "));
+  switch (sql_cache)
+  {
+    case SQL_NO_CACHE:
+      str->append(STRING_WITH_LEN("sql_no_cache "));
+      break;
+    case SQL_CACHE:
+      str->append(STRING_WITH_LEN("sql_cache "));
+      break;
+    case SQL_CACHE_UNSPECIFIED:
+      break;
+    default:
+      DBUG_ASSERT(0);
+  }
 
   //Item List
   bool first= 1;

--- 1.49/strings/ctype-mb.c	2006-06-22 11:08:26 +04:00
+++ 1.50/strings/ctype-mb.c	2006-06-30 02:01:11 +04:00
@@ -24,12 +24,12 @@
 void my_caseup_str_mb(CHARSET_INFO * cs, char *str)
 {
   register uint32 l;
-  register char *end=str+strlen(str); /* BAR TODO: remove strlen() call */
   register uchar *map=cs->to_upper;
   
   while (*str)
   {
-    if ((l=my_ismbchar(cs, str,end)))
+    /* Pointing after the '\0' is safe here. */
+    if ((l=my_ismbchar(cs, str, str + cs->mbmaxlen)))
       str+=l;
     else
     { 
@@ -42,12 +42,12 @@
 void my_casedn_str_mb(CHARSET_INFO * cs, char *str)
 {
   register uint32 l;
-  register char *end=str+strlen(str);
   register uchar *map=cs->to_lower;
   
   while (*str)
   {
-    if ((l=my_ismbchar(cs, str,end)))
+    /* Pointing after the '\0' is safe here. */
+    if ((l=my_ismbchar(cs, str, str + cs->mbmaxlen)))
       str+=l;
     else
     {
@@ -101,15 +101,18 @@
   return srclen;
 }
 
+/*
+  my_strcasecmp_mb() returns 0 if strings are equal, non-zero otherwise.
+ */
 int my_strcasecmp_mb(CHARSET_INFO * cs,const char *s, const char *t)
 {
   register uint32 l;
-  register const char *end=s+strlen(s);
   register uchar *map=cs->to_upper;
   
-  while (s<end)
+  while (*s && *t)
   {
-    if ((l=my_ismbchar(cs, s,end)))
+    /* Pointing after the '\0' is safe here. */
+    if ((l=my_ismbchar(cs, s, s + cs->mbmaxlen)))
     {
       while (l--)
         if (*s++ != *t++) 
@@ -120,7 +123,8 @@
     else if (map[(uchar) *s++] != map[(uchar) *t++])
       return 1;
   }
-  return *t;
+  /* At least one of '*s' and '*t' is zero here. */
+  return (*t != *s);
 }
 
 
Thread
bk commit into 5.0 tree (evgen:1.2200)eugene30 Jun