List:Commits« Previous MessageNext Message »
From:Olav Sandstaa Date:June 20 2012 9:38am
Subject:bzr push into mysql-trunk branch (olav.sandstaa:4032 to 4033) Bug#14167585
View as plain text  
 4033 Olav Sandstaa	2012-06-20
      Fix for Bug#14167585 - LOTS OF TEST FAILURES ON TRUNK ON SOLARIS11/SPARC64
      
      The test failures are caused by the YEAR(X) deprecation message not
      being correctly printed when running on SPARC with 32 bit MySQL binaries.
      Instead of printing "YEAR(X)" where X is the width of the YEAR column,
      "YEAR(0)" is printed in the deprecation warning.
      
      This is caused by that we store the width/length of the YEAR(X) in an
      ulonglong variable in sql_yacc.yy. This will occupy 8 bytes on 32 bit
      SPARC. But in the deprecation message (ER_INVALID_YEAR_COLUMN_LENGTH
      in errmsg-utf8.txt) this is printed as "%lu" (ie. a 4 byte integer on
      32 bit SPARC). Since SPARC is big-endian, this will cause the upper 4
      bytes of the length variable to be printed. This will always be zero.
      
      The fix for this problem is to replace ulonglong with ulong for
      storing the length variable (in sql_yacc.yy). It is ok to do this
      change since the length variable gets its value from the call to
      strtoul() which returns an unsigned long.

    modified:
      sql/sql_yacc.yy
 4032 Tor Didriksen	2012-06-20
      Bug#14171740 65562: STRING::SHRINK SHOULD BE A NO-OP WHEN ALLOCED=0
      
      Fixed both String implementations, and added unit tests.

    added:
      unittest/gunit/client_string-t.cc
      unittest/gunit/sql_string-t.cc
      unittest/gunit/string-tests.cc
    modified:
      client/sql_string.h
      sql/sql_string.h
      unittest/gunit/CMakeLists.txt
=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy	2012-06-19 12:20:30 +0000
+++ b/sql/sql_yacc.yy	2012-06-20 09:35:32 +0000
@@ -6397,7 +6397,7 @@ type:
             if (Lex->length)
             {
               errno= 0;
-              ulonglong length= strtoul(Lex->length, NULL, 10);
+              ulong length= strtoul(Lex->length, NULL, 10);
               if (errno == 0 && length <= MAX_FIELD_BLOBLENGTH && length != 4)
               {
                 /* Reset unsupported positive column width to default value */

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (olav.sandstaa:4032 to 4033) Bug#14167585Olav Sandstaa20 Jun