mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-03 19:36:20 +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
 | 
			
		||||
        .raw(
 | 
			
		||||
          `
 | 
			
		||||
          CREATE TEMPORARY TABLE ??
 | 
			
		||||
          CREATE TABLE ??
 | 
			
		||||
            SELECT
 | 
			
		||||
              id,
 | 
			
		||||
              (
 | 
			
		||||
@ -361,9 +361,7 @@ const cleanOrderColumnsForInnoDB = async ({
 | 
			
		||||
        )
 | 
			
		||||
        .transacting(trx);
 | 
			
		||||
    } finally {
 | 
			
		||||
      await db.connection
 | 
			
		||||
        .raw(`DROP TEMPORARY TABLE IF EXISTS ??`, [tempInvOrderTableName])
 | 
			
		||||
        .transacting(trx);
 | 
			
		||||
      await db.connection.raw(`DROP TABLE IF EXISTS ??`, [tempInvOrderTableName]).transacting(trx);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user