List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:July 28 2009 8:12pm
Subject:bzr commit into mysql-5.0-bugteam branch (davi:2792) Bug#46385
View as plain text  
# At a local mysql-5.0-bugteam repository of davi

 2792 Davi Arnaut	2009-07-27
      Bug#46385: [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted t
      
      The maximum value of the max_join_size variable is set by converting
      a signed type (long int) with negative value (-1) to a wider unsigned
      type (unsigned long long), which yields the largest possible value of
      the wider unsigned type -- as per the language conversion rules. But,
      depending on build options, the type of the max_join_size might be a
      shorter type (ha_rows - unsigned long) which causes the warning to be
      thrown once the large value is truncated to fit.
      
      The solution is to ensure that the maximum value of the variable is
      always set to the maximum value of integer type of max_join_size.
      
      Furthermore, it would be interesting to always have a fixed type for
      this variable, but this would incur in a change of behavior which is
      not acceptable for a GA version. See Bug#35346.
     @ sql/mysqld.cc
        Set max value for type.

    modified:
      sql/mysqld.cc
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2009-07-23 11:38:11 +0000
+++ b/sql/mysqld.cc	2009-07-27 23:31:48 +0000
@@ -6171,7 +6171,7 @@ The minimum value for this variable is 4
    "Joins that are probably going to read more than max_join_size records return an error.",
    (gptr*) &global_system_variables.max_join_size,
    (gptr*) &max_system_variables.max_join_size, 0, GET_HA_ROWS, REQUIRED_ARG,
-   ~0L, 1, ~0L, 0, 1, 0},
+   HA_POS_ERROR, 1, HA_POS_ERROR, 0, 1, 0},
    {"max_length_for_sort_data", OPT_MAX_LENGTH_FOR_SORT_DATA,
     "Max number of bytes in sorted records.",
     (gptr*) &global_system_variables.max_length_for_sort_data,


Attachment: [text/bzr-bundle] bzr/davi.arnaut@sun.com-20090727233148-scpt5o9iyb7ouz8e.bundle
Thread
bzr commit into mysql-5.0-bugteam branch (davi:2792) Bug#46385Davi Arnaut28 Jul