diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-07-27 20:31:48 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-07-27 20:31:48 -0300 |
commit | f9551a9c30d7727a70f505962608a5a255edcd2d (patch) | |
tree | 617ad30959136e0ed6e91b04a4719e214b0be166 /sql/mysqld.cc | |
parent | 6084ee2728ed28e47ff9afa42372b54fd04c49f0 (diff) | |
download | mariadb-git-f9551a9c30d7727a70f505962608a5a255edcd2d.tar.gz |
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.
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r-- | sql/mysqld.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 753c2318ac2..ec08edbc265 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -6171,7 +6171,7 @@ The minimum value for this variable is 4096.", "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, |