Method and apparatus for controlling database transaction, and related device
AssigneeHuawei Cloud Computing Technologies Co., Ltd.
InventorsXiaoqin Xie, Wenlong Ma, Zongquan Zhang
Life of this patent
Estimating the term…
Abstract
A method for controlling a database transaction, includes: receiving a structured query language (SQL) statement from a user equipment; setting a first speculation function of a first database transaction based on the SQL statement, where the first speculation function indicates that before a log of a second database transaction is committed, an operation record of the second database transaction is visible to the first database transaction; and performing an operation on the first database transaction based on the first speculation function.
Claims20
A method comprising:
- receiving a structured query language (SQL) statement from a user equipment;
- setting a first speculation function of a first database transaction based on the SQL statement, wherein the first speculation function indicates that before a log of a second database transaction is committed, an operation record of the second database transaction is visible to the first database transaction;
- and
- performing, using the first speculation function, an operation on the first database transaction based on the operation record of the second database transaction before the log of the second database transaction is committed.
An apparatus comprising:
- a memory configured to store a computer program;
- and
- one or more processors coupled to the memory and configured to execute the computer program to cause the apparatus to:
- receive a structured query language (SQL) statement from a user equipment;
- set a first speculation function of a first database transaction based on the SQL statement, wherein the first speculation function indicates that before a log of a second database transaction is committed, an operation record of the second database transaction is visible to the first database transaction;
- and
- perform, using the first speculation function, an operation on the first database transaction based on the operation record of the second database transaction before the log of the second database transaction is committed.
Dependencies are inferred from the claim text.