From 734e80cd0c57cd59c28a2232e46f04457130f5fc Mon Sep 17 00:00:00 2001 From: v-kaywon Date: Fri, 16 Jun 2017 17:13:49 -0700 Subject: [PATCH] fix uft8 data for pdo memory test --- test/pdo_sqlsrv/MsCommon.inc | 10 +++++++++- test/pdo_sqlsrv/PDO81_MemoryCheck.phpt | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/test/pdo_sqlsrv/MsCommon.inc b/test/pdo_sqlsrv/MsCommon.inc index f4d455ca..29919e9e 100644 --- a/test/pdo_sqlsrv/MsCommon.inc +++ b/test/pdo_sqlsrv/MsCommon.inc @@ -1221,7 +1221,15 @@ function NumRows($conn, $tableName) function InsertQuery($tableName) { - return (InsertQueryEx($tableName, rand(1, 20))); + if (UseUTF8data()) + { + include_once 'MsData_UTF8.inc'; + return (InsertQueryExUTF8($tableName, rand(1, 20))); + } + else + { + return (InsertQueryEx($tableName, rand(1, 20))); + } } function InsertRows($conn, $tableName, $rowCount) diff --git a/test/pdo_sqlsrv/PDO81_MemoryCheck.phpt b/test/pdo_sqlsrv/PDO81_MemoryCheck.phpt index b5ff1363..6c3e9f3b 100644 --- a/test/pdo_sqlsrv/PDO81_MemoryCheck.phpt +++ b/test/pdo_sqlsrv/PDO81_MemoryCheck.phpt @@ -23,6 +23,7 @@ function MemCheck($noPasses, $noRows1, $noRows2, $startStep, $endStep, $leakThre Trace("Execution setup: $noPasses passes over a table with $noRows1 => ".($noRows1 + $noRows2)." rows.\n"); $conn1 = Connect(); + $conn1->setAttribute(PDO::SQLSRV_ATTR_ENCODING, PDO::SQLSRV_ENCODING_UTF8); SetUTF8Data(true); CreateTable($conn1, $tableName);