diff options
author | Andrey Hristov <andrey@php.net> | 2010-09-22 18:25:33 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-09-22 18:25:33 +0000 |
commit | bdaec773b54431a74a0b3a3927c5261ddfde2bc6 (patch) | |
tree | dbd4e8e7c1b32be5a762bf9299ef14dc99f39a4b /ext | |
parent | 7f0ec2a1270bf8779d0b80b7be47e84bd901b688 (diff) | |
download | php-git-bdaec773b54431a74a0b3a3927c5261ddfde2bc6.tar.gz |
Unify, force one charset at connect, thus fixing
test failures because different servers have different
system charsets.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/mysqli/tests/connect.inc | 2 | ||||
-rw-r--r-- | ext/mysqli/tests/mysqli_fetch_field.phpt | 4 | ||||
-rw-r--r-- | ext/mysqli/tests/mysqli_fetch_field_oo.phpt | 4 | ||||
-rw-r--r-- | ext/mysqli/tests/mysqli_fetch_fields.phpt | 4 | ||||
-rw-r--r-- | ext/mysqli/tests/mysqli_field_seek.phpt | 4 | ||||
-rw-r--r-- | ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt | 8 |
6 files changed, 14 insertions, 12 deletions
diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc index 92caa25e93..02a71ec0b8 100644 --- a/ext/mysqli/tests/connect.inc +++ b/ext/mysqli/tests/connect.inc @@ -90,10 +90,12 @@ if ($flags !== false) { $link = mysqli_init(); + $link->options(MYSQLI_SET_CHARSET_NAME, "utf8"); if (!mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags)) $link = false; } else { $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link->set_charset("utf8"); } return $link; diff --git a/ext/mysqli/tests/mysqli_fetch_field.phpt b/ext/mysqli/tests/mysqli_fetch_field.phpt index e90599257e..a99864ce2f 100644 --- a/ext/mysqli/tests/mysqli_fetch_field.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field.phpt @@ -99,9 +99,9 @@ object(stdClass)#%d (11) { [%u|b%"max_length"]=> int(1) [%u|b%"length"]=> - int(1) + int(%d) [%u|b%"charsetnr"]=> - int(8) + int(%d) [%u|b%"flags"]=> int(0) [%u|b%"type"]=> diff --git a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt index f7dcd9b9af..fc51e858b3 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt @@ -87,9 +87,9 @@ object(stdClass)#%d (11) { [%u|b%"max_length"]=> int(1) [%u|b%"length"]=> - int(1) + int(%d) [%u|b%"charsetnr"]=> - int(8) + int(%d) [%u|b%"flags"]=> int(0) [%u|b%"type"]=> diff --git a/ext/mysqli/tests/mysqli_fetch_fields.phpt b/ext/mysqli/tests/mysqli_fetch_fields.phpt index a87956de11..332db84c6c 100644 --- a/ext/mysqli/tests/mysqli_fetch_fields.phpt +++ b/ext/mysqli/tests/mysqli_fetch_fields.phpt @@ -80,9 +80,9 @@ object(stdClass)#%d (11) { [%u|b%"max_length"]=> int(1) [%u|b%"length"]=> - int(1) + int(%d) [%u|b%"charsetnr"]=> - int(8) + int(%d) [%u|b%"flags"]=> int(0) [%u|b%"type"]=> diff --git a/ext/mysqli/tests/mysqli_field_seek.phpt b/ext/mysqli/tests/mysqli_field_seek.phpt index 58692a620d..a0cab48ec9 100644 --- a/ext/mysqli/tests/mysqli_field_seek.phpt +++ b/ext/mysqli/tests/mysqli_field_seek.phpt @@ -172,9 +172,9 @@ object(stdClass)#%d (11) { [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> - int(1) + int(%d) [%u|b%"charsetnr"]=> - int(8) + int(%d) [%u|b%"flags"]=> int(0) [%u|b%"type"]=> diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt index 1a2dba4133..9c876e5227 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt @@ -81,9 +81,9 @@ object(stdClass)#%d (11) { [%u|b%"max_length"]=> int(1) [%u|b%"length"]=> - int(1) + int(%d) [%u|b%"charsetnr"]=> - int(8) + int(%d) [%u|b%"flags"]=> int(0) [%u|b%"type"]=> @@ -129,9 +129,9 @@ object(stdClass)#%d (11) { [%u|b%"max_length"]=> int(2) [%u|b%"length"]=> - int(2) + int(%d) [%u|b%"charsetnr"]=> - int(8) + int(%d) [%u|b%"flags"]=> int(0) [%u|b%"type"]=> |