List:Commits« Previous MessageNext Message »
From:bar Date:October 3 2006 12:22pm
Subject:bk commit into 5.1 tree (bar:1.2339)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of bar. When bar 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-03 15:21:47+05:00, bar@stripped +38 -0
  After merge fix
  MERGE: 1.1810.2131.2

  BitKeeper/deleted/.del-ps_6bdb.result@stripped, 2006-10-03 15:08:27+05:00,
bar@stripped +0 -0
    Auto merged
    MERGE: 1.27.7.2

  BitKeeper/deleted/.del-ps_6bdb.result@stripped, 2006-10-03 15:08:27+05:00,
bar@stripped +0 -0
    Merge rename: mysql-test/r/ps_6bdb.result -> BitKeeper/deleted/.del-ps_6bdb.result

  client/mysql.cc@stripped, 2006-10-03 15:08:27+05:00, bar@stripped +0 -0
    Auto merged
    MERGE: 1.199.1.20

  include/m_ctype.h@stripped, 2006-10-03 15:08:28+05:00, bar@stripped +0 -0
    Auto merged
    MERGE: 1.114.1.6

  mysql-test/r/cast.result@stripped, 2006-10-03 15:08:28+05:00, bar@stripped
+0 -0
    Auto merged
    MERGE: 1.39.1.8

  mysql-test/r/ctype_utf8.result@stripped, 2006-10-03 15:08:28+05:00,
bar@stripped +0 -0
    Auto merged
    MERGE: 1.85.1.14

  mysql-test/r/loaddata.result@stripped, 2006-10-03 15:21:39+05:00,
bar@stripped +0 -3
    After merge fix
    MERGE: 1.20.1.4

  mysql-test/r/ps.result@stripped, 2006-10-03 15:08:28+05:00, bar@stripped +0
-0
    Auto merged
    MERGE: 1.56.1.19

  mysql-test/r/ps_2myisam.result@stripped, 2006-10-03 15:08:28+05:00,
bar@stripped +0 -0
    Auto merged
    MERGE: 1.39.1.4

  mysql-test/r/ps_3innodb.result@stripped, 2006-10-03 15:08:28+05:00,
bar@stripped +0 -0
    Auto merged
    MERGE: 1.42.1.4

  mysql-test/r/ps_4heap.result@stripped, 2006-10-03 15:08:29+05:00,
bar@stripped +0 -0
    Auto merged
    MERGE: 1.38.1.4

  mysql-test/r/ps_5merge.result@stripped, 2006-10-03 15:08:29+05:00,
bar@stripped +0 -0
    Auto merged
    MERGE: 1.39.1.4

  mysql-test/r/ps_7ndb.result@stripped, 2006-10-03 15:08:29+05:00,
bar@stripped +0 -0
    Auto merged
    MERGE: 1.26.1.20

  mysql-test/r/rpl_rewrt_db.result@stripped, 2006-10-03 15:21:39+05:00,
bar@stripped +0 -4
    After merge fix
    MERGE: 1.4.2.2

  mysql-test/r/rpl_rewrt_db.result@stripped, 2006-10-03 15:08:27+05:00,
bar@stripped +0 -0
    Merge rename: mysql-test/r/rpl_rewrite_db.result ->
mysql-test/r/rpl_rewrt_db.result

  mysql-test/r/select.result@stripped, 2006-10-03 15:21:39+05:00,
bar@stripped +9 -0
    After merge fix
    MERGE: 1.121.1.18

  mysql-test/r/sp-vars.result@stripped, 2006-10-03 15:21:39+05:00,
bar@stripped +0 -1
    After merge fix
    MERGE: 1.1.1.3

  mysql-test/r/strict.result@stripped, 2006-10-03 15:21:39+05:00,
bar@stripped +0 -4
    After merge fix
    MERGE: 1.25.1.5

  mysql-test/r/view.result@stripped, 2006-10-03 15:21:39+05:00, bar@stripped
+0 -2
    After merge fix
    MERGE: 1.138.1.41

  mysql-test/r/warnings.result@stripped, 2006-10-03 15:21:39+05:00,
bar@stripped +0 -30
    After merge fix
    MERGE: 1.34.1.5

  mysql-test/t/cast.test@stripped, 2006-10-03 15:08:30+05:00, bar@stripped +0
-0
    Auto merged
    MERGE: 1.31.1.2

  mysql-test/t/ctype_utf8.test@stripped, 2006-10-03 15:08:30+05:00,
bar@stripped +0 -0
    Auto merged
    MERGE: 1.84.1.8

  mysql-test/t/strict.test@stripped, 2006-10-03 15:08:30+05:00, bar@stripped
+0 -0
    Auto merged
    MERGE: 1.19.1.4

  sql/field.cc@stripped, 2006-10-03 15:21:39+05:00, bar@stripped +7 -1
    After merge fix
    MERGE: 1.256.1.69

  sql/field_conv.cc@stripped, 2006-10-03 15:08:31+05:00, bar@stripped +0 -0
    Auto merged
    MERGE: 1.52.1.5

  sql/item_func.cc@stripped, 2006-10-03 15:08:31+05:00, bar@stripped +0 -0
    Auto merged
    MERGE: 1.270.22.1

  strings/ctype-big5.c@stripped, 2006-10-03 15:08:31+05:00, bar@stripped +0
-0
    Auto merged
    MERGE: 1.80.1.10

  strings/ctype-bin.c@stripped, 2006-10-03 15:08:32+05:00, bar@stripped +0 -0
    Auto merged
    MERGE: 1.66.1.4

  strings/ctype-cp932.c@stripped, 2006-10-03 15:08:32+05:00, bar@stripped +0
-0
    Auto merged
    MERGE: 1.11.1.2

  strings/ctype-euc_kr.c@stripped, 2006-10-03 15:08:32+05:00, bar@stripped +0
-0
    Auto merged
    MERGE: 1.65.1.3

  strings/ctype-eucjpms.c@stripped, 2006-10-03 15:08:33+05:00, bar@stripped
+0 -0
    Auto merged
    MERGE: 1.12.1.2

  strings/ctype-gb2312.c@stripped, 2006-10-03 15:08:33+05:00, bar@stripped +0
-0
    Auto merged
    MERGE: 1.62.1.3

  strings/ctype-gbk.c@stripped, 2006-10-03 15:08:34+05:00, bar@stripped +0 -0
    Auto merged
    MERGE: 1.78.1.2

  strings/ctype-latin1.c@stripped, 2006-10-03 15:08:34+05:00, bar@stripped +0
-0
    Auto merged
    MERGE: 1.48.1.2

  strings/ctype-simple.c@stripped, 2006-10-03 15:21:39+05:00, bar@stripped
+13 -13
    After merge fix
    MERGE: 1.75.1.2

  strings/ctype-sjis.c@stripped, 2006-10-03 15:08:34+05:00, bar@stripped +0
-0
    Auto merged
    MERGE: 1.88.1.2

  strings/ctype-tis620.c@stripped, 2006-10-03 15:08:35+05:00, bar@stripped +0
-0
    Auto merged
    MERGE: 1.91.1.2

  strings/ctype-ucs2.c@stripped, 2006-10-03 15:08:35+05:00, bar@stripped +0
-0
    Auto merged
    MERGE: 1.50.1.12

  strings/ctype-ujis.c@stripped, 2006-10-03 15:08:35+05:00, bar@stripped +0
-0
    Auto merged
    MERGE: 1.69.1.2

  strings/ctype-utf8.c@stripped, 2006-10-03 15:08:35+05:00, bar@stripped +0
-0
    Auto merged
    MERGE: 1.97.1.2

# 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:	bar
# Host:	bar.intranet.mysql.r18.ru
# Root:	/usr/home/bar/mysql-5.1/RESYNC

--- 1.231/client/mysql.cc	2006-10-03 15:22:03 +05:00
+++ 1.232/client/mysql.cc	2006-10-03 15:22:03 +05:00
@@ -2493,9 +2493,14 @@
     {
       tee_fprintf(PAGER, "\t<field name=\"");
       xmlencode_print(fields[i].name, (uint) strlen(fields[i].name));
-      tee_fprintf(PAGER, "\">");
-      xmlencode_print(cur[i], lengths[i]);
-      tee_fprintf(PAGER, "</field>\n");
+      if (cur[i])
+      {
+        tee_fprintf(PAGER, "\">");
+        xmlencode_print(cur[i], lengths[i]);
+        tee_fprintf(PAGER, "</field>\n");
+      }
+      else
+        tee_fprintf(PAGER, "\" xsi:nil=\"true\" />\n");
     }
     (void) tee_fputs("  </row>\n", PAGER);
   }

--- 1.124/include/m_ctype.h	2006-10-03 15:22:03 +05:00
+++ 1.125/include/m_ctype.h	2006-10-03 15:22:03 +05:00
@@ -217,6 +217,9 @@
 			 int *err);
   longlong    (*strtoll10)(struct charset_info_st *cs,
                            const char *nptr, char **endptr, int *error);
+  ulonglong   (*strntoull10rnd)(struct charset_info_st *cs,
+                                const char *str, uint length, int unsigned_fl,
+                                char **endptr, int *error);
   ulong        (*scan)(struct charset_info_st *, const char *b, const char *e,
 		       int sq);
 } MY_CHARSET_HANDLER;
@@ -356,6 +359,13 @@
                            const char *nptr, char **endptr, int *error);
 longlong my_strtoll10_ucs2(CHARSET_INFO *cs, 
                            const char *nptr, char **endptr, int *error);
+
+ulonglong my_strntoull10rnd_8bit(CHARSET_INFO *cs,
+                                 const char *str, uint length, int unsigned_fl,
+                                 char **endptr, int *error);
+ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs, 
+                                 const char *str, uint length, int unsigned_fl,
+                                 char **endptr, int *error);
 
 void my_fill_8bit(CHARSET_INFO *cs, char* to, uint l, int fill);
 

--- 1.342/sql/field.cc	2006-10-03 15:22:03 +05:00
+++ 1.343/sql/field.cc	2006-10-03 15:22:03 +05:00
@@ -2553,28 +2553,26 @@
   ASSERT_COLUMN_MARKED_FOR_WRITE;
   int not_used;				// We can ignore result from str2int
   char *end;
-  long tmp= my_strntol(cs, from, len, 10, &end, &not_used);
-  int error= 0;
+  int error;
 
   if (unsigned_flag)
   {
-    if (tmp < 0)
-    {
-      tmp=0; /* purecov: inspected */
-      set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
-      error= 1;
-    }
-    else if (tmp > 255)
+    ulonglong tmp= cs->cset->strntoull10rnd(cs, from, len, 1, &end,
&error);
+    if (error == MY_ERRNO_ERANGE || tmp > 255)
     {
-      tmp= 255;
+      set_if_smaller(tmp, 255);
       set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
       error= 1;
     }
     else if (table->in_use->count_cuted_fields &&
check_int(from,len,end,cs))
       error= 1;
+    else
+      error= 0;
+    ptr[0]= (char) tmp;
   }
   else
   {
+    longlong tmp= cs->cset->strntoull10rnd(cs, from, len, 0, &end, &error);
     if (tmp < -128)
     {
       tmp= -128;
@@ -2589,8 +2587,10 @@
     }
     else if (table->in_use->count_cuted_fields &&
check_int(from,len,end,cs))
       error= 1;
+    else
+      error= 0;
+    ptr[0]= (char) tmp;
   }
-  ptr[0]= (char) tmp;
   return error;
 }
 
@@ -2763,28 +2763,33 @@
   ASSERT_COLUMN_MARKED_FOR_WRITE;
   int not_used;				// We can ignore result from str2int
   char *end;
-  long tmp= my_strntol(cs, from, len, 10, &end, &not_used);
-  int error= 0;
+  int error;
 
   if (unsigned_flag)
   {
-    if (tmp < 0)
+    ulonglong tmp= cs->cset->strntoull10rnd(cs, from, len, 1, &end,
&error);
+    if (error == MY_ERRNO_ERANGE || tmp > UINT_MAX16)
     {
-      tmp=0;
-      set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
-      error= 1;
-    }
-    else if (tmp > UINT_MAX16)
-    {
-      tmp=UINT_MAX16;
+      set_if_smaller(tmp, UINT_MAX16);
       set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
       error= 1;
     }
     else if (table->in_use->count_cuted_fields &&
check_int(from,len,end,cs))
       error= 1;
+    else
+      error= 0;
+#ifdef WORDS_BIGENDIAN
+    if (table->s->db_low_byte_first)
+    {
+      int2store(ptr,tmp);
+    }
+    else
+#endif
+      shortstore(ptr,(short) tmp);
   }
   else
   {
+    longlong tmp= cs->cset->strntoull10rnd(cs, from, len, 0, &end, &error);
     if (tmp < INT_MIN16)
     {
       tmp= INT_MIN16;
@@ -2799,15 +2804,17 @@
     }
     else if (table->in_use->count_cuted_fields &&
check_int(from,len,end,cs))
       error= 1;
-  }
+    else
+      error= 0;
 #ifdef WORDS_BIGENDIAN
