fix uft8 data for pdo memory test

This commit is contained in:
v-kaywon 2017-06-16 17:13:49 -07:00
parent cc54c60ede
commit 734e80cd0c
2 changed files with 10 additions and 1 deletions

View file

@ -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)

View file

@ -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);