I have connected to Firebird using ODBC. Name of database is employee.fdb, password is masterkey, user is sysdba This database installs with Firebird LibreBase opened database, but when I attempt to execute this: select * from "COUNTRY"; Result of executing of this statement in 3.5.0 rc 3 is wrong: instead of some values appears squares, when scroll result by mouse, all disappears. If try open tables of database, some tables seen wrong, table "employee" crashes 3.5.0 rc3. If try master 97fdf02-9eed775-f061262, it silently exits writing on console: Exited with code '139' used Fedora 64 bit
Created attachment 56857 [details] backtrace of crash in 3.5.0 rc 3 on Fedora 64 bit
That's a driver bug. The driver uses the C/C++ dataype "long" for the SQL datatype "Integer" and for ODBC C type identifier SQL_C_SLONG. It should use the ODBC C typedef of SQLINTEGER for that, which depending on platforms will be "int" or "long" or even (theoretically) something else. Integer / SQL_INTEGER / SQL_C_SLONG / SQLINTEGER is a 32 bit integer. On Windows (32 bit or 64 bit), long == int == 32 bit integer, so one can use "long" or "int" interchangeably and the bug does not appear. On most modern 32 bit Unices, long == int == 32 bit integer, so again the bug does not appear. On most modern 64 bit Unices, int == 32 bit integer and long == 64 bit integer, so not the same one => need to use the right one. That's why UnixODBC has: #if (SIZEOF_LONG_INT == 8) typedef int SQLINTEGER; #else typedef long SQLINTEGER; #endif See also http://msdn.microsoft.com/en-us/library/windows/desktop/ms714556%28v=vs.85%29.aspx http://msdn.microsoft.com/en-us/library/windows/desktop/ms713979%28v=vs.85%29.aspx
Thanks for information
*** Bug 67144 has been marked as a duplicate of this bug. ***
Changed title to better reflect behaviour
re-read behaviour and Lionel's comments, re-corrected title
Just for information, I downloaded 2.0.5 source of Firebird odbc (https://firebirdsql.org/en/odbc-driver/) Here are the results of grep: - searching SQL_C_SLONG => ... OdbcJdbc/Headers/SQLEXT.H:493:#define SQL_C_SLONG (SQL_C_LONG+SQL_SIGNED_OFFSET) /* SIGNED INTEGER */ ... - Searching SQL_C_LONG => ... OdbcJdbc/Headers/SQLEXT.H:452:#define SQL_C_LONG SQL_INTEGER /* INTEGER ... Where is the wrong ref to long type?