Commit Graph
15 Commits
Author SHA1 Message Date
James Woodcock 2be45a3a0b Implement MySQL relations for schema exports 2021-02-16 19:39:00 +00:00
James Woodcock 8bf8806d4f Implement a MySQL serial type for schema exports 2021-02-16 19:32:27 +00:00
James Woodcock a980d73447 mdb-export: handle MySQL blobs (#250)
* 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.
2021-02-03 14:48:56 -05:00
James Woodcock 42996dad65 Send error message to stderr 2020-11-01 12:56:38 +00:00
James Woodcock de4f5516b7 Handle errors from mdb_bind_column() 2020-10-31 09:46:00 +00:00
James Woodcock 50f1bd4a86 Return column number from mdb_bind_column()
To match the return from mdb_bind_column_by_name().
2020-10-31 09:40:24 +00:00
James Woodcock 2e8480d7e5 Merge branch 'dev' of https://github.com/mdbtools/mdbtools into bounds-check-mdb-bind-column 2020-10-31 09:38:03 +00:00
James Woodcock a7885f2680 Bounds check mdb_bind_column()
Return -1 to report out of bounds column number.
2020-10-24 13:27:34 +01:00
James Woodcock 06868e58ae Don't include length of '\0' in SQLGetData pcbValue
SQLGetData() should return the length of the string without the
null terminator.
2020-10-24 09:47:10 +01:00
James Woodcock 9bf70e0e1e mdb-export: use sensible date formats 2020-10-24 09:41:39 +01:00
James Woodcock 6f566eeab8 Fix POSIX error in configure.ac
POSIX shells use = rather than == for comparison.  This change fixes the
build on NetBSD.
2020-10-19 05:47:15 +02:00
James Woodcock eb5dd4d0b7 Support "SELECT TOP n [PERCENT]... " queries.
Updated the SQL parser to support "SELECT TOP n [PERCENT]... " queries,
matching the Mocrosoft Access SQL language.

Export these queries from databases with mdb-queries.
2020-09-26 11:28:34 +01:00
James Woodcock 833985043f mdb-sql: Simplify handling files loaded by ":r"
:r is an undocumented command to load SQL files from the msb-sql prompt
2020-09-19 11:29:41 +01:00
James Woodcock eab60a6060 mdb-sql: Handle ';' as terminators in SQL input files 2020-09-19 11:28:44 +01:00
James Woodcock 9c8b67b8f8 mdb-sql: support ';' as an SQL terminator 2020-09-19 11:28:00 +01:00