Babelfish for PostgreSQL provides the capability for PostgreSQL to work with applications written for Microsoft SQL Server. Babelfish understands the SQL Server wire-protocol and T-SQL, the Microsoft SQL Server query and procedural language, so you don’t have to switch database drivers or rewrite all of your application queries.
In datetime_in_str function, we are unnecessarily using strcpy function which is also causing issues in valgrind as the source and the destination overlap.
This commit removes this unnecessary strcpy call in datetime_in_str function. Also, we can directly send the original input string in clean_input_str() function rather than sending modified_str as we were doing before.
[ ] 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.
Description
In datetime_in_str function, we are unnecessarily using strcpy function which is also causing issues in valgrind as the source and the destination overlap.
This commit removes this unnecessary strcpy call in datetime_in_str function. Also, we can directly send the original input string in clean_input_str() function rather than sending modified_str as we were doing before.
Issues Resolved
BABEL-5034
Signed-off-by: Sai Rohan Basa bsrohan@amazon.com
Test Scenarios Covered
Tested locally with Valgrind
Use case based - N/A
Boundary conditions - N/A
Arbitrary inputs - N/A
Negative test cases - N/A
Minor version upgrade tests - N/A
Major version upgrade tests - N/A
Performance tests - N/A
Tooling impact - N/A
Client tests - N/A
Check List
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.