diff options
| author | Georg Richter <georg@php.net> | 2005-05-21 08:46:46 +0000 |
|---|---|---|
| committer | Georg Richter <georg@php.net> | 2005-05-21 08:46:46 +0000 |
| commit | 230681b0b39bc7881e50c0e384369059d8f4e460 (patch) | |
| tree | 3d378836ba4ac5c92cd7a6349b05d1888faf60ed | |
| parent | 3e416f738c1b5994bb8f67d269be28aaa6853056 (diff) | |
| download | php-git-230681b0b39bc7881e50c0e384369059d8f4e460.tar.gz | |
enabled set_charset for MySQL Versions >= 5.0.6
added testcase for bug #33090
| -rw-r--r-- | ext/mysqli/php_mysqli.h | 2 | ||||
| -rw-r--r-- | ext/mysqli/tests/bug33090.phpt | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/ext/mysqli/php_mysqli.h b/ext/mysqli/php_mysqli.h index 3d2cdffb73..4531bcd4de 100644 --- a/ext/mysqli/php_mysqli.h +++ b/ext/mysqli/php_mysqli.h @@ -103,7 +103,7 @@ typedef struct { #define PHP_MYSQLI_API #endif -#if MYSQL_VERSION_ID > 40112 && MYSQL_VERSION_ID < 50000 +#if (MYSQL_VERSION_ID > 40112 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID > 50005 #define HAVE_MYSQLI_SET_CHARSET #endif diff --git a/ext/mysqli/tests/bug33090.phpt b/ext/mysqli/tests/bug33090.phpt new file mode 100644 index 0000000000..5c1cba961e --- /dev/null +++ b/ext/mysqli/tests/bug33090.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #33090 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + include ("connect.inc"); + + /*** test mysqli_connect 127.0.0.1 ***/ + $link = mysqli_connect($host, $user, $passwd); + mysqli_select_db($link, "test"); + + if (!($link->prepare("this makes no sense"))) { + printf("%d\n", $link->errno); + printf("%s\n", $link->sqlstate); + } + $link->close(); +?> +--EXPECT-- +1064 +42000 |
