Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid SQL Statement in rust integrration test #740

Open
tobyhede opened this issue May 15, 2024 · 0 comments
Open

Invalid SQL Statement in rust integrration test #740

tobyhede opened this issue May 15, 2024 · 0 comments

Comments

@tobyhede
Copy link
Contributor

tobyhede commented May 15, 2024

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

  1. Run the integration tests
  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant