mirror of
https://github.com/strapi/strapi.git
synced 2025-11-09 06:40:42 +00:00
Merge pull request #15197 from strapi/fix/deadlock-mysql-inverse-order
Avoid deadlocks for mysql and mariadb when creating a Nth locale
This commit is contained in:
commit
a8064a03ca
@ -328,7 +328,7 @@ const cleanOrderColumnsForInnoDB = async ({
|
|||||||
await db.connection
|
await db.connection
|
||||||
.raw(
|
.raw(
|
||||||
`
|
`
|
||||||
CREATE TEMPORARY TABLE ??
|
CREATE TABLE ??
|
||||||
SELECT
|
SELECT
|
||||||
id,
|
id,
|
||||||
(
|
(
|
||||||
@ -361,9 +361,7 @@ const cleanOrderColumnsForInnoDB = async ({
|
|||||||
)
|
)
|
||||||
.transacting(trx);
|
.transacting(trx);
|
||||||
} finally {
|
} finally {
|
||||||
await db.connection
|
await db.connection.raw(`DROP TABLE IF EXISTS ??`, [tempInvOrderTableName]).transacting(trx);
|
||||||
.raw(`DROP TEMPORARY TABLE IF EXISTS ??`, [tempInvOrderTableName])
|
|
||||||
.transacting(trx);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user