diff --git a/CHANGELOG.md b/CHANGELOG.md index 171558055f6..a8fe33ba7a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and since Bareos version 20 this project adheres to [Semantic Versioning](https: ### Fixed - debian: Let dbconfig create the Bareos catalog also with LC_COLLATE='C' and LC_CTYPE='C'. The create_bareos_database script did always do so. Requires dbconfig >= 2.0.21 [PR #1031] - fix wrong `packages_dir` in restapi workflow, so restapi packages will be released to PyPI [PR #1033] +- core cats: Add IF EXISTS in drop table statements fix for bug #1409 (Allow usage of ExitOnFatal) [PR #1035] ### Added - doc: Add chapter for mariabackup db plugin [PR #1016] @@ -27,4 +28,5 @@ and since Bareos version 20 this project adheres to [Semantic Versioning](https: [PR #1016]: https://github.com/bareos/bareos/pull/1016 [PR #1031]: https://github.com/bareos/bareos/pull/1031 [PR #1033]: https://github.com/bareos/bareos/pull/1033 +[PR #1035]: https://github.com/bareos/bareos/pull/1035 [unreleased]: https://github.com/bareos/bareos/tree/master diff --git a/core/src/cats/dml/0018_uar_del_temp b/core/src/cats/dml/0018_uar_del_temp index bc38111a52c..7bdae6c5a49 100644 --- a/core/src/cats/dml/0018_uar_del_temp +++ b/core/src/cats/dml/0018_uar_del_temp @@ -1 +1 @@ -DROP TABLE temp +DROP TABLE IF EXISTS temp diff --git a/core/src/cats/dml/0019_uar_del_temp1 b/core/src/cats/dml/0019_uar_del_temp1 index 5da72f467ff..820de81c97d 100644 --- a/core/src/cats/dml/0019_uar_del_temp1 +++ b/core/src/cats/dml/0019_uar_del_temp1 @@ -1 +1 @@ -DROP TABLE temp1 +DROP TABLE IF EXISTS temp1 diff --git a/core/src/cats/mysql_queries.inc b/core/src/cats/mysql_queries.inc index e9773f1551b..8b555418388 100644 --- a/core/src/cats/mysql_queries.inc +++ b/core/src/cats/mysql_queries.inc @@ -214,11 +214,11 @@ const char *BareosDbMysql::query_definitions[] = { , /* 0018_uar_del_temp */ -"DROP TABLE temp " +"DROP TABLE IF EXISTS temp " , /* 0019_uar_del_temp1 */ -"DROP TABLE temp1 " +"DROP TABLE IF EXISTS temp1 " , /* 0020_uar_last_full */ diff --git a/core/src/cats/postgresql_queries.inc b/core/src/cats/postgresql_queries.inc index 718274a1c35..7c0ec929452 100644 --- a/core/src/cats/postgresql_queries.inc +++ b/core/src/cats/postgresql_queries.inc @@ -211,11 +211,11 @@ const char *BareosDbPostgresql::query_definitions[] = { , /* 0018_uar_del_temp */ -"DROP TABLE temp " +"DROP TABLE IF EXISTS temp " , /* 0019_uar_del_temp1 */ -"DROP TABLE temp1 " +"DROP TABLE IF EXISTS temp1 " , /* 0020_uar_last_full */ diff --git a/core/src/cats/sqlite_queries.inc b/core/src/cats/sqlite_queries.inc index d2bf6a637cc..94819f02f12 100644 --- a/core/src/cats/sqlite_queries.inc +++ b/core/src/cats/sqlite_queries.inc @@ -214,11 +214,11 @@ const char *BareosDbSqlite::query_definitions[] = { , /* 0018_uar_del_temp */ -"DROP TABLE temp " +"DROP TABLE IF EXISTS temp " , /* 0019_uar_del_temp1 */ -"DROP TABLE temp1 " +"DROP TABLE IF EXISTS temp1 " , /* 0020_uar_last_full */ diff --git a/core/src/dird/query.sql b/core/src/dird/query.sql index 37a9dc57d93..b932d02c07f 100644 --- a/core/src/dird/query.sql +++ b/core/src/dird/query.sql @@ -90,8 +90,8 @@ SELECT DISTINCT Job.JobId,VolumeName # 8 :List Volumes to Restore All Files *Enter Client Name: -!DROP TABLE temp; -!DROP TABLE temp2; +!DROP TABLE IF EXISTS temp; +!DROP TABLE IF EXISTS temp2; CREATE TABLE temp (JobId BIGINT NOT NULL, JobTDate BIGINT, ClientId BIGINT, @@ -135,8 +135,8 @@ INSERT INTO temp2 SELECT DISTINCT Job.JobId,Job.StartTime,Media.VolumeName, AND JobMedia.MediaId=Media.MediaId; # list results SELECT DISTINCT VolumeName from temp2; -!DROP TABLE temp; -!DROP TABLE temp2; +!DROP TABLE IF EXISTS temp; +!DROP TABLE IF EXISTS temp2; # 9 :List Pool Attributes for a selected Pool