Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opt: fix error in case of casted NULL arguments to AddGeometryColumn
This commit fixes an error that occurred when AddGeometryColumn was called with NULL arguments that were cast to the type specified by the function signature. #50992 already fixed the case when AddGeometryColumn was called with bare NULL arguments, since those were detected by TypeCheck. TypeCheck does not detect NULL arguments if they are cast to the correct type. This commit fixes the error by adding an explicit check in the optbuilder that each argument is not null before calling the SQLFn of the AddGeometryColumn overload. Informs #50296 Release note (bug fix): Fixed an internal error that occurred when AddGeometryColumn was called with NULL arguments. This now results in a no-op and returns NULL.
- Loading branch information