-  if (table->s->db_low_byte_first)
-  {
-    int2store(ptr,tmp);
-  }
-  else
+    if (table->s->db_low_byte_first)
+    {
+      int2store(ptr,tmp);
+    }
+    else
 #endif
-    shortstore(ptr,(short) tmp);
+      shortstore(ptr,(short) tmp);
+  }
   return error;
 }
 
@@ -3043,28 +3050,26 @@
   ASSERT_COLUMN_MARKED_FOR_WRITE;
   int not_used;				// We can ignore result from str2int
   char *end;
-  long tmp= my_strntol(cs, from, len, 10, &end, &not_used);
-  int error= 0;
+  int error;
 
   if (unsigned_flag)
   {
-    if (tmp < 0)
+    ulonglong tmp= cs->cset->strntoull10rnd(cs, from, len, 1, &end,
&error);
+    if (error == MY_ERRNO_ERANGE || tmp > UINT_MAX24)
     {
-      tmp=0;
-      set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
-      error= 1;
-    }
-    else if (tmp >= (long) (1L << 24))
-    {
-      tmp=(long) (1L << 24)-1L;
+      set_if_smaller(tmp, UINT_MAX24);
       set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
       error= 1;
     }
     else if (table->in_use->count_cuted_fields &&
check_int(from,len,end,cs))
       error= 1;
+    else
+      error= 0;
+    int3store(ptr,tmp);
   }
   else
   {
+    longlong tmp= cs->cset->strntoull10rnd(cs, from, len, 0, &end, &error);
     if (tmp < INT_MIN24)
     {
       tmp= INT_MIN24;
@@ -3079,9 +3084,10 @@
     }
     else if (table->in_use->count_cuted_fields &&
check_int(from,len,end,cs))
       error= 1;
+    else
+      error= 0;
+    int3store(ptr,tmp);
   }
-
-  int3store(ptr,tmp);
   return error;
 }
 
@@ -3290,58 +3296,43 @@
   int error;
   char *end;
 
-  tmp_scan= cs->cset->scan(cs, from, from+len, MY_SEQ_SPACES);
-  len-= tmp_scan;
-  from+= tmp_scan;
-
-  end= (char*) from+len;
-  tmp= cs->cset->strtoll10(cs, from, &end, &error);
-
-  if (error != MY_ERRNO_EDOM)
+  if (unsigned_flag)
   {
-    if (unsigned_flag)
+    ulonglong tmp= cs->cset->strntoull10rnd(cs, from, len, 1, &end,
&error);
+    if (error == MY_ERRNO_ERANGE || tmp > (ulonglong) UINT_MAX32)
     {
-      if (error < 0)
-      {
-        error= 1;
-        tmp= 0;
-      }
-      else if ((ulonglong) tmp > (ulonglong) UINT_MAX32)
-      {
-        tmp= UINT_MAX32;
-        error= 1;
-      }
-      else
-        error= 0;
+      set_if_smaller(tmp, (ulonglong) UINT_MAX32);
+      set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
+      error= 1;
     }
+    else if (table->in_use->count_cuted_fields &&
check_int(from,len,end,cs))
+      error= 1;
     else
-    {
-      if (error < 0)
-      {
-        error= 0;
-        if (tmp < INT_MIN32)
-        {
-          tmp= INT_MIN32;
-          error= 1;
-        }
-      }
-      else if (tmp > INT_MAX32)
-      {
-        tmp= INT_MAX32;
-        error= 1;
-      }
-    }
+      error= 0;
+    store_tmp= (long) tmp;
   }
-  if (error)
+  else
   {
-    error= error != MY_ERRNO_EDOM ? 1 : 2;
-    set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
+    longlong tmp= cs->cset->strntoull10rnd(cs, from, len, 0, &end, &error);
+    if (tmp < INT_MIN32)
+    {
+      tmp= INT_MIN32;
+      set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
+      error= 1;
+    }
+    else if (tmp > INT_MAX32)
+    {
+      tmp=INT_MAX32;
+      set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
+      error= 1;
+    }
+    else if (table->in_use->count_cuted_fields &&
check_int(from,len,end,cs))
+      error= 1;
+    else
+      error= 0;
+    store_tmp= (long) tmp;
   }
-  else if (from+len != end && table->in_use->count_cuted_fields &&
-           check_int(from,len,end,cs))
-    error= 2;
     
-  store_tmp= (long) tmp;
 #ifdef WORDS_BIGENDIAN
   if (table->s->db_low_byte_first)
   {
@@ -3586,30 +3577,18 @@
   longlong tmp;
   int error= 0;
   char *end;
+  ulonglong tmp;
 
-  tmp= cs->cset->scan(cs, from, from+len, MY_SEQ_SPACES);
-  len-= (uint)tmp;
-  from+= tmp;
-  if (unsigned_flag)
-  {
-    if (!len || test_if_minus(cs, from, from + len))
-    {
-      tmp=0;					// Set negative to 0
-      error= 1;
-    }
-    else
-      tmp=(longlong) my_strntoull(cs,from,len,10,&end,&error);
-  }
-  else
-    tmp=my_strntoll(cs,from,len,10,&end,&error);
-  if (error)
+  tmp= cs->cset->strntoull10rnd(cs,from,len,unsigned_flag,&end,&error);
+  if (error == MY_ERRNO_ERANGE)
   {
     set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
     error= 1;
   }
-  else if (from+len != end && table->in_use->count_cuted_fields &&
-           check_int(from,len,end,cs))
-    error= 2;
+  else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs))
+    error= 1;
+  else
+    error= 0;
 #ifdef WORDS_BIGENDIAN
   if (table->s->db_low_byte_first)
   {
@@ -9160,7 +9139,7 @@
     case  3: sql_type= FIELD_TYPE_MEDIUM_BLOB; break;
     default: sql_type= FIELD_TYPE_LONG_BLOB; break;
     }
-    length=(length+charset->mbmaxlen-1) / charset->mbmaxlen;
+    length/= charset->mbmaxlen;
     key_length/= charset->mbmaxlen;
     break;
   case MYSQL_TYPE_STRING:

--- 1.60/sql/field_conv.cc	2006-10-03 15:22:03 +05:00
+++ 1.61/sql/field_conv.cc	2006-10-03 15:22:03 +05:00
@@ -427,6 +427,21 @@
          length);
 }
 
+
+static void do_varstring2_mb(Copy_field *copy)
+{
+  int well_formed_error;
+  CHARSET_INFO *cs= copy->from_field->charset();
+  uint char_length= (copy->to_length - HA_KEY_BLOB_LENGTH) / cs->mbmaxlen;
+  uint from_length= uint2korr(copy->from_ptr);
+  const char *from_beg= copy->from_ptr + HA_KEY_BLOB_LENGTH;
+  uint length= cs->cset->well_formed_len(cs, from_beg, from_beg + from_length,
+                                         char_length, &well_formed_error);
+  int2store(copy->to_ptr, length);
+  memcpy(copy->to_ptr+HA_KEY_BLOB_LENGTH, from_beg, length);
+}
+ 
+
 /***************************************************************************
 ** The different functions that fills in a Copy_field class
 ***************************************************************************/
@@ -586,7 +601,8 @@
           return do_field_string;
         if (to_length != from_length)
           return (((Field_varstring*) to)->length_bytes == 1 ?
-                  do_varstring1 : do_varstring2);
+                  do_varstring1 : (from->charset()->mbmaxlen == 1 ?
+                                   do_varstring2 : do_varstring2_mb));
       }
       else if (to_length < from_length)
 	return (from->charset()->mbmaxlen == 1 ?

--- 1.89/strings/ctype-big5.c	2006-10-03 15:22:03 +05:00
+++ 1.90/strings/ctype-big5.c	2006-10-03 15:22:03 +05:00
@@ -6371,6 +6371,7 @@
   my_strntoull_8bit,
   my_strntod_8bit,
   my_strtoll10_8bit,
+  my_strntoull10rnd_8bit,
   my_scan_8bit
 };
 

--- 1.69/strings/ctype-euc_kr.c	2006-10-03 15:22:03 +05:00
+++ 1.70/strings/ctype-euc_kr.c	2006-10-03 15:22:03 +05:00
@@ -8712,6 +8712,7 @@
   my_strntoull_8bit,
   my_strntod_8bit,
   my_strtoll10_8bit,
+  my_strntoull10rnd_8bit,
   my_scan_8bit
 };
 

--- 1.66/strings/ctype-gb2312.c	2006-10-03 15:22:03 +05:00
+++ 1.67/strings/ctype-gb2312.c	2006-10-03 15:22:03 +05:00
@@ -5763,6 +5763,7 @@
   my_strntoull_8bit,
   my_strntod_8bit,
   my_strtoll10_8bit,
+  my_strntoull10rnd_8bit,
   my_scan_8bit
 };
 

--- 1.80/strings/ctype-gbk.c	2006-10-03 15:22:03 +05:00
+++ 1.81/strings/ctype-gbk.c	2006-10-03 15:22:03 +05:00
@@ -10016,6 +10016,7 @@
   my_strntoull_8bit,
   my_strntod_8bit,
   my_strtoll10_8bit,
+  my_strntoull10rnd_8bit,
   my_scan_8bit
 };
 

--- 1.90/strings/ctype-sjis.c	2006-10-03 15:22:03 +05:00
+++ 1.91/strings/ctype-sjis.c	2006-10-03 15:22:03 +05:00
@@ -4664,6 +4664,7 @@
   my_strntoull_8bit,
   my_strntod_8bit,
   my_strtoll10_8bit,
+  my_strntoull10rnd_8bit,
   my_scan_8bit
 };
 

--- 1.93/strings/ctype-tis620.c	2006-10-03 15:22:04 +05:00
+++ 1.94/strings/ctype-tis620.c	2006-10-03 15:22:04 +05:00
@@ -892,6 +892,7 @@
     my_strntoull_8bit,
     my_strntod_8bit,
     my_strtoll10_8bit,
+    my_strntoull10rnd_8bit,
     my_scan_8bit
 };
 

--- 1.71/strings/ctype-ujis.c	2006-10-03 15:22:04 +05:00
+++ 1.72/strings/ctype-ujis.c	2006-10-03 15:22:04 +05:00
@@ -8546,6 +8546,7 @@
     my_strntoull_8bit,
     my_strntod_8bit,
     my_strtoll10_8bit,
+    my_strntoull10rnd_8bit,
     my_scan_8bit
 };
 

--- 1.6/mysql-test/r/sp-vars.result	2006-10-03 15:22:04 +05:00
+++ 1.7/mysql-test/r/sp-vars.result	2006-10-03 15:22:04 +05:00
@@ -896,7 +896,7 @@
 @user_var
 0
 Warnings:
-Warning	1264	Out of range value for column 'sp_var' at row 1
+Warning	1366	Incorrect integer value: 'Hello, world!' for column 'sp_var' at row 1
 DROP PROCEDURE p1;
 DROP TABLE t1;
 

--- 1.102/mysql-test/r/ctype_utf8.result	2006-10-03 15:22:04 +05:00
+++ 1.103/mysql-test/r/ctype_utf8.result	2006-10-03 15:22:04 +05:00
@@ -1449,3 +1449,21 @@
 execute my_stmt using @a;
 a	b
 drop table if exists t1;
