Updated to handle non-encrypted data (#724)
updated to handle non-encrypted data
This commit is contained in:
parent
af54c9eaeb
commit
b5821b28f8
|
@ -80,17 +80,19 @@ foreach ($dataTypes as $dataType) {
|
|||
}
|
||||
sqlsrv_execute($stmt);
|
||||
$errors = sqlsrv_errors();
|
||||
if (empty($errors)) {
|
||||
if (empty($errors) && AE\IsDataEncrypted()) {
|
||||
// SQLSRV_PHPTYPE_DATETIME not supported
|
||||
echo "$dataType should not be compatible with any datetime type.\n";
|
||||
$success = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// cleanup
|
||||
sqlsrv_free_stmt($stmt);
|
||||
}
|
||||
}
|
||||
}
|
||||
sqlsrv_query($conn, "TRUNCATE TABLE $tbname");
|
||||
|
||||
if ($success) {
|
||||
echo "Test successfully done.\n";
|
||||
|
|
|
@ -104,6 +104,7 @@ foreach ($dataTypes as $dataType) {
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (AE\IsDataEncrypted() || stripos("SQLSRV_SQLTYPE_" . $dataType, $sqlType) !== false) {
|
||||
if ($dataType == "float" || $dataType == "real") {
|
||||
if (abs($c_detOut - $inputValues[0]) > $epsilon || abs($c_randOut - $inputValues[1]) > $epsilon) {
|
||||
echo "Incorrect output retrieved for datatype $dataType and sqlType $sqlType:\n";
|
||||
|
@ -120,6 +121,7 @@ foreach ($dataTypes as $dataType) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sqlsrv_free_stmt($stmt);
|
||||
}
|
||||
|
@ -134,6 +136,7 @@ foreach ($dataTypes as $dataType) {
|
|||
if ($success) {
|
||||
echo "Test successfully done.\n";
|
||||
}
|
||||
|
||||
dropTable($conn, $tbname);
|
||||
}
|
||||
|
||||
|
|
|
@ -89,6 +89,7 @@ foreach ($dataTypes as $dataType) {
|
|||
}
|
||||
else
|
||||
{
|
||||
if (AE\IsDataEncrypted() || stripos("SQLSRV_SQLTYPE_" . $dataType, $sqlType) !== false) {
|
||||
if ($c_detOut != $inputValues[0] || $c_randOut != $inputValues[1]) {
|
||||
echo "Incorrect output retrieved for datatype $dataType and sqlType $sqlType:\n";
|
||||
print(" c_det: " . $c_detOut . "\n");
|
||||
|
@ -96,6 +97,7 @@ foreach ($dataTypes as $dataType) {
|
|||
$success = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sqlsrv_free_stmt($stmt);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue