Bug #35699 Incorrect startup and default values for max_join_size
Submitted: 31 Mar 2008 9:41 Modified: 30 Apr 2008 10:43
Reporter: Rizwan Maredia Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.1.22 OS:Linux (redhat-linux-gnu, pc-linux-gnu)
Assigned to: CPU Architecture:Any
Tags: Max_join_size, sql_max_join_size

[31 Mar 2008 9:41] Rizwan Maredia
Description:
max_join_size has a different startup and default value on linux. The documented default value is 4294967295 where as here it is -1. Also setting negative values are not converted to nearest valid value.

How to repeat:
Here is how we can verify this

[mysql@rhel3 suite]$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.22-rc-community MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SELECT @@max_join_size;
+-----------------+
| @@max_join_size |
+-----------------+
|              -1 | 
+-----------------+
1 row in set (0.00 sec)

mysql> SET @@max_join_size = 1024;
Query OK, 0 rows affected (0.01 sec)

mysql> SELECT @@max_join_size;
+-----------------+
| @@max_join_size |
+-----------------+
|            1024 | 
+-----------------+
1 row in set (0.00 sec)

mysql> SET @@max_join_size = DEFAULT;
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT @@max_join_size;
+-----------------+
| @@max_join_size |
+-----------------+
|              -1 | 
+-----------------+
1 row in set (0.00 sec)

mysql> SET @@max_join_size = -1024;
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT @@max_join_size;
+-----------------+
| @@max_join_size |
+-----------------+
|           -1024 | 
+-----------------+
1 row in set (0.00 sec)

Suggested fix:
Negative values should be mapped to valid range. Also startup and default values should be documented for linux.
[31 Mar 2008 10:43] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 5.1.23, and inform about the results.
[1 May 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".