+CREATE TABLE t1 (
+colA int(11) NOT NULL,
+colB varchar(255) character set utf8 NOT NULL,
+PRIMARY KEY  (colA)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO t1 (colA, colB) VALUES (1, 'foo'), (2, 'foo bar');
+CREATE TABLE t2 (
+colA int(11) NOT NULL,
+colB varchar(255) character set utf8 NOT NULL,
+KEY bad  (colA,colB(3))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO t2 (colA, colB) VALUES (1, 'foo'),(2, 'foo bar');
+SELECT * FROM t1 JOIN t2 ON t1.colA=t2.colA AND t1.colB=t2.colB
+WHERE t1.colA < 3;
+colA	colB	colA	colB
+1	foo	1	foo
+2	foo bar	2	foo bar
+DROP TABLE t1, t2;

--- 1.93/mysql-test/t/ctype_utf8.test	2006-10-03 15:22:04 +05:00
+++ 1.94/mysql-test/t/ctype_utf8.test	2006-10-03 15:22:04 +05:00
@@ -1147,3 +1147,23 @@
 set @a:=null;
 execute my_stmt using @a;
 drop table if exists t1;
+
+#
+# Bug#19960: Inconsistent results when joining
+# InnoDB tables using partial UTF8 indexes
+#
+CREATE TABLE t1 (
+  colA int(11) NOT NULL,
+  colB varchar(255) character set utf8 NOT NULL,
+   PRIMARY KEY  (colA)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO t1 (colA, colB) VALUES (1, 'foo'), (2, 'foo bar');
+CREATE TABLE t2 (
+  colA int(11) NOT NULL,
+  colB varchar(255) character set utf8 NOT NULL,
+   KEY bad  (colA,colB(3))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO t2 (colA, colB) VALUES (1, 'foo'),(2, 'foo bar');
+SELECT * FROM t1 JOIN t2 ON t1.colA=t2.colA AND t1.colB=t2.colB
+WHERE t1.colA < 3;
+DROP TABLE t1, t2;

--- 1.71/strings/ctype-bin.c	2006-10-03 15:22:04 +05:00
+++ 1.72/strings/ctype-bin.c	2006-10-03 15:22:04 +05:00
@@ -518,6 +518,7 @@
     my_strntoull_8bit,
     my_strntod_8bit,
     my_strtoll10_8bit,
+    my_strntoull10rnd_8bit,
     my_scan_8bit
 };
 

--- 1.50/strings/ctype-latin1.c	2006-10-03 15:22:04 +05:00
+++ 1.51/strings/ctype-latin1.c	2006-10-03 15:22:04 +05:00
@@ -412,6 +412,7 @@
     my_strntoull_8bit,
     my_strntod_8bit,
     my_strtoll10_8bit,
+    my_strntoull10rnd_8bit,
     my_scan_8bit
 };
 

--- 1.62/strings/ctype-ucs2.c	2006-10-03 15:22:04 +05:00
+++ 1.63/strings/ctype-ucs2.c	2006-10-03 15:22:04 +05:00
@@ -974,6 +974,35 @@
 }
 
 
+ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs __attribute__((unused)),
+                                 const char *nptr, uint length, int unsign_fl,
+                                 char **endptr, int *err)
+{
+  char     buf[256], *b= buf;
+  ulonglong res;
+  const uchar *end, *s= (const uchar*) nptr;
+  my_wc_t  wc;
+  int      cnv;
+
+  /* Cut too long strings */
+  if (length >= sizeof(buf))
+    length= sizeof(buf)-1;
+  end= s + length;
+
+  while ((cnv= cs->cset->mb_wc(cs,&wc,s,end)) > 0)
+  {
+    s+= cnv;
+    if (wc > (int) (uchar) 'e' || !wc)
+      break;                            /* Can't be a number part */
+    *b++= (char) wc;
+  }
+
+  res= my_strntoull10rnd_8bit(cs, buf, b - buf, unsign_fl, endptr, err);
+  *endptr= (char*) nptr + 2 * (uint) (*endptr- buf);
+  return res;
+}
+
+
 /*
   This is a fast version optimized for the case of radix 10 / -10
 */
@@ -1630,6 +1659,7 @@
     my_strntoull_ucs2,
     my_strntod_ucs2,
     my_strtoll10_ucs2,
+    my_strntoull10rnd_ucs2,
     my_scan_ucs2
 };
 

--- 1.79/strings/ctype-simple.c	2006-10-03 15:22:04 +05:00
+++ 1.80/strings/ctype-simple.c	2006-10-03 15:22:04 +05:00
@@ -17,6 +17,7 @@
 #include <my_global.h>
 #include "m_string.h"
 #include "m_ctype.h"
+#include "my_sys.h"  /* Needed for MY_ERRNO_ERANGE */
 #include <errno.h>
 
 #include "stdarg.h"
@@ -1367,6 +1368,341 @@
 }
 
 
