-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
…-24.2.3-rc-131209 release-24.2.3-rc: sqlliveness: detect and handle invalid SessionIDs
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Validate that invalid sessionID's are always | ||
# considered dead. | ||
subtest invalid_sessions | ||
|
||
# Legacy non-RBR format | ||
query B | ||
select crdb_internal.sql_liveness_is_alive(x'1f915e98f96145a5baa9f3a42c378eb6'); | ||
---- | ||
false | ||
|
||
# Wrong length | ||
query B | ||
select crdb_internal.sql_liveness_is_alive(x'deadbeef'); | ||
---- | ||
false | ||
|
||
subtest end | ||
|
||
|
||
subtest valid_sessions | ||
|
||
# Sanity: All sessions are alive in sqlliveness. | ||
query I | ||
SELECT count(*) FROM system.sqlliveness WHERE crdb_internal.sql_liveness_is_alive(session_id) = false; | ||
---- | ||
0 | ||
|
||
query B | ||
SELECT count(*) > 0 FROM system.sqlliveness WHERE crdb_internal.sql_liveness_is_alive(session_id) = true; | ||
---- | ||
true | ||
|
||
subtest end | ||
|
||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.