File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,13 @@ var_dump($stmt->fetchAll());
24
24
25
25
$ pdo = PDOTest::factory ();
26
26
27
- $ pdo ->exec ("create table test2 (id integer primary key, n text) " );
27
+ if ($ pdo ->getAttribute (PDO ::ATTR_DRIVER_NAME ) == 'oci ' ) {
28
+ $ type = "clob " ;
29
+ } else {
30
+ $ type = "text " ;
31
+ }
32
+
33
+ $ pdo ->exec ("create table test2 (id integer primary key, n $ type) " );
28
34
$ pdo ->exec ("INSERT INTO test2 (id, n) VALUES (1,'hi') " );
29
35
30
36
$ pdo ->setAttribute (PDO ::ATTR_DEFAULT_FETCH_MODE , PDO ::FETCH_FUNC );
Original file line number Diff line number Diff line change @@ -127,7 +127,13 @@ foreach($objs as $idx => $obj)
127
127
unset($ stmt );
128
128
129
129
echo "===DATA=== \n" ;
130
- var_dump ($ db ->query ('SELECT test.val FROM test ' )->fetchAll (PDO ::FETCH_COLUMN ));
130
+ $ res = $ db ->query ('SELECT test.val FROM test ' )->fetchAll (PDO ::FETCH_COLUMN );
131
+
132
+ // For Oracle map NULL to empty string so the test doesn't diff
133
+ if ($ db ->getAttribute (PDO ::ATTR_DRIVER_NAME ) == 'oci ' && $ res [0 ] === null ) {
134
+ $ res [0 ] = "" ;
135
+ }
136
+ var_dump ($ res );
131
137
132
138
echo "===FAILURE=== \n" ;
133
139
try
You can’t perform that action at this time.
0 commit comments