+#undef  ULONGLONG_MAX
+/*
+  Needed under MetroWerks Compiler, since MetroWerks compiler does not
+  properly handle a constant expression containing a mod operator
+*/
+#if defined(__NETWARE__) && defined(__MWERKS__)
+static ulonglong ulonglong_max= ~(ulonglong) 0;
+#define ULONGLONG_MAX ulonglong_max
+#else
+#define ULONGLONG_MAX           (~(ulonglong) 0)
+#endif /* __NETWARE__ && __MWERKS__ */
+
+    
+#define CUTOFF  (ULONGLONG_MAX / 10)
+#define CUTLIM  (ULONGLONG_MAX % 10)
+#define DIGITS_IN_ULONGLONG 20
+
+static ulonglong d10[DIGITS_IN_ULONGLONG]=
+{
+  1,
+  10,
+  100,
+  1000,
+  10000,
+  100000,
+  1000000,
+  10000000,
+  100000000,
+  1000000000,
+  10000000000ULL,
+  100000000000ULL,
+  1000000000000ULL,
+  10000000000000ULL,
+  100000000000000ULL,
+  1000000000000000ULL,
+  10000000000000000ULL,
+  100000000000000000ULL,
+  1000000000000000000ULL,
+  10000000000000000000ULL
+};
+
+
+/*
+
+  Convert a string to unsigned long long integer value
+  with rounding.
+  
+  SYNOPSYS
+    my_strntoull10_8bit()
+      cs              in      pointer to character set
+      str             in      pointer to the string to be converted
+      length          in      string length
+      unsigned_flag   in      whether the number is unsigned
+      endptr          out     pointer to the stop character
+      error           out     returned error code
+
+  DESCRIPTION
+    This function takes the decimal representation of integer number
+    from string str and converts it to an signed or unsigned
+    long long integer value.
+    Space characters and tab are ignored.
+    A sign character might precede the digit characters.
+    The number may have any number of pre-zero digits.
+    The number may have decimal point and exponent.
+    Rounding is always done in "away from zero" style:
+      0.5  ->   1
+     -0.5  ->  -1
+
+    The function stops reading the string str after "length" bytes
+    or at the first character that is not a part of correct number syntax:
+
+    <signed numeric literal> ::=
+      [ <sign> ] <exact numeric literal> [ E [ <sign> ] <unsigned
integer> ]
+
+    <exact numeric literal> ::=
+                        <unsigned integer> [ <period> [ <unsigned
integer> ] ]
+                      | <period> <unsigned integer>
+    <unsigned integer>   ::= <digit>...
+     
+  RETURN VALUES
+    Value of string as a signed/unsigned longlong integer
+
+    endptr cannot be NULL. The function will store the end pointer
+    to the stop character here.
+
+    The error parameter contains information how things went:
+    0	     ok
+    ERANGE   If the the value of the converted number is out of range
+    In this case the return value is:
+    - ULONGLONG_MAX if unsigned_flag and the number was too big
+    - 0 if unsigned_flag and the number was negative
+    - LONGLONG_MAX if no unsigned_flag and the number is too big
+    - LONGLONG_MIN if no unsigned_flag and the number it too big negative
+    
+    EDOM If the string didn't contain any digits.
+    In this case the return value is 0.
+*/
+
+ulonglong
+my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)),
+                       const char *str, uint length, int unsigned_flag,
+                       char **endptr, int *error)
+{
+  const char *dot, *end9, *beg, *end= str + length;
+  ulonglong ull;
+  ulong ul;
+  unsigned char ch;
+  int shift= 0, digits= 0, negative, addon;
+
+  /* Skip leading spaces and tabs */
+  for ( ; str < end && (*str == ' ' || *str == '\t') ; str++);
+
+  if (str >= end)
+    goto ret_edom;
+
+  if ((negative= (*str == '-')) || *str=='+') /* optional sign */
+  {
+    if (++str == end)
+      goto ret_edom;
+  }
+
+  beg= str;
+  end9= (str + 9) > end ? end : (str + 9);
+  /* Accumulate small number into ulong, for performance purposes */
+  for (ul= 0 ; str < end9 && (ch= (unsigned char) (*str - '0')) < 10;
str++)
+  {
+    ul= ul * 10 + ch;
+  }
+  
+  if (str >= end) /* Small number without dots and expanents */
+  {
+    *endptr= (char*) str;
+    if (negative)
+    {
+      if (unsigned_flag)
+      {
+        *error= ul ? MY_ERRNO_ERANGE : 0;
+        return 0;
+      }
+      else
+      {
+        *error= 0;
+        return (ulonglong) (longlong) (long) -ul;
+      }
+    }
+    else
+    {
+      *error=0;
+      return (ulonglong) ul;
+    }
+  }
+  
+  digits= str - beg;
+
+  /* Continue to accumulate into ulonglong */
+  for (dot= NULL, ull= ul; str < end; str++)
+  {
+    if ((ch= (unsigned char) (*str - '0')) < 10)
+    {
+      if (ull < CUTOFF || (ull == CUTOFF && ch <= CUTLIM))
+      {
+        ull= ull * 10 + ch;
+        digits++;
+        continue;
+      }
+      /*
+        Adding the next digit would overflow.
+        Remember the next digit in "addon", for rounding.
+        Scan all digits with an optional single dot.
+      */
+      if (ull == CUTOFF)
+      {
+        ull= ULONGLONG_MAX;
+        addon= 1;
+        str++;
+      }
+      else
+        addon= (*str >= '5');
+      for ( ; str < end && (ch= (unsigned char) (*str - '0')) < 10; str++)
+      {
+        if (!dot)
+          shift++;
+      }
+      if (str < end && *str == '.' && !dot)
+      {
+        str++;
+        for ( ; str < end && (ch= (unsigned char) (*str - '0')) < 10;
str++);
+      }
+      goto exp;
+    }
+    
+    if (*str == '.')
+    {
+      if (dot)
+      {
+        /* The second dot character */
+        addon= 0;
+        goto exp;
+      }
+      else
+      {
+        dot= str + 1;
+      }
+      continue;
+    }
+    
+    /* Unknown character, exit the loop */
+    break; 
+  }
+  shift= dot ? dot - str : 0; /* Right shift */
+  addon= 0;
+
+exp:    /* [ E [ <sign> ] <unsigned integer> ] */
+
+  if (!digits)
+  {
+    str= beg;
+    goto ret_edom;
+  }
+  
+  if (str < end && (*str == 'e' || *str == 'E'))
+  {
+    str++;
+    if (str < end)
+    {
+      int negative_exp, exp;
+      if ((negative_exp= (*str == '-')) || *str=='+')
+      {
+        if (++str == end)
+          goto ret_sign;
+      }
+      for (exp= 0 ;
+           str < end && (ch= (unsigned char) (*str - '0')) < 10;
+           str++)
+      {
+        exp= exp * 10 + ch;
+      }
+      shift+= negative_exp ? -exp : exp;
+    }
+  }
+  
+  if (shift == 0) /* No shift, check addon digit */
+  {
+    if (addon)
+    {
+      if (ull == ULONGLONG_MAX)
+        goto ret_too_big;
+      ull++;
+    }
+    goto ret_sign;
+  }
+
+  if (shift < 0) /* Right shift */
+  {
+    ulonglong d, r;
+    
+    if (-shift >= DIGITS_IN_ULONGLONG)
+      goto ret_zero; /* Exponent is a big negative number, return 0 */
+    
+    d= d10[-shift];
+    r= (ull % d) * 2;
+    ull /= d;
+    if (r >= d)
+      ull++;
+    goto ret_sign;
+  }
+
+  if (shift > DIGITS_IN_ULONGLONG) /* Huge left shift */
+  {
+    if (!ull)
+      goto ret_sign;
+    goto ret_too_big;
+  }
+
+  for ( ; shift > 0; shift--, ull*= 10) /* Left shift */
+  {
+    if (ull > CUTOFF)
+      goto ret_too_big; /* Overflow, number too big */
+  }
+
+ret_sign:
+  *endptr= (char*) str;
+
+  if (!unsigned_flag)
+  {
+    if (negative)
+    {
+      if (ull > (ulonglong) LONGLONG_MIN)
+      {
+        *error= MY_ERRNO_ERANGE;
+        return (ulonglong) LONGLONG_MIN;
+      }
+      *error= 0;
+      return (ulonglong) -ull;
+    }
+    else
+    {
+      if (ull > (ulonglong) LONGLONG_MAX)
+      {
+        *error= MY_ERRNO_ERANGE;
+        return (ulonglong) LONGLONG_MAX;
+      }
+      *error= 0;
+      return ull;
+    }
+  }
+
+  /* Unsigned number */
+  if (negative && ull)
+  {
+    *error= MY_ERRNO_ERANGE;
+    return 0;
+  }
+  *error= 0;
+  return ull;
+
+ret_zero:
+  *endptr= (char*) str;
+  *error= 0;
+  return 0;
+
+ret_edom:
+  *endptr= (char*) str;
+  *error= MY_ERRNO_EDOM;
+  return 0;
+  
+ret_too_big:
+  *endptr= (char*) str;
+  *error= MY_ERRNO_ERANGE;
+  return unsigned_flag ?
+         ULONGLONG_MAX :
+         negative ? (ulonglong) LONGLONG_MIN : (ulonglong) LONGLONG_MAX;
+}
+
+
 /*
   Check if a constant can be propagated
 
@@ -1448,6 +1784,7 @@
     my_strntoull_8bit,
     my_strntod_8bit,
     my_strtoll10_8bit,
+    my_strntoull10rnd_8bit,
     my_scan_8bit
 };
 

--- 1.103/strings/ctype-utf8.c	2006-10-03 15:22:04 +05:00
+++ 1.104/strings/ctype-utf8.c	2006-10-03 15:22:04 +05:00
@@ -2551,6 +2551,7 @@
     my_strntoull_8bit,
     my_strntod_8bit,
     my_strtoll10_8bit,
+    my_strntoull10rnd_8bit,
     my_scan_8bit
 };
 

--- 1.182/mysql-test/r/view.result	2006-10-03 15:22:04 +05:00
+++ 1.183/mysql-test/r/view.result	2006-10-03 15:22:04 +05:00
@@ -1306,9 +1306,9 @@
 delete from t1;
 load data infile '../std_data_ln/loaddata3.dat' ignore into table v1 fields terminated by
'' enclosed by '' ignore 1 lines;
 Warnings:
-Warning	1264	Out of range value for column 'a' at row 3
+Warning	1366	Incorrect integer value: 'error      ' for column 'a' at row 3
 Error	1369	CHECK OPTION failed 'test.v1'
-Warning	1264	Out of range value for column 'a' at row 4
+Warning	1366	Incorrect integer value: 'wrong end  ' for column 'a' at row 4
 Error	1369	CHECK OPTION failed 'test.v1'
 select * from t1 order by a,b;
 a	b

--- 1.47/mysql-test/r/ps_2myisam.result	2006-10-03 15:22:04 +05:00
+++ 1.48/mysql-test/r/ps_2myisam.result	2006-10-03 15:22:04 +05:00
@@ -2689,21 +2689,21 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1265	Data truncated for column 'c1' at row 1
-Warning	1265	Data truncated for column 'c2' at row 1
-Warning	1265	Data truncated for column 'c3' at row 1
-Warning	1265	Data truncated for column 'c4' at row 1
-Warning	1265	Data truncated for column 'c5' at row 1
-Warning	1265	Data truncated for column 'c6' at row 1
+Warning	1264	Out of range value adjusted for column 'c1' at row 1
+Warning	1264	Out of range value adjusted for column 'c2' at row 1
+Warning	1264	Out of range value adjusted for column 'c3' at row 1
+Warning	1264	Out of range value adjusted for column 'c4' at row 1
+Warning	1264	Out of range value adjusted for column 'c5' at row 1
+Warning	1264	Out of range value adjusted for column 'c6' at row 1
 Warning	1264	Out of range value for column 'c7' at row 1
 Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
-c1	1
-c2	1
-c3	1
-c4	1
-c5	1
-c6	1
+c1	127
+c2	32767
+c3	8388607
+c4	2147483647
+c5	2147483647
+c6	9223372036854775807
 c7	3.40282e+38
 c8	1.11111111111111e+50
 c9	1.11111111111111e+50
@@ -2739,21 +2739,21 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1265	Data truncated for column 'c1' at row 1
-Warning	1265	Data truncated for column 'c2' at row 1
-Warning	1265	Data truncated for column 'c3' at row 1
-Warning	1265	Data truncated for column 'c4' at row 1
-Warning	1265	Data truncated for column 'c5' at row 1
-Warning	1265	Data truncated for column 'c6' at row 1
+Warning	1264	Out of range value adjusted for column 'c1' at row 1
+Warning	1264	Out of range value adjusted for column 'c2' at row 1
+Warning	1264	Out of range value adjusted for column 'c3' at row 1
+Warning	1264	Out of range value adjusted for column 'c4' at row 1
+Warning	1264	Out of range value adjusted for column 'c5' at row 1
+Warning	1264	Out of range value adjusted for column 'c6' at row 1
 Warning	1264	Out of range value for column 'c7' at row 1
 Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
-c1	-1
-c2	-1
-c3	-1
-c4	-1
-c5	-1
-c6	-1
+c1	-128
+c2	-32768
+c3	-8388608
+c4	-2147483648
+c5	-2147483648
+c6	-9223372036854775808
 c7	-3.40282e+38
 c8	-1.11111111111111e+50
 c9	-1.11111111111111e+50

--- 1.50/mysql-test/r/ps_3innodb.result	2006-10-03 15:22:04 +05:00
+++ 1.51/mysql-test/r/ps_3innodb.result	2006-10-03 15:22:04 +05:00
@@ -2672,21 +2672,21 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1265	Data truncated for column 'c1' at row 1
-Warning	1265	Data truncated for column 'c2' at row 1
-Warning	1265	Data truncated for column 'c3' at row 1
-Warning	1265	Data truncated for column 'c4' at row 1
-Warning	1265	Data truncated for column 'c5' at row 1
-Warning	1265	Data truncated for column 'c6' at row 1
+Warning	1264	Out of range value adjusted for column 'c1' at row 1
+Warning	1264	Out of range value adjusted for column 'c2' at row 1
+Warning	1264	Out of range value adjusted for column 'c3' at row 1
+Warning	1264	Out of range value adjusted for column 'c4' at row 1
+Warning	1264	Out of range value adjusted for column 'c5' at row 1
+Warning	1264	Out of range value adjusted for column 'c6' at row 1
 Warning	1264	Out of range value for column 'c7' at row 1
 Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
-c1	1
-c2	1
-c3	1
-c4	1
-c5	1
-c6	1
+c1	127
+c2	32767
+c3	8388607
+c4	2147483647
+c5	2147483647
+c6	9223372036854775807
 c7	3.40282e+38
 c8	1.11111111111111e+50
 c9	1.11111111111111e+50
@@ -2722,21 +2722,21 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1265	Data truncated for column 'c1' at row 1
-Warning	1265	Data truncated for column 'c2' at row 1
-Warning	1265	Data truncated for column 'c3' at row 1
-Warning	1265	Data truncated for column 'c4' at row 1
-Warning	1265	Data truncated for column 'c5' at row 1
-Warning	1265	Data truncated for column 'c6' at row 1
+Warning	1264	Out of range value adjusted for column 'c1' at row 1
+Warning	1264	Out of range value adjusted for column 'c2' at row 1
+Warning	1264	Out of range value adjusted for column 'c3' at row 1
+Warning	1264	Out of range value adjusted for column 'c4' at row 1
+Warning	1264	Out of range value adjusted for column 'c5' at row 1
+Warning	1264	Out of range value adjusted for column 'c6' at row 1
 Warning	1264	Out of range value for column 'c7' at row 1
 Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
-c1	-1
-c2	-1
-c3	-1
-c4	-1
-c5	-1
-c6	-1
+c1	-128
+c2	-32768
+c3	-8388608
+c4	-2147483648
+c5	-2147483648
+c6	-9223372036854775808
 c7	-3.40282e+38
 c8	-1.11111111111111e+50
 c9	-1.11111111111111e+50

--- 1.46/mysql-test/r/ps_4heap.result	2006-10-03 15:22:04 +05:00
+++ 1.47/mysql-test/r/ps_4heap.result	2006-10-03 15:22:04 +05:00
@@ -2673,21 +2673,21 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1265	Data truncated for column 'c1' at row 1
-Warning	1265	Data truncated for column 'c2' at row 1
-Warning	1265	Data truncated for column 'c3' at row 1
-Warning	1265	Data truncated for column 'c4' at row 1
-Warning	1265	Data truncated for column 'c5' at row 1
-Warning	1265	Data truncated for column 'c6' at row 1
+Warning	1264	Out of range value adjusted for column 'c1' at row 1
+Warning	1264	Out of range value adjusted for column 'c2' at row 1
+Warning	1264	Out of range value adjusted for column 'c3' at row 1
+Warning	1264	Out of range value adjusted for column 'c4' at row 1
+Warning	1264	Out of range value adjusted for column 'c5' at row 1
+Warning	1264	Out of range value adjusted for column 'c6' at row 1
 Warning	1264	Out of range value for column 'c7' at row 1
 Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
-c1	1
-c2	1
-c3	1
-c4	1
-c5	1
-c6	1
+c1	127
+c2	32767
+c3	8388607
+c4	2147483647
+c5	2147483647
+c6	9223372036854775807
 c7	3.40282e+38
 c8	1.11111111111111e+50
 c9	1.11111111111111e+50
@@ -2723,21 +2723,21 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1265	Data truncated for column 'c1' at row 1
-Warning	1265	Data truncated for column 'c2' at row 1
-Warning	1265	Data truncated for column 'c3' at row 1
-Warning	1265	Data truncated for column 'c4' at row 1
-Warning	1265	Data truncated for column 'c5' at row 1
-Warning	1265	Data truncated for column 'c6' at row 1
+Warning	1264	Out of range value adjusted for column 'c1' at row 1
+Warning	1264	Out of range value adjusted for column 'c2' at row 1
+Warning	1264	Out of range value adjusted for column 'c3' at row 1
+Warning	1264	Out of range value adjusted for column 'c4' at row 1
+Warning	1264	Out of range value adjusted for column 'c5' at row 1
+Warning	1264	Out of range value adjusted for column 'c6' at row 1
 Warning	1264	Out of range value for column 'c7' at row 1
 Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
-c1	-1
-c2	-1
-c3	-1
-c4	-1
-c5	-1
-c6	-1
+c1	-128
+c2	-32768
+c3	-8388608
+c4	-2147483648
+c5	-2147483648
+c6	-9223372036854775808
 c7	-3.40282e+38
 c8	-1.11111111111111e+50
 c9	-1.11111111111111e+50

--- 1.47/mysql-test/r/ps_5merge.result	2006-10-03 15:22:04 +05:00
+++ 1.48/mysql-test/r/ps_5merge.result	2006-10-03 15:22:04 +05:00
@@ -2609,21 +2609,21 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1265	Data truncated for column 'c1' at row 1
-Warning	1265	Data truncated for column 'c2' at row 1
-Warning	1265	Data truncated for column 'c3' at row 1
-Warning	1265	Data truncated for column 'c4' at row 1
-Warning	1265	Data truncated for column 'c5' at row 1
-Warning	1265	Data truncated for column 'c6' at row 1
+Warning	1264	Out of range value adjusted for column 'c1' at row 1
+Warning	1264	Out of range value adjusted for column 'c2' at row 1
+Warning	1264	Out of range value adjusted for column 'c3' at row 1
+Warning	1264	Out of range value adjusted for column 'c4' at row 1
+Warning	1264	Out of range value adjusted for column 'c5' at row 1
+Warning	1264	Out of range value adjusted for column 'c6' at row 1
 Warning	1264	Out of range value for column 'c7' at row 1
 Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
-c1	1
-c2	1
-c3	1
-c4	1
-c5	1
-c6	1
+c1	127
+c2	32767
+c3	8388607
+c4	2147483647
+c5	2147483647
+c6	9223372036854775807
 c7	3.40282e+38
 c8	1.11111111111111e+50
 c9	1.11111111111111e+50
@@ -2659,21 +2659,21 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1265	Data truncated for column 'c1' at row 1
-Warning	1265	Data truncated for column 'c2' at row 1
-Warning	1265	Data truncated for column 'c3' at row 1
-Warning	1265	Data truncated for column 'c4' at row 1
-Warning	1265	Data truncated for column 'c5' at row 1
-Warning	1265	Data truncated for column 'c6' at row 1
+Warning	1264	Out of range value adjusted for column 'c1' at row 1
+Warning	1264	Out of range value adjusted for column 'c2' at row 1
+Warning	1264	Out of range value adjusted for column 'c3' at row 1
+Warning	1264	Out of range value adjusted for column 'c4' at row 1
+Warning	1264	Out of range value adjusted for column 'c5' at row 1
+Warning	1264	Out of range value adjusted for column 'c6' at row 1
 Warning	1264	Out of range value for column 'c7' at row 1
 Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
-c1	-1
-c2	-1
-c3	-1
-c4	-1
-c5	-1
-c6	-1
+c1	-128
+c2	-32768
+c3	-8388608
+c4	-2147483648
+c5	-2147483648
+c6	-9223372036854775808
 c7	-3.40282e+38
 c8	-1.11111111111111e+50
 c9	-1.11111111111111e+50
@@ -5623,21 +5623,21 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1265	Data truncated for column 'c1' at row 1
-Warning	1265	Data truncated for column 'c2' at row 1
-Warning	1265	Data truncated for column 'c3' at row 1
-Warning	1265	Data truncated for column 'c4' at row 1
-Warning	1265	Data truncated for column 'c5' at row 1
-Warning	1265	Data truncated for column 'c6' at row 1
+Warning	1264	Out of range value adjusted for column 'c1' at row 1
+Warning	1264	Out of range value adjusted for column 'c2' at row 1
+Warning	1264	Out of range value adjusted for column 'c3' at row 1
+Warning	1264	Out of range value adjusted for column 'c4' at row 1
+Warning	1264	Out of range value adjusted for column 'c5' at row 1
+Warning	1264	Out of range value adjusted for column 'c6' at row 1
 Warning	1264	Out of range value for column 'c7' at row 1
 Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
-c1	1
-c2	1
-c3	1
-c4	1
-c5	1
-c6	1
+c1	127
+c2	32767
+c3	8388607
+c4	2147483647
+c5	2147483647
+c6	9223372036854775807
 c7	3.40282e+38
 c8	1.11111111111111e+50
 c9	1.11111111111111e+50
@@ -5673,21 +5673,21 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1265	Data truncated for column 'c1' at row 1
-Warning	1265	Data truncated for column 'c2' at row 1
-Warning	1265	Data truncated for column 'c3' at row 1
-Warning	1265	Data truncated for column 'c4' at row 1
-Warning	1265	Data truncated for column 'c5' at row 1
-Warning	1265	Data truncated for column 'c6' at row 1
+Warning	1264	Out of range value adjusted for column 'c1' at row 1
+Warning	1264	Out of range value adjusted for column 'c2' at row 1
+Warning	1264	Out of range value adjusted for column 'c3' at row 1
+Warning	1264	Out of range value adjusted for column 'c4' at row 1
+Warning	1264	Out of range value adjusted for column 'c5' at row 1
+Warning	1264	Out of range value adjusted for column 'c6' at row 1
 Warning	1264	Out of range value for column 'c7' at row 1
 Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
-c1	-1
-c2	-1
-c3	-1
-c4	-1
-c5	-1
-c6	-1
+c1	-128
+c2	-32768
+c3	-8388608
+c4	-2147483648
+c5	-2147483648
+c6	-9223372036854775808
 c7	-3.40282e+38
 c8	-1.11111111111111e+50
 c9	-1.11111111111111e+50

--- 1.27.7.1/mysql-test/r/ps_6bdb.result	2006-10-03 15:22:04 +05:00
+++ 1.51/BitKeeper/deleted/.del-ps_6bdb.result	2006-10-03 15:22:04 +05:00
@@ -1287,7 +1287,7 @@
 set @arg01=2;
 execute stmt1 using @arg00, @arg01;
 Warnings:
-Warning	1263	Column was set to data type implicit default; NULL supplied for NOT NULL
column 'a' at row 1
+Warning	1048	Column 'a' cannot be null
 select a,b from t1 order by a;
 a	b
 0	two
@@ -1409,7 +1409,7 @@
 a	b
 6	six
 execute stmt1 using @arg00;
-ERROR 23000: Duplicate entry '6' for key 1
+ERROR 23000: Duplicate entry '6' for key 'PRIMARY'
 set @arg00=NULL ;
 prepare stmt1 from 'insert into t1 values(0, ? )';
 execute stmt1 using @arg00;
@@ -1522,7 +1522,7 @@
 set @arg00=81 ;
 set @arg01=1 ;
 execute stmt1 using @arg00, @arg01;
-ERROR 23000: Duplicate entry '82' for key 1
+ERROR 23000: Duplicate entry '82' for key 'PRIMARY'
 drop table if exists t2 ;
 create table t2 (id int auto_increment primary key) 
 ENGINE= 'BDB'  ;
@@ -1758,31 +1758,31 @@
 show create table t5 ;
 Table	Create Table
 t5	CREATE TABLE `t5` (
-  `const01` int(1) NOT NULL default '0',
-  `param01` bigint(20) default NULL,
-  `const02` decimal(2,1) NOT NULL default '0.0',
-  `param02` decimal(65,30) default NULL,
-  `const03` double NOT NULL default '0',
-  `param03` double default NULL,
-  `const04` varchar(3) NOT NULL default '',
+  `const01` int(1) NOT NULL DEFAULT '0',
+  `param01` bigint(20) DEFAULT NULL,
+  `const02` decimal(2,1) NOT NULL DEFAULT '0.0',
+  `param02` decimal(65,30) DEFAULT NULL,
+  `const03` double NOT NULL DEFAULT '0',
+  `param03` double DEFAULT NULL,
+  `const04` varchar(3) NOT NULL DEFAULT '',
   `param04` longtext,
-  `const05` varbinary(3) NOT NULL default '',
+  `const05` varbinary(3) NOT NULL DEFAULT '',
   `param05` longblob,
-  `const06` varchar(10) NOT NULL default '',
+  `const06` varchar(10) NOT NULL DEFAULT '',
   `param06` longtext,
-  `const07` date default NULL,
+  `const07` date DEFAULT NULL,
   `param07` longblob,
-  `const08` varchar(19) NOT NULL default '',
+  `const08` varchar(19) NOT NULL DEFAULT '',
   `param08` longtext,
-  `const09` datetime default NULL,
+  `const09` datetime DEFAULT NULL,
   `param09` longblob,
-  `const10` int(10) NOT NULL default '0',
-  `param10` bigint(20) default NULL,
-  `const11` int(4) default NULL,
-  `param11` bigint(20) default NULL,
-  `const12` binary(0) default NULL,
-  `param12` bigint(20) default NULL,
-  `param13` decimal(65,30) default NULL,
+  `const10` int(10) NOT NULL DEFAULT '0',
+  `param10` bigint(20) DEFAULT NULL,
+  `const11` int(4) DEFAULT NULL,
+  `param11` bigint(20) DEFAULT NULL,
+  `const12` binary(0) DEFAULT NULL,
+  `param12` bigint(20) DEFAULT NULL,
+  `param13` decimal(65,30) DEFAULT NULL,
   `param14` longtext,
   `param15` longblob
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -1912,26 +1912,26 @@
 def					@arg10	253	23	1	Y	128	31	63
 def					@arg11	253	67	6	Y	128	30	63
 def					@arg12	253	67	6	Y	128	30	63
-def					@arg13	253	8192	10	Y	128	31	63
-def					@arg14	253	8192	19	Y	128	31	63
-def					@arg15	253	8192	19	Y	128	31	63
-def					@arg16	253	8192	8	Y	128	31	63
+def					@arg13	253	16777216	10	Y	128	31	63
+def					@arg14	253	16777216	19	Y	128	31	63
+def					@arg15	253	16777216	19	Y	128	31	63
+def					@arg16	253	16777216	8	Y	128	31	63
 def					@arg17	253	20	4	Y	128	0	63
 def					@arg18	253	20	1	Y	128	0	63
 def					@arg19	253	20	1	Y	128	0	63
-def					@arg20	253	8192	1	Y	0	31	8
-def					@arg21	253	8192	10	Y	0	31	8
-def					@arg22	253	8192	30	Y	0	31	8
-def					@arg23	253	8192	8	Y	128	31	63
-def					@arg24	253	8192	8	Y	0	31	8
-def					@arg25	253	8192	4	Y	128	31	63
-def					@arg26	253	8192	4	Y	0	31	8
-def					@arg27	253	8192	10	Y	128	31	63
-def					@arg28	253	8192	10	Y	0	31	8
-def					@arg29	253	8192	8	Y	128	31	63
-def					@arg30	253	8192	8	Y	0	31	8
-def					@arg31	253	8192	3	Y	0	31	8
-def					@arg32	253	8192	6	Y	0	31	8
+def					@arg20	253	16777216	1	Y	0	31	8
+def					@arg21	253	16777216	10	Y	0	31	8
+def					@arg22	253	16777216	30	Y	0	31	8
+def					@arg23	253	16777216	8	Y	128	31	63
+def					@arg24	253	16777216	8	Y	0	31	8
+def					@arg25	253	16777216	4	Y	128	31	63
+def					@arg26	253	16777216	4	Y	0	31	8
+def					@arg27	253	16777216	10	Y	128	31	63
+def					@arg28	253	16777216	10	Y	0	31	8
+def					@arg29	253	16777216	8	Y	128	31	63
+def					@arg30	253	16777216	8	Y	0	31	8
+def					@arg31	253	16777216	3	Y	0	31	8
+def					@arg32	253	16777216	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29
11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 select @arg01:=  c1, @arg02:=  c2, @arg03:=  c3, @arg04:=  c4,
@@ -1959,26 +1959,26 @@
 def					@arg10	253	23	0	Y	128	31	63
 def					@arg11	253	67	0	Y	128	30	63
 def					@arg12	253	67	0	Y	128	30	63
-def					@arg13	253	8192	0	Y	128	31	63
-def					@arg14	253	8192	0	Y	128	31	63
-def					@arg15	253	8192	19	Y	128	31	63
-def					@arg16	253	8192	0	Y	128	31	63
+def					@arg13	253	16777216	0	Y	128	31	63
+def					@arg14	253	16777216	0	Y	128	31	63
+def					@arg15	253	16777216	19	Y	128	31	63
+def					@arg16	253	16777216	0	Y	128	31	63
 def					@arg17	253	20	0	Y	128	0	63
 def					@arg18	253	20	0	Y	128	0	63
 def					@arg19	253	20	0	Y	128	0	63
-def					@arg20	253	8192	0	Y	0	31	8
-def					@arg21	253	8192	0	Y	0	31	8
-def					@arg22	253	8192	0	Y	0	31	8
-def					@arg23	253	8192	0	Y	128	31	63
-def					@arg24	253	8192	0	Y	0	31	8
-def					@arg25	253	8192	0	Y	128	31	63
-def					@arg26	253	8192	0	Y	0	31	8
-def					@arg27	253	8192	0	Y	128	31	63
-def					@arg28	253	8192	0	Y	0	31	8
-def					@arg29	253	8192	0	Y	128	31	63
-def					@arg30	253	8192	0	Y	0	31	8
-def					@arg31	253	8192	0	Y	0	31	8
-def					@arg32	253	8192	0	Y	0	31	8
+def					@arg20	253	16777216	0	Y	0	31	8
+def					@arg21	253	16777216	0	Y	0	31	8
+def					@arg22	253	16777216	0	Y	0	31	8
+def					@arg23	253	16777216	0	Y	128	31	63
+def					@arg24	253	16777216	0	Y	0	31	8
+def					@arg25	253	16777216	0	Y	128	31	63
+def					@arg26	253	16777216	0	Y	0	31	8
+def					@arg27	253	16777216	0	Y	128	31	63
+def					@arg28	253	16777216	0	Y	0	31	8
+def					@arg29	253	16777216	0	Y	128	31	63
+def					@arg30	253	16777216	0	Y	0	31	8
+def					@arg31	253	16777216	0	Y	0	31	8
+def					@arg32	253	16777216	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01
01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select 
@@ -2009,26 +2009,26 @@
 def					@arg10	253	23	1	Y	128	31	63
 def					@arg11	253	67	6	Y	128	30	63
 def					@arg12	253	67	6	Y	128	30	63
-def					@arg13	253	8192	10	Y	128	31	63
-def					@arg14	253	8192	19	Y	128	31	63
-def					@arg15	253	8192	19	Y	128	31	63
-def					@arg16	253	8192	8	Y	128	31	63
+def					@arg13	253	16777216	10	Y	128	31	63
+def					@arg14	253	16777216	19	Y	128	31	63
+def					@arg15	253	16777216	19	Y	128	31	63
+def					@arg16	253	16777216	8	Y	128	31	63
 def					@arg17	253	20	4	Y	128	0	63
 def					@arg18	253	20	1	Y	128	0	63
 def					@arg19	253	20	1	Y	128	0	63
-def					@arg20	253	8192	1	Y	0	31	8
-def					@arg21	253	8192	10	Y	0	31	8
-def					@arg22	253	8192	30	Y	0	31	8
-def					@arg23	253	8192	8	Y	128	31	63
-def					@arg24	253	8192	8	Y	0	31	8
-def					@arg25	253	8192	4	Y	128	31	63
-def					@arg26	253	8192	4	Y	0	31	8
-def					@arg27	253	8192	10	Y	128	31	63
-def					@arg28	253	8192	10	Y	0	31	8
-def					@arg29	253	8192	8	Y	128	31	63
-def					@arg30	253	8192	8	Y	0	31	8
-def					@arg31	253	8192	3	Y	0	31	8
-def					@arg32	253	8192	6	Y	0	31	8
+def					@arg20	253	16777216	1	Y	0	31	8
+def					@arg21	253	16777216	10	Y	0	31	8
+def					@arg22	253	16777216	30	Y	0	31	8
+def					@arg23	253	16777216	8	Y	128	31	63
+def					@arg24	253	16777216	8	Y	0	31	8
+def					@arg25	253	16777216	4	Y	128	31	63
+def					@arg26	253	16777216	4	Y	0	31	8
+def					@arg27	253	16777216	10	Y	128	31	63
+def					@arg28	253	16777216	10	Y	0	31	8
+def					@arg29	253	16777216	8	Y	128	31	63
+def					@arg30	253	16777216	8	Y	0	31	8
+def					@arg31	253	16777216	3	Y	0	31	8
+def					@arg32	253	16777216	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29
11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 set @my_key= 0 ;
@@ -2049,26 +2049,26 @@
 def					@arg10	253	23	0	Y	128	31	63
 def					@arg11	253	67	0	Y	128	30	63
 def					@arg12	253	67	0	Y	128	30	63
-def					@arg13	253	8192	0	Y	128	31	63
-def					@arg14	253	8192	0	Y	128	31	63
-def					@arg15	253	8192	19	Y	128	31	63
-def					@arg16	253	8192	0	Y	128	31	63
+def					@arg13	253	16777216	0	Y	128	31	63
+def					@arg14	253	16777216	0	Y	128	31	63
+def					@arg15	253	16777216	19	Y	128	31	63
+def					@arg16	253	16777216	0	Y	128	31	63
 def					@arg17	253	20	0	Y	128	0	63
 def					@arg18	253	20	0	Y	128	0	63
 def					@arg19	253	20	0	Y	128	0	63
-def					@arg20	253	8192	0	Y	0	31	8
-def					@arg21	253	8192	0	Y	0	31	8
-def					@arg22	253	8192	0	Y	0	31	8
-def					@arg23	253	8192	0	Y	128	31	63
-def					@arg24	253	8192	0	Y	0	31	8
-def					@arg25	253	8192	0	Y	128	31	63
-def					@arg26	253	8192	0	Y	0	31	8
-def					@arg27	253	8192	0	Y	128	31	63
-def					@arg28	253	8192	0	Y	0	31	8
-def					@arg29	253	8192	0	Y	128	31	63
-def					@arg30	253	8192	0	Y	0	31	8
-def					@arg31	253	8192	0	Y	0	31	8
-def					@arg32	253	8192	0	Y	0	31	8
+def					@arg20	253	16777216	0	Y	0	31	8
+def					@arg21	253	16777216	0	Y	0	31	8
+def					@arg22	253	16777216	0	Y	0	31	8
+def					@arg23	253	16777216	0	Y	128	31	63
+def					@arg24	253	16777216	0	Y	0	31	8
+def					@arg25	253	16777216	0	Y	128	31	63
+def					@arg26	253	16777216	0	Y	0	31	8
+def					@arg27	253	16777216	0	Y	128	31	63
+def					@arg28	253	16777216	0	Y	0	31	8
+def					@arg29	253	16777216	0	Y	128	31	63
+def					@arg30	253	16777216	0	Y	0	31	8
+def					@arg31	253	16777216	0	Y	0	31	8
+def					@arg32	253	16777216	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01
01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@@ -2097,26 +2097,26 @@
 def					@arg10	253	23	1	Y	128	31	63
 def					@arg11	253	67	6	Y	128	30	63
 def					@arg12	253	67	6	Y	128	30	63
-def					@arg13	253	8192	10	Y	128	31	63
-def					@arg14	253	8192	19	Y	128	31	63
-def					@arg15	253	8192	19	Y	128	31	63
-def					@arg16	253	8192	8	Y	128	31	63
+def					@arg13	253	16777216	10	Y	128	31	63
+def					@arg14	253	16777216	19	Y	128	31	63
+def					@arg15	253	16777216	19	Y	128	31	63
+def					@arg16	253	16777216	8	Y	128	31	63
 def					@arg17	253	20	4	Y	128	0	63
 def					@arg18	253	20	1	Y	128	0	63
 def					@arg19	253	20	1	Y	128	0	63
-def					@arg20	253	8192	1	Y	0	31	8
-def					@arg21	253	8192	10	Y	0	31	8
-def					@arg22	253	8192	30	Y	0	31	8
-def					@arg23	253	8192	8	Y	128	31	63
-def					@arg24	253	8192	8	Y	0	31	8
-def					@arg25	253	8192	4	Y	128	31	63
-def					@arg26	253	8192	4	Y	0	31	8
-def					@arg27	253	8192	10	Y	128	31	63
-def					@arg28	253	8192	10	Y	0	31	8
-def					@arg29	253	8192	8	Y	128	31	63
-def					@arg30	253	8192	8	Y	0	31	8
-def					@arg31	253	8192	3	Y	0	31	8
-def					@arg32	253	8192	6	Y	0	31	8
+def					@arg20	253	16777216	1	Y	0	31	8
+def					@arg21	253	16777216	10	Y	0	31	8
+def					@arg22	253	16777216	30	Y	0	31	8
+def					@arg23	253	16777216	8	Y	128	31	63
+def					@arg24	253	16777216	8	Y	0	31	8
+def					@arg25	253	16777216	4	Y	128	31	63
+def					@arg26	253	16777216	4	Y	0	31	8
+def					@arg27	253	16777216	10	Y	128	31	63
+def					@arg28	253	16777216	10	Y	0	31	8
+def					@arg29	253	16777216	8	Y	128	31	63
+def					@arg30	253	16777216	8	Y	0	31	8
+def					@arg31	253	16777216	3	Y	0	31	8
+def					@arg32	253	16777216	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29
11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2141,26 +2141,26 @@
 def					@arg10	253	23	0	Y	128	31	63
 def					@arg11	253	67	0	Y	128	30	63
 def					@arg12	253	67	0	Y	128	30	63
-def					@arg13	253	8192	0	Y	128	31	63
-def					@arg14	253	8192	0	Y	128	31	63
-def					@arg15	253	8192	19	Y	128	31	63
-def					@arg16	253	8192	0	Y	128	31	63
+def					@arg13	253	16777216	0	Y	128	31	63
+def					@arg14	253	16777216	0	Y	128	31	63
+def					@arg15	253	16777216	19	Y	128	31	63
+def					@arg16	253	16777216	0	Y	128	31	63
 def					@arg17	253	20	0	Y	128	0	63
 def					@arg18	253	20	0	Y	128	0	63
 def					@arg19	253	20	0	Y	128	0	63
-def					@arg20	253	8192	0	Y	0	31	8
-def					@arg21	253	8192	0	Y	0	31	8
-def					@arg22	253	8192	0	Y	0	31	8
-def					@arg23	253	8192	0	Y	128	31	63
-def					@arg24	253	8192	0	Y	0	31	8
-def					@arg25	253	8192	0	Y	128	31	63
-def					@arg26	253	8192	0	Y	0	31	8
-def					@arg27	253	8192	0	Y	128	31	63
-def					@arg28	253	8192	0	Y	0	31	8
-def					@arg29	253	8192	0	Y	128	31	63
-def					@arg30	253	8192	0	Y	0	31	8
-def					@arg31	253	8192	0	Y	0	31	8
-def					@arg32	253	8192	0	Y	0	31	8
+def					@arg20	253	16777216	0	Y	0	31	8
+def					@arg21	253	16777216	0	Y	0	31	8
+def					@arg22	253	16777216	0	Y	0	31	8
+def					@arg23	253	16777216	0	Y	128	31	63
+def					@arg24	253	16777216	0	Y	0	31	8
+def					@arg25	253	16777216	0	Y	128	31	63
+def					@arg26	253	16777216	0	Y	0	31	8
+def					@arg27	253	16777216	0	Y	128	31	63
+def					@arg28	253	16777216	0	Y	0	31	8
+def					@arg29	253	16777216	0	Y	128	31	63
+def					@arg30	253	16777216	0	Y	0	31	8
+def					@arg31	253	16777216	0	Y	0	31	8
+def					@arg32	253	16777216	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01
01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2187,26 +2187,26 @@
 def					@arg10	253	23	1	Y	128	31	63
 def					@arg11	253	67	6	Y	128	30	63
 def					@arg12	253	67	6	Y	128	30	63
-def					@arg13	253	8192	10	Y	128	31	63
-def					@arg14	253	8192	19	Y	128	31	63
-def					@arg15	253	8192	19	Y	128	31	63
-def					@arg16	253	8192	8	Y	128	31	63
+def					@arg13	253	16777216	10	Y	128	31	63
+def					@arg14	253	16777216	19	Y	128	31	63
+def					@arg15	253	16777216	19	Y	128	31	63
+def					@arg16	253	16777216	8	Y	128	31	63
 def					@arg17	253	20	4	Y	128	0	63
 def					@arg18	253	20	1	Y	128	0	63
 def					@arg19	253	20	1	Y	128	0	63
-def					@arg20	253	8192	1	Y	0	31	8
-def					@arg21	253	8192	10	Y	0	31	8
-def					@arg22	253	8192	30	Y	0	31	8
-def					@arg23	253	8192	8	Y	128	31	63
-def					@arg24	253	8192	8	Y	0	31	8
-def					@arg25	253	8192	4	Y	128	31	63
-def					@arg26	253	8192	4	Y	0	31	8
-def					@arg27	253	8192	10	Y	128	31	63
-def					@arg28	253	8192	10	Y	0	31	8
-def					@arg29	253	8192	8	Y	128	31	63
-def					@arg30	253	8192	8	Y	0	31	8
-def					@arg31	253	8192	3	Y	0	31	8
-def					@arg32	253	8192	6	Y	0	31	8
+def					@arg20	253	16777216	1	Y	0	31	8
+def					@arg21	253	16777216	10	Y	0	31	8
+def					@arg22	253	16777216	30	Y	0	31	8
+def					@arg23	253	16777216	8	Y	128	31	63
+def					@arg24	253	16777216	8	Y	0	31	8
+def					@arg25	253	16777216	4	Y	128	31	63
+def					@arg26	253	16777216	4	Y	0	31	8
+def					@arg27	253	16777216	10	Y	128	31	63
+def					@arg28	253	16777216	10	Y	0	31	8
+def					@arg29	253	16777216	8	Y	128	31	63
+def					@arg30	253	16777216	8	Y	0	31	8
+def					@arg31	253	16777216	3	Y	0	31	8
+def					@arg32	253	16777216	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29
11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 set @my_key= 0 ;
@@ -2225,26 +2225,26 @@
 def					@arg10	253	23	0	Y	128	31	63
 def					@arg11	253	67	0	Y	128	30	63
 def					@arg12	253	67	0	Y	128	30	63
-def					@arg13	253	8192	0	Y	128	31	63
-def					@arg14	253	8192	0	Y	128	31	63
-def					@arg15	253	8192	19	Y	128	31	63
-def					@arg16	253	8192	0	Y	128	31	63
+def					@arg13	253	16777216	0	Y	128	31	63
+def					@arg14	253	16777216	0	Y	128	31	63
+def					@arg15	253	16777216	19	Y	128	31	63
+def					@arg16	253	16777216	0	Y	128	31	63
 def					@arg17	253	20	0	Y	128	0	63
 def					@arg18	253	20	0	Y	128	0	63
 def					@arg19	253	20	0	Y	128	0	63
-def					@arg20	253	8192	0	Y	0	31	8
-def					@arg21	253	8192	0	Y	0	31	8
-def					@arg22	253	8192	0	Y	0	31	8
-def					@arg23	253	8192	0	Y	128	31	63
-def					@arg24	253	8192	0	Y	0	31	8
-def					@arg25	253	8192	0	Y	128	31	63
-def					@arg26	253	8192	0	Y	0	31	8
-def					@arg27	253	8192	0	Y	128	31	63
-def					@arg28	253	8192	0	Y	0	31	8
-def					@arg29	253	8192	0	Y	128	31	63
-def					@arg30	253	8192	0	Y	0	31	8
-def					@arg31	253	8192	0	Y	0	31	8
-def					@arg32	253	8192	0	Y	0	31	8
+def					@arg20	253	16777216	0	Y	0	31	8
+def					@arg21	253	16777216	0	Y	0	31	8
+def					@arg22	253	16777216	0	Y	0	31	8
+def					@arg23	253	16777216	0	Y	128	31	63
+def					@arg24	253	16777216	0	Y	0	31	8
+def					@arg25	253	16777216	0	Y	128	31	63
+def					@arg26	253	16777216	0	Y	0	31	8
+def					@arg27	253	16777216	0	Y	128	31	63
+def					@arg28	253	16777216	0	Y	0	31	8
+def					@arg29	253	16777216	0	Y	128	31	63
+def					@arg30	253	16777216	0	Y	0	31	8
+def					@arg31	253	16777216	0	Y	0	31	8
+def					@arg32	253	16777216	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01
01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
@@ -2555,12 +2555,12 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1264	Out of range value adjusted for column 'c1' at row 1
-Warning	1264	Out of range value adjusted for column 'c2' at row 1
-Warning	1264	Out of range value adjusted for column 'c3' at row 1
-Warning	1264	Out of range value adjusted for column 'c4' at row 1
-Warning	1264	Out of range value adjusted for column 'c5' at row 1
-Warning	1264	Out of range value adjusted for column 'c12' at row 1
+Warning	1264	Out of range value for column 'c1' at row 1
+Warning	1264	Out of range value for column 'c2' at row 1
+Warning	1264	Out of range value for column 'c3' at row 1
+Warning	1264	Out of range value for column 'c4' at row 1
+Warning	1264	Out of range value for column 'c5' at row 1
+Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
 c1	127
 c2	32767
@@ -2578,12 +2578,12 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1264	Out of range value adjusted for column 'c1' at row 1
-Warning	1264	Out of range value adjusted for column 'c2' at row 1
-Warning	1264	Out of range value adjusted for column 'c3' at row 1
-Warning	1264	Out of range value adjusted for column 'c4' at row 1
-Warning	1264	Out of range value adjusted for column 'c5' at row 1
-Warning	1264	Out of range value adjusted for column 'c12' at row 1
+Warning	1264	Out of range value for column 'c1' at row 1
+Warning	1264	Out of range value for column 'c2' at row 1
+Warning	1264	Out of range value for column 'c3' at row 1
+Warning	1264	Out of range value for column 'c4' at row 1
+Warning	1264	Out of range value for column 'c5' at row 1
+Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
 c1	127
 c2	32767
@@ -2601,12 +2601,12 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1264	Out of range value adjusted for column 'c1' at row 1
-Warning	1264	Out of range value adjusted for column 'c2' at row 1
-Warning	1264	Out of range value adjusted for column 'c3' at row 1
-Warning	1264	Out of range value adjusted for column 'c4' at row 1
-Warning	1264	Out of range value adjusted for column 'c5' at row 1
-Warning	1264	Out of range value adjusted for column 'c12' at row 1
+Warning	1264	Out of range value for column 'c1' at row 1
+Warning	1264	Out of range value for column 'c2' at row 1
+Warning	1264	Out of range value for column 'c3' at row 1
+Warning	1264	Out of range value for column 'c4' at row 1
+Warning	1264	Out of range value for column 'c5' at row 1
+Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
 c1	-128
 c2	-32768
@@ -2624,12 +2624,12 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1264	Out of range value adjusted for column 'c1' at row 1
-Warning	1264	Out of range value adjusted for column 'c2' at row 1
-Warning	1264	Out of range value adjusted for column 'c3' at row 1
-Warning	1264	Out of range value adjusted for column 'c4' at row 1
-Warning	1264	Out of range value adjusted for column 'c5' at row 1
-Warning	1264	Out of range value adjusted for column 'c12' at row 1
+Warning	1264	Out of range value for column 'c1' at row 1
+Warning	1264	Out of range value for column 'c2' at row 1
+Warning	1264	Out of range value for column 'c3' at row 1
+Warning	1264	Out of range value for column 'c4' at row 1
+Warning	1264	Out of range value for column 'c5' at row 1
+Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
 c1	-128
 c2	-32768
@@ -2647,14 +2647,14 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1264	Out of range value adjusted for column 'c1' at row 1
-Warning	1264	Out of range value adjusted for column 'c2' at row 1
-Warning	1264	Out of range value adjusted for column 'c3' at row 1
-Warning	1264	Out of range value adjusted for column 'c4' at row 1
-Warning	1264	Out of range value adjusted for column 'c5' at row 1
-Warning	1264	Out of range value adjusted for column 'c6' at row 1
-Warning	1264	Out of range value adjusted for column 'c7' at row 1
-Warning	1264	Out of range value adjusted for column 'c12' at row 1
+Warning	1264	Out of range value for column 'c1' at row 1
+Warning	1264	Out of range value for column 'c2' at row 1
+Warning	1264	Out of range value for column 'c3' at row 1
+Warning	1264	Out of range value for column 'c4' at row 1
+Warning	1264	Out of range value for column 'c5' at row 1
+Warning	1264	Out of range value for column 'c6' at row 1
+Warning	1264	Out of range value for column 'c7' at row 1
+Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
 c1	127
 c2	32767
@@ -2678,8 +2678,8 @@
 Warning	1264	Out of range value adjusted for column 'c4' at row 1
 Warning	1264	Out of range value adjusted for column 'c5' at row 1
 Warning	1264	Out of range value adjusted for column 'c6' at row 1
-Warning	1264	Out of range value adjusted for column 'c7' at row 1
-Warning	1264	Out of range value adjusted for column 'c12' at row 1
+Warning	1264	Out of range value for column 'c7' at row 1
+Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
 c1	127
 c2	32767
@@ -2697,14 +2697,14 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1264	Out of range value adjusted for column 'c1' at row 1
-Warning	1264	Out of range value adjusted for column 'c2' at row 1
-Warning	1264	Out of range value adjusted for column 'c3' at row 1
-Warning	1264	Out of range value adjusted for column 'c4' at row 1
-Warning	1264	Out of range value adjusted for column 'c5' at row 1
-Warning	1264	Out of range value adjusted for column 'c6' at row 1
-Warning	1264	Out of range value adjusted for column 'c7' at row 1
-Warning	1264	Out of range value adjusted for column 'c12' at row 1
+Warning	1264	Out of range value for column 'c1' at row 1
+Warning	1264	Out of range value for column 'c2' at row 1
+Warning	1264	Out of range value for column 'c3' at row 1
+Warning	1264	Out of range value for column 'c4' at row 1
+Warning	1264	Out of range value for column 'c5' at row 1
+Warning	1264	Out of range value for column 'c6' at row 1
+Warning	1264	Out of range value for column 'c7' at row 1
+Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
 c1	-128
 c2	-32768
@@ -2728,8 +2728,8 @@
 Warning	1264	Out of range value adjusted for column 'c4' at row 1
 Warning	1264	Out of range value adjusted for column 'c5' at row 1
 Warning	1264	Out of range value adjusted for column 'c6' at row 1
-Warning	1264	Out of range value adjusted for column 'c7' at row 1
-Warning	1264	Out of range value adjusted for column 'c12' at row 1
+Warning	1264	Out of range value for column 'c7' at row 1
+Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
 c1	-128
 c2	-32768
@@ -2960,45 +2960,45 @@
 Warnings:
 Warning	1265	Data truncated for column 'c17' at row 1
 Warnings:
-Warning	1264	Out of range value adjusted for column 'c13' at row 1
-Warning	1264	Out of range value adjusted for column 'c14' at row 1
+Warning	1264	Out of range value for column 'c13' at row 1
+Warning	1264	Out of range value for column 'c14' at row 1
 Warning	1265	Data truncated for column 'c15' at row 1
-Warning	1264	Out of range value adjusted for column 'c16' at row 1
-Warning	1264	Out of range value adjusted for column 'c17' at row 1
+Warning	1264	Out of range value for column 'c16' at row 1
+Warning	1264	Out of range value for column 'c17' at row 1
 Warnings:
-Warning	1264	Out of range value adjusted for column 'c13' at row 1
-Warning	1264	Out of range value adjusted for column 'c14' at row 1
+Warning	1264	Out of range value for column 'c13' at row 1
+Warning	1264	Out of range value for column 'c14' at row 1
 Warning	1265	Data truncated for column 'c15' at row 1
-Warning	1264	Out of range value adjusted for column 'c16' at row 1
-Warning	1264	Out of range value adjusted for column 'c17' at row 1
+Warning	1264	Out of range value for column 'c16' at row 1
+Warning	1264	Out of range value for column 'c17' at row 1
 Warnings:
-Warning	1264	Out of range value adjusted for column 'c13' at row 1
-Warning	1264	Out of range value adjusted for column 'c14' at row 1
+Warning	1264	Out of range value for column 'c13' at row 1
+Warning	1264	Out of range value for column 'c14' at row 1
 Warning	1265	Data truncated for column 'c15' at row 1
-Warning	1264	Out of range value adjusted for column 'c16' at row 1
-Warning	1264	Out of range value adjusted for column 'c17' at row 1
+Warning	1264	Out of range value for column 'c16' at row 1
+Warning	1264	Out of range value for column 'c17' at row 1
 Warnings:
-Warning	1264	Out of range value adjusted for column 'c13' at row 1
-Warning	1264	Out of range value adjusted for column 'c14' at row 1
+Warning	1264	Out of range value for column 'c13' at row 1
+Warning	1264	Out of range value for column 'c14' at row 1
 Warning	1265	Data truncated for column 'c15' at row 1
-Warning	1264	Out of range value adjusted for column 'c16' at row 1
-Warning	1264	Out of range value adjusted for column 'c17' at row 1
+Warning	1264	Out of range value for column 'c16' at row 1
+Warning	1264	Out of range value for column 'c17' at row 1
 Warnings:
 Warning	1265	Data truncated for column 'c15' at row 1
-Warning	1264	Out of range value adjusted for column 'c16' at row 1
-Warning	1264	Out of range value adjusted for column 'c17' at row 1
+Warning	1264	Out of range value for column 'c16' at row 1
+Warning	1264	Out of range value for column 'c17' at row 1
 Warnings:
 Warning	1265	Data truncated for column 'c15' at row 1
-Warning	1264	Out of range value adjusted for column 'c16' at row 1
-Warning	1264	Out of range value adjusted for column 'c17' at row 1
+Warning	1264	Out of range value for column 'c16' at row 1
+Warning	1264	Out of range value for column 'c17' at row 1
 Warnings:
 Warning	1265	Data truncated for column 'c15' at row 1
-Warning	1264	Out of range value adjusted for column 'c16' at row 1
-Warning	1264	Out of range value adjusted for column 'c17' at row 1
+Warning	1264	Out of range value for column 'c16' at row 1
+Warning	1264	Out of range value for column 'c17' at row 1
 Warnings:
 Warning	1265	Data truncated for column 'c15' at row 1
-Warning	1264	Out of range value adjusted for column 'c16' at row 1
-Warning	1264	Out of range value adjusted for column 'c17' at row 1
+Warning	1264	Out of range value for column 'c16' at row 1
+Warning	1264	Out of range value for column 'c17' at row 1
 select c1, c13, c14, c15, c16, c17 from t9 order by c1 ;
 c1	c13	c14	c15	c16	c17
 20	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991

--- 1.4.2.1/mysql-test/r/rpl_rewrite_db.result	2006-10-03 15:22:04 +05:00
+++ 1.9/mysql-test/r/rpl_rewrt_db.result	2006-10-03 15:22:04 +05:00
@@ -80,7 +80,6 @@
 0	1234567890
 truncate table t1;
 load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by ''
enclosed by '' lines terminated by '' ignore 1 lines;
-Warnings:
 Warning	1366	Incorrect integer value: '
 ' for column 'a' at row 4
 Warning	1261	Row 4 doesn't contain data for all columns

--- 1.45/mysql-test/r/ps_7ndb.result	2006-10-03 15:22:04 +05:00
+++ 1.46/mysql-test/r/ps_7ndb.result	2006-10-03 15:22:04 +05:00
@@ -2672,21 +2672,21 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1265	Data truncated for column 'c1' at row 1
-Warning	1265	Data truncated for column 'c2' at row 1
-Warning	1265	Data truncated for column 'c3' at row 1
-Warning	1265	Data truncated for column 'c4' at row 1
-Warning	1265	Data truncated for column 'c5' at row 1
-Warning	1265	Data truncated for column 'c6' at row 1
+Warning	1264	Out of range value adjusted for column 'c1' at row 1
+Warning	1264	Out of range value adjusted for column 'c2' at row 1
+Warning	1264	Out of range value adjusted for column 'c3' at row 1
+Warning	1264	Out of range value adjusted for column 'c4' at row 1
+Warning	1264	Out of range value adjusted for column 'c5' at row 1
+Warning	1264	Out of range value adjusted for column 'c6' at row 1
 Warning	1264	Out of range value for column 'c7' at row 1
 Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
-c1	1
-c2	1
-c3	1
-c4	1
-c5	1
-c6	1
+c1	127
+c2	32767
+c3	8388607
+c4	2147483647
+c5	2147483647
+c6	9223372036854775807
 c7	3.40282e+38
 c8	1.11111111111111e+50
 c9	1.11111111111111e+50
@@ -2722,21 +2722,21 @@
 execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
 @arg00, @arg00, @arg00, @arg00, @arg00 ;
 Warnings:
-Warning	1265	Data truncated for column 'c1' at row 1
-Warning	1265	Data truncated for column 'c2' at row 1
-Warning	1265	Data truncated for column 'c3' at row 1
-Warning	1265	Data truncated for column 'c4' at row 1
-Warning	1265	Data truncated for column 'c5' at row 1
-Warning	1265	Data truncated for column 'c6' at row 1
+Warning	1264	Out of range value adjusted for column 'c1' at row 1
+Warning	1264	Out of range value adjusted for column 'c2' at row 1
+Warning	1264	Out of range value adjusted for column 'c3' at row 1
+Warning	1264	Out of range value adjusted for column 'c4' at row 1
+Warning	1264	Out of range value adjusted for column 'c5' at row 1
+Warning	1264	Out of range value adjusted for column 'c6' at row 1
 Warning	1264	Out of range value for column 'c7' at row 1
 Warning	1264	Out of range value for column 'c12' at row 1
 execute my_select ;
-c1	-1
-c2	-1
-c3	-1
-c4	-1
-c5	-1
-c6	-1
+c1	-128
+c2	-32768
+c3	-8388608
+c4	-2147483648
+c5	-2147483648
+c6	-9223372036854775808
 c7	-3.40282e+38
 c8	-1.11111111111111e+50
 c9	-1.11111111111111e+50

--- 1.135/mysql-test/r/select.result	2006-10-03 15:22:04 +05:00
+++ 1.136/mysql-test/r/select.result	2006-10-03 15:22:04 +05:00
@@ -2730,6 +2730,16 @@
 EXPLAIN SELECT * FROM t1 FORCE INDEX (a);
 ERROR 42000: Key 'a' doesn't exist in table 't1'
 DROP TABLE t1;
+ERROR HY000: Key 'a' doesn't exist in table 't1'
+EXPLAIN SELECT * FROM t1 FORCE INDEX (a);
+ERROR HY000: Key 'a' doesn't exist in table 't1'
+DROP TABLE t1;
+CREATE TABLE t1 (i BIGINT UNSIGNED NOT NULL);
+INSERT INTO t1 VALUES (10);
+SELECT i='1e+01',i=1e+01, i in (1e+01,1e+01), i in ('1e+01','1e+01') FROM t1;
+i='1e+01'	i=1e+01	i in (1e+01,1e+01)	i in ('1e+01','1e+01')
+1	1	1	1
+DROP TABLE t1;
 CREATE TABLE t1 (a int, b int);
 INSERT INTO t1 VALUES (1,1), (2,1), (4,10);
 CREATE TABLE t2 (a int PRIMARY KEY, b int, KEY b (b));

--- 1.35/mysql-test/r/strict.result	2006-10-03 15:22:04 +05:00
+++ 1.36/mysql-test/r/strict.result	2006-10-03 15:22:04 +05:00
@@ -619,9 +619,9 @@
 UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;
 ERROR 22012: Division by 0
 INSERT INTO t1 (col1) VALUES ('');
-ERROR 22003: Out of range value for column 'col1' at row 1
+ERROR HY000: Incorrect integer value: '' for column 'col1' at row 1
 INSERT INTO t1 (col1) VALUES ('a59b');
-ERROR 22003: Out of range value for column 'col1' at row 1
+ERROR HY000: Incorrect integer value: 'a59b' for column 'col1' at row 1
 INSERT INTO t1 (col1) VALUES ('1a');
 ERROR 01000: Data truncated for column 'col1' at row 1
 INSERT IGNORE INTO t1 (col1) VALUES ('2a');
@@ -701,9 +701,9 @@
 UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;
 ERROR 22012: Division by 0
 INSERT INTO t1 (col1) VALUES ('');
-ERROR 22003: Out of range value for column 'col1' at row 1
+ERROR HY000: Incorrect integer value: '' for column 'col1' at row 1
 INSERT INTO t1 (col1) VALUES ('a59b');
-ERROR 22003: Out of range value for column 'col1' at row 1
+ERROR HY000: Incorrect integer value: 'a59b' for column 'col1' at row 1
 INSERT INTO t1 (col1) VALUES ('1a');
 ERROR 01000: Data truncated for column 'col1' at row 1
 INSERT IGNORE INTO t1 (col1) VALUES ('2a');

--- 1.23/mysql-test/t/strict.test	2006-10-03 15:22:04 +05:00
+++ 1.24/mysql-test/t/strict.test	2006-10-03 15:22:04 +05:00
@@ -649,9 +649,9 @@
 UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0;
 --error 1365
 UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;
---error 1264
+--error 1366
 INSERT INTO t1 (col1) VALUES ('');
---error 1264
+--error 1366
 INSERT INTO t1 (col1) VALUES ('a59b');
 --error 1265
 INSERT INTO t1 (col1) VALUES ('1a');
@@ -710,9 +710,9 @@
 UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0;
 --error 1365
 UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;
---error 1264
+--error 1366
 INSERT INTO t1 (col1) VALUES ('');
---error 1264
+--error 1366
 INSERT INTO t1 (col1) VALUES ('a59b');
 --error 1265
 INSERT INTO t1 (col1) VALUES ('1a');

--- 1.26/mysql-test/r/loaddata.result	2006-10-03 15:22:04 +05:00
+++ 1.27/mysql-test/r/loaddata.result	2006-10-03 15:22:04 +05:00
@@ -43,9 +43,9 @@
 create table t1 (a int, b char(10));
 load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by ''
enclosed by '' ignore 1 lines;
 Warnings:
-Warning	1264	Out of range value for column 'a' at row 3
+Warning	1366	Incorrect integer value: 'error      ' for column 'a' at row 3
 Warning	1262	Row 3 was truncated; it contained more data than there were input columns
-Warning	1264	Out of range value for column 'a' at row 5
+Warning	1366	Incorrect integer value: 'wrong end  ' for column 'a' at row 5
 Warning	1262	Row 5 was truncated; it contained more data than there were input columns
 select * from t1;
 a	b
@@ -57,7 +57,8 @@
 truncate table t1;
 load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by ''
enclosed by '' lines terminated by '' ignore 1 lines;
 Warnings:
-Warning	1264	Out of range value for column 'a' at row 4
+Warning	1366	Incorrect integer value: '
+' for column 'a' at row 4
 Warning	1261	Row 4 doesn't contain data for all columns
 select * from t1;
 a	b

--- 1.49/mysql-test/r/warnings.result	2006-10-03 15:22:04 +05:00
+++ 1.50/mysql-test/r/warnings.result	2006-10-03 15:22:04 +05:00
@@ -31,19 +31,19 @@
 insert into t1 values (1);
 insert into t1 values ("hej");
 Warnings:
-Warning	1264	Out of range value for column 'a' at row 1
+Warning	1366	Incorrect integer value: 'hej' for column 'a' at row 1
 insert into t1 values ("hej"),("då");
 Warnings:
-Warning	1264	Out of range value for column 'a' at row 1
-Warning	1264	Out of range value for column 'a' at row 2
+Warning	1366	Incorrect integer value: 'hej' for column 'a' at row 1
+Warning	1366	Incorrect integer value: 'd?' for column 'a' at row 2
 set SQL_WARNINGS=1;
 insert into t1 values ("hej");
 Warnings:
-Warning	1264	Out of range value for column 'a' at row 1
+Warning	1366	Incorrect integer value: 'hej' for column 'a' at row 1
 insert into t1 values ("hej"),("då");
 Warnings:
-Warning	1264	Out of range value for column 'a' at row 1
-Warning	1264	Out of range value for column 'a' at row 2
+Warning	1366	Incorrect integer value: 'hej' for column 'a' at row 1
+Warning	1366	Incorrect integer value: 'd?' for column 'a' at row 2
 drop table t1;
 set SQL_WARNINGS=0;
 drop temporary table if exists not_exists;
@@ -180,44 +180,44 @@
 insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
 update t1 set a='abc';
 Warnings:
-Warning	1264	Out of range value for column 'a' at row 1
-Warning	1264	Out of range value for column 'a' at row 2
-Warning	1264	Out of range value for column 'a' at row 3
-Warning	1264	Out of range value for column 'a' at row 4
-Warning	1264	Out of range value for column 'a' at row 5
-Warning	1264	Out of range value for column 'a' at row 6
-Warning	1264	Out of range value for column 'a' at row 7
-Warning	1264	Out of range value for column 'a' at row 8
-Warning	1264	Out of range value for column 'a' at row 9
-Warning	1264	Out of range value for column 'a' at row 10
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 1
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 2
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 3
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 4
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 5
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 6
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 7
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 8
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 9
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 10
 show warnings limit 2, 1;
 Level	Code	Message
-Warning	1264	Out of range value for column 'a' at row 3
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 3
 show warnings limit 0, 10;
 Level	Code	Message
-Warning	1264	Out of range value for column 'a' at row 1
-Warning	1264	Out of range value for column 'a' at row 2
-Warning	1264	Out of range value for column 'a' at row 3
-Warning	1264	Out of range value for column 'a' at row 4
-Warning	1264	Out of range value for column 'a' at row 5
-Warning	1264	Out of range value for column 'a' at row 6
-Warning	1264	Out of range value for column 'a' at row 7
-Warning	1264	Out of range value for column 'a' at row 8
-Warning	1264	Out of range value for column 'a' at row 9
-Warning	1264	Out of range value for column 'a' at row 10
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 1
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 2
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 3
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 4
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 5
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 6
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 7
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 8
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 9
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 10
 show warnings limit 9, 1;
 Level	Code	Message
-Warning	1264	Out of range value for column 'a' at row 10
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 10
 show warnings limit 10, 1;
 Level	Code	Message
 show warnings limit 9, 2;
 Level	Code	Message
-Warning	1264	Out of range value for column 'a' at row 10
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 10
 show warnings limit 0, 0;
 Level	Code	Message
 show warnings limit 1;
 Level	Code	Message
-Warning	1264	Out of range value for column 'a' at row 1
+Warning	1366	Incorrect integer value: 'abc' for column 'a' at row 1
 show warnings limit 0;
 Level	Code	Message
 show warnings limit 1, 0;

--- 1.13/strings/ctype-cp932.c	2006-10-03 15:22:04 +05:00
+++ 1.14/strings/ctype-cp932.c	2006-10-03 15:22:04 +05:00
@@ -5493,6 +5493,7 @@
   my_strntoull_8bit,
   my_strntod_8bit,
   my_strtoll10_8bit,
+  my_strntoull10rnd_8bit,
   my_scan_8bit
 };
 

--- 1.14/strings/ctype-eucjpms.c	2006-10-03 15:22:04 +05:00
+++ 1.15/strings/ctype-eucjpms.c	2006-10-03 15:22:04 +05:00
@@ -8678,6 +8678,7 @@
     my_strntoull_8bit,
     my_strntod_8bit,
     my_strtoll10_8bit,
+    my_strntoull10rnd_8bit,
     my_scan_8bit
 };
 
Thread
bk commit into 5.1 tree (bar:1.2339)bar3 Oct