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
3a571c7c
Commit
3a571c7c
authored
Mar 26, 2002
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed overflow bug
parent
133651d6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
16 deletions
+20
-16
Docs/manual.texi
Docs/manual.texi
+2
-0
include/mysql_com.h
include/mysql_com.h
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+17
-15
No files found.
Docs/manual.texi
View file @
3a571c7c
...
@@ -46913,6 +46913,8 @@ not yet 100% confident in this code.
...
@@ -46913,6 +46913,8 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.50
@appendixsubsec Changes in release 3.23.50
@itemize @bullet
@itemize @bullet
@item
@item
Fixed some buffer overflow problems when reading startup parameters.
@item
Because of problems on shutdown we have now disabled named pipes on
Because of problems on shutdown we have now disabled named pipes on
windows by default. One can enable this with by starting mysqld with
windows by default. One can enable this with by starting mysqld with
@code{--enable-named-pipe}.
@code{--enable-named-pipe}.
include/mysql_com.h
View file @
3a571c7c
...
@@ -67,7 +67,7 @@ enum enum_server_command {COM_SLEEP,COM_QUIT,COM_INIT_DB,COM_QUERY,
...
@@ -67,7 +67,7 @@ enum enum_server_command {COM_SLEEP,COM_QUIT,COM_INIT_DB,COM_QUERY,
#define REFRESH_TABLES 4
/* close all tables */
#define REFRESH_TABLES 4
/* close all tables */
#define REFRESH_HOSTS 8
/* Flush host cache */
#define REFRESH_HOSTS 8
/* Flush host cache */
#define REFRESH_STATUS 16
/* Flush status variables */
#define REFRESH_STATUS 16
/* Flush status variables */
#define REFRESH_THREADS 32
/* Flush
status variables
*/
#define REFRESH_THREADS 32
/* Flush
thread cache
*/
#define REFRESH_SLAVE 64
/* Reset master info and restart slave
#define REFRESH_SLAVE 64
/* Reset master info and restart slave
thread */
thread */
#define REFRESH_MASTER 128
/* Remove all bin logs in the index
#define REFRESH_MASTER 128
/* Remove all bin logs in the index
...
...
sql/mysqld.cc
View file @
3a571c7c
...
@@ -1659,7 +1659,7 @@ int main(int argc, char **argv)
...
@@ -1659,7 +1659,7 @@ int main(int argc, char **argv)
if
(
gethostname
(
glob_hostname
,
sizeof
(
glob_hostname
)
-
4
)
<
0
)
if
(
gethostname
(
glob_hostname
,
sizeof
(
glob_hostname
)
-
4
)
<
0
)
strmov
(
glob_hostname
,
"mysql"
);
strmov
(
glob_hostname
,
"mysql"
);
strm
ov
(
pidfile_name
,
glob_hostname
);
strm
ake
(
pidfile_name
,
glob_hostname
,
sizeof
(
pidfile_name
)
-
5
);
strmov
(
strcend
(
pidfile_name
,
'.'
),
".pid"
);
// Add extension
strmov
(
strcend
(
pidfile_name
,
'.'
),
".pid"
);
// Add extension
#ifndef DBUG_OFF
#ifndef DBUG_OFF
strxmov
(
strend
(
server_version
),
MYSQL_SERVER_SUFFIX
,
"-debug"
,
NullS
);
strxmov
(
strend
(
server_version
),
MYSQL_SERVER_SUFFIX
,
"-debug"
,
NullS
);
...
@@ -3418,9 +3418,10 @@ static void set_options(void)
...
@@ -3418,9 +3418,10 @@ static void set_options(void)
opt_specialflag
|=
SPECIAL_NO_PRIOR
;
opt_specialflag
|=
SPECIAL_NO_PRIOR
;
#endif
#endif
(
void
)
strmov
(
default_charset
,
MYSQL_CHARSET
);
(
void
)
strmake
(
default_charset
,
MYSQL_CHARSET
,
sizeof
(
default_charset
)
-
1
);
(
void
)
strmov
(
language
,
LANGUAGE
);
(
void
)
strmake
(
language
,
LANGUAGE
,
sizeof
(
language
)
-
1
);
(
void
)
strmov
(
mysql_real_data_home
,
get_relative_path
(
DATADIR
));
(
void
)
strmake
(
mysql_real_data_home
,
get_relative_path
(
DATADIR
),
sizeof
(
mysql_real_data_home
-
1
));
#ifdef __WIN__
#ifdef __WIN__
/* Allow Win32 users to move MySQL anywhere */
/* Allow Win32 users to move MySQL anywhere */
{
{
...
@@ -3433,7 +3434,7 @@ static void set_options(void)
...
@@ -3433,7 +3434,7 @@ static void set_options(void)
const
char
*
tmpenv
;
const
char
*
tmpenv
;
if
(
!
(
tmpenv
=
getenv
(
"MY_BASEDIR_VERSION"
)))
if
(
!
(
tmpenv
=
getenv
(
"MY_BASEDIR_VERSION"
)))
tmpenv
=
DEFAULT_MYSQL_HOME
;
tmpenv
=
DEFAULT_MYSQL_HOME
;
(
void
)
strm
ov
(
mysql_home
,
tmpenv
);
(
void
)
strm
ake
(
mysql_home
,
tmpenv
,
sizeof
(
mysql_home
)
-
1
);
#endif
#endif
#if defined( HAVE_mit_thread ) || defined( __WIN__ ) || defined( HAVE_LINUXTHREADS )
#if defined( HAVE_mit_thread ) || defined( __WIN__ ) || defined( HAVE_LINUXTHREADS )
...
@@ -3469,17 +3470,17 @@ static void get_options(int argc,char **argv)
...
@@ -3469,17 +3470,17 @@ static void get_options(int argc,char **argv)
default_tx_isolation
=
ISO_SERIALIZABLE
;
default_tx_isolation
=
ISO_SERIALIZABLE
;
break
;
break
;
case
'b'
:
case
'b'
:
strm
ov
(
mysql_home
,
optarg
);
strm
ake
(
mysql_home
,
optarg
,
sizeof
(
mysql_home
)
-
1
);
break
;
break
;
case
'l'
:
case
'l'
:
opt_log
=
1
;
opt_log
=
1
;
opt_logname
=
optarg
;
// Use hostname.log if null
opt_logname
=
optarg
;
// Use hostname.log if null
break
;
break
;
case
'h'
:
case
'h'
:
strm
ov
(
mysql_real_data_home
,
optarg
);
strm
ake
(
mysql_real_data_home
,
optarg
,
sizeof
(
mysql_real_data_home
)
-
1
);
break
;
break
;
case
'L'
:
case
'L'
:
strm
ov
(
language
,
optarg
);
strm
ake
(
language
,
optarg
,
sizeof
(
language
)
-
1
);
break
;
break
;
case
'n'
:
case
'n'
:
opt_specialflag
|=
SPECIAL_NEW_FUNC
;
opt_specialflag
|=
SPECIAL_NEW_FUNC
;
...
@@ -3813,7 +3814,7 @@ static void get_options(int argc,char **argv)
...
@@ -3813,7 +3814,7 @@ static void get_options(int argc,char **argv)
}
}
break
;
break
;
case
(
int
)
OPT_PID_FILE
:
case
(
int
)
OPT_PID_FILE
:
strm
ov
(
pidfile_name
,
optarg
);
strm
ake
(
pidfile_name
,
optarg
,
sizeof
(
pidfile_name
)
-
1
);
break
;
break
;
case
(
int
)
OPT_INIT_FILE
:
case
(
int
)
OPT_INIT_FILE
:
opt_init_file
=
optarg
;
opt_init_file
=
optarg
;
...
@@ -3865,10 +3866,10 @@ static void get_options(int argc,char **argv)
...
@@ -3865,10 +3866,10 @@ static void get_options(int argc,char **argv)
myisam_delay_key_write
=
0
;
myisam_delay_key_write
=
0
;
break
;
break
;
case
'C'
:
case
'C'
:
strm
ov
(
default_charset
,
optarg
);
strm
ake
(
default_charset
,
optarg
,
sizeof
(
default_charset
)
-
1
);
break
;
break
;
case
OPT_CHARSETS_DIR
:
case
OPT_CHARSETS_DIR
:
strm
ov
(
mysql_charsets_dir
,
optarg
);
strm
ake
(
mysql_charsets_dir
,
optarg
,
sizeof
(
mysql_charsets_dir
)
-
1
);
charsets_dir
=
mysql_charsets_dir
;
charsets_dir
=
mysql_charsets_dir
;
break
;
break
;
#include "sslopt-case.h"
#include "sslopt-case.h"
...
@@ -4098,16 +4099,17 @@ static void fix_paths(void)
...
@@ -4098,16 +4099,17 @@ static void fix_paths(void)
char
buff
[
FN_REFLEN
],
*
sharedir
=
get_relative_path
(
SHAREDIR
);
char
buff
[
FN_REFLEN
],
*
sharedir
=
get_relative_path
(
SHAREDIR
);
if
(
test_if_hard_path
(
sharedir
))
if
(
test_if_hard_path
(
sharedir
))
strm
ov
(
buff
,
sharedir
);
/* purecov: tested */
strm
ake
(
buff
,
sharedir
,
sizeof
(
buff
)
-
1
);
/* purecov: tested */
else
else
strx
mov
(
buff
,
mysql_home
,
sharedir
,
NullS
);
strx
nmov
(
buff
,
sizeof
(
buff
)
-
1
,
mysql_home
,
sharedir
,
NullS
);
convert_dirname
(
buff
);
convert_dirname
(
buff
);
(
void
)
my_load_path
(
language
,
language
,
buff
);
(
void
)
my_load_path
(
language
,
language
,
buff
);
/* If --character-sets-dir isn't given, use shared library dir */
/* If --character-sets-dir isn't given, use shared library dir */
if
(
charsets_dir
!=
mysql_charsets_dir
)
if
(
charsets_dir
!=
mysql_charsets_dir
)
{
{
strmov
(
strmov
(
mysql_charsets_dir
,
buff
),
CHARSET_DIR
);
strxnmov
(
mysql_charsets_dir
,
sizeof
(
mysql_charsets_dir
)
-
1
,
buff
,
CHARSET_DIR
,
NullS
);
charsets_dir
=
mysql_charsets_dir
;
charsets_dir
=
mysql_charsets_dir
;
}
}
...
@@ -4115,7 +4117,7 @@ static void fix_paths(void)
...
@@ -4115,7 +4117,7 @@ static void fix_paths(void)
char
*
tmp
=
(
char
*
)
my_malloc
(
FN_REFLEN
,
MYF
(
MY_FAE
));
char
*
tmp
=
(
char
*
)
my_malloc
(
FN_REFLEN
,
MYF
(
MY_FAE
));
if
(
tmp
)
if
(
tmp
)
{
{
strm
ov
(
tmp
,
mysql_tmpdir
);
strm
ake
(
tmp
,
mysql_tmpdir
,
FN_REFLEN
-
1
);
mysql_tmpdir
=
tmp
;
mysql_tmpdir
=
tmp
;
convert_dirname
(
mysql_tmpdir
);
convert_dirname
(
mysql_tmpdir
);
mysql_tmpdir
=
(
char
*
)
my_realloc
(
mysql_tmpdir
,(
uint
)
strlen
(
mysql_tmpdir
)
+
1
,
mysql_tmpdir
=
(
char
*
)
my_realloc
(
mysql_tmpdir
,(
uint
)
strlen
(
mysql_tmpdir
)
+
1
,
...
...
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