My Oracle Support Banner

SET .. SELECT Takes More Locks Than Equivalent SELECT .. INTO Syntax (Doc ID 2813867.1)

Last updated on MARCH 13, 2023

Applies to:

MySQL Server - Version 5.7 and later
Information in this document applies to any platform.

Symptoms

On two otherwise equivalent statements,  their are row locks on the one,  but not the other:

Locking statement syntax:

 

 

Changes

New query or application was changed to use SET @var:=(SELECT ...);  which introduces more locking and potential for deadlocks.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.