Skip to content

Commit

Permalink
Add travis-ci.org configuration; adjust mysqli test for 5.3+ utf8 beh…
Browse files Browse the repository at this point in the history
…avior
  • Loading branch information
Christian Weiske committed Jul 6, 2015
1 parent 7dac016 commit 5ee4e5f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .travis.yml
@@ -0,0 +1,21 @@
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7
matrix:
allow_failures:
- php: 7
env:
global:
- MYSQL_TEST_USER=root
- MYSQL_TEST_PASSWD=
- MYSQL_TEST_DB=pear_db
- MYSQL_TEST_HOST=127.0.0.1
before_script:
- mysql -e 'CREATE DATABASE pear_db;'
script:
- pear run-tests -r tests/
- for i in `find tests/ -name '*.out'`; do echo "$i"; cat "$i"; done
4 changes: 4 additions & 0 deletions DB/mysqli.php
Expand Up @@ -1031,6 +1031,10 @@ function tableInfo($result, $mode = null)
? $this->mysqli_types[$tmp->type]
: 'unknown',
// http://bugs.php.net/?id=36579
// Doc Bug #36579: mysqli_fetch_field length handling
// https://bugs.php.net/bug.php?id=62426
// Bug #62426: mysqli_fetch_field_direct returns incorrect
// length on UTF8 fields
'len' => $tmp->length,
'flags' => $flags,
);
Expand Down
6 changes: 3 additions & 3 deletions tests/driver/16tableinfo.phpt
Expand Up @@ -569,7 +569,7 @@ $quirks = array(
),
2 => array(
'type' => 'blob',
'len' => 65535,
'len' => 196605,
'flags' => 'blob',
),
3 => array(
Expand All @@ -579,7 +579,7 @@ $quirks = array(
),
4 => array(
'type' => 'string',
'len' => 2,
'len' => 6,
'flags' => 'not_null',
),
5 => array(
Expand All @@ -589,7 +589,7 @@ $quirks = array(
),
9 => array(
'type' => 'string',
'len' => 20,
'len' => 60,
'flags' => '',
),
),
Expand Down

0 comments on commit 5ee4e5f

Please sign in to comment.