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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
00836cb3
Commit
00836cb3
authored
May 13, 2002
by
jani@rhols221.adsl.netsonic.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some bugs and added support for --loose-set-variable
parent
54b0d014
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
27 deletions
+41
-27
mysys/my_getopt.c
mysys/my_getopt.c
+23
-24
sql/mysqld.cc
sql/mysqld.cc
+18
-3
No files found.
mysys/my_getopt.c
View file @
00836cb3
...
@@ -94,6 +94,8 @@ int handle_options(int *argc, char ***argv,
...
@@ -94,6 +94,8 @@ int handle_options(int *argc, char ***argv,
option_is_loose
=
0
;
option_is_loose
=
0
;
cur_arg
++
;
/* skip '-' */
cur_arg
++
;
/* skip '-' */
if
(
*
cur_arg
==
'-'
||
*
cur_arg
==
'O'
)
/* check for long option, */
{
/* --set-variable, or -O */
if
(
*
cur_arg
==
'O'
)
if
(
*
cur_arg
==
'O'
)
{
{
must_be_var
=
1
;
must_be_var
=
1
;
...
@@ -110,18 +112,16 @@ int handle_options(int *argc, char ***argv,
...
@@ -110,18 +112,16 @@ int handle_options(int *argc, char ***argv,
cur_arg
=
*
pos
;
cur_arg
=
*
pos
;
(
*
argc
)
--
;
(
*
argc
)
--
;
}
}
/* Sasha: quick dirty fix of a bug that coredumps mysqladmin while
running the test suite. The bug is actually pretty serious -
even in cases when we do not coredump, -O var=val will not set
the variable, and the previous option would be treated upredictably.
*/
goto
found_var
;
}
}
else
if
(
*
cur_arg
==
'-'
)
/* check for long option, or --set-variable */
else
if
(
!
compare_strings
(
cur_arg
,
"-set-variable"
,
13
)
||
{
!
compare_strings
(
cur_arg
,
"-loose-set-variable"
,
19
))
if
(
!
compare_strings
(
cur_arg
,
"-set-variable"
,
13
))
{
{
must_be_var
=
1
;
must_be_var
=
1
;
if
(
cur_arg
[
1
]
==
'l'
)
{
option_is_loose
=
1
;
cur_arg
+=
6
;
}
if
(
cur_arg
[
13
]
==
'='
)
if
(
cur_arg
[
13
]
==
'='
)
{
{
cur_arg
+=
14
;
cur_arg
+=
14
;
...
@@ -159,7 +159,6 @@ int handle_options(int *argc, char ***argv,
...
@@ -159,7 +159,6 @@ int handle_options(int *argc, char ***argv,
continue
;
continue
;
}
}
}
}
found_var:
optend
=
strcend
(
cur_arg
,
'='
);
optend
=
strcend
(
cur_arg
,
'='
);
length
=
optend
-
cur_arg
;
length
=
optend
-
cur_arg
;
if
(
*
optend
==
'='
)
if
(
*
optend
==
'='
)
...
...
sql/mysqld.cc
View file @
00836cb3
...
@@ -2806,7 +2806,20 @@ enum options {
...
@@ -2806,7 +2806,20 @@ enum options {
OPT_SORT_BUFFER
,
OPT_TABLE_CACHE
,
OPT_SORT_BUFFER
,
OPT_TABLE_CACHE
,
OPT_THREAD_CONCURRENCY
,
OPT_THREAD_CACHE_SIZE
,
OPT_THREAD_CONCURRENCY
,
OPT_THREAD_CACHE_SIZE
,
OPT_TMP_TABLE_SIZE
,
OPT_THREAD_STACK
,
OPT_TMP_TABLE_SIZE
,
OPT_THREAD_STACK
,
OPT_WAIT_TIMEOUT
OPT_WAIT_TIMEOUT
,
OPT_INNODB_MIRRORED_LOG_GROUPS
,
OPT_INNODB_LOG_FILES_IN_GROUP
,
OPT_INNODB_LOG_FILE_SIZE
,
OPT_INNODB_LOG_BUFFER_SIZE
,
OPT_INNODB_BUFFER_POOL_SIZE
,
OPT_INNODB_ADDITIONAL_MEM_POOL_SIZE
,
OPT_INNODB_FILE_IO_THREADS
,
OPT_INNODB_LOCK_WAIT_TIMEOUT
,
OPT_INNODB_THREAD_CONCURRENCY
,
OPT_INNODB_FORCE_RECOVERY
,
OPT_BDB_CACHE_SIZE
,
OPT_BDB_LOG_BUFFER_SIZE
,
OPT_BDB_MAX_LOCK
};
};
...
@@ -2945,7 +2958,7 @@ static struct my_option my_long_options[] =
...
@@ -2945,7 +2958,7 @@ static struct my_option my_long_options[] =
0
,
0
,
0
},
0
,
0
,
0
},
{
"innodb_fast_shutdown"
,
OPT_INNODB_FAST_SHUTDOWN
,
{
"innodb_fast_shutdown"
,
OPT_INNODB_FAST_SHUTDOWN
,
"Speeds up server shutdown process"
,
(
gptr
*
)
&
innobase_fast_shutdown
,
"Speeds up server shutdown process"
,
(
gptr
*
)
&
innobase_fast_shutdown
,
(
gptr
*
)
&
innobase_fast_shutdown
,
0
,
GET_
STR
,
OPT_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
(
gptr
*
)
&
innobase_fast_shutdown
,
0
,
GET_
BOOL
,
NO_ARG
,
1
,
0
,
0
,
0
,
0
,
0
},
#endif
/* End HAVE_INNOBASE_DB */
#endif
/* End HAVE_INNOBASE_DB */
{
"help"
,
'?'
,
"Display this help and exit"
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
{
"help"
,
'?'
,
"Display this help and exit"
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
,
0
,
0
},
...
@@ -3040,6 +3053,7 @@ static struct my_option my_long_options[] =
...
@@ -3040,6 +3053,7 @@ static struct my_option my_long_options[] =
*/
*/
{
"memlock"
,
OPT_MEMLOCK
,
"Lock mysqld in memory"
,
(
gptr
*
)
&
locked_in_memory
,
{
"memlock"
,
OPT_MEMLOCK
,
"Lock mysqld in memory"
,
(
gptr
*
)
&
locked_in_memory
,
(
gptr
*
)
&
locked_in_memory
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
(
gptr
*
)
&
locked_in_memory
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#ifndef DBUG_OFF
{
"disconnect-slave-event-count"
,
OPT_DISCONNECT_SLAVE_EVENT_COUNT
,
{
"disconnect-slave-event-count"
,
OPT_DISCONNECT_SLAVE_EVENT_COUNT
,
"Undocumented: Meant for debugging and testing of replication"
,
"Undocumented: Meant for debugging and testing of replication"
,
(
gptr
*
)
&
disconnect_slave_event_count
,
(
gptr
*
)
&
disconnect_slave_event_count
,
...
@@ -3056,6 +3070,7 @@ static struct my_option my_long_options[] =
...
@@ -3056,6 +3070,7 @@ static struct my_option my_long_options[] =
(
gptr
*
)
&
opt_sporadic_binlog_dump_fail
,
(
gptr
*
)
&
opt_sporadic_binlog_dump_fail
,
(
gptr
*
)
&
opt_sporadic_binlog_dump_fail
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
(
gptr
*
)
&
opt_sporadic_binlog_dump_fail
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
0
},
#endif
{
"safemalloc-mem-limit"
,
OPT_SAFEMALLOC_MEM_LIMIT
,
{
"safemalloc-mem-limit"
,
OPT_SAFEMALLOC_MEM_LIMIT
,
"Simulate memory shortage when compiled with the --with-debug=full option"
,
"Simulate memory shortage when compiled with the --with-debug=full option"
,
0
,
0
,
0
,
GET_ULL
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
,
GET_ULL
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
...
@@ -3243,7 +3258,7 @@ static struct my_option my_long_options[] =
...
@@ -3243,7 +3258,7 @@ static struct my_option my_long_options[] =
REQUIRED_ARG
,
50
,
1
,
65535
,
0
,
1
,
0
},
REQUIRED_ARG
,
50
,
1
,
65535
,
0
,
1
,
0
},
#ifdef HAVE_BERKELEY_DB
#ifdef HAVE_BERKELEY_DB
{
"bdb_cache_size"
,
OPT_BDB_CACHE_SIZE
,
{
"bdb_cache_size"
,
OPT_BDB_CACHE_SIZE
,
"The buffer that is allocated to cache index and rows for BDB tables."
"The buffer that is allocated to cache index and rows for BDB tables."
,
(
gptr
*
)
&
berkeley_cache_size
,
(
gptr
*
)
&
berkeley_cache_size
,
0
,
GET_ULONG
,
(
gptr
*
)
&
berkeley_cache_size
,
(
gptr
*
)
&
berkeley_cache_size
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
KEY_CACHE_SIZE
,
20
*
1024
,
(
long
)
~
0
,
0
,
IO_SIZE
,
0
},
REQUIRED_ARG
,
KEY_CACHE_SIZE
,
20
*
1024
,
(
long
)
~
0
,
0
,
IO_SIZE
,
0
},
{
"bdb_log_buffer_size"
,
OPT_BDB_LOG_BUFFER_SIZE
,
{
"bdb_log_buffer_size"
,
OPT_BDB_LOG_BUFFER_SIZE
,
...
...
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