File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 144
144
# Debian: beware of the bashisms...
145
145
# Debian: can safely run on upgrades with existing databases
146
146
set +e
147
- bash /usr/bin/mysql_install_db --rpm --cross-bootstrap --user=mysql --disable-log-bin 2>&1 | $ERR_LOGGER
147
+ bash /usr/bin/mysql_install_db --rpm --cross-bootstrap --user=mysql --disable-log-bin --upgrade-info 2>&1 | $ERR_LOGGER
148
148
set -e
149
149
150
150
# # On every reconfiguration the maintenance user is recreated.
Original file line number Diff line number Diff line change @@ -276,6 +276,21 @@ This must be given as the first argument\&.
276
276
.sp -1
277
277
.IP \(bu 2.3
278
278
.\}
279
+ .\" mysql_install_db: upgrade-info option
280
+ .\" upgrade-info option: mysql_install_db
281
+ \fB \-\- upgrade \- info \fR
282
+ .sp
283
+ This places a mysql_upgrade_info file containing the server version in the data directory\& .
284
+ .RE
285
+ .sp
286
+ .RS 4
287
+ .ie n \{\
288
+ \h '-04' \(bu \h '+03' \c
289
+ .\}
290
+ .el \{\
291
+ .sp -1
292
+ .IP \(bu 2.3
293
+ .\}
279
294
.\" mysql_install_db: rpm option
280
295
.\" rpm option: mysql_install_db
281
296
\fB \-\- rpm \fR
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ create database if not exists test;
41
41
use mysql;"
42
42
auth_root_authentication_method=normal
43
43
auth_root_socket_user=' root'
44
+ upgrade_info=0
44
45
45
46
dirname0=` dirname $0 2> /dev/null`
46
47
dirname0=` dirname $dirname0 2> /dev/null`
@@ -97,6 +98,7 @@ Usage: $0 [OPTIONS]
97
98
user. You must be root to use this option. By default
98
99
mysqld runs using your current login name and files and
99
100
directories that it creates will be owned by you.
101
+ --upgrade-info Store mysql_upgrade_info in the installed data directory.
100
102
101
103
All other options are passed to the mysqld program
102
104
@@ -152,6 +154,7 @@ parse_arguments()
152
154
--skip-name-resolve) ip_only=1 ;;
153
155
--verbose) verbose=1 ; silent_startup=" " ;;
154
156
--rpm) in_rpm=1 ;;
157
+ --upgrade-info) upgrade_info=1 ;;
155
158
--help) usage ;;
156
159
--no-defaults|--defaults-file=* |--defaults-extra-file=* )
157
160
defaults=" $arg " ;;
@@ -509,6 +512,10 @@ SET @auth_root_socket='$auth_root_socket_user';" ;;
509
512
esac
510
513
if { echo " $install_params " ; cat " $create_system_tables " " $create_system_tables2 " " $fill_system_tables " " $fill_help_tables " " $maria_add_gis_sp " ; } | eval " $filter_cmd_line " | mysqld_install_cmd_line > /dev/null
511
514
then
515
+ if test " $upgrade_info " -eq 1
516
+ then
517
+ printf " @VERSION@-MariaDB" > " $ldata /mysql_upgrade_info"
518
+ fi
512
519
s_echo " OK"
513
520
else
514
521
echo
You can’t perform that action at this time.
0 commit comments