Skipped the non-applicables tests against Azure Data Warehouse (#913)
This commit is contained in:
parent
5801edd5c6
commit
25d6812087
|
@ -624,6 +624,33 @@ function IsDaasMode()
|
||||||
return ($daasMode ? true : false);
|
return ($daasMode ? true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isAzureDW()
|
||||||
|
{
|
||||||
|
// Check if running Azure Data Warehouse
|
||||||
|
// For details, https://docs.microsoft.com/sql/t-sql/functions/serverproperty-transact-sql
|
||||||
|
try {
|
||||||
|
$conn = connect();
|
||||||
|
|
||||||
|
// Check if running Azure Data Warehouse
|
||||||
|
// For details, https://docs.microsoft.com/sql/t-sql/functions/serverproperty-transact-sql
|
||||||
|
$tsql = "SELECT SERVERPROPERTY ('edition'), SERVERPROPERTY ('EngineEdition')";
|
||||||
|
$stmt = $conn->query($tsql);
|
||||||
|
|
||||||
|
$result = $stmt->fetch(PDO::FETCH_NUM);
|
||||||
|
$edition = $result[0];
|
||||||
|
$engEd = intval($result[1]);
|
||||||
|
|
||||||
|
if ($edition == "SQL Azure" && $engEd == 6) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
die("skip Failed to connect or could not fetch edition info.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function FatalError($errorMsg)
|
function FatalError($errorMsg)
|
||||||
{
|
{
|
||||||
if (!IsPdoMode()) {
|
if (!IsPdoMode()) {
|
||||||
|
|
|
@ -6,7 +6,7 @@ emalloc (which only allocate memory in the memory space allocated for the PHP pr
|
||||||
--ENV--
|
--ENV--
|
||||||
PHPT_EXEC=true
|
PHPT_EXEC=true
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif_azure.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
include 'MsCommon.inc';
|
include 'MsCommon.inc';
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
Tests error returned when binding output parameter with emulate prepare
|
Tests error returned when binding output parameter with emulate prepare
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require_once('skipif_mid-refactor.inc'); ?>
|
<?php require_once('skipif_mid-refactor.inc'); ?>
|
||||||
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
require_once("MsCommon_mid-refactor.inc");
|
require_once("MsCommon_mid-refactor.inc");
|
||||||
|
|
|
@ -6,6 +6,7 @@ Verifies the functionality of PDOStatement nextRowset
|
||||||
PHPT_EXEC=true
|
PHPT_EXEC=true
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif_mid-refactor.inc'); ?>
|
<?php require('skipif_mid-refactor.inc'); ?>
|
||||||
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -12,30 +12,27 @@ require_once("MsSetup.inc");
|
||||||
//
|
//
|
||||||
$connectionInfo = "Database = $databaseName; Authentication = SqlPassword; TrustServerCertificate = true;";
|
$connectionInfo = "Database = $databaseName; Authentication = SqlPassword; TrustServerCertificate = true;";
|
||||||
|
|
||||||
try
|
try {
|
||||||
{
|
$conn = new PDO("sqlsrv:server = $server ; $connectionInfo", $uid, $pwd);
|
||||||
$conn = new PDO( "sqlsrv:server = $server ; $connectionInfo", $uid, $pwd );
|
|
||||||
echo "Connected successfully with Authentication=SqlPassword.\n";
|
echo "Connected successfully with Authentication=SqlPassword.\n";
|
||||||
}
|
} catch (PDOException $e) {
|
||||||
catch( PDOException $e )
|
|
||||||
{
|
|
||||||
echo "Could not connect with Authentication=SqlPassword.\n";
|
echo "Could not connect with Authentication=SqlPassword.\n";
|
||||||
print_r( $e->getMessage() );
|
print_r($e->getMessage());
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$stmt = $conn->query( "SELECT count(*) FROM cd_info" );
|
// For details, https://docs.microsoft.com/sql/t-sql/functions/serverproperty-transact-sql
|
||||||
if ( $stmt === false )
|
$conn->setAttribute(PDO::SQLSRV_ATTR_FETCHES_NUMERIC_TYPE, true);
|
||||||
{
|
$stmt = $conn->query("SELECT SERVERPROPERTY('EngineEdition')");
|
||||||
|
if ($stmt === false) {
|
||||||
echo "Query failed.\n";
|
echo "Query failed.\n";
|
||||||
}
|
} else {
|
||||||
else
|
$result = $stmt->fetch(PDO::FETCH_NUM);
|
||||||
{
|
$edition = $result[0];
|
||||||
$result = $stmt->fetch();
|
var_dump($edition);
|
||||||
var_dump( $result );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$conn = null;
|
unset($conn);
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Test Azure AD with integrated authentication. This should fail because
|
// Test Azure AD with integrated authentication. This should fail because
|
||||||
|
@ -43,16 +40,13 @@ $conn = null;
|
||||||
//
|
//
|
||||||
$connectionInfo = "Authentication = ActiveDirectoryIntegrated; TrustServerCertificate = true;";
|
$connectionInfo = "Authentication = ActiveDirectoryIntegrated; TrustServerCertificate = true;";
|
||||||
|
|
||||||
try
|
try {
|
||||||
{
|
$conn = new PDO("sqlsrv:server = $server ; $connectionInfo");
|
||||||
$conn = new PDO( "sqlsrv:server = $server ; $connectionInfo" );
|
|
||||||
echo "Connected successfully with Authentication=ActiveDirectoryIntegrated.\n";
|
echo "Connected successfully with Authentication=ActiveDirectoryIntegrated.\n";
|
||||||
$conn = null;
|
unset($conn);
|
||||||
}
|
} catch (PDOException $e) {
|
||||||
catch( PDOException $e )
|
|
||||||
{
|
|
||||||
echo "Could not connect with Authentication=ActiveDirectoryIntegrated.\n";
|
echo "Could not connect with Authentication=ActiveDirectoryIntegrated.\n";
|
||||||
print_r( $e->getMessage() );
|
print_r($e->getMessage());
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,35 +59,24 @@ $azureDatabase = $adDatabase;
|
||||||
$azureUsername = $adUser;
|
$azureUsername = $adUser;
|
||||||
$azurePassword = $adPassword;
|
$azurePassword = $adPassword;
|
||||||
|
|
||||||
if ($azureServer != 'TARGET_AD_SERVER')
|
if ($azureServer != 'TARGET_AD_SERVER') {
|
||||||
{
|
|
||||||
$connectionInfo = "Authentication = ActiveDirectoryPassword; TrustServerCertificate = false";
|
$connectionInfo = "Authentication = ActiveDirectoryPassword; TrustServerCertificate = false";
|
||||||
|
|
||||||
try
|
try {
|
||||||
{
|
$conn = new PDO("sqlsrv:server = $azureServer ; $connectionInfo", $azureUsername, $azurePassword);
|
||||||
$conn = new PDO( "sqlsrv:server = $azureServer ; $connectionInfo", $azureUsername, $azurePassword );
|
|
||||||
echo "Connected successfully with Authentication=ActiveDirectoryPassword.\n";
|
echo "Connected successfully with Authentication=ActiveDirectoryPassword.\n";
|
||||||
}
|
} catch (PDOException $e) {
|
||||||
catch( PDOException $e )
|
|
||||||
{
|
|
||||||
echo "Could not connect with ActiveDirectoryPassword.\n";
|
echo "Could not connect with ActiveDirectoryPassword.\n";
|
||||||
print_r( $e->getMessage() );
|
print_r($e->getMessage());
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "Not testing with Authentication=ActiveDirectoryPassword.\n";
|
echo "Not testing with Authentication=ActiveDirectoryPassword.\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
Connected successfully with Authentication=SqlPassword.
|
Connected successfully with Authentication=SqlPassword.
|
||||||
array(2) {
|
string(1) "%d"
|
||||||
[""]=>
|
|
||||||
string(1) "7"
|
|
||||||
[0]=>
|
|
||||||
string(1) "7"
|
|
||||||
}
|
|
||||||
Could not connect with Authentication=ActiveDirectoryIntegrated.
|
Could not connect with Authentication=ActiveDirectoryIntegrated.
|
||||||
SQLSTATE[IMSSP]: Invalid option for the Authentication keyword. Only SqlPassword or ActiveDirectoryPassword is supported.
|
SQLSTATE[IMSSP]: Invalid option for the Authentication keyword. Only SqlPassword or ActiveDirectoryPassword is supported.
|
||||||
%s with Authentication=ActiveDirectoryPassword.
|
%s with Authentication=ActiveDirectoryPassword.
|
||||||
|
|
|
@ -4,6 +4,7 @@ Test PDO::prepare() with PDO::ATTR_EMULATE_PREPARES.
|
||||||
PHPT_EXEC=true
|
PHPT_EXEC=true
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require_once('skipif_mid-refactor.inc'); ?>
|
<?php require_once('skipif_mid-refactor.inc'); ?>
|
||||||
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
10
test/functional/pdo_sqlsrv/skipif_azure_dw.inc
Normal file
10
test/functional/pdo_sqlsrv/skipif_azure_dw.inc
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
if (!extension_loaded("pdo_sqlsrv")) {
|
||||||
|
die("skip Extension not loaded");
|
||||||
|
}
|
||||||
|
|
||||||
|
require_once('MsCommon_mid-refactor.inc');
|
||||||
|
if (isAzureDW()) {
|
||||||
|
die("skip test not applicable in Azure Data Warehouse\n");
|
||||||
|
}
|
||||||
|
?>
|
|
@ -1,7 +1,7 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
A test for a simple query
|
A test for a simple query
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
sqlsrv_configure('WarningsReturnAsErrors', 0);
|
sqlsrv_configure('WarningsReturnAsErrors', 0);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
zombied streams after sqlsrv_stmt_cancel.
|
zombied streams after sqlsrv_stmt_cancel.
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
sqlsrv_configure( 'WarningsReturnAsErrors', 0 );
|
sqlsrv_configure( 'WarningsReturnAsErrors', 0 );
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Test for integer, float, and datetime types vs various sql server types.
|
Test for integer, float, and datetime types vs various sql server types.
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,28 @@ function isDaasMode()
|
||||||
return ($daasMode ? true : false);
|
return ($daasMode ? true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isAzureDW()
|
||||||
|
{
|
||||||
|
// Check if running Azure Data Warehouse
|
||||||
|
// For details, https://docs.microsoft.com/sql/t-sql/functions/serverproperty-transact-sql
|
||||||
|
$conn = connect();
|
||||||
|
$tsql = "SELECT SERVERPROPERTY ('edition'), SERVERPROPERTY ('EngineEdition')";
|
||||||
|
$stmt = sqlsrv_query($conn, $tsql);
|
||||||
|
|
||||||
|
if (sqlsrv_fetch($stmt)) {
|
||||||
|
$edition = sqlsrv_get_field($stmt, 0);
|
||||||
|
$engEd = sqlsrv_get_field($stmt, 1, SQLSRV_PHPTYPE_INT);
|
||||||
|
|
||||||
|
if ($edition == "SQL Azure" && $engEd == 6) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
die("Could not fetch edition info.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function startTest($testName)
|
function startTest($testName)
|
||||||
{
|
{
|
||||||
if (traceMode()) {
|
if (traceMode()) {
|
||||||
|
|
|
@ -6,8 +6,8 @@ emalloc (which only allocate memory in the memory space allocated for the PHP pr
|
||||||
--ENV--
|
--ENV--
|
||||||
PHPT_EXEC=true
|
PHPT_EXEC=true
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif_azure.inc');
|
<?php require('skipif_versions_old.inc'); ?>
|
||||||
require('skipif_versions_old.inc'); ?>
|
<?php require('skipif_azure.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
require_once('MsCommon.inc');
|
require_once('MsCommon.inc');
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
data corruption fix.
|
data corruption fix.
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
sqlsrv_configure( 'WarningsReturnAsErrors', 0 );
|
sqlsrv_configure( 'WarningsReturnAsErrors', 0 );
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Fix for 168256.
|
Fix for 168256.
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
sqlsrv_configure('WarningsReturnAsErrors', 0);
|
sqlsrv_configure('WarningsReturnAsErrors', 0);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Fix for 168256.
|
Fix for 168256.
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
sqlsrv_configure('WarningsReturnAsErrors', 0);
|
sqlsrv_configure('WarningsReturnAsErrors', 0);
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
fix for 182741.
|
fix for 182741.
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif_versions_old.inc'); ?>
|
<?php require('skipif_versions_old.inc'); ?>
|
||||||
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
sqlsrv_configure('WarningsReturnAsErrors', 0);
|
sqlsrv_configure('WarningsReturnAsErrors', 0);
|
||||||
|
|
12
test/functional/sqlsrv/skipif_azure_dw.inc
Normal file
12
test/functional/sqlsrv/skipif_azure_dw.inc
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (!extension_loaded("sqlsrv")) {
|
||||||
|
die("skip extension not loaded");
|
||||||
|
}
|
||||||
|
|
||||||
|
require_once('MsCommon.inc');
|
||||||
|
if (isAzureDW()) {
|
||||||
|
die("skip test not applicable in Azure Data Warehouse\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -6,6 +6,7 @@ Verifies the functionality of sqlsrv_next_result
|
||||||
PHPT_EXEC=true
|
PHPT_EXEC=true
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif_versions_old.inc'); ?>
|
<?php require('skipif_versions_old.inc'); ?>
|
||||||
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -13,31 +13,26 @@ require_once("MsSetup.inc");
|
||||||
$connectionInfo = array( "Database"=>$databaseName, "UID"=>$uid, "PWD"=>$pwd,
|
$connectionInfo = array( "Database"=>$databaseName, "UID"=>$uid, "PWD"=>$pwd,
|
||||||
"Authentication"=>'SqlPassword', "TrustServerCertificate"=>true);
|
"Authentication"=>'SqlPassword', "TrustServerCertificate"=>true);
|
||||||
|
|
||||||
$conn = sqlsrv_connect( $server, $connectionInfo );
|
$conn = sqlsrv_connect($server, $connectionInfo);
|
||||||
|
|
||||||
if( $conn === false )
|
if ($conn === false) {
|
||||||
{
|
|
||||||
echo "Could not connect with Authentication=SqlPassword.\n";
|
echo "Could not connect with Authentication=SqlPassword.\n";
|
||||||
var_dump( sqlsrv_errors() );
|
var_dump(sqlsrv_errors());
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "Connected successfully with Authentication=SqlPassword.\n";
|
echo "Connected successfully with Authentication=SqlPassword.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$stmt = sqlsrv_query( $conn, "SELECT count(*) FROM cd_info" );
|
// For details, https://docs.microsoft.com/sql/t-sql/functions/serverproperty-transact-sql
|
||||||
if ( $stmt === false )
|
$stmt = sqlsrv_query($conn, "SELECT SERVERPROPERTY('EngineEdition')");
|
||||||
{
|
if (sqlsrv_fetch($stmt)) {
|
||||||
|
$edition = sqlsrv_get_field($stmt, 0);
|
||||||
|
var_dump($edition);
|
||||||
|
} else {
|
||||||
echo "Query failed.\n";
|
echo "Query failed.\n";
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
$result = sqlsrv_fetch_array( $stmt );
|
|
||||||
var_dump( $result );
|
|
||||||
}
|
|
||||||
|
|
||||||
sqlsrv_free_stmt( $stmt );
|
sqlsrv_free_stmt($stmt);
|
||||||
sqlsrv_close( $conn );
|
sqlsrv_close($conn);
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Test Azure AD with integrated authentication. This should fail because
|
// Test Azure AD with integrated authentication. This should fail because
|
||||||
|
@ -45,17 +40,14 @@ sqlsrv_close( $conn );
|
||||||
//
|
//
|
||||||
$connectionInfo = array( "Authentication"=>"ActiveDirectoryIntegrated", "TrustServerCertificate"=>true );
|
$connectionInfo = array( "Authentication"=>"ActiveDirectoryIntegrated", "TrustServerCertificate"=>true );
|
||||||
|
|
||||||
$conn = sqlsrv_connect( $server, $connectionInfo );
|
$conn = sqlsrv_connect($server, $connectionInfo);
|
||||||
if( $conn === false )
|
if ($conn === false) {
|
||||||
{
|
|
||||||
echo "Could not connect with Authentication=ActiveDirectoryIntegrated.\n";
|
echo "Could not connect with Authentication=ActiveDirectoryIntegrated.\n";
|
||||||
$errors = sqlsrv_errors();
|
$errors = sqlsrv_errors();
|
||||||
print_r($errors[0]);
|
print_r($errors[0]);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "Connected successfully with Authentication=ActiveDirectoryIntegrated.\n";
|
echo "Connected successfully with Authentication=ActiveDirectoryIntegrated.\n";
|
||||||
sqlsrv_close( $conn );
|
sqlsrv_close($conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -67,36 +59,25 @@ $azureDatabase = $adDatabase;
|
||||||
$azureUsername = $adUser;
|
$azureUsername = $adUser;
|
||||||
$azurePassword = $adPassword;
|
$azurePassword = $adPassword;
|
||||||
|
|
||||||
if ($azureServer != 'TARGET_AD_SERVER')
|
if ($azureServer != 'TARGET_AD_SERVER') {
|
||||||
{
|
$connectionInfo = array( "UID"=>$azureUsername, "PWD"=>$azurePassword,
|
||||||
$connectionInfo = array( "UID"=>$azureUsername, "PWD"=>$azurePassword,
|
|
||||||
"Authentication"=>'ActiveDirectoryPassword', "TrustServerCertificate"=>false );
|
"Authentication"=>'ActiveDirectoryPassword', "TrustServerCertificate"=>false );
|
||||||
|
|
||||||
$conn = sqlsrv_connect( $azureServer, $connectionInfo );
|
$conn = sqlsrv_connect($azureServer, $connectionInfo);
|
||||||
if( $conn === false )
|
if ($conn === false) {
|
||||||
{
|
|
||||||
echo "Could not connect with ActiveDirectoryPassword.\n";
|
echo "Could not connect with ActiveDirectoryPassword.\n";
|
||||||
print_r( sqlsrv_errors() );
|
print_r(sqlsrv_errors());
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "Connected successfully with Authentication=ActiveDirectoryPassword.\n";
|
echo "Connected successfully with Authentication=ActiveDirectoryPassword.\n";
|
||||||
sqlsrv_close( $conn );
|
sqlsrv_close($conn);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "Not testing with Authentication=ActiveDirectoryPassword.\n";
|
echo "Not testing with Authentication=ActiveDirectoryPassword.\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
Connected successfully with Authentication=SqlPassword.
|
Connected successfully with Authentication=SqlPassword.
|
||||||
array(2) {
|
string(1) "%d"
|
||||||
[0]=>
|
|
||||||
int(7)
|
|
||||||
[""]=>
|
|
||||||
int(7)
|
|
||||||
}
|
|
||||||
Could not connect with Authentication=ActiveDirectoryIntegrated.
|
Could not connect with Authentication=ActiveDirectoryIntegrated.
|
||||||
Array
|
Array
|
||||||
(
|
(
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
large types to strings of 1MB size.
|
large types to strings of 1MB size.
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
integer, float, and datetime types vs various sql server types.
|
integer, float, and datetime types vs various sql server types.
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
field metadata for all types.
|
field metadata for all types.
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
sqlsrv_configure( 'WarningsReturnAsErrors', 0 );
|
sqlsrv_configure( 'WarningsReturnAsErrors', 0 );
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Read varchar(max) fields from a stream
|
Read varchar(max) fields from a stream
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,8 @@ require_once('MsCommon.inc');
|
||||||
$conn = AE\connect();
|
$conn = AE\connect();
|
||||||
|
|
||||||
// Prepare the statement
|
// Prepare the statement
|
||||||
$sql = "select * from cd_info";
|
$sql = "SELECT * FROM sys.objects";
|
||||||
|
|
||||||
$stmt = sqlsrv_prepare($conn, $sql, array(), array("Scrollable"=>SQLSRV_CURSOR_CLIENT_BUFFERED));
|
$stmt = sqlsrv_prepare($conn, $sql, array(), array("Scrollable"=>SQLSRV_CURSOR_CLIENT_BUFFERED));
|
||||||
if ($stmt === false) {
|
if ($stmt === false) {
|
||||||
printErrors();
|
printErrors();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
using an already closed connection.
|
using an already closed connection.
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
sqlsrv_configure( 'WarningsReturnAsErrors', 0 );
|
sqlsrv_configure( 'WarningsReturnAsErrors', 0 );
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
various fetch types.
|
various fetch types.
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
nameless fields return correctly in sqlsrv_fetch_array and sqlsrv_fetch_object.
|
nameless fields return correctly in sqlsrv_fetch_array and sqlsrv_fetch_object.
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Insert nulls into fields of all types.
|
Insert nulls into fields of all types.
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -1,7 +1,7 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
send a large amount (10MB) using encryption.
|
send a large amount (10MB) using encryption.
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
class my_stream {
|
class my_stream {
|
||||||
|
|
|
@ -4,7 +4,7 @@ test new error messages when sqlsrv_get_field is called
|
||||||
new error messages when sqlsrv_get_field is called before sqlsrv_fetch or
|
new error messages when sqlsrv_get_field is called before sqlsrv_fetch or
|
||||||
if sqlsrv_get_field is called with out of order field indices.
|
if sqlsrv_get_field is called with out of order field indices.
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif.inc'); ?>
|
<?php require('skipif_azure_dw.inc'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -14,7 +14,7 @@ Test for stream zombifying.
|
||||||
fatalError("Failed to connect.");
|
fatalError("Failed to connect.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$stmt = sqlsrv_query($conn, "SELECT * FROM [test_streamable_types]");
|
$stmt = sqlsrv_query($conn, "SELECT * FROM sys.objects");
|
||||||
$metadata = sqlsrv_field_metadata($stmt);
|
$metadata = sqlsrv_field_metadata($stmt);
|
||||||
$count = count($metadata);
|
$count = count($metadata);
|
||||||
sqlsrv_fetch($stmt);
|
sqlsrv_fetch($stmt);
|
||||||
|
|
|
@ -15,7 +15,7 @@ if( $conn === false ) {
|
||||||
die( print_r( sqlsrv_errors(), true ));
|
die( print_r( sqlsrv_errors(), true ));
|
||||||
}
|
}
|
||||||
|
|
||||||
$stmt = sqlsrv_prepare( $conn, "SELECT * FROM [cd_info]");
|
$stmt = sqlsrv_prepare( $conn, "SELECT * FROM sys.objects");
|
||||||
|
|
||||||
$result = sqlsrv_field_metadata( $stmt );
|
$result = sqlsrv_field_metadata( $stmt );
|
||||||
if( $result === false ) {
|
if( $result === false ) {
|
||||||
|
|
Loading…
Reference in a new issue