[MDEV-5286] 64-bit server with 32-bit limits on variables Created: 2013-11-13  Updated: 2013-11-17  Resolved: 2013-11-17

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.5, 5.5.33a
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Will Fong Assignee: Ian Gilfillan
Resolution: Fixed Votes: 0
Labels: None
Environment:

CentOS 6 64-bit



 Description   

Looks like some variables have a maximum value of an unsigned 32bit integer, but the docs say they should be 64 bit.

https://mariadb.com/kb/en/server-system-variables/#delayed_insert_limit

In question:

delayed_insert_limit
delayed_queue_size
key_cache_age_threshold
log_warnings
max_seeks_for_key
min_examined_row_limit
net_retry_count
progress_report_time
query_alloc_block_size
query_cache_limit
query_cache_min_res_unit
query_prealloc_size
transaction_alloc_block_size
transaction_prealloc_size

Example:

MariaDB [(none)]> \! uname -a
Linux dev-100-11 2.6.32-358.23.2.el6.x86_64 #1 SMP Wed Oct 16 18:37:12 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
 
MariaDB [(none)]> \! rpm -qa|grep "MariaDB"
MariaDB-client-10.0.5-1.x86_64
MariaDB-compat-10.0.5-1.x86_64
MariaDB-server-10.0.5-1.x86_64
MariaDB-common-10.0.5-1.x86_64
 
MariaDB [(none)]> SELECT VERSION();
+----------------+
| VERSION()      |
+----------------+
| 10.0.5-MariaDB |
+----------------+
1 row in set (0.00 sec)
 
MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'delayed_insert_limit';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| delayed_insert_limit | 100   |
+----------------------+-------+
1 row in set (0.00 sec)
 
MariaDB [(none)]> SET GLOBAL delayed_insert_limit = 18446744073709547520;
Query OK, 0 rows affected, 1 warning (0.00 sec)
 
MariaDB [(none)]> SHOW WARNINGS;
+---------+------+------------------------------------------------------------------------+
| Level   | Code | Message                                                                |
+---------+------+------------------------------------------------------------------------+
| Warning | 1292 | Truncated incorrect delayed_insert_limit value: '18446744073709547520' |
+---------+------+------------------------------------------------------------------------+
1 row in set (0.00 sec)
 
MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'delayed_insert_limit';
+----------------------+------------+
| Variable_name        | Value      |
+----------------------+------------+
| delayed_insert_limit | 4294967295 |
+----------------------+------------+
1 row in set (0.00 sec)
 
MariaDB [(none)]> 



 Comments   
Comment by Sergei Golubchik [ 2013-11-13 ]

Ian, could you please update the manual to match the code?

Variables are defined in the sys_vars.cc file and you can easily see from there what is the valid range of values for every variable. Note, that UINT_MAX is 4294967295

Comment by Ian Gilfillan [ 2013-11-14 ]

Thanks, I see this. Why is the limit ULONG_MAX on MySQL, and UINT_MAX on MariaDB?

Comment by Sergei Golubchik [ 2013-11-14 ]

Win64 portability. Win64 is 64 bit, but ulong is 32-bit, and ULONG_MAX is 4294967295. So some variables are truly 32-bit, others are truly 64-bit. And some (ulong) variables are 32-bit on 32-bit platforms and Win64 and 64-bit on 64-bit platforms excluding Win64. This was proven to be problematic in certain cases.

We've basically removed all ULONG_MAX from system variable limits, so all ulong variables have now fixed architecture-independent limits.

Generated at Thu Feb 08 07:03:06 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.