Commit Graph
27 Commits
Author SHA1 Message Date
Nyall Dawson 3ac497c6ff Fix crash when a missing file is accessed via ODBC 2020-10-12 13:47:11 +10:00
Nyall Dawson 83104b7b69 Setup operator precedence for parser to avoid ambiguity and fix shift/reduce warnings 2020-08-23 07:57:17 +10:00
Nyall Dawson 88e2ffa34a const correctness (fixes warning) 2020-08-23 07:56:26 +10:00
Nyall Dawson ab9d17ef98 Fix read after free error 2020-08-21 09:36:01 +10:00
Nyall Dawson d0ea8a9a86 ODBC requires dates formatted in ISO standards 2020-08-20 14:07:17 +10:00
Nyall Dawson 40981d2fc6 Only handle tables in SQLColumns, not other objects 2020-08-19 10:50:12 +10:00
Nyall Dawson b72ac6b1c0 Don't crash when a table can't be read for some reason 2020-08-19 10:44:17 +10:00
Nyall Dawson 333f4712b9 Fix empty table results
Fixes #19
2020-08-19 10:28:01 +10:00
Nyall Dawson 44529052be Try using homebrew version of bison 2020-08-18 15:21:36 +10:00
Nyall Dawson 083ec7f9e4 SELECT ... LIMIT 0 should return no rows, not all rows 2020-08-18 14:54:38 +10:00
Nyall Dawson 4e3ed3a5fd Fix LIMIT clause is ignored when executing SQL via ODBC 2020-08-18 14:54:19 +10:00
Nyall Dawson e82c1e9e1b Fix another leak 2020-08-18 14:36:44 +10:00
Nyall Dawson e8ab7e7ea6 Fix leak after running "SELECT COUNT(*)..." sql query 2020-08-18 12:36:29 +10:00
Nyall Dawson c65b402348 Fix leak after running "SELECT COUNT(*)..." sql query 2020-08-18 12:31:38 +10:00
Nyall Dawson 86741f4614 More thread safety 2020-08-18 12:28:20 +10:00
Nyall Dawson e92f14f9c4 Make SQL parser/lexer reentrant
Provides thread safety for mdbtools ODBC driver
2020-08-18 12:23:04 +10:00
Nyall Dawson 6085a89e1d Use ICONV_CONST 2020-08-13 12:42:32 +10:00
Nyall Dawson 3f278f3996 Correctly return len of character data when SQLColAttributes is called with SQL_COLUMN_TYPE_NAME 2020-08-13 12:40:46 +10:00
Nyall Dawson 1fc6d60dfa Fix placeholder text used instead of type name in SQLGetData SQLColumns_TYPE_NAME call 2020-08-13 12:12:57 +10:00
Nyall Dawson 1846fab4e6 Const correctness on src char pointers for unicode/ascii conversion 2020-08-13 12:12:52 +10:00
Nyall Dawson 8202e38155 Don't automatically add terminators when reading data parts
via SQLGetData for OLE fields

if the column type is OLE, then we don't add terminators
see https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlgetdata-function?view=sql-server-ver15
and https://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/odbc/src/tpc/db2z_fngetdata.html

"The buffer that the rgbValue argument specifies contains nul-terminated values, unless you retrieve
binary data, or the SQL data type of the column is graphic (DBCS) and the C buffer type is SQL_C_CHAR."
2020-08-13 08:03:00 +10:00
Nyall Dawson 9a749e68fd Report more accurate field type for OLE fields 2020-08-12 15:33:54 +10:00
Nyall Dawson 277b49f209 More warning fixes 2020-08-12 13:11:52 +10:00
Nyall Dawson 1639283779 Fix int/guint comparison warnings 2020-08-12 13:04:20 +10:00
Nyall Dawson 68d3104134 pos should finish on data length 2020-08-12 09:51:54 +10:00
Nyall Dawson 2567e57faa Fix incorrect early free of str when reading ole fields 2020-08-12 09:06:04 +10:00
Nyall Dawson 3517b0eee6 Implement SQL_COLUMN_TYPE_NAME field identifier in SQLColAttributes
Without this use of mdbtools in UnixODBC is broken, as all calls to
SqlFetch error out
2020-08-07 13:48:45 +10:00