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
2677a1c4
Commit
2677a1c4
authored
Jan 11, 2005
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Review of new pushed code
Indentation cleanup
parent
56fb6f31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
client/mysqladmin.cc
client/mysqladmin.cc
+17
-8
No files found.
client/mysqladmin.cc
View file @
2677a1c4
...
...
@@ -832,7 +832,8 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
if
(
argv
[
1
][
0
])
{
char
*
pw
=
argv
[
1
];
bool
old
=
find_type
(
argv
[
0
],
&
command_typelib
,
2
)
==
ADMIN_OLD_PASSWORD
;
bool
old
=
(
find_type
(
argv
[
0
],
&
command_typelib
,
2
)
==
ADMIN_OLD_PASSWORD
);
#ifdef __WIN__
uint
pw_len
=
strlen
(
pw
);
if
(
pw_len
>
1
&&
pw
[
0
]
==
'\''
&&
pw
[
pw_len
-
1
]
==
'\''
)
...
...
@@ -843,21 +844,29 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
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'"
))
{
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
{
}
else
{
MYSQL_RES
*
res
=
mysql_store_result
(
mysql
);
if
(
!
res
)
{
my_printf_error
(
0
,
"Could not get old_passwords setting from server; error: '%s'"
,
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
))
{
if
(
!
mysql_num_rows
(
res
))
old
=
1
;
}
else
{
else
{
MYSQL_ROW
row
=
mysql_fetch_row
(
res
);
old
=
!
strncmp
(
row
[
1
],
"ON"
,
2
);
}
...
...
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