]> granicus.if.org Git - php/commitdiff
Fix PDO tests to match SQL standard syntax and pass Firebird tests.
authorDorin Marcoci <dorin.marcoci@marcodor.com>
Mon, 2 Jan 2017 17:02:11 +0000 (19:02 +0200)
committerAnatol Belski <ab@php.net>
Tue, 3 Jan 2017 16:48:52 +0000 (17:48 +0100)
ext/pdo/tests/pdo_018.phpt
ext/pdo_firebird/tests/bug_72931.phpt

index 80e34532872f21f8fc4ef1bc1138137456fd2205..57430ae20db9e1060905a796ed683a4a37eb84be 100644 (file)
@@ -71,7 +71,7 @@ $db->exec('CREATE TABLE classtypes(id int NOT NULL PRIMARY KEY, name VARCHAR(20)
 $db->exec('INSERT INTO classtypes VALUES(0, \'stdClass\')'); 
 $db->exec('INSERT INTO classtypes VALUES(1, \'TestBase\')'); 
 $db->exec('INSERT INTO classtypes VALUES(2, \'TestDerived\')'); 
-$db->exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, classtype int NULL, val VARCHAR(255) NULL)');
+$db->exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, classtype int, val VARCHAR(255))');
 
 $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
 
index ecbde6a109d180235a71268eb8dcc887eb6380d3..4f8a1a174624997be52d54557b163d937df73dfe 100644 (file)
@@ -10,7 +10,7 @@ $C->exec('create table tablea (id integer)');
 $S = $C->prepare('insert into tablea (id) values (1) returning id');
 $S->execute();
 $D = $S->fetch(PDO::FETCH_NUM);
-echo $D[0][0];
+echo $D[0];
 unset($S);
 unset($C);
 ?>
@@ -18,7 +18,7 @@ unset($C);
 <?php
 require 'testdb.inc';
 $C = new PDO('firebird:dbname='.$test_base, $user, $password) or die;
-$C->exec('DROP table tablea');
+$C->exec('drop table tablea');
 ?>
 --EXPECT--
 1