Merge pull request #638 from yitam/localeIssue
Modified sqlsrv tests with specific locale testing
This commit is contained in:
commit
870c23f7a7
|
@ -84,18 +84,6 @@ function isDaasMode()
|
||||||
return ($daasMode ? true : false);
|
return ($daasMode ? true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// function isAEQualified($conn)
|
|
||||||
// {
|
|
||||||
// $msodbcsql_ver = sqlsrv_client_info($conn)['DriverVer'];
|
|
||||||
// $server_ver = sqlsrv_server_info($conn)['SQLServerVersion'];
|
|
||||||
// $msodbcsql_maj = explode(".", $msodbcsql_ver)[0];
|
|
||||||
// $msodbcsql_min = explode(".", $msodbcsql_ver)[1];
|
|
||||||
// if ($msodbcsql_maj < 17 || explode('.', $server_ver)[0] < 13) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
function startTest($testName)
|
function startTest($testName)
|
||||||
{
|
{
|
||||||
if (traceMode()) {
|
if (traceMode()) {
|
||||||
|
@ -455,10 +443,17 @@ function handleErrors()
|
||||||
}
|
}
|
||||||
|
|
||||||
// non-UTF8 locale support in ODBC 17 and above only
|
// non-UTF8 locale support in ODBC 17 and above only
|
||||||
|
// if AE enabled, only supported in Windows (AE limitations)
|
||||||
function isLocaleSupported()
|
function isLocaleSupported()
|
||||||
{
|
{
|
||||||
|
if (isWindows()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (AE\isColEncrypted()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// now check ODBC version
|
||||||
$conn = AE\connect();
|
$conn = AE\connect();
|
||||||
|
|
||||||
$msodbcsql_ver = sqlsrv_client_info($conn)['DriverVer'];
|
$msodbcsql_ver = sqlsrv_client_info($conn)['DriverVer'];
|
||||||
if (explode(".", $msodbcsql_ver)[0] < 17) {
|
if (explode(".", $msodbcsql_ver)[0] < 17) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -330,12 +330,8 @@ function getSeqPlaceholders($num)
|
||||||
*/
|
*/
|
||||||
function isColEncrypted()
|
function isColEncrypted()
|
||||||
{
|
{
|
||||||
global $keystore, $dataEncrypted;
|
global $keystore;
|
||||||
if ($keystore === KEYSTORE_NONE) {
|
return ($keystore !== KEYSTORE_NONE);
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -345,11 +341,7 @@ function isColEncrypted()
|
||||||
function isDataEncrypted()
|
function isDataEncrypted()
|
||||||
{
|
{
|
||||||
global $keystore, $dataEncrypted;
|
global $keystore, $dataEncrypted;
|
||||||
if ($keystore === KEYSTORE_NONE || !$dataEncrypted) {
|
return ($keystore !== KEYSTORE_NONE && $dataEncrypted);
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -6,18 +6,25 @@ Validates that a prepared statement can be successfully executed more than once.
|
||||||
--ENV--
|
--ENV--
|
||||||
PHPT_EXEC=true
|
PHPT_EXEC=true
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif_versions_old.inc'); ?>
|
<?php
|
||||||
|
// locale must be set before 1st connection
|
||||||
|
if (!isWindows()) {
|
||||||
|
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
||||||
|
}
|
||||||
|
require('skipif_versions_old.inc');
|
||||||
|
?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
require_once('MsCommon.inc');
|
require_once('MsCommon.inc');
|
||||||
|
|
||||||
function prepareAndExecute($noPasses)
|
function prepareAndExecute($noPasses)
|
||||||
{
|
{
|
||||||
$testName = "Statement - Prepare and Execute";
|
|
||||||
startTest($testName);
|
|
||||||
|
|
||||||
setup();
|
setup();
|
||||||
$conn1 = AE\connect();
|
if (useUTF8Data()) {
|
||||||
|
$conn1 = AE\connect(array('CharacterSet'=>'UTF-8'));
|
||||||
|
} else {
|
||||||
|
$conn1 = AE\connect();
|
||||||
|
}
|
||||||
|
|
||||||
$tableName = 'TC34test';
|
$tableName = 'TC34test';
|
||||||
AE\createTestTable($conn1, $tableName);
|
AE\createTestTable($conn1, $tableName);
|
||||||
|
@ -80,20 +87,38 @@ function prepareAndExecute($noPasses)
|
||||||
dropTable($conn1, $tableName);
|
dropTable($conn1, $tableName);
|
||||||
|
|
||||||
sqlsrv_close($conn1);
|
sqlsrv_close($conn1);
|
||||||
|
|
||||||
endTest($testName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// locale must be set before 1st connection
|
||||||
if (!isWindows()) {
|
if (!isWindows()) {
|
||||||
setUTF8Data(true);
|
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$testName = "Statement - Prepare and Execute";
|
||||||
|
|
||||||
|
// test ansi only if windows or non-UTF8 locales are supported (ODBC 17 and above)
|
||||||
|
startTest($testName);
|
||||||
|
if (isLocaleSupported()) {
|
||||||
|
try {
|
||||||
|
setUTF8Data(false);
|
||||||
|
prepareAndExecute(5);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
endTest($testName);
|
||||||
|
|
||||||
|
// test utf8
|
||||||
|
startTest($testName);
|
||||||
try {
|
try {
|
||||||
|
setUTF8Data(true);
|
||||||
prepareAndExecute(5);
|
prepareAndExecute(5);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
echo $e->getMessage();
|
echo $e->getMessage();
|
||||||
}
|
}
|
||||||
setUTF8Data(false);
|
endTest($testName);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
Test "Statement - Prepare and Execute" completed successfully.
|
Test "Statement - Prepare and Execute" completed successfully.
|
||||||
|
Test "Statement - Prepare and Execute" completed successfully.
|
||||||
|
|
|
@ -6,20 +6,22 @@ retrieving fields from a table including rows with all supported SQL types (28 t
|
||||||
--ENV--
|
--ENV--
|
||||||
PHPT_EXEC=true
|
PHPT_EXEC=true
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif_versions_old.inc'); ?>
|
<?php
|
||||||
|
// locale must be set before 1st connection
|
||||||
|
if (!isWindows()) {
|
||||||
|
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
||||||
|
}
|
||||||
|
require('skipif_versions_old.inc');
|
||||||
|
?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
require_once('MsCommon.inc');
|
require_once('MsCommon.inc');
|
||||||
|
|
||||||
function fetchFields()
|
function fetchFields()
|
||||||
{
|
{
|
||||||
$testName = "Fetch - Field";
|
|
||||||
startTest($testName);
|
|
||||||
|
|
||||||
setup();
|
setup();
|
||||||
$tableName = 'TC42test';
|
$tableName = 'TC42test';
|
||||||
|
if (useUTF8Data()) {
|
||||||
if (! isWindows()) {
|
|
||||||
$conn1 = AE\connect(array('CharacterSet'=>'UTF-8'));
|
$conn1 = AE\connect(array('CharacterSet'=>'UTF-8'));
|
||||||
} else {
|
} else {
|
||||||
$conn1 = AE\connect();
|
$conn1 = AE\connect();
|
||||||
|
@ -63,16 +65,38 @@ function fetchFields()
|
||||||
dropTable($conn1, $tableName);
|
dropTable($conn1, $tableName);
|
||||||
|
|
||||||
sqlsrv_close($conn1);
|
sqlsrv_close($conn1);
|
||||||
|
|
||||||
endTest($testName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// locale must be set before 1st connection
|
||||||
|
if (!isWindows()) {
|
||||||
|
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
||||||
|
}
|
||||||
|
|
||||||
|
$testName = "Fetch - Field";
|
||||||
|
|
||||||
|
// test ansi only if windows or non-UTF8 locales are supported (ODBC 17 and above)
|
||||||
|
startTest($testName);
|
||||||
|
if (isLocaleSupported()) {
|
||||||
|
try {
|
||||||
|
setUTF8Data(false);
|
||||||
|
fetchFields();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
endTest($testName);
|
||||||
|
|
||||||
|
// test utf8
|
||||||
|
startTest($testName);
|
||||||
try {
|
try {
|
||||||
|
setUTF8Data(true);
|
||||||
fetchFields();
|
fetchFields();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
echo $e->getMessage();
|
echo $e->getMessage();
|
||||||
}
|
}
|
||||||
|
endTest($testName);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
Test "Fetch - Field" completed successfully.
|
Test "Fetch - Field" completed successfully.
|
||||||
|
Test "Fetch - Field" completed successfully.
|
||||||
|
|
|
@ -5,9 +5,10 @@ PHPT_EXEC=true
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?
|
<?
|
||||||
// locale must be set before 1st connection
|
// locale must be set before 1st connection
|
||||||
if ( !isWindows() ) {
|
if (!isWindows()) {
|
||||||
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
||||||
}
|
}
|
||||||
|
require('skipif_versions_old.inc');
|
||||||
?>
|
?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
@ -104,7 +105,7 @@ $testName = "Fetch - Field Data";
|
||||||
|
|
||||||
// test ansi only if windows or non-UTF8 locales are supported (ODBC 17 and above)
|
// test ansi only if windows or non-UTF8 locales are supported (ODBC 17 and above)
|
||||||
startTest($testName);
|
startTest($testName);
|
||||||
if (isWindows() || isLocaleSupported()) {
|
if (isLocaleSupported()) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
setUTF8Data(false);
|
setUTF8Data(false);
|
||||||
|
|
|
@ -8,9 +8,10 @@ PHPT_EXEC=true
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?
|
<?
|
||||||
// locale must be set before 1st connection
|
// locale must be set before 1st connection
|
||||||
if ( !isWindows() ) {
|
if (!isWindows()) {
|
||||||
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
||||||
}
|
}
|
||||||
|
require('skipif_versions_old.inc');
|
||||||
?>
|
?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
@ -161,7 +162,7 @@ $testName = "Fetch - Array";
|
||||||
|
|
||||||
// test ansi only if windows or non-UTF8 locales are supported (ODBC 17 and above)
|
// test ansi only if windows or non-UTF8 locales are supported (ODBC 17 and above)
|
||||||
startTest($testName);
|
startTest($testName);
|
||||||
if (isWindows() || isLocaleSupported()) {
|
if (isLocaleSupported()) {
|
||||||
try {
|
try {
|
||||||
setUTF8Data(false);
|
setUTF8Data(false);
|
||||||
fetchRow(1, 4);
|
fetchRow(1, 4);
|
||||||
|
|
|
@ -5,7 +5,13 @@ Verifies data retrieval via "sqlsrv_fetch_object".
|
||||||
--ENV--
|
--ENV--
|
||||||
PHPT_EXEC=true
|
PHPT_EXEC=true
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif_versions_old.inc'); ?>
|
<?php
|
||||||
|
// locale must be set before 1st connection
|
||||||
|
if (!isWindows()) {
|
||||||
|
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
||||||
|
}
|
||||||
|
require('skipif_versions_old.inc');
|
||||||
|
?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
require_once('MsCommon.inc');
|
require_once('MsCommon.inc');
|
||||||
|
@ -19,14 +25,10 @@ class TestClass
|
||||||
|
|
||||||
function fetchRow($minFetchMode, $maxFetchMode)
|
function fetchRow($minFetchMode, $maxFetchMode)
|
||||||
{
|
{
|
||||||
$testName = "Fetch - Object";
|
|
||||||
startTest($testName);
|
|
||||||
|
|
||||||
setup();
|
setup();
|
||||||
$tableName = 'TC45test';
|
$tableName = 'TC45test';
|
||||||
|
if (useUTF8Data()) {
|
||||||
if (! isWindows()) {
|
$conn1 = AE\connect(array('CharacterSet'=>'UTF-8'));
|
||||||
$conn1 = AE\connect(array( 'CharacterSet'=>'UTF-8' ));
|
|
||||||
} else {
|
} else {
|
||||||
$conn1 = AE\connect();
|
$conn1 = AE\connect();
|
||||||
}
|
}
|
||||||
|
@ -73,8 +75,6 @@ function fetchRow($minFetchMode, $maxFetchMode)
|
||||||
dropTable($conn1, $tableName);
|
dropTable($conn1, $tableName);
|
||||||
|
|
||||||
sqlsrv_close($conn1);
|
sqlsrv_close($conn1);
|
||||||
|
|
||||||
endTest($testName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ function fetchObject($stmt, $rows, $fields, $useClass)
|
||||||
$obj = sqlsrv_fetch_object($stmt);
|
$obj = sqlsrv_fetch_object($stmt);
|
||||||
}
|
}
|
||||||
if ($obj === false) {
|
if ($obj === false) {
|
||||||
fatalError("Row $i is missing");
|
fatalError("In fetchObject: Row $i is missing");
|
||||||
}
|
}
|
||||||
$values[$i] = $obj;
|
$values[$i] = $obj;
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ function fetchArray($stmt, $rows, $fields)
|
||||||
for ($i = 0; $i < $rows; $i++) {
|
for ($i = 0; $i < $rows; $i++) {
|
||||||
$row = sqlsrv_fetch_array($stmt);
|
$row = sqlsrv_fetch_array($stmt);
|
||||||
if ($row === false) {
|
if ($row === false) {
|
||||||
fatalError("Row $i is missing");
|
fatalError("In fetchArray: Row $i is missing");
|
||||||
}
|
}
|
||||||
$values[$i] = $row;
|
$values[$i] = $row;
|
||||||
}
|
}
|
||||||
|
@ -127,12 +127,36 @@ function checkData($rows, $fields, $actualValues, $expectedValues)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// locale must be set before 1st connection
|
||||||
|
if (!isWindows()) {
|
||||||
|
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
||||||
|
}
|
||||||
|
|
||||||
|
$testName = "Fetch - Object";
|
||||||
|
|
||||||
|
// test ansi only if windows or non-UTF8 locales are supported (ODBC 17 and above)
|
||||||
|
startTest($testName);
|
||||||
|
if (isLocaleSupported()) {
|
||||||
|
try {
|
||||||
|
setUTF8Data(false);
|
||||||
|
fetchRow(0, 2);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
endTest($testName);
|
||||||
|
|
||||||
|
// test utf8
|
||||||
|
startTest($testName);
|
||||||
try {
|
try {
|
||||||
|
setUTF8Data(true);
|
||||||
fetchRow(0, 2);
|
fetchRow(0, 2);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
echo $e->getMessage();
|
echo $e->getMessage();
|
||||||
}
|
}
|
||||||
|
endTest($testName);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
Test "Fetch - Object" completed successfully.
|
Test "Fetch - Object" completed successfully.
|
||||||
|
Test "Fetch - Object" completed successfully.
|
||||||
|
|
|
@ -7,9 +7,10 @@ PHPT_EXEC=true
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?
|
<?
|
||||||
// locale must be set before 1st connection
|
// locale must be set before 1st connection
|
||||||
if ( !isWindows() ) {
|
if (!isWindows()) {
|
||||||
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
||||||
}
|
}
|
||||||
|
require('skipif_versions_old.inc');
|
||||||
?>
|
?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
@ -94,7 +95,7 @@ $testName = "Fetch - Next Result";
|
||||||
|
|
||||||
// test ansi only if windows or non-UTF8 locales are supported (ODBC 17 and above)
|
// test ansi only if windows or non-UTF8 locales are supported (ODBC 17 and above)
|
||||||
startTest($testName);
|
startTest($testName);
|
||||||
if (isWindows() || isLocaleSupported()) {
|
if (isLocaleSupported()) {
|
||||||
try {
|
try {
|
||||||
setUTF8Data(false);
|
setUTF8Data(false);
|
||||||
fetchFields();
|
fetchFields();
|
||||||
|
|
|
@ -5,19 +5,22 @@ Verifies data retrieval with scrollable result sets.
|
||||||
--ENV--
|
--ENV--
|
||||||
PHPT_EXEC=true
|
PHPT_EXEC=true
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php require('skipif_versions_old.inc'); ?>
|
<?php
|
||||||
|
// locale must be set before 1st connection
|
||||||
|
if (!isWindows()) {
|
||||||
|
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
||||||
|
}
|
||||||
|
require('skipif_versions_old.inc');
|
||||||
|
?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
require_once('MsCommon.inc');
|
require_once('MsCommon.inc');
|
||||||
|
|
||||||
function fetchRow($noRows)
|
function fetchRow($noRows)
|
||||||
{
|
{
|
||||||
$testName = "Fetch - Scrollable";
|
|
||||||
startTest($testName);
|
|
||||||
|
|
||||||
setup();
|
setup();
|
||||||
$tableName = 'TC48test';
|
$tableName = 'TC48test';
|
||||||
if (! isWindows()) {
|
if (useUTF8Data()) {
|
||||||
$conn1 = AE\connect(array('CharacterSet'=>'UTF-8'));
|
$conn1 = AE\connect(array('CharacterSet'=>'UTF-8'));
|
||||||
} else {
|
} else {
|
||||||
$conn1 = AE\connect();
|
$conn1 = AE\connect();
|
||||||
|
@ -72,8 +75,6 @@ function fetchRow($noRows)
|
||||||
dropTable($conn1, $tableName);
|
dropTable($conn1, $tableName);
|
||||||
|
|
||||||
sqlsrv_close($conn1);
|
sqlsrv_close($conn1);
|
||||||
|
|
||||||
endTest($testName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function fetchArray($stmt, $rows, $fields)
|
function fetchArray($stmt, $rows, $fields)
|
||||||
|
@ -135,12 +136,36 @@ function checkData($rows, $fields, $actualValues, $expectedValues)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// locale must be set before 1st connection
|
||||||
|
if (!isWindows()) {
|
||||||
|
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
||||||
|
}
|
||||||
|
|
||||||
|
$testName = "Fetch - Scrollable";
|
||||||
|
|
||||||
|
// test ansi only if windows or non-UTF8 locales are supported (ODBC 17 and above)
|
||||||
|
startTest($testName);
|
||||||
|
if (isLocaleSupported()) {
|
||||||
|
try {
|
||||||
|
setUTF8Data(false);
|
||||||
|
fetchRow(10);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
endTest($testName);
|
||||||
|
|
||||||
|
// test utf8
|
||||||
|
startTest($testName);
|
||||||
try {
|
try {
|
||||||
|
setUTF8Data(true);
|
||||||
fetchRow(10);
|
fetchRow(10);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
echo $e->getMessage();
|
echo $e->getMessage();
|
||||||
}
|
}
|
||||||
|
endTest($testName);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
Test "Fetch - Scrollable" completed successfully.
|
Test "Fetch - Scrollable" completed successfully.
|
||||||
|
Test "Fetch - Scrollable" completed successfully.
|
||||||
|
|
|
@ -7,9 +7,10 @@ can be successfully retrieved as streams.
|
||||||
PHPT_EXEC=true
|
PHPT_EXEC=true
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?// locale must be set before 1st connection
|
<?// locale must be set before 1st connection
|
||||||
if ( !isWindows() ) {
|
if (!isWindows()) {
|
||||||
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
||||||
}
|
}
|
||||||
|
require('skipif_versions_old.inc');
|
||||||
?>
|
?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
@ -138,7 +139,7 @@ $errMessage = 'Connection with Column Encryption enabled does not support fetchi
|
||||||
|
|
||||||
// test ansi only if windows or non-UTF8 locales are supported (ODBC 17 and above)
|
// test ansi only if windows or non-UTF8 locales are supported (ODBC 17 and above)
|
||||||
startTest($testName);
|
startTest($testName);
|
||||||
if (isWindows() || isLocaleSupported()) {
|
if (isLocaleSupported()) {
|
||||||
try {
|
try {
|
||||||
setUTF8Data(false);
|
setUTF8Data(false);
|
||||||
streamRead(20, 1);
|
streamRead(20, 1);
|
||||||
|
|
|
@ -7,9 +7,10 @@ PHPT_EXEC=true
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?
|
<?
|
||||||
// locale must be set before 1st connection
|
// locale must be set before 1st connection
|
||||||
if ( !isWindows() ) {
|
if (!isWindows()) {
|
||||||
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
||||||
}
|
}
|
||||||
|
require('skipif_versions_old.inc');
|
||||||
?>
|
?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
@ -175,7 +176,7 @@ $errMessage = 'Connection with Column Encryption enabled does not support fetchi
|
||||||
|
|
||||||
// test ansi only if windows or non-UTF8 locales are supported (ODBC 17 and above)
|
// test ansi only if windows or non-UTF8 locales are supported (ODBC 17 and above)
|
||||||
startTest($testName);
|
startTest($testName);
|
||||||
if (isWindows() || isLocaleSupported()) {
|
if (isLocaleSupported()) {
|
||||||
try {
|
try {
|
||||||
setUTF8Data(false);
|
setUTF8Data(false);
|
||||||
streamScroll(20, 1);
|
streamScroll(20, 1);
|
||||||
|
|
|
@ -3,11 +3,11 @@ streaming large amounts of data into a database and getting it out as a string e
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?
|
<?
|
||||||
// locale must be set before 1st connection
|
// locale must be set before 1st connection
|
||||||
if ( !isWindows() ) {
|
if (!isWindows() ) {
|
||||||
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
setlocale(LC_ALL, "en_US.ISO-8859-1");
|
||||||
}
|
}
|
||||||
|
|
||||||
php require('skipif.inc');
|
require('skipif.inc');
|
||||||
?>
|
?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
@ -259,7 +259,7 @@ if (!isWindows()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// test ansi only if windows or non-UTF8 locales are supported (ODBC 17 and above)
|
// test ansi only if windows or non-UTF8 locales are supported (ODBC 17 and above)
|
||||||
if (isWindows() || isLocaleSupported()) {
|
if (isLocaleSupported()) {
|
||||||
setUTF8Data(false);
|
setUTF8Data(false);
|
||||||
runtest();
|
runtest();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue