Replace the WITH Staleness
to AS OF
clause
#24291
Labels
type/enhancement
The issue or PR belongs to an enhancement.
WITH Staleness
to AS OF
clause
#24291
Background
This is a subtask of #21094. Ref #22765, #22506
pingcap/parser#1206 has implemented the syntax of
AS OF
clause, so we can replace begin a staleness read-only transaction withAS OF
clause, which like:Note: The
AS OF TIMESTAMP
clause can be used only when the transaction is read-only. If the transaction contains any writes, or if the READ WRITE mode is specified, an error will be returned.Implementation
Now that
BeginStmt
is marked withReadOnly
, we need to addAsOfClause
in the statement. and then replace the origin process logic in #21897. and also we may need to implement thefuncCallExpr
, because we should judge the read_ts_in(xxxx,xxx). and should be noted the function is deterministic function.BeginStmt
with staleness
toAS OF
cluaseThe text was updated successfully, but these errors were encountered: