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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
b0eb222a
Commit
b0eb222a
authored
May 28, 2009
by
Alexey Kopytov
Browse files
Options
Browse Files
Download
Plain Diff
Automerge.
parents
beb0e1a3
23c0cf38
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
4 deletions
+30
-4
client/mysql_upgrade.c
client/mysql_upgrade.c
+30
-4
No files found.
client/mysql_upgrade.c
View file @
b0eb222a
...
...
@@ -39,6 +39,7 @@ static uint my_end_arg= 0;
static
char
*
opt_user
=
(
char
*
)
"root"
;
static
DYNAMIC_STRING
ds_args
;
static
DYNAMIC_STRING
conn_args
;
static
char
*
opt_password
=
0
;
static
my_bool
tty_password
=
0
;
...
...
@@ -135,6 +136,7 @@ static void free_used_memory(void)
free_defaults
(
defaults_argv
);
dynstr_free
(
&
ds_args
);
dynstr_free
(
&
conn_args
);
}
...
...
@@ -204,7 +206,7 @@ static void add_one_option(DYNAMIC_STRING* ds,
}
}
dynstr_append_os_quoted
(
ds
,
"--"
,
opt
->
name
,
eq
,
arg
,
NullS
);
dynstr_append
(
&
ds_arg
s
,
" "
);
dynstr_append
(
d
s
,
" "
);
}
...
...
@@ -256,6 +258,15 @@ get_one_option(int optid, const struct my_option *opt,
case
'f'
:
/* --force */
add_option
=
FALSE
;
break
;
case
'h'
:
/* --host */
case
'W'
:
/* --pipe */
case
'P'
:
/* --port */
case
'S'
:
/* --socket */
case
OPT_MYSQL_PROTOCOL
:
/* --protocol */
case
OPT_SHARED_MEMORY_BASE_NAME
:
/* --shared-memory-base-name */
add_one_option
(
&
conn_args
,
opt
,
argument
);
break
;
}
if
(
add_option
)
...
...
@@ -603,6 +614,20 @@ static void create_mysql_upgrade_info_file(void)
}
/*
Print connection-related arguments.
*/
static
void
print_conn_args
(
const
char
*
tool_name
)
{
if
(
conn_args
.
str
[
0
])
verbose
(
"Running '%s' with connection arguments: %s"
,
tool_name
,
conn_args
.
str
);
else
verbose
(
"Running '%s with default connection arguments"
,
tool_name
);
}
/*
Check and upgrade(if neccessary) all tables
in the server using "mysqlcheck --check-upgrade .."
...
...
@@ -610,7 +635,7 @@ static void create_mysql_upgrade_info_file(void)
static
int
run_mysqlcheck_upgrade
(
void
)
{
verbose
(
"Running 'mysqlcheck'...
"
);
print_conn_args
(
"mysqlcheck
"
);
return
run_tool
(
mysqlcheck_path
,
NULL
,
/* Send output from mysqlcheck directly to screen */
"--no-defaults"
,
...
...
@@ -624,7 +649,7 @@ static int run_mysqlcheck_upgrade(void)
static
int
run_mysqlcheck_fixnames
(
void
)
{
verbose
(
"Running 'mysqlcheck'...
"
);
print_conn_args
(
"mysqlcheck
"
);
return
run_tool
(
mysqlcheck_path
,
NULL
,
/* Send output from mysqlcheck directly to screen */
"--no-defaults"
,
...
...
@@ -753,7 +778,8 @@ int main(int argc, char **argv)
strncpy
(
self_name
,
argv
[
0
],
FN_REFLEN
);
}
if
(
init_dynamic_string
(
&
ds_args
,
""
,
512
,
256
))
if
(
init_dynamic_string
(
&
ds_args
,
""
,
512
,
256
)
||
init_dynamic_string
(
&
conn_args
,
""
,
512
,
256
))
die
(
"Out of memory"
);
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
...
...
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