Nyall Dawson
98ef4a1663
[odbc] Ensure repid field formatting matching Microsoft Access ODBC
...
driver formatting of these fields (i.e. without surrounding {} braces)
2021-08-30 09:34:29 +10:00
Nyall Dawson
d94796d79b
Fix accidental reads of non-index data as indices
...
Follow up be2a287f5c - it's hard to be sure from the commit message,
but I suspect the intention here was to reduce the number of indices
read in that particular situation, instead of allowing replacing
the number of real indices read direct from the table definition
with a larger number.
In any case, omitting a possible index definition which exists
is a safer approach then trying to read an index from non-index data.
Fixes #335
2021-08-29 16:22:34 +10:00
Nyall Dawson
dccc88b722
Fix incorrect conversion of double values
...
Fixes #339
2021-08-29 15:31:00 +10:00
Nyall Dawson
4c61f2d49b
Handle sql queries where a double constant value has a trailing .
...
with no extra digits, e.g. "my_double_col" = 123.
2021-08-26 23:54:06 -04:00
Nyall Dawson
036f9b95c6
Handle sql queries where a double column is compared to an int
...
eg "my_double_column" = 123
2021-08-26 23:54:06 -04:00
Nyall Dawson
f4ca6b9e57
Handle sql queries where an integer column is compared to a double value
...
(e.g. "my_int_column" = 123.0)
2021-08-26 23:54:06 -04:00
Nyall Dawson
f557e6525b
Better error output
2021-08-26 23:49:11 -04:00
Nyall Dawson
fa336fd325
Handle sql queries using REP_ID columns
2021-08-26 20:17:39 -04:00
Nyall Dawson
fadd536e2e
Add support for <> SQL operator ( #329 )
2021-08-22 00:28:29 -04:00
Nyall Dawson
05d1b373d5
[odbc] Format boolean values correctly as SQL_C_CHAR ( #327 )
...
When a boolean column value is requested as a SQL_C_CHAR value,
correctly return a "1" or "0" string value
2021-08-19 21:21:46 -04:00
Nyall Dawson
cfbca2af03
Copy date formats when cloning handle ( #326 )
...
Fix date format for odbc handles get reset to default date format
for backend when handle is cloned
2021-08-18 22:08:07 -04:00
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