Skip to content

Commit 952af4a

Browse files
grooverdanLinuxJedi
authored andcommitted
Deb: MariaDB names as default for deb scripts
Also include the ftp.mariadb.org script rather than old name.
1 parent 687657c commit 952af4a

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

debian/additions/debian-start

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ if [ -f /etc/default/mariadb ]; then
1717
. /etc/default/mariadb
1818
fi
1919

20-
MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf"
21-
MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
22-
# Don't run full mysql_upgrade on every server restart, use --version-check to do it only once
23-
MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf --version-check --silent"
24-
MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf"
25-
MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables"
20+
MARIADB="/usr/bin/mariadb --defaults-file=/etc/mysql/debian.cnf"
21+
MYADMIN="/usr/bin/mariadb-admin --defaults-file=/etc/mysql/debian.cnf"
22+
# Don't run full mariadb-upgrade on every server restart, use --version-check to do it only once
23+
MYUPGRADE="/usr/bin/mariadb-upgrade --defaults-extra-file=/etc/mysql/debian.cnf --version-check --silent"
24+
MYCHECK="/usr/bin/mariadb-check --defaults-file=/etc/mysql/debian.cnf"
25+
MYCHECK_SUBJECT="WARNING: mariadb-check has found corrupt tables"
2626
MYCHECK_PARAMS="--all-databases --fast --silent"
2727
MYCHECK_RCPT="${MYCHECK_RCPT:-root}"
2828

debian/additions/debian-start.inc.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function check_for_crashed_tables() {
1111
set -u
1212

1313
# But do it in the background to not stall the boot process.
14-
logger -p daemon.info -i -t$0 "Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables"
14+
logger -p daemon.info -i -t"$0" "Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables"
1515

1616
# Checking for $? is unreliable so the size of the output is checked.
1717
# Some table handlers like HEAP do not support CHECK TABLE.
@@ -20,15 +20,15 @@ function check_for_crashed_tables() {
2020
# We have to use xargs in this case, because a for loop barfs on the
2121
# spaces in the thing to be looped over.
2222

23-
# If a crashed table is encountered, the "mysql" command will return with a status different from 0
23+
# If a crashed table is encountered, the "mariadb" command will return with a status different from 0
2424
set +e
2525

26-
LC_ALL=C $MYSQL --skip-column-names --batch -e '
26+
LC_ALL=C $MARIADB --skip-column-names --batch -e '
2727
select concat('\''select count(*) into @discard from `'\'',
2828
TABLE_SCHEMA, '\''`.`'\'', TABLE_NAME, '\''`'\'')
2929
from information_schema.TABLES where TABLE_SCHEMA<>'\''INFORMATION_SCHEMA'\'' and TABLE_SCHEMA<>'\''PERFORMANCE_SCHEMA'\'' and ( ENGINE='\''MyISAM'\'' or ENGINE='\''Aria'\'' )' | \
30-
xargs -i $MYSQL --skip-column-names --silent --batch \
31-
--force -e "{}" &>$tempfile
30+
xargs -i "${MARIADB}" --skip-column-names --silent --batch \
31+
--force -e "{}" &>"${tempfile}"
3232
set -e
3333

3434
if [ -s "$tempfile" ]; then
@@ -37,14 +37,14 @@ function check_for_crashed_tables() {
3737
"Improperly closed tables are also reported if clients are accessing\n" \
3838
"the tables *now*. A list of current connections is below.\n";
3939
$MYADMIN processlist status
40-
) >> $tempfile
40+
) >> "${tempfile}"
4141
# Check for presence as a dependency on mailx would require an MTA.
4242
if [ -x /usr/bin/mailx ]; then
43-
mailx -e -s"$MYCHECK_SUBJECT" $MYCHECK_RCPT < $tempfile
43+
mailx -e -s"$MYCHECK_SUBJECT" $MYCHECK_RCPT < "$tempfile"
4444
fi
45-
(echo "$MYCHECK_SUBJECT"; cat $tempfile) | logger -p daemon.warn -i -t$0
45+
(echo "$MYCHECK_SUBJECT"; cat "${tempfile}") | logger -p daemon.warn -i -t"$0"
4646
fi
47-
rm $tempfile
47+
rm "${tempfile}"
4848
}
4949

5050
## Check for tables needing an upgrade.
@@ -54,14 +54,14 @@ function upgrade_system_tables_if_necessary() {
5454
set -e
5555
set -u
5656

57-
logger -p daemon.info -i -t$0 "Upgrading MySQL tables if necessary."
57+
logger -p daemon.info -i -t"$0" "Upgrading MySQL tables if necessary."
5858

5959
# Filter all "duplicate column", "duplicate key" and "unknown column"
6060
# errors as the script is designed to be idempotent.
6161
LC_ALL=C $MYUPGRADE \
6262
2>&1 \
6363
| egrep -v '^(1|@had|ERROR (1051|1054|1060|1061|1146|1347|1348))' \
64-
| logger -p daemon.warn -i -t$0
64+
| logger -p daemon.warn -i -t"$0"
6565
}
6666

6767
## Check for the presence of both, root accounts with and without password.
@@ -70,10 +70,10 @@ function check_root_accounts() {
7070
set -e
7171
set -u
7272

73-
logger -p daemon.info -i -t$0 "Checking for insecure root accounts."
73+
logger -p daemon.info -i -t"$0" "Checking for insecure root accounts."
7474

75-
ret=$( echo "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and plugin in ('', 'mysql_native_password', 'mysql_old_password');" | $MYSQL --skip-column-names )
75+
ret=$( echo "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and plugin in ('', 'mysql_native_password', 'mysql_old_password');" | "$MARIADB" --skip-column-names )
7676
if [ "$ret" -ne "0" ]; then
77-
logger -p daemon.warn -i -t$0 "WARNING: mysql.user contains $ret root accounts without password!"
77+
logger -p daemon.warn -i -t"$0" "WARNING: mysql.user contains $ret root accounts without password!"
7878
fi
7979
}

mysql-test/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ https://mariadb.org/jira/.
9393
If the test case is really big or if it contains 'not public' data,
9494
then put your .test file and .result file(s) into a tar.gz archive,
9595
add a README that explains the problem, ftp the archive to
96-
ftp://ftp.askmonty.org/private and submit a report to
96+
ftp://ftp.mariadb.org/private and submit a report to
9797
https://mariadb.org/jira about it.
9898

9999
The latest information about mysql-test-run can be found at:

0 commit comments

Comments
 (0)