dont access pages in mdb_fetch_row when pdata is not initialized.
Happens when a client, e.g. pyodbc, queries for an unsupported type,
e.g. SQL_WVARCHAR, temp_table is empty and further access to it will crash.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff70fe3df in mdb_fetch_row (table=0xa74610) at data.c:467
467 rows = mdb_get_int16(
Backtrace:
0 0x00007ffff70fe3df in mdb_fetch_row (table=0xa74610) at data.c:467
1 0x00007ffff77f8746 in SQLFetch (hstmt=0xa70500) at odbc.c:1074
2 0x00007ffff7729b43 in SQLFetch () from /lib/x86_64-linux-gnu/libodbc.so.2
3 0x00007ffff778d545 in GetColumnSize (cnxn=0x7ffff77eb1f0, cnxn=0x7ffff77eb1f0, psize=0x7ffff77bde00, sqltype=-9) at src/cnxninfo.cpp:81
4 CnxnInfo_New (cnxn=0x7ffff77eb1f0) at src/cnxninfo.cpp:145
Signed-off-by: Ulrich Weber <ulrich.weber@gmail.com>
Per #260 I am assuming that the internal version 6 refers to files
created with Access 2019. I can't find any documentation on this format,
so I am calling it ACE17. Testing welcome.
When searching for unixODBC, we want to use
the libdir passed in to autotools (--libdir)
to ensure that we find the library
for the correct ABI.
It is possible that we pick up the wrong
copy from e.g. /usr/lib/ where a 32-bit
unixODBC copy of the library exists
when we're in the middle of a 64-bit build.
Use ${libdir} to ensure we respect
any preferences/information given and
search for ODBC in the right place.
Note that this previously affected
us with iODBC but that's since been
resolved by using their
iodbc-config binary.
Bug: https://bugs.gentoo.org/697568
Signed-off-by: Sam James <sam@gentoo.org>
* Refactor code so BLOBs are always correctly exported
Previously, BLOBs weren't exported from mdb-export correctly if the
backend had MDB_SHEXP_BULK_INSERT set.
* Export MySQL BLOBs correctly
MySQL BLOBs should be in the form 0x[hex values] when inserting them
with the mysql command line tool.
* MySQL needs a BLOB to store exported MDB_OLE values
MDB_OLE size always comes out as 256 bytes, but varbinary(256) is insufficient
to hold all possible OLE data.