mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
Fix for Bug#3754 "SET GLOBAL myisam_max_sort_file_size doesn't
work as expected": precision-losing conversion removed from sys_var_thd_ulonglong.
This commit is contained in:
parent
fdc0f0e781
commit
e13e9288c9
3 changed files with 13 additions and 3 deletions
|
@ -377,3 +377,7 @@ select 1;
|
|||
1
|
||||
select @@session.key_buffer_size;
|
||||
Variable 'key_buffer_size' is a GLOBAL variable
|
||||
set global myisam_max_sort_file_size=4294967296;
|
||||
show global variables like 'myisam_max_sort_file_size';
|
||||
Variable_name Value
|
||||
myisam_max_sort_file_size 4294967296
|
||||
|
|
|
@ -268,4 +268,10 @@ select @@xxxxxxxxxx;
|
|||
select 1;
|
||||
|
||||
--error 1238
|
||||
select @@session.key_buffer_size;
|
||||
select @@session.key_buffer_size;
|
||||
|
||||
# Bug#3754 SET GLOBAL myisam_max_sort_file_size doesn't work as
|
||||
# expected: check that there is no overflow when 64-bit unsigned
|
||||
# variables are set
|
||||
set global myisam_max_sort_file_size=4294967296;
|
||||
show global variables like 'myisam_max_sort_file_size';
|
||||
|
|
|
@ -965,11 +965,11 @@ bool sys_var_thd_ulonglong::update(THD *thd, set_var *var)
|
|||
{
|
||||
ulonglong tmp= var->value->val_int();
|
||||
|
||||
if ((ulonglong) tmp > max_system_variables.*offset)
|
||||
if (tmp > max_system_variables.*offset)
|
||||
tmp= max_system_variables.*offset;
|
||||
|
||||
if (option_limits)
|
||||
tmp= (ulong) getopt_ull_limit_value(tmp, option_limits);
|
||||
tmp= getopt_ull_limit_value(tmp, option_limits);
|
||||
if (var->type == OPT_GLOBAL)
|
||||
{
|
||||
/* Lock is needed to make things safe on 32 bit systems */
|
||||
|
|
Loading…
Add table
Reference in a new issue