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
SUBSTRING in ODBC escape translations #207
Comments
Thanks for reporting. The firebird-odbc-driver project currently has no active maintainer. |
That's a shame. There are at least 2 pull requests for this repository and 2 forks with plenty of updates and fixes. No candidates for the position? |
{fn SUBSTRING(A,B[,C])} is working ok now
Hi @edwig |
Hi @irodushka SELECT {fn SUBSTRING('one two three',5) FROM rdb$database; => Yields 'two three' From my perspective: AOK !! |
@edwig BTW it will produce an error on SELECT {fn SUBSTRING('one {two} three',5)} FROM rdb$database; |
Could you tell me about the SQLComponents unit tests you mentioned above, please? Perhaps I could use it to fully test ODBC driver. We have a big shortage of testing tools. |
Good to know that.. I will add the test with the brackets to my unit test suite.
It is a work in progress (of course) and will be expanded in the future. Have fun! |
Well, I've done it, it sees 87 tests but does not run any of them) I think I'll try again i 2024) Happy New Year, Edwig! P.S. It seems you are using user name "sysdba" in lowercase & non-masterkey password) |
@irodushka Working OK:
Sadly NOT working:
The unit test in "BasicDatabase.cpp" beyond lin 950 shows how the not working functions could be translated into working Firebird equivalents Furthermore: NOT tested (no equivalent in Firebird)
|
Hi @edwig Can you please check previously not working funcs in the 3.0.0.5 build? |
Hi Irodushka,
Did a quick test this evening.
The following seem to work correctly for the basic smoke test:
(UnitTest.BasicTesting.ODBCEscapeSequences)
{ fn ASCII('A')} -> Now working
{ fn CHAR(65)} -> Now working
{ fn CONCAT(a,b)} -> Now wokking
{ fn INSERT(a,start,len,b) -> Now working
{ fn LOCATE(a,b)} -> Now working
{ fn LTRIM(a) -> Now working
{ fn RTRIM(a) -> Now working
The only one NOT working is:
{ fn SPACE(x)} -> NOT WORKING:
[HY000][-104][ODBC Firebird Driver][Firebird]Dynamic SQL Error
…-SQL error code = -104
-Token unknown - line 1, column 14
Will also test corner cases and one-offs in the days to come.
This seems to be a BIG improvement over the previous versions!!!
Thank you!
Van: irodushka ***@***.***>
Verzonden: woensdag 24 januari 2024 10:40
Aan: FirebirdSQL/firebird-odbc-driver ***@***.***>
CC: Edwig Huisman ***@***.***>; Mention ***@***.***>
Onderwerp: Re: [FirebirdSQL/firebird-odbc-driver] SUBSTRING in ODBC escape translations (Issue #207)
Hi @edwig <https://github.com/edwig>
Can you please check previously not working funcs in the 3.0.0.5 build?
Regards
—
Reply to this email directly, view it on GitHub <#207 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABFDS323BY5ZZVT4G4FQSLDYQDJIDAVCNFSM6AAAAAA2C2NQZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBXG42TSNRRGU> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/ABFDS32NPP7B2S3FPZ26GMTYQDJIDA5CNFSM6AAAAAA2C2NQZKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTRWYM76.gif> Message ID: ***@***.*** ***@***.***> >
|
Hi @edwig
|
Issue #207: SPACE() fn. Build 3.0.0.6
Hi @edwig Perhaps we will close this issue - if you confirm that everything was completed ok. |
Hi Irodushka,
Fine with me. No more issues found. You may close this issue.
Van: irodushka ***@***.***>
Verzonden: donderdag 8 februari 2024 14:39
Aan: FirebirdSQL/firebird-odbc-driver ***@***.***>
CC: Edwig Huisman ***@***.***>; Mention ***@***.***>
Onderwerp: Re: [FirebirdSQL/firebird-odbc-driver] SUBSTRING in ODBC escape translations (Issue #207)
Hi @edwig <https://github.com/edwig>
Perhaps we will close this issue - if you confirm that everything was completed ok.
—
Reply to this email directly, view it on GitHub <#207 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABFDS355KHWOXLJO7OXU47LYSTIPPAVCNFSM6AAAAAA2C2NQZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZUGE2DGOJUGE> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/ABFDS335U7YYBLH3ARDUTK3YSTIPPA5CNFSM6AAAAAA2C2NQZKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTTJCY4K.gif> Message ID: ***@***.*** ***@***.***> >
|
Ok! Feel free to contact me for new issues) |
The ODBC documentation states that since version 1.0 the construction of the string function "SUBSTRING(string,start[,length]) should be translatable to native SQL trhough the "{ fn SUBSTRING(string,start[,length]) }" construct.
If you do that in the current Firebird ODBC driver you get a "SUBSTRING(string,start,length)" back, instead of a "SUBSTRING(string FROM start FOR length)" translation. And this invariable leads to a syntax error -104.
In my opinion the "{ fn .... }" translator in the ODBC driver should take care of this conversion.
The text was updated successfully, but these errors were encountered: