Bug 29778: Remove DBMS error

ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Table 'additional_contents' is specified twice, both as a target for 'DELETE' and as a separate source for data at /kohadevbox/koha/C4/Installer.pm line 738

Happened on MariaDB 10.1 and 10.3, not 10.6

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2022-01-05 16:45:34 +01:00 committed by Fridolin Somers
parent 0c4590160a
commit c2e91f7248
1 changed files with 5 additions and 3 deletions

View File

@ -9,9 +9,11 @@ return {
$dbh->do(q{
DELETE FROM additional_contents
WHERE code NOT IN (
SELECT code
FROM additional_contents
WHERE lang = "default"
SELECT code FROM (
SELECT code
FROM additional_contents
WHERE lang = "default"
) as tmp
);
});
},