Open vasiliy-yashkov opened 3 hours ago
Did you check using UnixODBC's uisql that problem is not in the ODBC driver?
BTW, the driver in my repository is for Windows only.
Did you check using UnixODBC's uisql that problem is not in the ODBC driver?
Sure:
isql -v FBMODBCTEST
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| echo [string] |
| quit |
| |
+---------------------------------------+
This is isql, I asked about uisql. These two are different utilities.
This is isql, I asked about uisql. These two are different utilities.
I can't find any mention of uisql. Only isql or iusql:
>iusql -v FBMODBCTEST
[
[
[ISQL]ERROR: Could not SQLDriverConnect
Oops, my bad, it is iusql indeed. This failure shows that Firebird ODBC driver doesn't support Unicode API required for Magpie (while transliteration is known to be broken in UnixODBC Manager Library).
Thanks for clarification :)
OS: Debian GNU/Linux trixie/sid x86_64 Kernel: 6.11.10-x64v3-xanmod1 GCC: gcc (Debian 14.2.0-8) 14.2.0.
Firebird server is built with commands:
./autogen.sh --enable-binreloc --prefix=/home/vasiliy/dev/github/firebird/gen/Release/firebird/ && make all -j7
Magpie library added to plugins directory, plugin added to server providers configuration:
Providers = Engine14,Magpie,Remote,Loopback
ODBC driver v3-0-0-release was installed for Firebird.
/etc/odbcinst.ini:
/etc/odbc.ini:
Executing the following script hangs:
The debug version of the Magpie library prints logs:
magpie_29521.log
``` ******* Log 1.0.3.0 started at Fri Oct 18 12:33:51 2024 0x7e387f2e1300 ODBCFactory::createPlugin(0x7e3890cd3c78) Unicode charset is UTF16LE 0x7e387f2e1300 Default config = 0x7e3890cd4858 License string "JwtS1UJzq6" 0x60e860864aa0 ODBCProvider created 0x60e860864aa0 ODBCProvider::attachDatabase("localhost:employee") 0x60e860864aa0 ODBCProvider::release 0x60e860864aa0 ODBCProvider destructed (counter 0) License expiration time: Tue Oct 22 18:51:53 2024 owner Public, status 129 ******* Log ended at Fri Oct 18 12:34:51 2024 ```magpie_29517.log
``` ******* Log 1.0.3.0 started at Fri Oct 18 12:34:06 2024 0x7ad6244e1300 ODBCFactory::createPlugin(0x7ad638c69278) Unicode charset is UTF16LE 0x7ad6244e1300 Default config = 0x7ad638c69b38 License string "JwtS1UJzq6" 0x7ad618012680 ODBCProvider created 0x7ad618012680 ODBCProvider::setDbCryptCallback(...) 0x7ad618012680 ODBCProvider::attachDatabase("odbc://test") DPB version 2: isc_dpb_auth_block Auth block 0, length 99 AUTH_TYPE: Seen AUTH_SECURE_DB: /home/vasiliy/dev/github/firebird/gen/Release/firebird/examples/empbuild/employee.fdb Auth block 1, length 82 AUTH_TYPE: Seen AUTH_SECURE_DB: /home/vasiliy/dev/github/firebird/gen/Release/firebird/security6.fdb Auth block 2, length 104 AUTH_TYPE: USER AUTH_NAME: SYSDBA AUTH_PLUGIN: Srp256 AUTH_SECURE_DB: /home/vasiliy/dev/github/firebird/gen/Release/firebird/security6.fdb isc_dpb_lc_ctype NONE found NONE, id 0, bytes per char 1, code page 0, iconv name isc_dpb_utf8_filename isc_dpb_session_time_zone Europe/Moscow isc_dpb_ext_call_depth 1 isc_dpb_ext_call_depth 1 isc_dpb_user_name SYSDBA isc_dpb_password masterkey Create environment handle... License expiration time: Tue Oct 22 18:51:53 2024 owner Public, status 129 Check for license... 0x7ad618012680 Attaching to test as user "SYSDBA" password "masterkey" Error line 1 (len 168): [unixODBC][Driver Manager]Data source name not found and no default driver specified SQL state: IM002 attachDatabase caught exception std::exception 0x7ad618012680 ODBCProvider::release 0x7ad618012680 ODBCProvider destructed (counter 0) 0x7ad6244e1300 ODBCFactory::createPlugin(0x7ad638c69278) Unicode charset is UTF16LE 0x7ad6244e1300 Default config = 0x7ad638c69b38 License string "JwtS1UJzq6" 0x7ad618012680 ODBCProvider created 0x7ad618012680 ODBCProvider::setDbCryptCallback(...) 0x7ad618012680 ODBCProvider::attachDatabase("odbc://FBMODBCTEST") DPB version 2: isc_dpb_auth_block Auth block 0, length 99 AUTH_TYPE: Seen AUTH_SECURE_DB: /home/vasiliy/dev/github/firebird/gen/Release/firebird/examples/empbuild/employee.fdb Auth block 1, length 82 AUTH_TYPE: Seen AUTH_SECURE_DB: /home/vasiliy/dev/github/firebird/gen/Release/firebird/security6.fdb Auth block 2, length 104 AUTH_TYPE: USER AUTH_NAME: SYSDBA AUTH_PLUGIN: Srp256 AUTH_SECURE_DB: /home/vasiliy/dev/github/firebird/gen/Release/firebird/security6.fdb isc_dpb_lc_ctype NONE found NONE, id 0, bytes per char 1, code page 0, iconv name isc_dpb_utf8_filename isc_dpb_session_time_zone Europe/Moscow isc_dpb_ext_call_depth 1 isc_dpb_ext_call_depth 1 isc_dpb_user_name SYSDBA isc_dpb_password masterkey Create environment handle... Check for license... 0x7ad618012680 Attaching to FBMODBCTEST as user "SYSDBA" password "masterkey" ```If using the ODBC driver from here, the script execution fails with an error:
Magpie logs in this case:
magpie_31596.log
``` ******* Log 1.0.3.0 started at Fri Oct 18 13:26:56 2024 0x7a5ba0ee1300 ODBCFactory::createPlugin(0x7a5bb2953c78) Unicode charset is UTF16LE 0x7a5ba0ee1300 Default config = 0x7a5bb2954858 License string "JwtS1UJzq6" 0x607d57519aa0 ODBCProvider created 0x607d57519aa0 ODBCProvider::attachDatabase("localhost:employee") 0x607d57519aa0 ODBCProvider::release 0x607d57519aa0 ODBCProvider destructed (counter 0) License expiration time: Tue Oct 22 18:51:53 2024 owner Public, status 129 ******* Log ended at Fri Oct 18 13:27:04 2024 ```magpie_31592.log
``` ******* Log 1.0.3.0 started at Fri Oct 18 13:27:02 2024 0x72c9e1ae1300 ODBCFactory::createPlugin(0x72c9fc51fa18) Unicode charset is UTF16LE 0x72c9e1ae1300 Default config = 0x72c9fc51f4a8 License string "JwtS1UJzq6" 0x72c9dc012680 ODBCProvider created 0x72c9dc012680 ODBCProvider::setDbCryptCallback(...) 0x72c9dc012680 ODBCProvider::attachDatabase("odbc://FBMODBCTEST") DPB version 2: isc_dpb_auth_block Auth block 0, length 99 AUTH_TYPE: Seen AUTH_SECURE_DB: /home/vasiliy/dev/github/firebird/gen/Release/firebird/examples/empbuild/employee.fdb Auth block 1, length 82 AUTH_TYPE: Seen AUTH_SECURE_DB: /home/vasiliy/dev/github/firebird/gen/Release/firebird/security6.fdb Auth block 2, length 104 AUTH_TYPE: USER AUTH_NAME: SYSDBA AUTH_PLUGIN: Srp256 AUTH_SECURE_DB: /home/vasiliy/dev/github/firebird/gen/Release/firebird/security6.fdb isc_dpb_lc_ctype NONE found NONE, id 0, bytes per char 1, code page 0, iconv name isc_dpb_utf8_filename isc_dpb_session_time_zone Europe/Moscow isc_dpb_ext_call_depth 1 isc_dpb_ext_call_depth 1 isc_dpb_user_name SYSDBA isc_dpb_password masterkey Create environment handle... License expiration time: Tue Oct 22 18:51:53 2024 owner Public, status 129 Check for license... 0x72c9dc012680 Attaching to FBMODBCTEST as user "SYSDBA" password "masterkey" Error line 1 (len 22): [unixODBC][ SQL state: 0 attachDatabase caught exception std::exception 0x72c9dc012680 ODBCProvider::release 0x72c9dc012680 ODBCProvider destructed (counter 0) ******* Log ended at Fri Oct 18 13:27:05 2024 ```The server log in both cases contains errors: