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
48af52bf
Commit
48af52bf
authored
Apr 04, 2002
by
sasha@mysql.sashanet.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes to make it compile and pass the test suite again after the last
accidental push of broken code.
parent
34998c5a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
+17
-3
client/mysqladmin.c
client/mysqladmin.c
+8
-2
libmysql/Makefile.shared
libmysql/Makefile.shared
+2
-1
mysys/my_getopt.c
mysys/my_getopt.c
+7
-0
No files found.
client/mysqladmin.c
View file @
48af52bf
...
@@ -253,10 +253,16 @@ int main(int argc,char *argv[])
...
@@ -253,10 +253,16 @@ int main(int argc,char *argv[])
int
error
,
ho_error
;
int
error
,
ho_error
;
MYSQL
mysql
;
MYSQL
mysql
;
char
**
commands
;
char
**
commands
;
char
**
save_argv
;
MY_INIT
(
argv
[
0
]);
MY_INIT
(
argv
[
0
]);
mysql_init
(
&
mysql
);
mysql_init
(
&
mysql
);
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
save_argv
=
argv
;
/* Sasha: with the change to handle_options() we now need to do this fix
with save_argv in all client utilities. The problem is that
handle_options may modify argv, and that wreaks havoc with
free_defaults()
*/
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
{
{
printf
(
"%s: handle_options() failed with error %d
\n
"
,
my_progname
,
printf
(
"%s: handle_options() failed with error %d
\n
"
,
my_progname
,
...
@@ -327,7 +333,7 @@ int main(int argc,char *argv[])
...
@@ -327,7 +333,7 @@ int main(int argc,char *argv[])
}
}
my_free
(
opt_password
,
MYF
(
MY_ALLOW_ZERO_PTR
));
my_free
(
opt_password
,
MYF
(
MY_ALLOW_ZERO_PTR
));
my_free
(
user
,
MYF
(
MY_ALLOW_ZERO_PTR
));
my_free
(
user
,
MYF
(
MY_ALLOW_ZERO_PTR
));
free_defaults
(
argv
);
free_defaults
(
save_
argv
);
my_end
(
0
);
my_end
(
0
);
exit
(
error
?
1
:
0
);
exit
(
error
?
1
:
0
);
return
0
;
return
0
;
...
...
libmysql/Makefile.shared
View file @
48af52bf
...
@@ -58,7 +58,8 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
...
@@ -58,7 +58,8 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
my_compress.lo array.lo my_once.lo list.lo my_net.lo
\
my_compress.lo array.lo my_once.lo list.lo my_net.lo
\
charset.lo hash.lo mf_iocache.lo
\
charset.lo hash.lo mf_iocache.lo
\
mf_iocache2.lo my_seek.lo
\
mf_iocache2.lo my_seek.lo
\
my_pread.lo mf_cache.lo my_vsnprintf.lo md5.lo
my_pread.lo mf_cache.lo my_vsnprintf.lo md5.lo
\
my_getopt.lo
# Not needed in the minimum library
# Not needed in the minimum library
mysysobjects2
=
getopt.lo getopt1.lo getvar.lo my_lib.lo
mysysobjects2
=
getopt.lo getopt1.lo getvar.lo my_lib.lo
...
...
mysys/my_getopt.c
View file @
48af52bf
...
@@ -102,6 +102,12 @@ int handle_options(int *argc, char ***argv,
...
@@ -102,6 +102,12 @@ 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
(
*
cur_arg
==
'-'
)
/* check for long option, or --set-variable */
{
{
...
@@ -145,6 +151,7 @@ int handle_options(int *argc, char ***argv,
...
@@ -145,6 +151,7 @@ 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
==
'='
)
...
...
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