Evan Miller
615b625d79
Let LC_COLLATE influence string-comparison operations
...
By default this will be set to the C locale, but set it to the user's
locale when string comparisons are performed from mdb-sql. Note that
this can be overridden with the LC_COLLATE environment variable.
We could infer the collation locale from the file itself, but this will
likely require a big ball of glue between the Windows locales and Unix
ones.
2021-01-19 21:24:31 -05:00
Evan Miller
2bb31f05ee
Improve bounds checking
...
No particular crashes, but replace strcpy / strncpy with snprintf
and GLib functions wherever possible.
2020-12-28 20:12:39 -05:00
Evan Miller
1b96ef4b0d
Clarify mdb_unicode2ascii API and fix buffer overrun ( #220 )
...
There was some confusion as to whether the destination buffer length
should include space for the null terminator. Some callers of the
function assumed that a terminator would be added beyond the end
of the stated buffer size, while others did not. Make everything
consistent and also fix an overrun when there was insufficient
space for the output in the non-iconv implementation.
As stated in a code comment, a better solution would follow the lead
of libxls and use wcstombs and friends when iconv is not available.
But this gets into the weeds with conversion functions named differently
across platforms. The goal here is to fix the buffer overrun.
See oss-fuzz/28773
2020-12-19 08:24:32 -05:00
Evan Miller
a13936bd77
Support comparisons with MDB_FLOAT and MDB_DOUBLE
...
See https://github.com/mdbtools/mdbtools/issues/105
2020-09-02 21:24:24 -04:00
Evan Miller
90ee7bfcb5
Remove references to dmalloc
...
There are more modern tools for memory debugging, get rid of DMALLOC
crap in the source code.
I've left one reference in backend.c to prevent a merge conflict but
this can be removed later.
2020-08-20 08:59:08 -04:00
Evan Miller
8a63560ca1
Merge https://github.com/markord/mdbtools
...
Enable memo field filtering. See:
brianb/mdbtools#140
brianb/mdbtools#141
2020-08-03 17:25:09 -04:00
Mark Ord
f893efb401
Unable to filter on memo field #140
...
* Added case statement for comparing memo fields
2018-05-26 10:37:05 -07:00
leecher1337
2355aec912
At least for me IS NULL and IS NOT NULL are the wrong way round in SQL, fixed it.
2016-08-29 12:14:51 -04:00
leecher1337
e2449c11f3
Added strptime function to SQL parser as a feature. This is needed to i.e. be able to query time-fields in DB and to use dates <1.1.1970 and >19.1.2038. All changes should be backwards-compatible to not break existing queries.
2015-08-30 11:23:57 +02:00
leecher1337
5ce4cc5528
At least for me IS NULL and IS NOT NULL are the wrong way round in SQL, fixed it.
2015-08-21 14:50:34 +02:00
Nirgal Vourgère
2a70e16a8b
Allow CFLGAS="-std=c99 -D_POSIX_C_SOURCE=2"
...
Use glib function:
strcasecmp -> g_ascii_strcasecmp
bzero -> memset
strdup -> g_strdump
Don't use arithmetic void*+int
2014-12-28 12:36:55 +01:00
Nirgal Vourgère
7841d30d43
Revert use of config.h
...
Revert
7162e8db74
088493d499
And drop AC_CONFIG_HEADERS so that config goes though the command line.
No longer generating config.h, update .gitignore
2013-07-15 02:42:12 +02:00
Nirgal Vourgère
7162e8db74
Include config.h in all .c files
...
Need to be the first file since it may define large files support
and other options.
2013-07-04 10:53:13 +02:00
Jean-Michel Vourgère
1db0a89ee2
Removed last compilation warnings, updated TODO
2012-07-02 23:29:05 +02:00
Nirgal Vourgre
dd0f4c3819
Patch docs.diff from Nirgal
2011-08-28 19:53:29 -04:00
Nirgal Vourgre
fba597765d
Patch wheredate.diff from Nirgal
2011-08-28 19:47:18 -04:00
whydoubt
b4d9eb5225
Remove some unused variables
2005-03-13 22:14:06 +00:00
whydoubt
d271b5fae5
Better compressed text handling
2004-12-11 06:07:20 +00:00
brianb
fa8d24dd2b
patch from Wind Li for iconv on jet3.
...
Small changes from me for writing.
2004-12-01 23:31:48 +00:00
brianb
34a9eac4ea
iconv conversion code
2004-11-26 05:22:52 +00:00
whydoubt
e121a82946
Lots more gcc warnings fixes
2004-07-09 12:47:04 +00:00
brianb
fed589b2e7
rework of patch #879693 to support 0=1 in where clause
2004-02-08 21:54:20 +00:00
brianb
fcf4e1a53a
fixed booleans
2004-02-07 00:58:29 +00:00
brianb
5f02ba4fd2
add IS NULL/IS NOT NULL support, patches
2004-02-06 23:55:18 +00:00
brianb
a74094c667
sync up, see ChangeLog for details
2004-02-06 02:34:20 +00:00
brianb
aa19a0892f
resync...no idea what's in here, it's been sitting on the shelf for a while
2003-04-29 17:55:09 +00:00
brianb
75216d7a90
index work
...
dmalloc headers
mem leak fixes
start on i18n
2003-01-28 23:51:06 +00:00
brianb
b0942cbf7d
fix for like clause in jet4
2003-01-21 23:43:31 +00:00
brianb
092e2b79af
query planner stuff
...
some gcc -Wall fixes
added suport for _ in identifier names in SQL
gmdb2 manual additions
2003-01-20 16:04:24 +00:00
brianb
606887dfbd
added like operator and handling of string sargs
...
Added index stuff to HACKING file
Misc. mdb-sql updates
2001-04-20 21:06:46 +00:00
brianb
5ceaff28ce
new index code
2001-04-01 22:10:15 +00:00
brianb
b40283a8f8
First cut of sarg (search argument) support.
2001-03-29 04:50:35 +00:00