MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:msvensson Date:July 19 2006 1:55pm
Subject:bk commit into 4.1 tree (msvensson:1.2519) BUG#21135
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-07-19 15:55:04+02:00, msvensson@neptunus.(none) +2 -0
  Bug #21135 Crash in test "func_time"
   - backport patch from 5.0
   - "table" can be NULL in temporary fields used for type conversion

  sql/field.cc@stripped, 2006-07-19 15:55:03+02:00, msvensson@neptunus.(none) +23 -23
    table can be NULL in temporary fields used for type conversion.
    Store value in field as if db_low_byte_first was set.

  sql/field.h@stripped, 2006-07-19 15:55:03+02:00, msvensson@neptunus.(none) +1 -1
    table can be NULL in temporary fields used for type conversion.
    Store value in field as if db_low_byte_first was set.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-4.1-release

--- 1.231/sql/field.cc	2006-07-19 15:55:07 +02:00
+++ 1.232/sql/field.cc	2006-07-19 15:55:07 +02:00
@@ -3680,7 +3680,7 @@
     error= 2;
 
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
   {
     int4store(ptr,tmp);
   }
@@ -3738,7 +3738,7 @@
                          nr, MYSQL_TIMESTAMP_DATETIME, 1);
 
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
   {
     int4store(ptr,timestamp);
   }
@@ -3762,7 +3762,7 @@
   THD  *thd= table->in_use;
 
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
     temp=uint4korr(ptr);
   else
 #endif
@@ -3792,7 +3792,7 @@
   val_buffer->length(field_length);
 
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
     temp=uint4korr(ptr);
   else
 #endif
@@ -3857,7 +3857,7 @@
   long temp;
   THD *thd= table->in_use;
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
     temp=uint4korr(ptr);
   else
 #endif
@@ -3894,7 +3894,7 @@
 {
   int32 a,b;
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
   {
     a=sint4korr(a_ptr);
     b=sint4korr(b_ptr);
@@ -3912,7 +3912,7 @@
 void Field_timestamp::sort_string(char *to,uint length __attribute__((unused)))
 {
 #ifdef WORDS_BIGENDIAN
-  if (!table->db_low_byte_first)
+  if (!table || !table->db_low_byte_first)
   {
     to[0] = ptr[0];
     to[1] = ptr[1];
@@ -3941,7 +3941,7 @@
   long tmp= (long) table->in_use->query_start();
   set_notnull();
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
   {
     int4store(ptr,tmp);
   }
@@ -4329,7 +4329,7 @@
                          from, len, MYSQL_TIMESTAMP_DATE, 1);
 
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
   {
     int4store(ptr,tmp);
   }
@@ -4357,7 +4357,7 @@
   else
     tmp=(long) rint(nr);
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
   {
     int4store(ptr,tmp);
   }
@@ -4385,7 +4385,7 @@
   else
     tmp=(long) nr;
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
   {
     int4store(ptr,tmp);
   }
@@ -4411,7 +4411,7 @@
 {
   int32 j;
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
     j=sint4korr(ptr);
   else
 #endif
@@ -4423,7 +4423,7 @@
 {
   int32 j;
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
     j=sint4korr(ptr);
   else
 #endif
@@ -4438,7 +4438,7 @@
   val_buffer->alloc(field_length);
   int32 tmp;
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
     tmp=sint4korr(ptr);
   else
 #endif
@@ -4456,7 +4456,7 @@
 {
   int32 a,b;
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
   {
     a=sint4korr(a_ptr);
     b=sint4korr(b_ptr);
@@ -4474,7 +4474,7 @@
 void Field_date::sort_string(char *to,uint length __attribute__((unused)))
 {
 #ifdef WORDS_BIGENDIAN
-  if (!table->db_low_byte_first)
+  if (!table || !table->db_low_byte_first)
   {
     to[0] = ptr[0];
     to[1] = ptr[1];
@@ -4698,7 +4698,7 @@
                          from, len, MYSQL_TIMESTAMP_DATETIME, 1);
 
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
   {
     int8store(ptr,tmp);
   }
@@ -4739,7 +4739,7 @@
                          MYSQL_TIMESTAMP_DATETIME, 1);
 
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
   {
     int8store(ptr,nr);
   }
@@ -4766,7 +4766,7 @@
     set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_TRUNCATED, 1);
   }
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
   {
     int8store(ptr,tmp);
   }
@@ -4792,7 +4792,7 @@
 {
   longlong j;
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
     j=sint8korr(ptr);
   else
 #endif
@@ -4812,7 +4812,7 @@
   int part3;
 
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
     tmp=sint8korr(ptr);
   else
 #endif
@@ -4877,7 +4877,7 @@
 {
   longlong a,b;
 #ifdef WORDS_BIGENDIAN
-  if (table->db_low_byte_first)
+  if (table && table->db_low_byte_first)
   {
     a=sint8korr(a_ptr);
     b=sint8korr(b_ptr);
@@ -4895,7 +4895,7 @@
 void Field_datetime::sort_string(char *to,uint length __attribute__((unused)))
 {
 #ifdef WORDS_BIGENDIAN
-  if (!table->db_low_byte_first)
+  if (!table || !table->db_low_byte_first)
   {
     to[0] = ptr[0];
     to[1] = ptr[1];

--- 1.131/sql/field.h	2006-07-19 15:55:07 +02:00
+++ 1.132/sql/field.h	2006-07-19 15:55:07 +02:00
@@ -713,7 +713,7 @@
     if ((*null_value= is_null()))
       return 0;
 #ifdef WORDS_BIGENDIAN
-    if (table->db_low_byte_first)
+    if (table && table->db_low_byte_first)
       return sint4korr(ptr);
 #endif
     long tmp;
Thread
bk commit into 4.1 tree (msvensson:1.2519) BUG#21135msvensson19 Jul