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

Fix Crash in handle_where_clause_restargets_right #2579

Conversation

ahmed-shameem
Copy link
Contributor

Description

This commit fixes the crash in handle_where_clause_restargets_right and other functions which are used by sp_describe_undeclared_parameters. The crash was happening because we were throwing WARNING instead or ERROR. But, rather than throwing error, it's better to return 0 rows for the unsupported cases to avoid unnecessary application code errors.

We keep a flag which says whether we support the specific case or not. Based on that flag we return rows.

Issues Resolved

BABEL-4869
Signed-off-by: Shameem Ahmed [email protected]

Test Scenarios Covered

  • Use case based - YES

  • Boundary conditions - YES

  • Arbitrary inputs - YES

  • Negative test cases - YES

  • Minor version upgrade tests - YES

  • Major version upgrade tests -

  • Performance tests -

  • Tooling impact -

  • Client tests -

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

ahmed-shameem and others added 5 commits May 16, 2024 06:53
…gresql#2566)

This commit fixes the crash in handle_where_clause_restargets_right and other functions which are used by sp_describe_undeclared_parameters. The crash was happening because we were throwing WARNING instead or ERROR. But, rather than throwing error, it's better to return 0 rows for the unsupported cases to avoid unnecessary application code errors.

We keep a flag which says whether we support the specific case or not. Based on that flag we return rows.
Issues Resolved

BABEL-4869
Signed-off-by: Shameem Ahmed [email protected]
@shardgupta shardgupta merged commit eda23ea into babelfish-for-postgresql:BABEL_2_X_DEV May 17, 2024
29 checks passed
@shardgupta shardgupta deleted the jira-babel-4869-2-x branch May 17, 2024 06:07
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

Successfully merging this pull request may close these issues.

3 participants