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
620d520d
Commit
620d520d
authored
Sep 29, 2022
by
Daniel Black
Committed by
GitHub
Sep 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-29614 mariadb-upgrade calls mysql and mysql-check (#2279)
rather than mariadb/mariadb-check
parent
fe7c95ec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
client/mysql_upgrade.c
client/mysql_upgrade.c
+3
-3
mysql-test/main/mysql_upgrade.result
mysql-test/main/mysql_upgrade.result
+3
-3
mysql-test/main/mysql_upgrade.test
mysql-test/main/mysql_upgrade.test
+6
-6
No files found.
client/mysql_upgrade.c
View file @
620d520d
...
@@ -935,7 +935,7 @@ static int run_mysqlcheck_upgrade(my_bool mysql_db_only)
...
@@ -935,7 +935,7 @@ static int run_mysqlcheck_upgrade(my_bool mysql_db_only)
return
0
;
return
0
;
}
}
verbose
(
"Phase %d/%d: Checking and upgrading %s"
,
++
phase
,
phases_total
,
what
);
verbose
(
"Phase %d/%d: Checking and upgrading %s"
,
++
phase
,
phases_total
,
what
);
print_conn_args
(
"m
ysql
check"
);
print_conn_args
(
"m
ariadb-
check"
);
retch
=
run_tool
(
mysqlcheck_path
,
retch
=
run_tool
(
mysqlcheck_path
,
NULL
,
/* Send output from mysqlcheck directly to screen */
NULL
,
/* Send output from mysqlcheck directly to screen */
defaults_file
,
defaults_file
,
...
@@ -1451,7 +1451,7 @@ int main(int argc, char **argv)
...
@@ -1451,7 +1451,7 @@ int main(int argc, char **argv)
}
}
/* Find mysql */
/* Find mysql */
find_tool
(
mysql_path
,
IF_WIN
(
"m
ysql.exe"
,
"mysql
"
),
self_name
);
find_tool
(
mysql_path
,
IF_WIN
(
"m
ariadb.exe"
,
"mariadb
"
),
self_name
);
open_mysql_upgrade_file
();
open_mysql_upgrade_file
();
...
@@ -1459,7 +1459,7 @@ int main(int argc, char **argv)
...
@@ -1459,7 +1459,7 @@ int main(int argc, char **argv)
exit
(
upgrade_already_done
(
0
)
==
0
);
exit
(
upgrade_already_done
(
0
)
==
0
);
/* Find mysqlcheck */
/* Find mysqlcheck */
find_tool
(
mysqlcheck_path
,
IF_WIN
(
"m
ysqlcheck.exe"
,
"mysql
check"
),
self_name
);
find_tool
(
mysqlcheck_path
,
IF_WIN
(
"m
ariadb-check.exe"
,
"mariadb-
check"
),
self_name
);
if
(
opt_systables_only
&&
!
opt_silent
)
if
(
opt_systables_only
&&
!
opt_silent
)
printf
(
"The --upgrade-system-tables option was used, user tables won't be touched.
\n
"
);
printf
(
"The --upgrade-system-tables option was used, user tables won't be touched.
\n
"
);
...
...
mysql-test/main/mysql_upgrade.result
View file @
620d520d
...
@@ -778,18 +778,18 @@ FLUSH PRIVILEGES;
...
@@ -778,18 +778,18 @@ FLUSH PRIVILEGES;
#
#
This installation of MariaDB is already upgraded to MariaDB .
This installation of MariaDB is already upgraded to MariaDB .
There is no need to run mysql_upgrade again for MariaDB .
There is no need to run mysql_upgrade again for MariaDB .
Looking for 'm
ysql' as: mysql
Looking for 'm
ariadb' as: mariadb
This installation of MariaDB is already upgraded to MariaDB .
This installation of MariaDB is already upgraded to MariaDB .
There is no need to run mysql_upgrade again for MariaDB .
There is no need to run mysql_upgrade again for MariaDB .
#
#
# MDEV-27279: mariadb_upgrade check-if-upgrade absence is do it
# MDEV-27279: mariadb_upgrade check-if-upgrade absence is do it
#
#
Looking for 'm
ysql' as: mysql
Looking for 'm
ariadb' as: mariadb
Empty or non existent ...mysql_upgrade_info. Assuming mysql_upgrade has to be run!
Empty or non existent ...mysql_upgrade_info. Assuming mysql_upgrade has to be run!
#
#
# MDEV-27279: mariadb_upgrade check-if-upgrade with minor version change
# MDEV-27279: mariadb_upgrade check-if-upgrade with minor version change
#
#
Looking for 'm
ysql' as: mysql
Looking for 'm
ariadb' as: mariadb
This installation of MariaDB is already upgraded to MariaDB .
This installation of MariaDB is already upgraded to MariaDB .
There is no need to run mysql_upgrade again for MariaDB .
There is no need to run mysql_upgrade again for MariaDB .
This installation of MariaDB is already upgraded to MariaDB .
This installation of MariaDB is already upgraded to MariaDB .
...
...
mysql-test/main/mysql_upgrade.test
View file @
620d520d
...
@@ -55,7 +55,7 @@ DROP USER mysqltest1@'%';
...
@@ -55,7 +55,7 @@ DROP USER mysqltest1@'%';
--
echo
Run
mysql_upgrade
with
a
non
existing
server
socket
--
echo
Run
mysql_upgrade
with
a
non
existing
server
socket
--
replace_result
$MYSQLTEST_VARDIR
var
--
replace_result
$MYSQLTEST_VARDIR
var
--
replace_regex
/.*
m
ysqlcheck
.*:
Got
/
mysql
check
:
Got
/
/
\
([
0
-
9
|-
]
*
\
)
/
(
errno
)
/
--
replace_regex
/.*
m
ariadb
-
check
.*:
Got
/
mariadb
-
check
:
Got
/
/
\
([
0
-
9
|-
]
*
\
)
/
(
errno
)
/
--
error
1
--
error
1
# NC: Added --skip-version-check, as the version check would fail when
# NC: Added --skip-version-check, as the version check would fail when
# mysql_upgrade tries to get the server version.
# mysql_upgrade tries to get the server version.
...
@@ -139,7 +139,7 @@ let $MYSQLD_DATADIR= `select @@datadir`;
...
@@ -139,7 +139,7 @@ let $MYSQLD_DATADIR= `select @@datadir`;
--
echo
Run
mysql_upgrade
with
unauthorized
access
--
echo
Run
mysql_upgrade
with
unauthorized
access
--
error
1
--
error
1
--
exec
$MYSQL_UPGRADE
--
skip
-
verbose
--
user
=
root
--
password
=
wrong_password
2
>&
1
--
exec
$MYSQL_UPGRADE
--
skip
-
verbose
--
user
=
root
--
password
=
wrong_password
2
>&
1
--
replace_regex
/.*
m
ysqlcheck
.*:
Got
/
mysql
check
:
Got
/
/
\
([
0
-
9
|-
]
*
\
)
/
(
errno
)
/
--
replace_regex
/.*
m
ariadb
-
check
.*:
Got
/
mariadb
-
check
:
Got
/
/
\
([
0
-
9
|-
]
*
\
)
/
(
errno
)
/
--
error
1
--
error
1
--
exec
$MYSQL_UPGRADE
--
skip
-
verbose
--
skip
-
version
-
check
--
user
=
root
--
password
=
wrong_password
2
>&
1
--
exec
$MYSQL_UPGRADE
--
skip
-
verbose
--
skip
-
version
-
check
--
user
=
root
--
password
=
wrong_password
2
>&
1
...
@@ -290,7 +290,7 @@ FLUSH PRIVILEGES;
...
@@ -290,7 +290,7 @@ FLUSH PRIVILEGES;
--
replace_regex
/
\d\d
\
.
\d
*
\
.
\d
*
[
^
.
\n
]
*/
MariaDB
/
--
replace_regex
/
\d\d
\
.
\d
*
\
.
\d
*
[
^
.
\n
]
*/
MariaDB
/
--
error
1
--
error
1
--
exec
$MYSQL_UPGRADE
--
check
-
if
-
upgrade
-
is
-
needed
--
exec
$MYSQL_UPGRADE
--
check
-
if
-
upgrade
-
is
-
needed
--
replace_regex
/
\d\d
\
.
\d
*
\
.
\d
*
[
^
.
\n
]
*/
MariaDB
/
/
'm
ysql.* as:[^\n]*/'
mysql
' as: mysql
/
--
replace_regex
/
\d\d
\
.
\d
*
\
.
\d
*
[
^
.
\n
]
*/
MariaDB
/
/
'm
ariadb.* as:[^\n]*/'
mariadb
' as: mariadb
/
--error 1
--error 1
--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --verbose
--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --verbose
...
@@ -302,7 +302,7 @@ FLUSH PRIVILEGES;
...
@@ -302,7 +302,7 @@ FLUSH PRIVILEGES;
--replace_regex /[^ ]*mysql_upgrade_info/...mysql_upgrade_info/
--replace_regex /[^ ]*mysql_upgrade_info/...mysql_upgrade_info/
--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed
--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed
--replace_regex /'
m
ysql
.*
as
:
[
^
\n
]
*/
'mysql'
as
:
mysql
/
/
open
.*
Assuming
/
open
XXX
.
Assuming
/
/
[
^
]
*
mysql_upgrade_info
/...
mysql_upgrade_info
/
--replace_regex /'
m
ariadb
.*
as
:
[
^
\n
]
*/
'mariadb'
as
:
mariadb
/
/
open
.*
Assuming
/
open
XXX
.
Assuming
/
/
[
^
]
*
mysql_upgrade_info
/...
mysql_upgrade_info
/
--
exec
$MYSQL_UPGRADE
--
check
-
if
-
upgrade
-
is
-
needed
--
verbose
--
exec
$MYSQL_UPGRADE
--
check
-
if
-
upgrade
-
is
-
needed
--
verbose
--
echo
#
--
echo
#
...
@@ -324,7 +324,7 @@ EOF
...
@@ -324,7 +324,7 @@ EOF
--
error
1
--
error
1
--
exec
$MYSQL_UPGRADE
--
check
-
if
-
upgrade
-
is
-
needed
--
silent
--
exec
$MYSQL_UPGRADE
--
check
-
if
-
upgrade
-
is
-
needed
--
silent
--
replace_regex
/
\d\d
\
.
\d
*
\
.
\d
*
[
^
.
\n
]
*/
MariaDB
/
/
'm
ysql.* as:[^\n]*/'
mysql
' as: mysql
/
--
replace_regex
/
\d\d
\
.
\d
*
\
.
\d
*
[
^
.
\n
]
*/
MariaDB
/
/
'm
ariadb.* as:[^\n]*/'
mariadb
' as: mariadb
/
--error 1
--error 1
--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --verbose
--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --verbose
--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB /
--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB /
...
@@ -351,7 +351,7 @@ EOF
...
@@ -351,7 +351,7 @@ EOF
--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --silent
--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --silent
--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB /
--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB /
--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed
--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed
--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / /'
m
ysql
.*
as
:
[
^
\n
]
*/
'mysql'
as
:
mysql
/
--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / /'
m
ariadb
.*
as
:
[
^
\n
]
*/
'mysql'
as
:
mysql
/
--
exec
$MYSQL_UPGRADE
--
check
-
if
-
upgrade
-
is
-
needed
--
verbose
--
exec
$MYSQL_UPGRADE
--
check
-
if
-
upgrade
-
is
-
needed
--
verbose
--
remove_file
$MYSQLD_DATADIR
/
mysql_upgrade_info
--
remove_file
$MYSQLD_DATADIR
/
mysql_upgrade_info
drop
table
mysql
.
global_priv
;
drop
table
mysql
.
global_priv
;
...
...
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