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
9ac8feee
Commit
9ac8feee
authored
Oct 29, 2009
by
Alexander Nozdrin
Browse files
Options
Browse Files
Download
Plain Diff
Automerge from mysql-next-mr.
parents
ca543fc8
96f31b36
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
5 deletions
+25
-5
client/mysql_upgrade.c
client/mysql_upgrade.c
+17
-5
mysql-test/r/mysql_upgrade.result
mysql-test/r/mysql_upgrade.result
+1
-0
mysql-test/t/mysql_upgrade.test
mysql-test/t/mysql_upgrade.test
+7
-0
No files found.
client/mysql_upgrade.c
View file @
9ac8feee
...
...
@@ -34,7 +34,8 @@
static
char
mysql_path
[
FN_REFLEN
];
static
char
mysqlcheck_path
[
FN_REFLEN
];
static
my_bool
opt_force
,
opt_verbose
,
debug_info_flag
,
debug_check_flag
;
static
my_bool
opt_force
,
opt_verbose
,
debug_info_flag
,
debug_check_flag
,
opt_systables_only
;
static
uint
my_end_arg
=
0
;
static
char
*
opt_user
=
(
char
*
)
"root"
;
...
...
@@ -121,6 +122,10 @@ static struct my_option my_long_options[]=
#include <sslopt-longopts.h>
{
"tmpdir"
,
't'
,
"Directory for temporary files"
,
0
,
0
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"upgrade-system-tables"
,
's'
,
"Only upgrade the system tables "
"do not try to upgrade the data."
,
(
uchar
**
)
&
opt_systables_only
,
(
uchar
**
)
&
opt_systables_only
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"user"
,
'u'
,
"User for login if not current user."
,
(
uchar
**
)
&
opt_user
,
(
uchar
**
)
&
opt_user
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"verbose"
,
'v'
,
"Display more output about the process"
,
...
...
@@ -838,8 +843,15 @@ int main(int argc, char **argv)
/* Find mysql */
find_tool
(
mysql_path
,
IF_WIN
(
"mysql.exe"
,
"mysql"
),
self_name
);
if
(
!
opt_systables_only
)
{
/* Find mysqlcheck */
find_tool
(
mysqlcheck_path
,
IF_WIN
(
"mysqlcheck.exe"
,
"mysqlcheck"
),
self_name
);
}
else
{
printf
(
"The --upgrade-system-tables option was used, databases won't be touched.
\n
"
);
}
/*
Read the mysql_upgrade_info file to check if mysql_upgrade
...
...
@@ -856,8 +868,8 @@ int main(int argc, char **argv)
/*
Run "mysqlcheck" and "mysql_fix_privilege_tables.sql"
*/
if
(
run_mysqlcheck_fixnames
()
||
run_mysqlcheck_upgrade
(
)
||
if
(
(
!
opt_systables_only
&&
(
run_mysqlcheck_fixnames
()
||
run_mysqlcheck_upgrade
())
)
||
run_sql_fix_privilege_tables
())
{
/*
...
...
mysql-test/r/mysql_upgrade.result
View file @
9ac8feee
...
...
@@ -127,3 +127,4 @@ mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
set GLOBAL sql_mode=default;
The --upgrade-system-tables option was used, databases won't be touched.
mysql-test/t/mysql_upgrade.test
View file @
9ac8feee
...
...
@@ -89,3 +89,10 @@ DROP USER mysqltest1@'%';
set GLOBAL sql_mode='
STRICT_ALL_TABLES
,
ANSI_QUOTES
,
NO_ZERO_DATE
'
;
--
exec
$MYSQL_UPGRADE
--
skip
-
verbose
--
force
2
>&
1
eval
set
GLOBAL
sql_mode
=
default
;
#
# Test the --upgrade-system-tables option
#
--
replace_result
$MYSQLTEST_VARDIR
var
--
exec
$MYSQL_UPGRADE
--
skip
-
verbose
--
upgrade
-
system
-
tables
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