@@ -388,9 +388,8 @@ func (n *ExecuteStmt) Accept(v Visitor) (Node, bool) {
388
388
type BeginStmt struct {
389
389
stmtNode
390
390
Mode string
391
- ReadOnly bool
392
- Bound * TimestampBound
393
391
CausalConsistencyOnly bool
392
+ ReadOnly bool
394
393
// AS OF is used to read the data at a specific point of time.
395
394
// Should only be used when ReadOnly is true.
396
395
AsOf * AsOfClause
@@ -401,24 +400,7 @@ func (n *BeginStmt) Restore(ctx *format.RestoreCtx) error {
401
400
if n .Mode == "" {
402
401
if n .ReadOnly {
403
402
ctx .WriteKeyWord ("START TRANSACTION READ ONLY" )
404
- if n .Bound != nil {
405
- switch n .Bound .Mode {
406
- case TimestampBoundStrong :
407
- ctx .WriteKeyWord (" WITH TIMESTAMP BOUND STRONG" )
408
- case TimestampBoundMaxStaleness :
409
- ctx .WriteKeyWord (" WITH TIMESTAMP BOUND MAX STALENESS " )
410
- return n .Bound .Timestamp .Restore (ctx )
411
- case TimestampBoundExactStaleness :
412
- ctx .WriteKeyWord (" WITH TIMESTAMP BOUND EXACT STALENESS " )
413
- return n .Bound .Timestamp .Restore (ctx )
414
- case TimestampBoundReadTimestamp :
415
- ctx .WriteKeyWord (" WITH TIMESTAMP BOUND READ TIMESTAMP " )
416
- return n .Bound .Timestamp .Restore (ctx )
417
- case TimestampBoundMinReadTimestamp :
418
- ctx .WriteKeyWord (" WITH TIMESTAMP BOUND MIN READ TIMESTAMP " )
419
- return n .Bound .Timestamp .Restore (ctx )
420
- }
421
- } else if n .AsOf != nil {
403
+ if n .AsOf != nil {
422
404
ctx .WriteKeyWord (" " )
423
405
return n .AsOf .Restore (ctx )
424
406
}
@@ -441,13 +423,6 @@ func (n *BeginStmt) Accept(v Visitor) (Node, bool) {
441
423
return v .Leave (newNode )
442
424
}
443
425
n = newNode .(* BeginStmt )
444
- if n .Bound != nil && n .Bound .Timestamp != nil {
445
- newTimestamp , ok := n .Bound .Timestamp .Accept (v )
446
- if ! ok {
447
- return n , false
448
- }
449
- n .Bound .Timestamp = newTimestamp .(ExprNode )
450
- }
451
426
return v .Leave (n )
452
427
}
453
428
0 commit comments