Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the error in the pdo decimal test #890

Merged
merged 1 commit into from
Nov 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions test/functional/pdo_sqlsrv/pdostatement_format_decimals.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -152,18 +152,20 @@ function getOutputParam($conn, $storedProcName, $inputValue, $prec, $scale, $ino
$stmt->bindParam(1, $outString, $paramType, $len);
$stmt->execute();

// The output param value should be the same as the input value,
// unaffected by the statement attr PDO::SQLSRV_ATTR_DECIMAL_PLACES.
// The output param value should be unaffected by the attr
// PDO::SQLSRV_ATTR_DECIMAL_PLACES. Without ColumnEncryption, the
// output param is treated as a regular string (not a decimal), so
// no missing leading zeroes.
// If ColumnEncryption is enabled, in which case the driver is able
// to derive the decimal type, leading zero will be added if missing
// to derive the decimal type, leading zero will be added if missing.
if (isAEConnected()) {
trace("\ngetOutputParam ($inout) with AE:\n");
$column = 'outputParamAE';
compareNumbers($outString, $inputValue, $column, $scale, true);
compareNumbers($outString, $inputValue, $column, $scale);
} else {
trace("\ngetOutputParam ($inout) without AE:\n");
$column = 'outputParam';
compareNumbers($outString, $inputValue, $column, $scale, false);
compareNumbers($outString, $inputValue, $column, $scale);
}
}

Expand Down