Invalid SQL Statement in rust integrration test
tobyhede opened this issue · 0 comments
tobyhede commented
The rust integration test uses invalid SQL and does not actually work.
The test_prepared_statements
function in the Rust integration tests uses this code & statement:
match sqlx::query("SELECT one").fetch_all(&pool).await {
Ok(_) => (),
Err(err) => {
if err.to_string().contains("prepared statement") {
panic!("prepared statement error: {}", err);
}
}
}
SELECT one
is not valid SQL and produces an error
Severity: ERROR Code: 42703 Message: column "one" does not exist Position: 8 File: parse_relation.c Line: 3666 Routine: errorMissingColumn
The test "passes" because the error handling ignores the errors
To Reproduce
- Run the integration tests
- pgcat output will contain the above error message
Expected behavior
The rust test should run without errors in either the test or the running proxy.