php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43036 mysqli_get_metadata test wrongly assumes charset
Submitted: 2007-10-19 12:42 UTC Modified: 2008-01-04 09:20 UTC
From: chad at herballure dot com Assigned: uw (profile)
Status: Closed Package: MySQLi related
PHP Version: 5.2.5RC1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: chad at herballure dot com
New email:
PHP Version: OS:

 

 [2007-10-19 12:42 UTC] chad at herballure dot com
Description:
------------
ext/mysqli/tests/047.phpt fails because the default MySQL character set of this machine is UTF-8 instead of some single-byte encoding. This makes the 'length' and 'charsetnr' fields have unexpected values (30 and 33 instead of 10 and 3), but otherwise the test produces the expected results.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-04 09:20 UTC] uw@php.net
Thanks!

This should fix it. Committed into 5_3 and 6 branches. 5_2 also modified. 

nixnutz@ulflinux:~/php5> cvs diff ext/mysqli/tests/047.phpt
Index: ext/mysqli/tests/047.phpt
===================================================================
RCS file: /repository/php-src/ext/mysqli/tests/047.phpt,v
retrieving revision 1.8.4.1.2.1
diff -r1.8.4.1.2.1 047.phpt
4,5c4,5
< <?php
< require_once('skipif.inc');
---
> <?php
> require_once('skipif.inc');
65c65
<     int(11)
---
>     int(%d)
67c67
<     int(63)
---
>     int(%d)
90c90
<     int(10)
---
>     int(%d)
92c92
<     int(8)
---
>     int(%d)
117c117
<   int(11)
---
>   int(%d)
119c119
<   int(63)
---
>   int(%d)
141c141
<   int(10)
---
>   int(%d)
143c143
<   int(8)
---
>   int(%d)
167c167
<   int(11)
---
>   int(%d)
169c169
<   int(63)
---
>   int(%d)
191c191
<   int(10)
---
>   int(%d)
193c193
<   int(8)
---
>   int(%d)
220c220
<     int(11)
---
>     int(%d)
222c222
<     int(63)
---
>     int(%d)


Its a bit tricky to catch all the OS/Settings/Server version pitfalls. Anyway, I can't warranty that in all cases we can work around custom server settings. It might happen that we have to assume default settings in some cases.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 14:01:29 2024 UTC