From cbdc01c0073c15a531b7e5d73ffe6444fe010623 Mon Sep 17 00:00:00 2001 From: Jenny Tam Date: Thu, 29 Nov 2018 08:55:09 -0800 Subject: [PATCH] Fixed the error in the pdo decimal test (#890) --- .../pdo_sqlsrv/pdostatement_format_decimals.phpt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/functional/pdo_sqlsrv/pdostatement_format_decimals.phpt b/test/functional/pdo_sqlsrv/pdostatement_format_decimals.phpt index 07303c4b7..ebbb3e532 100644 --- a/test/functional/pdo_sqlsrv/pdostatement_format_decimals.phpt +++ b/test/functional/pdo_sqlsrv/pdostatement_format_decimals.phpt @@ -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); } }