Skip to content

Commit

Permalink
Merge #76993
Browse files Browse the repository at this point in the history
76993: sql, pgwire: remove flakey part of pgwire aost test r=RichardJCai a=RichardJCai

Release note: None

Co-authored-by: richardjcai <[email protected]>
  • Loading branch information
craig[bot] and RichardJCai committed Feb 24, 2022
2 parents 920464f + f163ff1 commit cdd55fb
Showing 1 changed file with 0 additions and 59 deletions.
59 changes: 0 additions & 59 deletions pkg/sql/pgwire/testdata/pgtest/as_of_system_time
Original file line number Diff line number Diff line change
Expand Up @@ -59,62 +59,3 @@ ReadyForQuery
----
{"Type":"CommandComplete","CommandTag":"INSERT 0 1"}
{"Type":"ReadyForQuery","TxStatus":"I"}

# Make sure AOST is handled consistently during Parse/Bind/Execute. This should
# succeed, but should not be able to read the data that was added to the table.
send crdb_only
Parse {"Name": "historical_stmt", "Query": "SELECT * FROM tab AS OF SYSTEM TIME '-0.05s'"}
Bind {"DestinationPortal": "p1", "PreparedStatement": "historical_stmt"}
Execute {"Portal": "p1"}
Sync
----

until crdb_only
ReadyForQuery
----
{"Type":"ParseComplete"}
{"Type":"BindComplete"}
{"Type":"CommandComplete","CommandTag":"SELECT 0"}
{"Type":"ReadyForQuery","TxStatus":"I"}

# Make sure AOST is handled consistently during Bind/Execute. This also should
# not be able to see the data in the table, since this is a historical read.
send crdb_only
Bind {"DestinationPortal": "p2", "PreparedStatement": "historical_stmt"}
Execute {"Portal": "p2"}
Sync
----

until crdb_only
ReadyForQuery
----
{"Type":"BindComplete"}
{"Type":"CommandComplete","CommandTag":"SELECT 0"}
{"Type":"ReadyForQuery","TxStatus":"I"}

send crdb_only
Query {"String": "SELECT pg_sleep(0.1)"}
----

until crdb_only
ReadyForQuery
----
{"Type":"RowDescription","Fields":[{"Name":"pg_sleep","TableOID":0,"TableAttributeNumber":0,"DataTypeOID":16,"DataTypeSize":1,"TypeModifier":-1,"Format":0}]}
{"Type":"DataRow","Values":[{"text":"t"}]}
{"Type":"CommandComplete","CommandTag":"SELECT 1"}
{"Type":"ReadyForQuery","TxStatus":"I"}

# Now, Bind/Execute again should be able to see the data.
send crdb_only
Bind {"DestinationPortal": "p3", "PreparedStatement": "historical_stmt"}
Execute {"Portal": "p3"}
Sync
----

until crdb_only
ReadyForQuery
----
{"Type":"BindComplete"}
{"Type":"DataRow","Values":[{"text":"1"}]}
{"Type":"CommandComplete","CommandTag":"SELECT 1"}
{"Type":"ReadyForQuery","TxStatus":"I"}

0 comments on commit cdd55fb

Please sign in to comment.