mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -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))";
|
||||
} else {
|
||||
push @conditions,
|
||||
"($op($member) && $op(\$vals[$ix]))";
|
||||
"($op($member) && !defined(\$vals[$ix]))";
|
||||
}
|
||||
} elsif (SQLITE_3010000 && $op =~ /str/) {
|
||||
push @conditions,
|
||||
|
|
|
@ -35,7 +35,7 @@ our $perl_rows = [
|
|||
];
|
||||
|
||||
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;
|
||||
|
||||
my $dbh = connect_ok( RaiseError => 1, AutoCommit => 1 );
|
||||
|
@ -113,6 +113,10 @@ sub test_table {
|
|||
$sql = "SELECT a FROM $table WHERE c IS ?";
|
||||
$res = $dbh->selectcol_arrayref($sql, {}, undef);
|
||||
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