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
2.5.1 broke query that worked with 2.5.0. Changing just one CONTAINING to LIKE fixes the issue. [CORE3746] #4090
Comments
Commented by: @asfernandes We can do nothing without proper test case. |
Commented by: flipo (zflipo) I'm working on preparing test database and code to submit. |
Commented by: Sean Leyne (seanleyne) No, the "problem" may be solved with a later version of IBO, which you may need to update to. IBO bug are not a project responsibility. |
Modified by: Sean Leyne (seanleyne)status: Open [ 1 ] => Resolved [ 5 ] resolution: Won't Fix [ 2 ] |
Commented by: flipo (zflipo) Just saw your post. I was incorrect about TIB_CURSOR working. I don't give much hope on this being resolved as changing one CONTAINING to LIKE fixes the issue while same thanks for your quick responses. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Commented by: @AlexPeshkoff Even with closed issue it seems that something may be wrong with 2.5.1. So - please prepare test case using our isql. This will save us all a lot of time, avoiding need to guess is it IBO or FB bug. |
Commented by: Damyan Ivanov (dam) I tried the following query in isql on LI-V2.5.2.26424 Firebird 2.5 (amd64, snapshot from the 2.5 release branch) and it worked: SQL> select first 1 id from events where details containing 'max';
===================== events.details is BLOB segment 80, subtype TEXT CHARACTER SET UNICODE_FSS Nullable |
Commented by: flipo (zflipo) OK, |
Commented by: flipo (zflipo) Given that tbInventory is a TIB_Query tbInventory.sql.text:= 'Select Inventory.*,ItemComments.comments from Inventory Left Join ItemComments on ItemComments.GUID=Inventory.GUID where Inventory.Server=:Server and ((ItemComments.Comments CONTAINING :PLike0) or (Slayer CONTAINING :PLike0) or (ReqSkillName CONTAINING :PLike0) or (Itemname CONTAINING :PLike0) or (SpellNames CONTAINING :PLike0 ) or (SetNumber CONTAINING :PLike0 ) or (Cast(WieldReqAmount as VARCHAR(20) )=:P0) or (Cast(ArmourLevel as VARCHAR(20) ) = :P0) )' ..do setting of parameters. If prior to execute I change the tbInventory.Sql via a call to a function which generate a new sql statment that utilizing that same tbInventory.sql.text and tbinventory.Sql.Params[x] executing that will provide data. set tbInventory.sql.text as above and NewSql:=GetSQLWithParamData(tbInventory); //newsql returns for my test 'Select Inventory.*,ItemComments.comments from Inventory Left Join ItemComments on ItemComments.GUID=Inventory.GUID where Inventory.Server='Solclaim' and ((ItemComments.Comments CONTAINING 'Key') or (Slayer CONTAINING 'Key') or (ReqSkillName CONTAINING 'Key') or (Itemname CONTAINING 'Key') or (SpellNames CONTAINING 'Key' ) or (SetNumber CONTAINING 'Key' ) or (Cast(WieldReqAmount as VARCHAR(20) )='Key') or (Cast(ArmourLevel as VARCHAR(20) ) = 'Key') )' tbInventory.sql.text:=NewSql; |
Modified by: flipo (zflipo)Attachment: Test.zip [ 12096 ] |
Commented by: flipo (zflipo) It appears that TBI_query is having trouble generating a valid sql statement based on what version of firebird. I know that if you change just the following So yes something about Firebird 2.1.5 is causing IBO to have issues. Given that a explicit sql statement works it points to IBO issue. Given that sql works against prior FB 2.1.5 it points to firebird. Now i have to go figure out what is going on with users who upgraded to 2.1.5 and then reverted to 2.1.0 as they are reporting that a different query has stopped working. Thanks for your effort. I've enjoyed blissful use of Firebird since the 1.x days. |
Commented by: @AlexPeshkoff Well, it looks like I've EXLICITLY written - do it using _isql_. |
Submitted by: flipo (zflipo)
Attachments:
Test.zip
2.5.1 broke query that worked with 2.5.0.
This will work on 2.5.1
select * from inventory,ItemComments where (ItemComments.GUID=Inventory.GUID) and ItemComments.Comments LIKE '%max%' and ...other Inventory CONTAINING tests
This does not work on 2.5.1 but works with 2.5.0 ( ie Firebird-2.5.0.26074_1_Win32.exe, Firebird-2.5.0.26074_1_x64.exe)
select * from inventory,ItemComments where (ItemComments.GUID=Inventory.GUID) and ItemComments.Comments CONTAINING 'max' and ...save other Inventory CONTAINING tests
The ItemComments.Comments is a blob and the other inventory CONTAINING usage is against a mix of varchar and blobs.
No errors reported just no info received back.
The text was updated successfully, but these errors were encountered: