Firebird date params broken in some queries
Original Reporter info from Mantis: JoshyFun @joshyfun
-
Reporter name: José Mejuto
Original Reporter info from Mantis: JoshyFun @joshyfun
- Reporter name: José Mejuto
Description:
The params as dates are broken in queries where dates are matched against firebird strings like:
select MONTIMESTAMP from MON
TRANSACTIONS
where
MON$TIMESTAMP between coalesce(:STARTDATE,'1900-01-01') and coalesce(:ENDDATE,'2200-12-31')
where the :STARTDATE is matched against '1900-01-01' so the isql_prepare identifies it as a text field and the default variant conversion converts it to a locale dependent date and FireBird can not parse the date in this format.
Steps to reproduce:
Run attached example.
Additional information:
Attached is also a proposed patch that could need to be extended to other formats, I only found the problem with dates.
Mantis conversion info:
- Mantis ID: 24080
- OS: Windows
- OS Build: Seven
- Build: 23683
- Platform: i386
- Version: 2.7.1
- Fixed in version: 2.6.4
- Fixed in revision: 24936 (#afb06e0d)
- Target version: 3.0.0