summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Baratz <adambaratz@php.net>2016-09-13 13:15:06 -0400
committerAdam Baratz <adambaratz@php.net>2016-09-13 16:36:23 -0400
commit9fb94f03e7b5a3655ae87c819638e3137b729004 (patch)
treed88b5b5e784176c2cb7ee28df49a245aac8acfc0
parent69013f6b2620d2ed9f143373e88124d4a74e4bf7 (diff)
downloadphp-git-9fb94f03e7b5a3655ae87c819638e3137b729004.tar.gz
Explicitly allow NULL values for dblib compatibility
MSSQL won't necessarily default columns to NULL, see: https://msdn.microsoft.com/en-us/library/ms174979.aspx
-rw-r--r--ext/pdo/tests/pdo_018.phpt2
-rw-r--r--ext/pdo/tests/pdo_024.phpt2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo/tests/pdo_018.phpt b/ext/pdo/tests/pdo_018.phpt
index 7f27ce36e5..d931a2c1c0 100644
--- a/ext/pdo/tests/pdo_018.phpt
+++ b/ext/pdo/tests/pdo_018.phpt
@@ -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, val VARCHAR(255))');
+$db->exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, classtype int NULL, val VARCHAR(255) NULL)');
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
diff --git a/ext/pdo/tests/pdo_024.phpt b/ext/pdo/tests/pdo_024.phpt
index 1b4f841f36..571ea73286 100644
--- a/ext/pdo/tests/pdo_024.phpt
+++ b/ext/pdo/tests/pdo_024.phpt
@@ -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))');
+$db->exec('create table test (id int, name varchar(10) null)');
$stmt = $db->prepare('insert into test (id, name) values(0, :name)');
$name = NULL;