mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 22:28:47 -04:00
fixed ISNOT undef case
This commit is contained in:
parent
a288096735
commit
573d6f02b7
2 changed files with 6 additions and 2 deletions
|
@ -115,7 +115,7 @@ sub BEST_INDEX {
|
||||||
"($op($member))";
|
"($op($member))";
|
||||||
} else {
|
} else {
|
||||||
push @conditions,
|
push @conditions,
|
||||||
"($op($member) && $op(\$vals[$ix]))";
|
"($op($member) && !defined(\$vals[$ix]))";
|
||||||
}
|
}
|
||||||
} elsif (SQLITE_3010000 && $op =~ /str/) {
|
} elsif (SQLITE_3010000 && $op =~ /str/) {
|
||||||
push @conditions,
|
push @conditions,
|
||||||
|
|
|
@ -35,7 +35,7 @@ our $perl_rows = [
|
||||||
];
|
];
|
||||||
|
|
||||||
my $tests = 14;
|
my $tests = 14;
|
||||||
$tests += 1 if has_sqlite('3.6.19');
|
$tests += 2 if has_sqlite('3.6.19');
|
||||||
plan tests => 4 + 2 * $tests + @interpolation_attempts + 9;
|
plan tests => 4 + 2 * $tests + @interpolation_attempts + 9;
|
||||||
|
|
||||||
my $dbh = connect_ok( RaiseError => 1, AutoCommit => 1 );
|
my $dbh = connect_ok( RaiseError => 1, AutoCommit => 1 );
|
||||||
|
@ -113,6 +113,10 @@ sub test_table {
|
||||||
$sql = "SELECT a FROM $table WHERE c IS ?";
|
$sql = "SELECT a FROM $table WHERE c IS ?";
|
||||||
$res = $dbh->selectcol_arrayref($sql, {}, undef);
|
$res = $dbh->selectcol_arrayref($sql, {}, undef);
|
||||||
is_deeply $res, [7], $sql;
|
is_deeply $res, [7], $sql;
|
||||||
|
|
||||||
|
$sql = "SELECT a FROM $table WHERE c IS NOT ? order by a";
|
||||||
|
$res = $dbh->selectcol_arrayref($sql, {}, undef);
|
||||||
|
is_deeply $res, [1, 4, 10, 11, 12], $sql;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue