made changes as per review
This commit is contained in:
parent
581a98085f
commit
69793cdafc
|
@ -43,7 +43,6 @@ Variety of connection parameters.
|
||||||
$conn = AE\connect();
|
$conn = AE\connect();
|
||||||
$tableName = 'php_table_SERIL1_1';
|
$tableName = 'php_table_SERIL1_1';
|
||||||
|
|
||||||
dropTable($conn, $tableName);
|
|
||||||
if (AE\isColEncrypted()) {
|
if (AE\isColEncrypted()) {
|
||||||
// With AE enabled, the sql types and SQLSRV SQLTYPES have to match exactly when binding
|
// With AE enabled, the sql types and SQLSRV SQLTYPES have to match exactly when binding
|
||||||
// Since SQLSRV SQLTYPES with datetime columns have no options for precision/scale,
|
// Since SQLSRV SQLTYPES with datetime columns have no options for precision/scale,
|
||||||
|
@ -53,6 +52,7 @@ Variety of connection parameters.
|
||||||
new AE\ColumnMeta('time', 'c3_time'));
|
new AE\ColumnMeta('time', 'c3_time'));
|
||||||
$stmt = AE\createTable($conn, $tableName, $columns);
|
$stmt = AE\createTable($conn, $tableName, $columns);
|
||||||
} else {
|
} else {
|
||||||
|
dropTable($conn, $tableName);
|
||||||
$stmt = sqlsrv_query($conn, "CREATE TABLE $tableName ([c1_datetime2] datetime2(0), [c2_datetimeoffset] datetimeoffset(0), [c3_time] time(0))");
|
$stmt = sqlsrv_query($conn, "CREATE TABLE $tableName ([c1_datetime2] datetime2(0), [c2_datetimeoffset] datetimeoffset(0), [c3_time] time(0))");
|
||||||
}
|
}
|
||||||
if (!$stmt) {
|
if (!$stmt) {
|
||||||
|
|
|
@ -17,7 +17,7 @@ require_once('MsCommon.inc');
|
||||||
$conn = AE\connect();
|
$conn = AE\connect();
|
||||||
|
|
||||||
// drop the procedure if exists
|
// drop the procedure if exists
|
||||||
$stmt = sqlsrv_query($conn, "IF OBJECT_ID('sp_MakeSubject', 'P') IS NOT NULL DROP PROCEDURE sp_MakeSubject");
|
dropProc($conn, 'sp_MakeSubject');
|
||||||
|
|
||||||
// Create Table 'Subjects' but do not encrypt the first column because in the stored procedure
|
// Create Table 'Subjects' but do not encrypt the first column because in the stored procedure
|
||||||
// we rely on the server to get the current date time. With Column Encryption, all input values
|
// we rely on the server to get the current date time. With Column Encryption, all input values
|
||||||
|
@ -79,7 +79,7 @@ if ($stmt === false) {
|
||||||
$tsql_callSP = "{call sp_MakeSubject(?,?,?,?)}";
|
$tsql_callSP = "{call sp_MakeSubject(?,?,?,?)}";
|
||||||
$introText="X";
|
$introText="X";
|
||||||
|
|
||||||
// With AE, the sql type has to match the column definition
|
// With AE, the sql type has to match the stored procedure parameter definition
|
||||||
$outSQLType = AE\isColEncrypted() ? SQLSRV_SQLTYPE_NVARCHAR('max') : SQLSRV_SQLTYPE_NVARCHAR(256);
|
$outSQLType = AE\isColEncrypted() ? SQLSRV_SQLTYPE_NVARCHAR('max') : SQLSRV_SQLTYPE_NVARCHAR(256);
|
||||||
$params = array(
|
$params = array(
|
||||||
array( 1, SQLSRV_PARAM_IN, SQLSRV_PHPTYPE_INT, SQLSRV_SQLTYPE_INT ),
|
array( 1, SQLSRV_PARAM_IN, SQLSRV_PHPTYPE_INT, SQLSRV_SQLTYPE_INT ),
|
||||||
|
|
|
@ -5,8 +5,9 @@ if (!extension_loaded("sqlsrv"))
|
||||||
|
|
||||||
require_once('MsCommon.inc');
|
require_once('MsCommon.inc');
|
||||||
|
|
||||||
if ($keystore != AE\KEYSTORE_KSP)
|
if ($keystore != AE\KEYSTORE_KSP) {
|
||||||
die('skip - this test requires a custom keystore provider.');
|
die('skip - this test requires a custom keystore provider.');
|
||||||
|
}
|
||||||
|
|
||||||
$conn = AE\connect();
|
$conn = AE\connect();
|
||||||
if (! $conn) {
|
if (! $conn) {
|
||||||
|
|
|
@ -344,8 +344,6 @@ $actualValue = $return;
|
||||||
$actualLength = strlen($return);
|
$actualLength = strlen($return);
|
||||||
compareResults($expectedLength, $expectedValue, $actualLength, $actualValue);
|
compareResults($expectedLength, $expectedValue, $actualLength, $actualValue);
|
||||||
|
|
||||||
// sqlsrv_query($conn, "DROP TABLE BindStringTest");
|
|
||||||
// sqlsrv_query($conn, "DROP PROCEDURE uspPerson");
|
|
||||||
dropTable($conn, $tableName);
|
dropTable($conn, $tableName);
|
||||||
dropProc($conn, 'uspPerson');
|
dropProc($conn, 'uspPerson');
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ require_once('MsCommon.inc');
|
||||||
|
|
||||||
$conn = AE\connect();
|
$conn = AE\connect();
|
||||||
|
|
||||||
$stmt = sqlsrv_query($conn, "IF OBJECT_ID('testBoolean', 'P') IS NOT NULL DROP PROCEDURE testBoolean");
|
dropProc($conn, 'testBoolean');
|
||||||
|
|
||||||
$createSP = <<<SQL
|
$createSP = <<<SQL
|
||||||
CREATE PROCEDURE testBoolean
|
CREATE PROCEDURE testBoolean
|
||||||
|
@ -51,7 +51,7 @@ var_dump($bit_false);
|
||||||
var_dump($bit_cast_true);
|
var_dump($bit_cast_true);
|
||||||
var_dump($int_true);
|
var_dump($int_true);
|
||||||
|
|
||||||
$stmt = sqlsrv_query($conn, "DROP PROCEDURE testBoolean");
|
dropProc($conn, 'testBoolean');
|
||||||
|
|
||||||
sqlsrv_free_stmt($stmt);
|
sqlsrv_free_stmt($stmt);
|
||||||
sqlsrv_close($conn);
|
sqlsrv_close($conn);
|
||||||
|
|
|
@ -14,7 +14,7 @@ require_once('MsCommon.inc');
|
||||||
|
|
||||||
$conn = AE\connect();
|
$conn = AE\connect();
|
||||||
|
|
||||||
$stmt = sqlsrv_query($conn, "IF OBJECT_ID('testBoolean', 'P') IS NOT NULL DROP PROCEDURE testBoolean");
|
dropProc($conn, 'testBoolean');
|
||||||
|
|
||||||
$createSP = <<<SQL
|
$createSP = <<<SQL
|
||||||
CREATE PROCEDURE testBoolean
|
CREATE PROCEDURE testBoolean
|
||||||
|
@ -52,7 +52,7 @@ var_dump($bit_false);
|
||||||
var_dump($bit_cast_true);
|
var_dump($bit_cast_true);
|
||||||
var_dump($int_true);
|
var_dump($int_true);
|
||||||
|
|
||||||
$stmt = sqlsrv_query($conn, "DROP PROCEDURE testBoolean");
|
dropProc($conn, 'testBoolean');
|
||||||
|
|
||||||
sqlsrv_free_stmt($stmt);
|
sqlsrv_free_stmt($stmt);
|
||||||
sqlsrv_close($conn);
|
sqlsrv_close($conn);
|
||||||
|
|
|
@ -14,7 +14,7 @@ require_once('MsCommon.inc');
|
||||||
|
|
||||||
$conn = AE\connect();
|
$conn = AE\connect();
|
||||||
|
|
||||||
$stmt = sqlsrv_query($conn, "IF OBJECT_ID('testBoolean', 'P') IS NOT NULL DROP PROCEDURE testBoolean");
|
dropProc($conn, 'testBoolean');
|
||||||
|
|
||||||
$createSP = <<<SQL
|
$createSP = <<<SQL
|
||||||
CREATE PROCEDURE testBoolean
|
CREATE PROCEDURE testBoolean
|
||||||
|
@ -52,7 +52,7 @@ var_dump($bit_false);
|
||||||
var_dump($bit_cast_true);
|
var_dump($bit_cast_true);
|
||||||
var_dump($int_true);
|
var_dump($int_true);
|
||||||
|
|
||||||
$stmt = sqlsrv_query($conn, "DROP PROCEDURE testBoolean");
|
dropProc($conn, 'testBoolean');
|
||||||
|
|
||||||
sqlsrv_free_stmt($stmt);
|
sqlsrv_free_stmt($stmt);
|
||||||
sqlsrv_close($conn);
|
sqlsrv_close($conn);
|
||||||
|
|
|
@ -14,7 +14,7 @@ require_once('MsCommon.inc');
|
||||||
|
|
||||||
$conn = AE\connect();
|
$conn = AE\connect();
|
||||||
|
|
||||||
$stmt = sqlsrv_query($conn, "IF OBJECT_ID('testBoolean', 'P') IS NOT NULL DROP PROCEDURE testBoolean");
|
dropProc($conn, 'testBoolean');
|
||||||
|
|
||||||
$createSP = <<<SQL
|
$createSP = <<<SQL
|
||||||
CREATE PROCEDURE testBoolean
|
CREATE PROCEDURE testBoolean
|
||||||
|
@ -52,7 +52,7 @@ var_dump($bit_false);
|
||||||
var_dump($bit_cast_true);
|
var_dump($bit_cast_true);
|
||||||
var_dump($int_true);
|
var_dump($int_true);
|
||||||
|
|
||||||
$stmt = sqlsrv_query($conn, "DROP PROCEDURE testBoolean");
|
dropProc($conn, 'testBoolean');
|
||||||
|
|
||||||
sqlsrv_free_stmt($stmt);
|
sqlsrv_free_stmt($stmt);
|
||||||
sqlsrv_close($conn);
|
sqlsrv_close($conn);
|
||||||
|
|
Loading…
Reference in a new issue