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
5010be1d
Commit
5010be1d
authored
Jan 06, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jwinstead2/mysql-4.1-clean
into mysql.com:/home/jwinstead2/mysql-5.0
parents
51577433
03578cd6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
8 deletions
+50
-8
client/mysqladmin.cc
client/mysqladmin.cc
+34
-2
client/mysqldump.c
client/mysqldump.c
+10
-2
scripts/mysql_config.sh
scripts/mysql_config.sh
+4
-2
scripts/mysqld_safe.sh
scripts/mysqld_safe.sh
+2
-2
No files found.
client/mysqladmin.cc
View file @
5010be1d
...
@@ -33,7 +33,8 @@
...
@@ -33,7 +33,8 @@
#define SHUTDOWN_DEF_TIMEOUT 3600
/* Wait for shutdown */
#define SHUTDOWN_DEF_TIMEOUT 3600
/* Wait for shutdown */
#define MAX_TRUNC_LENGTH 3
#define MAX_TRUNC_LENGTH 3
char
*
host
=
NULL
,
*
user
=
0
,
*
opt_password
=
0
;
char
*
host
=
NULL
,
*
user
=
0
,
*
opt_password
=
0
,
*
default_charset
=
NULL
;
char
truncated_var_names
[
MAX_MYSQL_VAR
][
MAX_TRUNC_LENGTH
];
char
truncated_var_names
[
MAX_MYSQL_VAR
][
MAX_TRUNC_LENGTH
];
char
ex_var_names
[
MAX_MYSQL_VAR
][
FN_REFLEN
];
char
ex_var_names
[
MAX_MYSQL_VAR
][
FN_REFLEN
];
ulonglong
last_values
[
MAX_MYSQL_VAR
];
ulonglong
last_values
[
MAX_MYSQL_VAR
];
...
@@ -145,6 +146,9 @@ static struct my_option my_long_options[] =
...
@@ -145,6 +146,9 @@ static struct my_option my_long_options[] =
{
"character-sets-dir"
,
OPT_CHARSETS_DIR
,
{
"character-sets-dir"
,
OPT_CHARSETS_DIR
,
"Directory where character sets are."
,
(
gptr
*
)
&
charsets_dir
,
"Directory where character sets are."
,
(
gptr
*
)
&
charsets_dir
,
(
gptr
*
)
&
charsets_dir
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
(
gptr
*
)
&
charsets_dir
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"default-character-set"
,
OPT_DEFAULT_CHARSET
,
"Set the default character set."
,
(
gptr
*
)
&
default_charset
,
(
gptr
*
)
&
default_charset
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"help"
,
'?'
,
"Display this help and exit."
,
0
,
0
,
0
,
GET_NO_ARG
,
{
"help"
,
'?'
,
"Display this help and exit."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"host"
,
'h'
,
"Connect to host."
,
(
gptr
*
)
&
host
,
(
gptr
*
)
&
host
,
0
,
GET_STR
,
{
"host"
,
'h'
,
"Connect to host."
,
(
gptr
*
)
&
host
,
(
gptr
*
)
&
host
,
0
,
GET_STR
,
...
@@ -343,6 +347,8 @@ int main(int argc,char *argv[])
...
@@ -343,6 +347,8 @@ int main(int argc,char *argv[])
if
(
shared_memory_base_name
)
if
(
shared_memory_base_name
)
mysql_options
(
&
mysql
,
MYSQL_SHARED_MEMORY_BASE_NAME
,
shared_memory_base_name
);
mysql_options
(
&
mysql
,
MYSQL_SHARED_MEMORY_BASE_NAME
,
shared_memory_base_name
);
#endif
#endif
if
(
default_charset
)
mysql_options
(
&
mysql
,
MYSQL_SET_CHARSET_NAME
,
default_charset
);
if
(
sql_connect
(
&
mysql
,
option_wait
))
if
(
sql_connect
(
&
mysql
,
option_wait
))
{
{
unsigned
int
err
=
mysql_errno
(
&
mysql
);
unsigned
int
err
=
mysql_errno
(
&
mysql
);
...
@@ -827,13 +833,39 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
...
@@ -827,13 +833,39 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
if
(
argv
[
1
][
0
])
if
(
argv
[
1
][
0
])
{
{
char
*
pw
=
argv
[
1
];
char
*
pw
=
argv
[
1
];
bool
old
=
find_type
(
argv
[
0
],
&
command_typelib
,
2
)
==
ADMIN_OLD_PASSWORD
;
#ifdef __WIN__
#ifdef __WIN__
uint
pw_len
=
strlen
(
pw
);
uint
pw_len
=
strlen
(
pw
);
if
(
pw_len
>
1
&&
pw
[
0
]
==
'\''
&&
pw
[
pw_len
-
1
]
==
'\''
)
if
(
pw_len
>
1
&&
pw
[
0
]
==
'\''
&&
pw
[
pw_len
-
1
]
==
'\''
)
printf
(
"Warning: single quotes were not trimmed from the password by"
printf
(
"Warning: single quotes were not trimmed from the password by"
" your command
\n
line client, as you might have expected.
\n
"
);
" your command
\n
line client, as you might have expected.
\n
"
);
#endif
#endif
if
(
find_type
(
argv
[
0
],
&
command_typelib
,
2
)
==
ADMIN_OLD_PASSWORD
)
/*
If we don't already know to use an old-style password, see what
the server is using
*/
if
(
!
old
)
{
if
(
mysql_query
(
mysql
,
"SHOW VARIABLES LIKE 'old_passwords'"
))
{
my_printf_error
(
0
,
"Could not determine old_passwords setting from server; error: '%s'"
,
MYF
(
ME_BELL
),
mysql_error
(
mysql
));
return
-
1
;
}
else
{
MYSQL_RES
*
res
=
mysql_store_result
(
mysql
);
if
(
!
res
)
{
my_printf_error
(
0
,
"Could not get old_passwords setting from server; error: '%s'"
,
MYF
(
ME_BELL
),
mysql_error
(
mysql
));
return
-
1
;
}
if
(
!
mysql_num_rows
(
res
))
{
old
=
1
;
}
else
{
MYSQL_ROW
row
=
mysql_fetch_row
(
res
);
old
=
!
strncmp
(
row
[
1
],
"ON"
,
2
);
}
mysql_free_result
(
res
);
}
}
if
(
old
)
make_scrambled_password_323
(
crypted_pw
,
pw
);
make_scrambled_password_323
(
crypted_pw
,
pw
);
else
else
make_scrambled_password
(
crypted_pw
,
pw
);
make_scrambled_password
(
crypted_pw
,
pw
);
...
...
client/mysqldump.c
View file @
5010be1d
...
@@ -106,7 +106,14 @@ FILE *md_result_file;
...
@@ -106,7 +106,14 @@ FILE *md_result_file;
static
char
*
shared_memory_base_name
=
0
;
static
char
*
shared_memory_base_name
=
0
;
#endif
#endif
static
uint
opt_protocol
=
0
;
static
uint
opt_protocol
=
0
;
static
char
*
default_charset
=
(
char
*
)
MYSQL_UNIVERSAL_CLIENT_CHARSET
;
/*
Constant for detection of default value of default_charset.
If default_charset is equal to mysql_universal_client_charset, then
it is the default value which assigned at the very beginning of main().
*/
static
const
char
*
mysql_universal_client_charset
=
MYSQL_UNIVERSAL_CLIENT_CHARSET
;
static
char
*
default_charset
;
static
CHARSET_INFO
*
charset_info
=
&
my_charset_latin1
;
static
CHARSET_INFO
*
charset_info
=
&
my_charset_latin1
;
const
char
*
default_dbug_option
=
"d:t:o,/tmp/mysqldump.trace"
;
const
char
*
default_dbug_option
=
"d:t:o,/tmp/mysqldump.trace"
;
/* do we met VIEWs during tables scaning */
/* do we met VIEWs during tables scaning */
...
@@ -682,7 +689,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -682,7 +689,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
Set charset to the default compiled value if it hasn't
Set charset to the default compiled value if it hasn't
been reset yet by --default-character-set=xxx.
been reset yet by --default-character-set=xxx.
*/
*/
if
(
default_charset
==
(
char
*
)
MYSQL_UNIVERSAL_CLIENT_CHARSET
)
if
(
default_charset
==
mysql_universal_client_charset
)
default_charset
=
(
char
*
)
MYSQL_DEFAULT_CHARSET_NAME
;
default_charset
=
(
char
*
)
MYSQL_DEFAULT_CHARSET_NAME
;
break
;
break
;
}
}
...
@@ -2610,6 +2617,7 @@ static my_bool getViewStructure(char *table, char* db)
...
@@ -2610,6 +2617,7 @@ static my_bool getViewStructure(char *table, char* db)
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
compatible_mode_normal_str
[
0
]
=
0
;
compatible_mode_normal_str
[
0
]
=
0
;
default_charset
=
(
char
*
)
mysql_universal_client_charset
;
MY_INIT
(
argv
[
0
]);
MY_INIT
(
argv
[
0
]);
if
(
get_options
(
&
argc
,
&
argv
))
if
(
get_options
(
&
argc
,
&
argv
))
...
...
scripts/mysql_config.sh
View file @
5010be1d
...
@@ -88,7 +88,7 @@ client_libs='@CLIENT_LIBS@'
...
@@ -88,7 +88,7 @@ client_libs='@CLIENT_LIBS@'
libs
=
"
$ldflags
-L
$pkglibdir
-lmysqlclient
$client_libs
"
libs
=
"
$ldflags
-L
$pkglibdir
-lmysqlclient
$client_libs
"
libs
=
`
echo
"
$libs
"
|
sed
-e
's; \+; ;g'
|
sed
-e
's;^ *;;'
|
sed
-e
's; *\$;;'
`
libs
=
`
echo
"
$libs
"
|
sed
-e
's; \+; ;g'
|
sed
-e
's;^ *;;'
|
sed
-e
's; *\$;;'
`
libs_r
=
"
$ldflags
-L
$pkglibdir
-lmysqlclient_r @LIBS@ @openssl_libs@"
libs_r
=
"
$ldflags
-L
$pkglibdir
-lmysqlclient_r @LIBS@ @
ZLIB_LIBS@ @
openssl_libs@"
libs_r
=
`
echo
"
$libs_r
"
|
sed
-e
's; \+; ;g'
|
sed
-e
's;^ *;;'
|
sed
-e
's; *\$;;'
`
libs_r
=
`
echo
"
$libs_r
"
|
sed
-e
's; \+; ;g'
|
sed
-e
's;^ *;;'
|
sed
-e
's; *\$;;'
`
cflags
=
"-I
$pkgincludedir
@CFLAGS@ "
#note: end space!
cflags
=
"-I
$pkgincludedir
@CFLAGS@ "
#note: end space!
include
=
"-I
$pkgincludedir
"
include
=
"-I
$pkgincludedir
"
...
@@ -100,7 +100,9 @@ for remove in DDBUG_OFF DSAFEMALLOC USAFEMALLOC DSAFE_MUTEX \
...
@@ -100,7 +100,9 @@ for remove in DDBUG_OFF DSAFEMALLOC USAFEMALLOC DSAFE_MUTEX \
DPEDANTIC_SAFEMALLOC DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS
\
DPEDANTIC_SAFEMALLOC DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS
\
DEXTRA_DEBUG DHAVE_purify
'O[0-9]'
'W[-A-Za-z]*'
DEXTRA_DEBUG DHAVE_purify
'O[0-9]'
'W[-A-Za-z]*'
do
do
cflags
=
`
echo
"
$cflags
"
|sed
-e
"s/-
$remove
*//g"
`
# The first option we might strip will always have a space before it because
# we set -I$pkgincludedir as the first option
cflags
=
`
echo
"
$cflags
"
|sed
-e
"s/ -
$remove
*/ /g"
`
done
done
cflags
=
`
echo
"
$cflags
"
|sed
-e
's/ *\$//'
`
cflags
=
`
echo
"
$cflags
"
|sed
-e
's/ *\$//'
`
...
...
scripts/mysqld_safe.sh
View file @
5010be1d
...
@@ -82,7 +82,7 @@ parse_arguments() {
...
@@ -82,7 +82,7 @@ parse_arguments() {
MY_PWD
=
`
pwd
`
MY_PWD
=
`
pwd
`
# Check if we are starting this relative (for the binary release)
# Check if we are starting this relative (for the binary release)
if
test
-
d
$MY_PWD
/data/mysql
-a
-
f
./share/mysql/english/errmsg.sys
-a
\
if
test
-f
./share/mysql/english/errmsg.sys
-a
\
-x
./bin/mysqld
-x
./bin/mysqld
then
then
MY_BASEDIR_VERSION
=
$MY_PWD
# Where bin, share and data are
MY_BASEDIR_VERSION
=
$MY_PWD
# Where bin, share and data are
...
@@ -93,7 +93,7 @@ then
...
@@ -93,7 +93,7 @@ then
defaults
=
"--defaults-extra-file=
$DATADIR
/my.cnf"
defaults
=
"--defaults-extra-file=
$DATADIR
/my.cnf"
fi
fi
# Check if this is a 'moved install directory'
# Check if this is a 'moved install directory'
elif
test
-f
./
var/mysql/db.frm
-a
-f
./
share/mysql/english/errmsg.sys
-a
\
elif
test
-f
./share/mysql/english/errmsg.sys
-a
\
-x
./libexec/mysqld
-x
./libexec/mysqld
then
then
MY_BASEDIR_VERSION
=
$MY_PWD
# Where libexec, share and var are
MY_BASEDIR_VERSION
=
$MY_PWD
# Where libexec, share and var are
...
...
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