Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c9c58417
Commit
c9c58417
authored
May 13, 2003
by
jani@hynda.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixed a bug in myisam_max_[extra]_sort_file_size, bug ID 339 and 342
- Fix for QNX: UNIX sockets available since 6.2.1
parent
aa9bc9d0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
21 deletions
+63
-21
include/my_global.h
include/my_global.h
+0
-1
mysql-test/r/variables.result
mysql-test/r/variables.result
+10
-9
mysql-test/t/variables.test
mysql-test/t/variables.test
+8
-5
sql/mysqld.cc
sql/mysqld.cc
+3
-2
sql/set_var.cc
sql/set_var.cc
+28
-4
sql/set_var.h
sql/set_var.h
+14
-0
No files found.
include/my_global.h
View file @
c9c58417
...
@@ -290,7 +290,6 @@ C_MODE_END
...
@@ -290,7 +290,6 @@ C_MODE_END
/* This has to be after include limits.h */
/* This has to be after include limits.h */
#define HAVE_ERRNO_AS_DEFINE
#define HAVE_ERRNO_AS_DEFINE
#define HAVE_FCNTL_LOCK
#define HAVE_FCNTL_LOCK
#undef HAVE_SYS_UN_H
#undef HAVE_FINITE
#undef HAVE_FINITE
#undef HAVE_RINT
#undef HAVE_RINT
#undef LONGLONG_MIN
/* These get wrongly defined in QNX 6.2 */
#undef LONGLONG_MIN
/* These get wrongly defined in QNX 6.2 */
...
...
mysql-test/r/variables.result
View file @
c9c58417
...
@@ -108,17 +108,14 @@ show global variables like 'table_type';
...
@@ -108,17 +108,14 @@ show global variables like 'table_type';
Variable_name Value
Variable_name Value
table_type INNODB
table_type INNODB
set GLOBAL query_cache_size=100000;
set GLOBAL query_cache_size=100000;
set myisam_max_sort_file_size=10000, GLOBAL myisam_max_sort_file_size=20000;
set GLOBAL myisam_max_sort_file_size=2000000;
show variables like 'myisam_max_sort_file_size';
Variable_name Value
myisam_max_sort_file_size 10000
show global variables like 'myisam_max_sort_file_size';
show global variables like 'myisam_max_sort_file_size';
Variable_name Value
Variable_name Value
myisam_max_sort_file_size
20000
myisam_max_sort_file_size
1048576
set myisam_max_sort_file_size=default;
set
GLOBAL
myisam_max_sort_file_size=default;
show variables like 'myisam_max_sort_file_size';
show variables like 'myisam_max_sort_file_size';
Variable_name Value
Variable_name Value
myisam_max_sort_file_size 2
0000
myisam_max_sort_file_size 2
147483647
set global net_retry_count=10, session net_retry_count=10;
set global net_retry_count=10, session net_retry_count=10;
set global net_buffer_length=1024, net_write_timeout=200, net_read_timeout=300;
set global net_buffer_length=1024, net_write_timeout=200, net_read_timeout=300;
set session net_buffer_length=2048, net_write_timeout=500, net_read_timeout=600;
set session net_buffer_length=2048, net_write_timeout=500, net_read_timeout=600;
...
@@ -211,6 +208,10 @@ set @@global.sql_auto_is_null=1;
...
@@ -211,6 +208,10 @@ set @@global.sql_auto_is_null=1;
Variable 'sql_auto_is_null' is a LOCAL variable and can't be used with SET GLOBAL
Variable 'sql_auto_is_null' is a LOCAL variable and can't be used with SET GLOBAL
select @@global.sql_auto_is_null;
select @@global.sql_auto_is_null;
Variable 'sql_auto_is_null' is a LOCAL variable and can't be used with SET GLOBAL
Variable 'sql_auto_is_null' is a LOCAL variable and can't be used with SET GLOBAL
set myisam_max_sort_file_size=100;
Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
set myisam_max_extra_sort_file_size=100;
Variable 'myisam_max_extra_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
set autocommit=1;
set autocommit=1;
set big_tables=1;
set big_tables=1;
select @@autocommit, @@big_tables;
select @@autocommit, @@big_tables;
...
@@ -264,11 +265,11 @@ select @@max_user_connections;
...
@@ -264,11 +265,11 @@ select @@max_user_connections;
@@max_user_connections
@@max_user_connections
100
100
set global max_write_lock_count=100;
set global max_write_lock_count=100;
set myisam_max_extra_sort_file_size=100;
set
global
myisam_max_extra_sort_file_size=100;
select @@myisam_max_extra_sort_file_size;
select @@myisam_max_extra_sort_file_size;
@@myisam_max_extra_sort_file_size
@@myisam_max_extra_sort_file_size
100
100
set myisam_max_sort_file_size=100;
set
global
myisam_max_sort_file_size=100;
set myisam_sort_buffer_size=100;
set myisam_sort_buffer_size=100;
set net_buffer_length=100;
set net_buffer_length=100;
set net_read_timeout=100;
set net_read_timeout=100;
...
...
mysql-test/t/variables.test
View file @
c9c58417
...
@@ -69,10 +69,9 @@ show local variables like 'table_type';
...
@@ -69,10 +69,9 @@ show local variables like 'table_type';
show
global
variables
like
'table_type'
;
show
global
variables
like
'table_type'
;
set
GLOBAL
query_cache_size
=
100000
;
set
GLOBAL
query_cache_size
=
100000
;
set
myisam_max_sort_file_size
=
10000
,
GLOBAL
myisam_max_sort_file_size
=
20000
;
set
GLOBAL
myisam_max_sort_file_size
=
2000000
;
show
variables
like
'myisam_max_sort_file_size'
;
show
global
variables
like
'myisam_max_sort_file_size'
;
show
global
variables
like
'myisam_max_sort_file_size'
;
set
myisam_max_sort_file_size
=
default
;
set
GLOBAL
myisam_max_sort_file_size
=
default
;
show
variables
like
'myisam_max_sort_file_size'
;
show
variables
like
'myisam_max_sort_file_size'
;
set
global
net_retry_count
=
10
,
session
net_retry_count
=
10
;
set
global
net_retry_count
=
10
,
session
net_retry_count
=
10
;
...
@@ -137,6 +136,10 @@ set @@concurrent_insert=1;
...
@@ -137,6 +136,10 @@ set @@concurrent_insert=1;
set
@@
global
.
sql_auto_is_null
=
1
;
set
@@
global
.
sql_auto_is_null
=
1
;
--
error
1228
--
error
1228
select
@@
global
.
sql_auto_is_null
;
select
@@
global
.
sql_auto_is_null
;
--
error
1229
set
myisam_max_sort_file_size
=
100
;
--
error
1229
set
myisam_max_extra_sort_file_size
=
100
;
# Test setting all variables
# Test setting all variables
...
@@ -181,9 +184,9 @@ set max_tmp_tables=100;
...
@@ -181,9 +184,9 @@ set max_tmp_tables=100;
set
global
max_user_connections
=
100
;
set
global
max_user_connections
=
100
;
select
@@
max_user_connections
;
select
@@
max_user_connections
;
set
global
max_write_lock_count
=
100
;
set
global
max_write_lock_count
=
100
;
set
myisam_max_extra_sort_file_size
=
100
;
set
global
myisam_max_extra_sort_file_size
=
100
;
select
@@
myisam_max_extra_sort_file_size
;
select
@@
myisam_max_extra_sort_file_size
;
set
myisam_max_sort_file_size
=
100
;
set
global
myisam_max_sort_file_size
=
100
;
set
myisam_sort_buffer_size
=
100
;
set
myisam_sort_buffer_size
=
100
;
set
net_buffer_length
=
100
;
set
net_buffer_length
=
100
;
set
net_read_timeout
=
100
;
set
net_read_timeout
=
100
;
...
...
sql/mysqld.cc
View file @
c9c58417
...
@@ -3839,12 +3839,13 @@ replicating a LOAD DATA INFILE command",
...
@@ -3839,12 +3839,13 @@ replicating a LOAD DATA INFILE command",
(
gptr
*
)
&
global_system_variables
.
myisam_max_extra_sort_file_size
,
(
gptr
*
)
&
global_system_variables
.
myisam_max_extra_sort_file_size
,
(
gptr
*
)
&
max_system_variables
.
myisam_max_extra_sort_file_size
,
(
gptr
*
)
&
max_system_variables
.
myisam_max_extra_sort_file_size
,
0
,
GET_ULL
,
REQUIRED_ARG
,
(
ulonglong
)
MI_MAX_TEMP_LENGTH
,
0
,
GET_ULL
,
REQUIRED_ARG
,
(
ulonglong
)
MI_MAX_TEMP_LENGTH
,
0
,
~
0L
,
0
,
1
,
0
},
0
,
(
ulonglong
)
MAX_FILE_SIZE
,
0
,
1
,
0
},
{
"myisam_max_sort_file_size"
,
OPT_MYISAM_MAX_SORT_FILE_SIZE
,
{
"myisam_max_sort_file_size"
,
OPT_MYISAM_MAX_SORT_FILE_SIZE
,
"Don't use the fast sort index method to created index if the temporary file would get bigger than this!"
,
"Don't use the fast sort index method to created index if the temporary file would get bigger than this!"
,
(
gptr
*
)
&
global_system_variables
.
myisam_max_sort_file_size
,
(
gptr
*
)
&
global_system_variables
.
myisam_max_sort_file_size
,
(
gptr
*
)
&
max_system_variables
.
myisam_max_sort_file_size
,
0
,
(
gptr
*
)
&
max_system_variables
.
myisam_max_sort_file_size
,
0
,
GET_ULL
,
REQUIRED_ARG
,
(
longlong
)
LONG_MAX
,
0
,
~
0L
,
0
,
1024
*
1024
,
0
},
GET_ULL
,
REQUIRED_ARG
,
(
longlong
)
LONG_MAX
,
0
,
(
ulonglong
)
MAX_FILE_SIZE
,
0
,
1024
*
1024
,
0
},
{
"myisam_repair_threads"
,
OPT_MYISAM_REPAIR_THREADS
,
{
"myisam_repair_threads"
,
OPT_MYISAM_REPAIR_THREADS
,
"Number of threads to use when repairing MyISAM tables. The value of 1 disables parallel repair."
,
"Number of threads to use when repairing MyISAM tables. The value of 1 disables parallel repair."
,
(
gptr
*
)
&
global_system_variables
.
myisam_repair_threads
,
(
gptr
*
)
&
global_system_variables
.
myisam_repair_threads
,
...
...
sql/set_var.cc
View file @
c9c58417
...
@@ -82,6 +82,8 @@ static void fix_net_retry_count(THD *thd, enum_var_type type);
...
@@ -82,6 +82,8 @@ static void fix_net_retry_count(THD *thd, enum_var_type type);
static
void
fix_max_join_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_max_join_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_query_cache_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_query_cache_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_key_buffer_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_key_buffer_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_myisam_max_extra_sort_file_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_myisam_max_sort_file_size
(
THD
*
thd
,
enum_var_type
type
);
/*
/*
Variable definition list
Variable definition list
...
@@ -165,8 +167,8 @@ sys_var_thd_ulong sys_max_tmp_tables("max_tmp_tables",
...
@@ -165,8 +167,8 @@ sys_var_thd_ulong sys_max_tmp_tables("max_tmp_tables",
&
SV
::
max_tmp_tables
);
&
SV
::
max_tmp_tables
);
sys_var_long_ptr
sys_max_write_lock_count
(
"max_write_lock_count"
,
sys_var_long_ptr
sys_max_write_lock_count
(
"max_write_lock_count"
,
&
max_write_lock_count
);
&
max_write_lock_count
);
sys_var_thd_ulonglong
sys_myisam_max_extra_sort_file_size
(
"myisam_max_extra_sort_file_size"
,
&
SV
::
myisam_max_extra_sort_file_size
);
sys_var_thd_ulonglong
sys_myisam_max_extra_sort_file_size
(
"myisam_max_extra_sort_file_size"
,
&
SV
::
myisam_max_extra_sort_file_size
,
fix_myisam_max_extra_sort_file_size
,
1
);
sys_var_thd_ulonglong
sys_myisam_max_sort_file_size
(
"myisam_max_sort_file_size"
,
&
SV
::
myisam_max_sort_file_size
);
sys_var_thd_ulonglong
sys_myisam_max_sort_file_size
(
"myisam_max_sort_file_size"
,
&
SV
::
myisam_max_sort_file_size
,
fix_myisam_max_sort_file_size
,
1
);
sys_var_thd_ulong
sys_myisam_repair_threads
(
"myisam_repair_threads"
,
&
SV
::
myisam_repair_threads
);
sys_var_thd_ulong
sys_myisam_repair_threads
(
"myisam_repair_threads"
,
&
SV
::
myisam_repair_threads
);
sys_var_thd_ulong
sys_myisam_sort_buffer_size
(
"myisam_sort_buffer_size"
,
&
SV
::
myisam_sort_buff_size
);
sys_var_thd_ulong
sys_myisam_sort_buffer_size
(
"myisam_sort_buffer_size"
,
&
SV
::
myisam_sort_buff_size
);
sys_var_thd_ulong
sys_net_buffer_length
(
"net_buffer_length"
,
sys_var_thd_ulong
sys_net_buffer_length
(
"net_buffer_length"
,
...
@@ -586,6 +588,21 @@ static void fix_low_priority_updates(THD *thd, enum_var_type type)
...
@@ -586,6 +588,21 @@ static void fix_low_priority_updates(THD *thd, enum_var_type type)
}
}
static
void
fix_myisam_max_extra_sort_file_size
(
THD
*
thd
,
enum_var_type
type
)
{
myisam_max_extra_temp_length
=
(
my_off_t
)
global_system_variables
.
myisam_max_sort_file_size
;
}
static
void
fix_myisam_max_sort_file_size
(
THD
*
thd
,
enum_var_type
type
)
{
myisam_max_temp_length
=
(
my_off_t
)
global_system_variables
.
myisam_max_sort_file_size
;
}
/*
/*
Set the OPTION_BIG_SELECTS flag if max_join_size == HA_POS_ERROR
Set the OPTION_BIG_SELECTS flag if max_join_size == HA_POS_ERROR
*/
*/
...
@@ -815,15 +832,22 @@ byte *sys_var_thd_ha_rows::value_ptr(THD *thd, enum_var_type type)
...
@@ -815,15 +832,22 @@ byte *sys_var_thd_ha_rows::value_ptr(THD *thd, enum_var_type type)
bool
sys_var_thd_ulonglong
::
update
(
THD
*
thd
,
set_var
*
var
)
bool
sys_var_thd_ulonglong
::
update
(
THD
*
thd
,
set_var
*
var
)
{
{
ulonglong
tmp
=
var
->
value
->
val_int
();
if
((
ulonglong
)
tmp
>
max_system_variables
.
*
offset
)
tmp
=
max_system_variables
.
*
offset
;
if
(
option_limits
)
tmp
=
(
ulong
)
getopt_ull_limit_value
(
tmp
,
option_limits
);
if
(
var
->
type
==
OPT_GLOBAL
)
if
(
var
->
type
==
OPT_GLOBAL
)
{
{
/* Lock is needed to make things safe on 32 bit systems */
/* Lock is needed to make things safe on 32 bit systems */
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
global_system_variables
.
*
offset
=
var
->
value
->
val_int
()
;
global_system_variables
.
*
offset
=
(
ulonglong
)
tmp
;
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
}
}
else
else
thd
->
variables
.
*
offset
=
var
->
value
->
val_int
()
;
thd
->
variables
.
*
offset
=
(
ulonglong
)
tmp
;
return
0
;
return
0
;
}
}
...
...
sql/set_var.h
View file @
c9c58417
...
@@ -233,13 +233,27 @@ class sys_var_thd_ulonglong :public sys_var_thd
...
@@ -233,13 +233,27 @@ class sys_var_thd_ulonglong :public sys_var_thd
{
{
public:
public:
ulonglong
SV
::*
offset
;
ulonglong
SV
::*
offset
;
bool
only_global
;
sys_var_thd_ulonglong
(
const
char
*
name_arg
,
ulonglong
SV
::*
offset_arg
)
sys_var_thd_ulonglong
(
const
char
*
name_arg
,
ulonglong
SV
::*
offset_arg
)
:
sys_var_thd
(
name_arg
),
offset
(
offset_arg
)
:
sys_var_thd
(
name_arg
),
offset
(
offset_arg
)
{}
{}
sys_var_thd_ulonglong
(
const
char
*
name_arg
,
ulonglong
SV
::*
offset_arg
,
sys_after_update_func
func
,
bool
only_global_arg
)
:
sys_var_thd
(
name_arg
,
func
),
offset
(
offset_arg
),
only_global
(
only_global_arg
)
{}
bool
update
(
THD
*
thd
,
set_var
*
var
);
bool
update
(
THD
*
thd
,
set_var
*
var
);
void
set_default
(
THD
*
thd
,
enum_var_type
type
);
void
set_default
(
THD
*
thd
,
enum_var_type
type
);
SHOW_TYPE
type
()
{
return
SHOW_LONGLONG
;
}
SHOW_TYPE
type
()
{
return
SHOW_LONGLONG
;
}
byte
*
value_ptr
(
THD
*
thd
,
enum_var_type
type
);
byte
*
value_ptr
(
THD
*
thd
,
enum_var_type
type
);
bool
check_default
(
enum_var_type
type
)
{
return
type
==
OPT_GLOBAL
&&
!
option_limits
;
}
bool
check_type
(
enum_var_type
type
)
{
return
(
only_global
&&
type
!=
OPT_GLOBAL
);
}
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment