mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-11-25 17:59:54 +08:00
At least for me IS NULL and IS NOT NULL are the wrong way round in SQL, fixed it.
This commit is contained in:
@@ -175,13 +175,10 @@ mdb_test_sarg(MdbHandle *mdb, MdbColumn *col, MdbSargNode *node, MdbField *field
|
|||||||
{
|
{
|
||||||
char tmpbuf[256];
|
char tmpbuf[256];
|
||||||
|
|
||||||
if (node->op == MDB_ISNULL) {
|
if (node->op == MDB_ISNULL)
|
||||||
if (field->is_null) return 0;
|
return field->is_null?1:0;
|
||||||
else return 1;
|
else if (node->op == MDB_NOTNULL)
|
||||||
} else if (node->op == MDB_NOTNULL) {
|
return field->is_null?0:1;
|
||||||
if (field->is_null) return 1;
|
|
||||||
else return 0;
|
|
||||||
}
|
|
||||||
switch (col->col_type) {
|
switch (col->col_type) {
|
||||||
case MDB_BOOL:
|
case MDB_BOOL:
|
||||||
return mdb_test_int(node, !field->is_null);
|
return mdb_test_int(node, !field->is_null);
|
||||||
|
|||||||
Reference in New Issue
Block a user