shrink down error checks in sqlsrv_fetch_large_stream.phpt
This commit is contained in:
parent
9f8078dde9
commit
2bf915c7f8
|
@ -40,9 +40,6 @@ if ($stream === false) {
|
||||||
if (AE\isColEncrypted() && $error['SQLSTATE'] === "IMSSP" && $error['code'] === -109 &&
|
if (AE\isColEncrypted() && $error['SQLSTATE'] === "IMSSP" && $error['code'] === -109 &&
|
||||||
$error['message'] === "Connection with Column Encryption enabled does not support fetching stream. Please fetch the data as a string.") {
|
$error['message'] === "Connection with Column Encryption enabled does not support fetching stream. Please fetch the data as a string.") {
|
||||||
$success = true;
|
$success = true;
|
||||||
} else {
|
|
||||||
var_dump($error);
|
|
||||||
fatalError("Failed to read field");
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$value = '';
|
$value = '';
|
||||||
|
@ -54,15 +51,13 @@ if ($stream === false) {
|
||||||
fclose($stream);
|
fclose($stream);
|
||||||
if (checkData($value, $inValue)) { // compare the data to see if they match!
|
if (checkData($value, $inValue)) { // compare the data to see if they match!
|
||||||
$success = true;
|
$success = true;
|
||||||
} else {
|
|
||||||
fatalError("Data corruption!\n");
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
fatalError("Error in getting stream!");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($success) {
|
if ($success) {
|
||||||
echo "Done.\n";
|
echo "Done.\n";
|
||||||
|
} else {
|
||||||
|
fatalError("Failed to fetch stream ");
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkData($actual, $expected)
|
function checkData($actual, $expected)
|
||||||
|
|
Loading…
Reference in a new issue