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
can't mix in one process remote connection using fbclient.dll from 2.* (or 3.0) with embedded connection using fbclient.dll from 3.0. [CORE5123] #5407
Comments
Commented by: @hvlad It is nor recommended nor good way to create application in a such way and nobody promises it is even going to work. In your first sample it is easy to use fb3 client to make rmote connection to fb2.5 server and embedded connection to the v3 database. In your second sample you should use single client at D:\Firebird\FB30 I see no reason to treat this ticket as too important therefore will lower its priority |
Modified by: @hvladpriority: Major [ 3 ] => Minor [ 4 ] |
Commented by: Nick (nick) I have this problem when work with IBExpert. |
Commented by: @asfernandes > It is nor recommended nor good way to create application in a such way and nobody promises it is even going to work. I completely disagree. There should be no good reason for at least the client do not work in this way. I do not talk about priority, but it's surely a bug and has nothing exotic. |
Commented by: @hvlad Adriano, client works. The current issue all about embedded. |
Commented by: @ibaseru questions: 1. are AHandle returned by LoadLibrary different after 2nd LoadLibrary call? 2. what if after 2nd LoadLibrary you make a call in the first attachment, not in the second? |
Commented by: Chau Chee Yang (cheeyang) The issue should be fix. It is consider a bug. Loading both Firebird 2.5 and 3.0 fbclient.dll in the same process should always allow and encourage to do so as long as the application using match dll handle to access match firebird database. It doesn't violate any rules at all. Loading both DLL in same process is useful for application that need to access both Firebird 2.5 and 3.0 database at the same time. One such usage is migrate the Firebird 2.5 data to Firebird 3.0 database. |
Commented by: @hvlad Chau Chee Yang, read my answers above. |
This issue can replay in Firebird 3.0 and Firebird 4.0 too. |
Could you specify, please - what exact issue do you speak about ? |
Trying to attach to both Firebird 3.0 and Firebird 4.0 embedded database in a windows process with these steps:
|
You should add Engine12 (from fb3) to fb4, configure it in firebird.conf and use fb4 fbclient to attach both fb3 & fb4 databases. |
@AlexPeshkoff, both fb3 and fb4 plugins has DLL file using same file name but different file size. Moving engine12.dll to fb4/plugins may cause some dependency or compatibility issue that can be hard to trace later. |
No issues, it's recommended way to open both types of databases in single process. Pay attention - I do not suggest to copy all plugins but for engine that does work. |
Submitted by: Nick (nick)
Votes: 2
- have runned firebird 2.5
- have only fbclient.dll from 2.5 in D:\Firebird\FB25Client
- have only fbclient.dll from 3.0 RC2 in D:\Firebird\FB30Client
- have all files from 3.0 RC2 in D:\Firebird\FB30
- all connections uses charset WIN1251.
code:
begin
AttachDatabase('D:\Firebird\FB25Client\fbclient.dll', '127.0.0.1:D:\Data\FB25.fdb', 'SYSDBA', 'masterkey'); // remote connect to 2.5
AttachDatabase('D:\Firebird\FB30\fbclient.dll', 'D:\Data\FB30.fdb', 'SYSDBA', 'masterkey'); // embedded connect to 3.0
end.
Error on second attach:
--------------------------------------------------------------------------------------------
Error loading plugin Engine12
Module D:\Firebird\FB30\plugins/Engine12 exists but can not be loaded
Unsuccessful execution caused by system error that does not preclude successful
execution of subsequent statements
GDS Code: 335545004, SQL Code: -901, Error Code: 684
--------------------------------------------------------------------------------------------
Example with only 3.0 libraries:
begin
AttachDatabase('D:\Firebird\FB30Client\fbclient.dll', '127.0.0.1:D:\Data\FB25.fdb', 'SYSDBA', 'masterkey'); // remote connect to 2.5
AttachDatabase('D:\Firebird\FB30\fbclient.dll', 'D:\Data\FB30.fdb', 'SYSDBA', 'masterkey'); // embedded connect to 3.0
end.
Error on second attach:
--------------------------------------------------------------------------------------------
bad parameters on attach or create database
CHARACTER SET WIN1251 is not defined
Connection error
GDS Code: 335544325, SQL Code: -924, Error Code: 5
--------------------------------------------------------------------------------------------
The text was updated successfully, but these errors were encountered: