summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2009-07-27 20:31:48 -0300
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2009-07-27 20:31:48 -0300
commite265609834a78a89da7101a73d29e5099b7e8ef6 (patch)
tree617ad30959136e0ed6e91b04a4719e214b0be166
parentbac18522e6288d6a84b33b6df3d884b953e17177 (diff)
downloadmariadb-git-e265609834a78a89da7101a73d29e5099b7e8ef6.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.
-rw-r--r--sql/mysqld.cc2
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,