diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-12-01 19:00:09 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-12-01 19:00:09 +0100 |
commit | 9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d (patch) | |
tree | 4368f9e4cb2d5b93a956c085337e45cb70f1e331 /nixpkgs/pkgs/development/interpreters/php/skip-sqlite3_bind_bug68849.phpt.patch | |
parent | a9cbfb6941b47d6f50129e6e36927882392daed7 (diff) | |
parent | 2344fe1da14cb08b0c18743b207995f9b8597915 (diff) | |
download | nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.gz nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.bz2 nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.lz nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.xz nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.zst nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.zip |
Merge https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/interpreters/php/skip-sqlite3_bind_bug68849.phpt.patch')
-rw-r--r-- | nixpkgs/pkgs/development/interpreters/php/skip-sqlite3_bind_bug68849.phpt.patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/interpreters/php/skip-sqlite3_bind_bug68849.phpt.patch b/nixpkgs/pkgs/development/interpreters/php/skip-sqlite3_bind_bug68849.phpt.patch new file mode 100644 index 000000000000..8e208e52dbab --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/php/skip-sqlite3_bind_bug68849.phpt.patch @@ -0,0 +1,75 @@ +diff --git a/ext/sqlite3/tests/sqlite3_bind_bug68849.phpt b/ext/sqlite3/tests/sqlite3_bind_bug68849.phpt +deleted file mode 100644 +index 6324d079..00000000 +--- a/ext/sqlite3/tests/sqlite3_bind_bug68849.phpt ++++ /dev/null +@@ -1,69 +0,0 @@ +---TEST-- +-Bug #68849 bindValue is not using the right data type +---EXTENSIONS-- +-sqlite3 +---FILE-- +-<?php +- +-$db = new SQLite3(':memory:'); +- +-$db->exec("CREATE TABLE test (a INTEGER, b TEXT, c REAL);" . +- "INSERT INTO test VALUES (1, 'hello', 3.14);" . +- "INSERT INTO test VALUES (3, 'world', 3.15);" . +- "INSERT INTO test VALUES (0, '42', 0.42);" +-); +- +-$s = $db->prepare('SELECT * FROM test WHERE (a+2) = ?;'); +-$s->bindValue(1, 3); +-$r = $s->execute(); +-var_dump($r->fetchArray(SQLITE3_ASSOC)); +- +-$s = $db->prepare('SELECT * FROM test WHERE a = ?;'); +-$s->bindValue(1, true); +-$r = $s->execute(); +-var_dump($r->fetchArray(SQLITE3_ASSOC)); +- +-$s = $db->prepare('SELECT * FROM test WHERE a = ?;'); +-$s->bindValue(1, false); +-$r = $s->execute(); +-var_dump($r->fetchArray(SQLITE3_ASSOC)); +- +-$s = $db->prepare('SELECT * FROM test WHERE c = ?;'); +-$s->bindValue(1, 3.15); +-$r = $s->execute(); +-var_dump($r->fetchArray(SQLITE3_ASSOC)); +- +-?> +---EXPECT-- +-array(3) { +- ["a"]=> +- int(1) +- ["b"]=> +- string(5) "hello" +- ["c"]=> +- float(3.14) +-} +-array(3) { +- ["a"]=> +- int(1) +- ["b"]=> +- string(5) "hello" +- ["c"]=> +- float(3.14) +-} +-array(3) { +- ["a"]=> +- int(0) +- ["b"]=> +- string(2) "42" +- ["c"]=> +- float(0.42) +-} +-array(3) { +- ["a"]=> +- int(3) +- ["b"]=> +- string(5) "world" +- ["c"]=> +- float(3.15) +-} |