]> granicus.if.org Git - php/commitdiff
Correct non-standard SQL. Standard SQL would define "DEFAULT NULL" -- but
authorDan Scott <dbs@php.net>
Wed, 26 Oct 2005 06:23:12 +0000 (06:23 +0000)
committerDan Scott <dbs@php.net>
Wed, 26 Oct 2005 06:23:12 +0000 (06:23 +0000)
that is the default value if the DEFAULT clause is omitted anyways.

ext/pdo/tests/pdo_018.phpt
ext/pdo/tests/pdo_024.phpt
ext/pdo/tests/pdo_027.phpt

index d03935b773e92a839a6ea8f2600427a1ddcc9544..c46ffde07bbd063b4e8f36defb28e4d3ed57e3b2 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))');
+$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 096f67ad3d7bb5544b9b2c1cac62f1364f5adff7..1b4f841f36e146735f17e443e52af6991b9e2831 100644 (file)
@@ -14,7 +14,7 @@ if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE_
 require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
 $db = PDOTest::factory();
 
-$db->exec('create table test (id int, name varchar(10) NULL)');
+$db->exec('create table test (id int, name varchar(10))');
 
 $stmt = $db->prepare('insert into test (id, name) values(0, :name)');
 $name = NULL;
index c76397702670b42d904e9fa3e237aa9aa6fff3ed..1d9990d3fd0e521c75cf8c20f464c0426a9494ef 100644 (file)
@@ -14,7 +14,7 @@ if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE_
 require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
 $db = PDOTest::factory();
 
-$db->exec('create table test (id int, name varchar(10) NULL)');
+$db->exec('create table test (id int, name varchar(10))');
 $db->exec("INSERT INTO test (id,name) VALUES(1,'test1')");
 $db->exec("INSERT INTO test (id,name) VALUES(2,'test2')");