From 66e5a09a9def89da730b31e39e52430a258027b4 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 25 Sep 2018 23:24:00 +0200 Subject: bin/get-package-updates,bin/interpret-mail,bin/slave-build-connect: "INSERT INTO" -> "INSERT IGNORE INTO" --- bin/get-package-updates | 2 +- bin/interpret-mail | 8 ++++---- bin/slave-build-connect | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/get-package-updates b/bin/get-package-updates index cc4497c..9d8ee25 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -566,7 +566,7 @@ echo 'Done - mark decisions as final.' "$(printf '%s' "${reason}" | base64 -w0)" done | \ sed ' - 1 i INSERT INTO `blacklist` (`arch`,`pkgbase`,`reason`) VALUES + 1 i INSERT IGNORE INTO `blacklist` (`arch`,`pkgbase`,`reason`) VALUES $ s/,$/;/ ' printf 'UPDATE `build_assignments`' diff --git a/bin/interpret-mail b/bin/interpret-mail index 7790951..a925118 100755 --- a/bin/interpret-mail +++ b/bin/interpret-mail @@ -66,7 +66,7 @@ log() { fi # shellcheck disable=SC2016 { - printf 'INSERT INTO `email_log` (`success`,`action`,`count`,`gpg_key`,`comment`)' + printf 'INSERT IGNORE INTO `email_log` (`success`,`action`,`count`,`gpg_key`,`comment`)' printf ' SELECT ' if [ "${success}" = '1' ]; then printf '1,' @@ -131,7 +131,7 @@ if ! hashcash -qXc -b 20 \ "${tmp_dir}/mail"; then # shellcheck disable=SC2016 { - printf 'INSERT INTO `email_log` (`success`,`comment`)' + printf 'INSERT IGNORE INTO `email_log` (`success`,`comment`)' printf ' VALUES (0,"Invalid stamp - ignoring this message.");\n' } | \ mysql_run_query @@ -151,7 +151,7 @@ if ! sed -n ' gpg --batch --status-file "${tmp_dir}/gpg-status" -q -d -o "${tmp_dir}/plain-content" > /dev/null 2>&1; then # shellcheck disable=SC2016 { - printf 'INSERT INTO `email_log` (`success`,`comment`)' + printf 'INSERT IGNORE INTO `email_log` (`success`,`comment`)' printf ' VALUES (0,from_base64("%s"));\n' \ "$( { @@ -191,7 +191,7 @@ gpg_keys_filter=$( if [ -z "${gpg_keys_filter}" ]; then # shellcheck disable=SC2016 { - printf 'INSERT INTO `email_log` (`success`,`comment`)' + printf 'INSERT IGNORE INTO `email_log` (`success`,`comment`)' printf ' VALUES (0,from_base64("%s"));\n' \ "$( { diff --git a/bin/slave-build-connect b/bin/slave-build-connect index 7d01e4c..aadf4df 100755 --- a/bin/slave-build-connect +++ b/bin/slave-build-connect @@ -37,7 +37,7 @@ if [ "x${SSH_ORIGINAL_COMMAND%% *}" = 'xget-assignment' ] || \ # shellcheck disable=SC2016 { - printf 'INSERT INTO `ssh_log` (`build_slave`,`action`,`parameters`)' + printf 'INSERT IGNORE INTO `ssh_log` (`build_slave`,`action`,`parameters`)' printf ' VALUES (%s' \ "${slave_id}" printf ',from_base64("%s")' \ -- cgit v1.2.3-54-g00ecf