You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pingcap/parser#1206 has implemented the syntax of AS OF clause, so we can replace begin a staleness read-only transaction with AS OF clause, which like:
START TRANSACTION READ ONLY AS OF TIMESTAMP '2020-02-02'
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 with ReadOnly, we need to add AsOfClause in the statement. and then replace the origin process logic in #21897. and also we may need to implement the funcCallExpr, because we should judge the read_ts_in(xxxx,xxx). and should be noted the function is deterministic function.
add the syntax in the BeginStmt
replace the with staleness to AS OF cluase
The text was updated successfully, but these errors were encountered:
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: