mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-09-18 18:22:07 +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];
|
||||
|
||||
if (node->op == MDB_ISNULL) {
|
||||
if (field->is_null) return 0;
|
||||
else return 1;
|
||||
} else if (node->op == MDB_NOTNULL) {
|
||||
if (field->is_null) return 1;
|
||||
else return 0;
|
||||
}
|
||||
if (node->op == MDB_ISNULL)
|
||||
return field->is_null?1:0;
|
||||
else if (node->op == MDB_NOTNULL)
|
||||
return field->is_null?0:1;
|
||||
switch (col->col_type) {
|
||||
case MDB_BOOL:
|
||||
return mdb_test_int(node, !field->is_null);
|
||||
|
Reference in New Issue
Block a user