From 272ff777c5cf59821c2c38896293d2a4e350bb07 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Mon, 3 Oct 2005 15:06:06 +0000 Subject: [PATCH] - Add missing test from base - Change require to require_once (found by kevin) --- ext/pdo/tests/bug_34630.phpt | 39 ++++++++++++++++++++++++++++++++ ext/pdo/tests/pdo_001.phpt | 2 +- ext/pdo/tests/pdo_002.phpt | 2 +- ext/pdo/tests/pdo_003.phpt | 2 +- ext/pdo/tests/pdo_004.phpt | 2 +- ext/pdo/tests/pdo_005.phpt | 2 +- ext/pdo/tests/pdo_006.phpt | 2 +- ext/pdo/tests/pdo_007.phpt | 2 +- ext/pdo/tests/pdo_008.phpt | 2 +- ext/pdo/tests/pdo_009.phpt | 2 +- ext/pdo/tests/pdo_010.phpt | 2 +- ext/pdo/tests/pdo_011.phpt | 2 +- ext/pdo/tests/pdo_012.phpt | 2 +- ext/pdo/tests/pdo_013.phpt | 2 +- ext/pdo/tests/pdo_014.phpt | 2 +- ext/pdo/tests/pdo_015.phpt | 2 +- ext/pdo/tests/pdo_016.phpt | 2 +- ext/pdo/tests/pdo_016a.phpt | 2 +- ext/pdo/tests/pdo_017.phpt | 2 +- ext/pdo/tests/pdo_018.phpt | 2 +- ext/pdo/tests/pdo_019.phpt | 2 +- ext/pdo/tests/pdo_020.phpt | 2 +- ext/pdo/tests/pdo_021.phpt | 2 +- ext/pdo/tests/pdo_022.phpt | 2 +- ext/pdo/tests/pdo_023.phpt | 2 +- ext/pdo/tests/pdo_024.phpt | 2 +- ext/pdo/tests/pdo_025.phpt | 2 +- ext/pdo/tests/pdo_026.phpt | 2 +- ext/pdo/tests/pdo_027.phpt | 2 +- ext/pdo/tests/pdo_028.phpt | 2 +- ext/pdo/tests/pdo_029.phpt | 2 +- ext/pdo/tests/pdo_030.phpt | 2 +- ext/pdo/tests/pecl_bug_5217.phpt | 2 +- 33 files changed, 71 insertions(+), 32 deletions(-) create mode 100644 ext/pdo/tests/bug_34630.phpt diff --git a/ext/pdo/tests/bug_34630.phpt b/ext/pdo/tests/bug_34630.phpt new file mode 100644 index 0000000000..f308f230e4 --- /dev/null +++ b/ext/pdo/tests/bug_34630.phpt @@ -0,0 +1,39 @@ +--TEST-- +PDO Common: PHP Bug #34630: inserting streams as LOBs +--SKIPIF-- + +--FILE-- +exec('CREATE TABLE test (id int NOT NULL PRIMARY KEY, val VARCHAR(256))'); +$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + +$fp = tmpfile(); +fwrite($fp, "I am the LOB data"); +rewind($fp); + +$insert = $db->prepare("insert into test (id, val) values (1, ?)"); +$insert->bindValue(1, $fp, PDO::PARAM_LOB); +$insert->execute(); + +print_r($db->query("SELECT * from test")->fetchAll(PDO::FETCH_ASSOC)); + +?> +--EXPECT-- +Array +( + [0] => Array + ( + [id] => 1 + [val] => I am the LOB data + ) + +) diff --git a/ext/pdo/tests/pdo_001.phpt b/ext/pdo/tests/pdo_001.phpt index 5129a17cec..cc6a90f791 100644 --- a/ext/pdo/tests/pdo_001.phpt +++ b/ext/pdo/tests/pdo_001.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_002.phpt b/ext/pdo/tests/pdo_002.phpt index d79839f039..60bfffd743 100644 --- a/ext/pdo/tests/pdo_002.phpt +++ b/ext/pdo/tests/pdo_002.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_003.phpt b/ext/pdo/tests/pdo_003.phpt index 6d199a0aaa..617ebbc18b 100644 --- a/ext/pdo/tests/pdo_003.phpt +++ b/ext/pdo/tests/pdo_003.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_004.phpt b/ext/pdo/tests/pdo_004.phpt index 61d19d1111..558eef4a5a 100644 --- a/ext/pdo/tests/pdo_004.phpt +++ b/ext/pdo/tests/pdo_004.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_005.phpt b/ext/pdo/tests/pdo_005.phpt index ce19961552..3d20159bac 100644 --- a/ext/pdo/tests/pdo_005.phpt +++ b/ext/pdo/tests/pdo_005.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_006.phpt b/ext/pdo/tests/pdo_006.phpt index 24ae5c41e0..4636e951c1 100644 --- a/ext/pdo/tests/pdo_006.phpt +++ b/ext/pdo/tests/pdo_006.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_007.phpt b/ext/pdo/tests/pdo_007.phpt index 87c84add73..c69098e9b2 100644 --- a/ext/pdo/tests/pdo_007.phpt +++ b/ext/pdo/tests/pdo_007.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id CHAR(1) NOT NULL PRIMARY KEY, val VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_008.phpt b/ext/pdo/tests/pdo_008.phpt index eeba74c69d..f83c7d89a3 100644 --- a/ext/pdo/tests/pdo_008.phpt +++ b/ext/pdo/tests/pdo_008.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id CHAR(1) NOT NULL PRIMARY KEY, val VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_009.phpt b/ext/pdo/tests/pdo_009.phpt index a558ba547b..cc27999d8f 100644 --- a/ext/pdo/tests/pdo_009.phpt +++ b/ext/pdo/tests/pdo_009.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE classtypes(id int NOT NULL PRIMARY KEY, name VARCHAR(10) NOT NULL UNIQUE)'); diff --git a/ext/pdo/tests/pdo_010.phpt b/ext/pdo/tests/pdo_010.phpt index 07a02bbfc2..b68b022a2a 100644 --- a/ext/pdo/tests/pdo_010.phpt +++ b/ext/pdo/tests/pdo_010.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE classtypes(id int NOT NULL PRIMARY KEY, name VARCHAR(10) NOT NULL UNIQUE)'); diff --git a/ext/pdo/tests/pdo_011.phpt b/ext/pdo/tests/pdo_011.phpt index a99c4a07b4..570f0c706e 100644 --- a/ext/pdo/tests/pdo_011.phpt +++ b/ext/pdo/tests/pdo_011.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10), grp VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_012.phpt b/ext/pdo/tests/pdo_012.phpt index 19c99d52bb..f73a8eb941 100644 --- a/ext/pdo/tests/pdo_012.phpt +++ b/ext/pdo/tests/pdo_012.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10), grp VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_013.phpt b/ext/pdo/tests/pdo_013.phpt index b870362431..c560b6405a 100644 --- a/ext/pdo/tests/pdo_013.phpt +++ b/ext/pdo/tests/pdo_013.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10), grp VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_014.phpt b/ext/pdo/tests/pdo_014.phpt index 2b79c80223..eb3e21bee9 100644 --- a/ext/pdo/tests/pdo_014.phpt +++ b/ext/pdo/tests/pdo_014.phpt @@ -13,7 +13,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10), grp VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_015.phpt b/ext/pdo/tests/pdo_015.phpt index 9450875fdf..4140d4b4a2 100644 --- a/ext/pdo/tests/pdo_015.phpt +++ b/ext/pdo/tests/pdo_015.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(20))'); diff --git a/ext/pdo/tests/pdo_016.phpt b/ext/pdo/tests/pdo_016.phpt index 03691a9496..7f4db0beab 100644 --- a/ext/pdo/tests/pdo_016.phpt +++ b/ext/pdo/tests/pdo_016.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(idx int NOT NULL PRIMARY KEY, txt VARCHAR(20))'); diff --git a/ext/pdo/tests/pdo_016a.phpt b/ext/pdo/tests/pdo_016a.phpt index ec425443a6..34ecf41d54 100755 --- a/ext/pdo/tests/pdo_016a.phpt +++ b/ext/pdo/tests/pdo_016a.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(idx int NOT NULL PRIMARY KEY, txt VARCHAR(20))'); diff --git a/ext/pdo/tests/pdo_017.phpt b/ext/pdo/tests/pdo_017.phpt index 4bf55b1f86..6713bfda9d 100644 --- a/ext/pdo/tests/pdo_017.phpt +++ b/ext/pdo/tests/pdo_017.phpt @@ -24,7 +24,7 @@ if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') { --FILE-- getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') { diff --git a/ext/pdo/tests/pdo_018.phpt b/ext/pdo/tests/pdo_018.phpt index c89ad7ca02..987d20ee39 100644 --- a/ext/pdo/tests/pdo_018.phpt +++ b/ext/pdo/tests/pdo_018.phpt @@ -12,7 +12,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(idx int NOT NULL PRIMARY KEY, txt VARCHAR(20))'); diff --git a/ext/pdo/tests/pdo_020.phpt b/ext/pdo/tests/pdo_020.phpt index 161532e64b..9fd5a90897 100644 --- a/ext/pdo/tests/pdo_020.phpt +++ b/ext/pdo/tests/pdo_020.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id INT NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(16))'); diff --git a/ext/pdo/tests/pdo_021.phpt b/ext/pdo/tests/pdo_021.phpt index e7aa34f68a..976df96972 100644 --- a/ext/pdo/tests/pdo_021.phpt +++ b/ext/pdo/tests/pdo_021.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id INT NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(16))'); diff --git a/ext/pdo/tests/pdo_022.phpt b/ext/pdo/tests/pdo_022.phpt index 428c52ed6f..942f7defc5 100644 --- a/ext/pdo/tests/pdo_022.phpt +++ b/ext/pdo/tests/pdo_022.phpt @@ -21,7 +21,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id INT NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(16))'); diff --git a/ext/pdo/tests/pdo_023.phpt b/ext/pdo/tests/pdo_023.phpt index 90ecec6c3b..bf05c5a35c 100644 --- a/ext/pdo/tests/pdo_023.phpt +++ b/ext/pdo/tests/pdo_023.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('create table test (id int, name varchar(10) NULL)'); diff --git a/ext/pdo/tests/pdo_025.phpt b/ext/pdo/tests/pdo_025.phpt index 553f2dc364..8594c1240a 100644 --- a/ext/pdo/tests/pdo_025.phpt +++ b/ext/pdo/tests/pdo_025.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id INT NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(16))'); diff --git a/ext/pdo/tests/pdo_026.phpt b/ext/pdo/tests/pdo_026.phpt index b39a11a78e..738a6f483e 100644 --- a/ext/pdo/tests/pdo_026.phpt +++ b/ext/pdo/tests/pdo_026.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('create table test (id int, name varchar(10) NULL)'); diff --git a/ext/pdo/tests/pdo_028.phpt b/ext/pdo/tests/pdo_028.phpt index 01a52feb11..a7797a89b8 100644 --- a/ext/pdo/tests/pdo_028.phpt +++ b/ext/pdo/tests/pdo_028.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val1 VARCHAR(10), val2 VARCHAR(10), val3 VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_029.phpt b/ext/pdo/tests/pdo_029.phpt index 13c7ef1352..0c70563790 100755 --- a/ext/pdo/tests/pdo_029.phpt +++ b/ext/pdo/tests/pdo_029.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE--