Skip to content

Commit

Permalink
Update SQL in Technical Advisory 131639 (#19005)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeCRL authored Oct 11, 2024
1 parent 86ff82f commit 3c52bf4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/current/advisories/a131639.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ For example, if you suspect that a row in `my_table` with primary key `pk=1` and

{% include_cached copy-clipboard.html %}
~~~ sql
SELECT count(*) FROM my_table@my_table_pkey WHERE pk = 1 AS OF SYSTEM TIME '-10s';
SELECT count(*) FROM my_table@my_table_a_idx WHERE pk = 1 AND a=2 AS OF SYSTEM TIME '-10s';
SELECT count(*) FROM my_table@my_table_b_idx WHERE pk = 1 AND b=3 AS OF SYSTEM TIME '-10s';
BEGIN AS OF SYSTEM TIME '-10s';
SELECT count(*) FROM my_table@my_table_pkey WHERE pk = 1;
SELECT count(*) FROM my_table@my_table_a_idx WHERE pk = 1;
SELECT count(*) FROM my_table@my_table_b_idx WHERE pk = 1;
COMMIT;
~~~

If any of these queries return different values for `count`, that likely indicates a lost write.
Expand Down

0 comments on commit 3c52bf4

Please sign in to comment.