-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've fixed the "mysql / mysqlnd / mysqli / pdo_mysql" extensions,
mostly minor issues and oversights, I tested in RH9, Mac OSX 10.3.9,
Mac OSX 10.4.0, Mac OSX 10.4.8 and Mac OSX 10.4.10(x86 and ppc) with
mysql 4.1.10, 4.1.13 and 5.0.24.
I've got a diff, now what?
- -- BuildSmart
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)
iD8DBQFG1iHx0hzWbkf0eKgRAvBZAKC8qxl6V5QoI0JmpyAeLbAbubuqagCgllfi
sparo/ngBg9ochL2SMALPzs=
=yPL3
-----END PGP SIGNATURE
I've fixed the "mysql / mysqlnd / mysqli / pdo_mysql" extensions,
mostly minor issues and oversights, I tested in RH9, Mac OSX 10.3.9,
Mac OSX 10.4.0, Mac OSX 10.4.8 and Mac OSX 10.4.10(x86 and ppc) with
mysql 4.1.10, 4.1.13 and 5.0.24.I've got a diff, now what?
Put it online and reply with the link to the patch here?
Derick
Perhaps you could send the diff to the list, or better yet, an url
pointing to the place you uploaded the diff. And note: it should be
unified diff. (diff -u)
--Jani
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1I've fixed the "mysql / mysqlnd / mysqli / pdo_mysql" extensions,
mostly minor issues and oversights, I tested in RH9, Mac OSX 10.3.9,
Mac OSX 10.4.0, Mac OSX 10.4.8 and Mac OSX 10.4.10(x86 and ppc) with
mysql 4.1.10, 4.1.13 and 5.0.24.I've got a diff, now what?
- -- BuildSmart
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)iD8DBQFG1iHx0hzWbkf0eKgRAvBZAKC8qxl6V5QoI0JmpyAeLbAbubuqagCgllfi
sparo/ngBg9ochL2SMALPzs=
=yPL3
-----END PGP SIGNATURE-----
--
Make me happy: http://pecl.php.net/wishlist.php/jani
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Perhaps you could send the diff to the list, or better yet, an url
pointing to the place you uploaded the diff. And note: it should be
unified diff. (diff -u)--Jani
A link to it:
http://daleenterprise.com/patches/mysql.diff
a unified diff:
diff -ur ext.orig/mysql/php_mysql.c ext/mysql/php_mysql.c
- --- ext.orig/mysql/php_mysql.c 2007-08-06 11:11:46.000000000 -0400
+++ ext/mysql/php_mysql.c 2007-08-30 15:00:16.000000000 -0400
@@ -1977,11 +1977,9 @@
(f)->type == MYSQL_TYPE_VAR_STRING || (f)->type ==
MYSQL_TYPE_VARCHAR ||
(f)->type == MYSQL_TYPE_STRING)&& (f)->charsetnr ==
MYSQL_BINARY_CHARSET_NR)
#else - -#define IS_BINARY_DATA(f) (((f)->type == MYSQL_TYPE_TINY_BLOB || (f)-
type == MYSQL_TYPE_BLOB ||
+#define IS_BINARY_DATA(f) ((f)->type == MYSQL_TYPE_TINY_BLOB || (f)-
type == MYSQL_TYPE_BLOB ||
(f)->type == MYSQL_TYPE_MEDIUM_BLOB || (f)->type ==
MYSQL_TYPE_LONG_BLOB || \
-
- (f)->type == MYSQL_TYPE_VAR_STRING || \ (f)->type ==
MYSQL_TYPE_VARCHAR || \
- (f)->type == MYSQL_TYPE_VAR_STRING || \ (f)->type ==
-
- (f)->type == MYSQL_TYPE_STRING)&& (f)->charsetnr ==
MYSQL_BINARY_CHARSET_NR)
- (f)->type == MYSQL_TYPE_STRING)&& (f)->charsetnr ==
-
- (f)->type == MYSQL_TYPE_VAR_STRING || (f)->type == MYSQL_TYPE_STRING)
#endif
/* {{{ php_mysql_fetch_hash
diff -ur ext.orig/mysqli/mysqli.c ext/mysqli/mysqli.c
- --- ext.orig/mysqli/mysqli.c 2007-07-24 12:13:25.000000000 -0400
+++ ext/mysqli/mysqli.c 2007-08-30 15:01:02.000000000 -0400
@@ -947,11 +947,16 @@
#define MYSQL_BINARY_CHARSET_NR 63
+#if MYSQL_VERSION_ID > 50002 || defined(HAVE_MYSQLND)
#define IS_BINARY_DATA(f) (((f).type == MYSQL_TYPE_TINY_BLOB ||
(f).type == MYSQL_TYPE_BLOB ||
(f).type == MYSQL_TYPE_MEDIUM_BLOB || (f).type ==
MYSQL_TYPE_LONG_BLOB ||
(f).type == MYSQL_TYPE_BIT || (f).type == MYSQL_TYPE_VAR_STRING ||
(f).type == MYSQL_TYPE_VARCHAR ||
(f).type == MYSQL_TYPE_STRING) && (f).charsetnr ==
MYSQL_BINARY_CHARSET_NR) -
+#else
+#define IS_BINARY_DATA(f) ((f).type == MYSQL_TYPE_TINY_BLOB ||
(f).type == MYSQL_TYPE_BLOB || \
- (f).type == MYSQL_TYPE_MEDIUM_BLOB || (f).type ==
MYSQL_TYPE_LONG_BLOB || \ - (f).type == MYSQL_TYPE_VAR_STRING || (f).type == MYSQL_TYPE_STRING)
+#endif
/* {{{ php_mysqli_fetch_into_hash
*/
diff -ur ext.orig/mysqli/mysqli_api.c ext/mysqli/mysqli_api.c
- --- ext.orig/mysqli/mysqli_api.c 2007-07-24 12:13:26.000000000 -0400
+++ ext/mysqli/mysqli_api.c 2007-08-30 15:01:02.000000000 -0400
@@ -759,10 +759,9 @@
(f).type == MYSQL_TYPE_STRING) && (f).charsetnr ==
MYSQL_BINARY_CHARSET_NR)
#else
/* No BIT */ - -#define IS_BINARY_DATA(f) (((f).type == MYSQL_TYPE_TINY_BLOB ||
(f).type == MYSQL_TYPE_BLOB ||
+#define IS_BINARY_DATA(f) ((f).type == MYSQL_TYPE_TINY_BLOB ||
(f).type == MYSQL_TYPE_BLOB ||
(f).type == MYSQL_TYPE_MEDIUM_BLOB || (f).type ==
MYSQL_TYPE_LONG_BLOB || \ -
- (f).type == MYSQL_TYPE_VAR_STRING || (f).type == MYSQL_TYPE_VARCHAR
||\
- (f).type == MYSQL_TYPE_VAR_STRING || (f).type == MYSQL_TYPE_VARCHAR
-
- (f).type == MYSQL_TYPE_STRING) && (f).charsetnr ==
MYSQL_BINARY_CHARSET_NR)
- (f).type == MYSQL_TYPE_STRING) && (f).charsetnr ==
- (f).type == MYSQL_TYPE_VAR_STRING || (f).type == MYSQL_TYPE_STRING)
#endif
- -- Dale
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)
iD8DBQFG1xbM0hzWbkf0eKgRAukpAKCY+SdOr6o9pqKvchZCiNY6Mr5ErQCeOn49
VOS5Jt4NIqrYElwFgmzYVr8=
=8yvq
-----END PGP SIGNATURE
Hi,
BuildSmart wrote:
Perhaps you could send the diff to the list, or better yet, an url
pointing to the place you uploaded the diff. And note: it should be
unified diff. (diff -u)
I don't understand the intention of the changes? What was the problem?
Greets,
Andrey
--Jani
A link to it:
http://daleenterprise.com/patches/mysql.diff
a unified diff:
diff -ur ext.orig/mysql/php_mysql.c ext/mysql/php_mysql.c
--- ext.orig/mysql/php_mysql.c 2007-08-06 11:11:46.000000000 -0400
+++ ext/mysql/php_mysql.c 2007-08-30 15:00:16.000000000 -0400
@@ -1977,11 +1977,9 @@
(f)->type == MYSQL_TYPE_VAR_STRING || (f)->type ==
MYSQL_TYPE_VARCHAR ||
(f)->type == MYSQL_TYPE_STRING)&& (f)->charsetnr ==
MYSQL_BINARY_CHARSET_NR)
#else
-#define IS_BINARY_DATA(f) (((f)->type == MYSQL_TYPE_TINY_BLOB ||
(f)->type == MYSQL_TYPE_BLOB ||
+#define IS_BINARY_DATA(f) ((f)->type == MYSQL_TYPE_TINY_BLOB ||
(f)->type == MYSQL_TYPE_BLOB ||
(f)->type == MYSQL_TYPE_MEDIUM_BLOB || (f)->type ==
MYSQL_TYPE_LONG_BLOB || \
- (f)->type == MYSQL_TYPE_VAR_STRING || \ (f)->type ==
MYSQL_TYPE_VARCHAR || \- (f)->type == MYSQL_TYPE_STRING)&& (f)->charsetnr ==
MYSQL_BINARY_CHARSET_NR)
- (f)->type == MYSQL_TYPE_VAR_STRING || (f)->type == MYSQL_TYPE_STRING)
#endif
/* {{{ php_mysql_fetch_hash
diff -ur ext.orig/mysqli/mysqli.c ext/mysqli/mysqli.c
--- ext.orig/mysqli/mysqli.c 2007-07-24 12:13:25.000000000 -0400
+++ ext/mysqli/mysqli.c 2007-08-30 15:01:02.000000000 -0400
@@ -947,11 +947,16 @@
#define MYSQL_BINARY_CHARSET_NR 63
+#if MYSQL_VERSION_ID > 50002 || defined(HAVE_MYSQLND)
#define IS_BINARY_DATA(f) (((f).type == MYSQL_TYPE_TINY_BLOB || (f).type
== MYSQL_TYPE_BLOB ||
(f).type == MYSQL_TYPE_MEDIUM_BLOB || (f).type ==
MYSQL_TYPE_LONG_BLOB ||
(f).type == MYSQL_TYPE_BIT || (f).type == MYSQL_TYPE_VAR_STRING ||
(f).type == MYSQL_TYPE_VARCHAR ||
(f).type == MYSQL_TYPE_STRING) && (f).charsetnr ==
MYSQL_BINARY_CHARSET_NR)
+#else
+#define IS_BINARY_DATA(f) ((f).type == MYSQL_TYPE_TINY_BLOB || (f).type
== MYSQL_TYPE_BLOB || \
- (f).type == MYSQL_TYPE_MEDIUM_BLOB || (f).type ==
MYSQL_TYPE_LONG_BLOB || \- (f).type == MYSQL_TYPE_VAR_STRING || (f).type == MYSQL_TYPE_STRING)
+#endif
/* {{{ php_mysqli_fetch_into_hash
/
diff -ur ext.orig/mysqli/mysqli_api.c ext/mysqli/mysqli_api.c
--- ext.orig/mysqli/mysqli_api.c 2007-07-24 12:13:26.000000000 -0400
+++ ext/mysqli/mysqli_api.c 2007-08-30 15:01:02.000000000 -0400
@@ -759,10 +759,9 @@
(f).type == MYSQL_TYPE_STRING) && (f).charsetnr ==
MYSQL_BINARY_CHARSET_NR)
#else
/ No BIT */
-#define IS_BINARY_DATA(f) (((f).type == MYSQL_TYPE_TINY_BLOB ||
(f).type == MYSQL_TYPE_BLOB ||
+#define IS_BINARY_DATA(f) ((f).type == MYSQL_TYPE_TINY_BLOB || (f).type
== MYSQL_TYPE_BLOB ||
(f).type == MYSQL_TYPE_MEDIUM_BLOB || (f).type ==
MYSQL_TYPE_LONG_BLOB || \
- (f).type == MYSQL_TYPE_VAR_STRING || (f).type ==
MYSQL_TYPE_VARCHAR ||\- (f).type == MYSQL_TYPE_STRING) && (f).charsetnr ==
MYSQL_BINARY_CHARSET_NR)
- (f).type == MYSQL_TYPE_VAR_STRING || (f).type == MYSQL_TYPE_STRING)
#endif
-- Dale
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
BuildSmart wrote:Perhaps you could send the diff to the list, or better yet, an url
pointing to the place you uploaded the diff. And note: it should be
unified diff. (diff -u)I don't understand the intention of the changes? What was the problem?
Compile failures.
The original #if tests had the same data in #else, obviously the
original coder had the right intentions but forgot to check the data
types.
Things like MYSQL_TYPE_VARCHAR don't exist in 4.1.13 and below, I
checked the header files for 4.1.10 and 4.1.13 and removed the ones
that didn't exist.
I can send you the header files if you wish?
One of the files didn't check at all and it didn't compensate for the
mysql version differences so the check was added to correct this.
Greets,
Andrey--Jani
A link to it:
http://daleenterprise.com/patches/mysql.diff
a unified diff:
diff -ur ext.orig/mysql/php_mysql.c ext/mysql/php_mysql.c
--- ext.orig/mysql/php_mysql.c 2007-08-06 11:11:46.000000000 -0400
+++ ext/mysql/php_mysql.c 2007-08-30 15:00:16.000000000 -0400
@@ -1977,11 +1977,9 @@
(f)->type == MYSQL_TYPE_VAR_STRING || (f)->type ==
MYSQL_TYPE_VARCHAR ||
(f)->type == MYSQL_TYPE_STRING)&& (f)->charsetnr ==
MYSQL_BINARY_CHARSET_NR)
#else
-#define IS_BINARY_DATA(f) (((f)->type == MYSQL_TYPE_TINY_BLOB ||
(f)->type == MYSQL_TYPE_BLOB ||
+#define IS_BINARY_DATA(f) ((f)->type == MYSQL_TYPE_TINY_BLOB ||
(f)->type == MYSQL_TYPE_BLOB ||
(f)->type == MYSQL_TYPE_MEDIUM_BLOB || (f)->type ==
MYSQL_TYPE_LONG_BLOB || \
- (f)->type == MYSQL_TYPE_VAR_STRING || \ (f)->type ==
MYSQL_TYPE_VARCHAR || \- (f)->type == MYSQL_TYPE_STRING)&& (f)->charsetnr ==
MYSQL_BINARY_CHARSET_NR)
- (f)->type == MYSQL_TYPE_VAR_STRING || (f)->type ==
MYSQL_TYPE_STRING)
#endif
/* {{{ php_mysql_fetch_hash
diff -ur ext.orig/mysqli/mysqli.c ext/mysqli/mysqli.c
--- ext.orig/mysqli/mysqli.c 2007-07-24 12:13:25.000000000 -0400
+++ ext/mysqli/mysqli.c 2007-08-30 15:01:02.000000000 -0400
@@ -947,11 +947,16 @@
#define MYSQL_BINARY_CHARSET_NR 63
+#if MYSQL_VERSION_ID > 50002 || defined(HAVE_MYSQLND)
#define IS_BINARY_DATA(f) (((f).type == MYSQL_TYPE_TINY_BLOB ||
(f).type
== MYSQL_TYPE_BLOB ||
(f).type == MYSQL_TYPE_MEDIUM_BLOB || (f).type ==
MYSQL_TYPE_LONG_BLOB ||
(f).type == MYSQL_TYPE_BIT || (f).type ==
MYSQL_TYPE_VAR_STRING ||
(f).type == MYSQL_TYPE_VARCHAR ||
(f).type == MYSQL_TYPE_STRING) && (f).charsetnr ==
MYSQL_BINARY_CHARSET_NR)
+#else
+#define IS_BINARY_DATA(f) ((f).type == MYSQL_TYPE_TINY_BLOB ||
(f).type
== MYSQL_TYPE_BLOB || \
- (f).type == MYSQL_TYPE_MEDIUM_BLOB || (f).type ==
MYSQL_TYPE_LONG_BLOB || \- (f).type == MYSQL_TYPE_VAR_STRING || (f).type ==
MYSQL_TYPE_STRING)
+#endif
/* {{{ php_mysqli_fetch_into_hash
/
diff -ur ext.orig/mysqli/mysqli_api.c ext/mysqli/mysqli_api.c
--- ext.orig/mysqli/mysqli_api.c 2007-07-24 12:13:26.000000000
-0400
+++ ext/mysqli/mysqli_api.c 2007-08-30 15:01:02.000000000 -0400
@@ -759,10 +759,9 @@
(f).type == MYSQL_TYPE_STRING) && (f).charsetnr ==
MYSQL_BINARY_CHARSET_NR)
#else
/ No BIT */
-#define IS_BINARY_DATA(f) (((f).type == MYSQL_TYPE_TINY_BLOB ||
(f).type == MYSQL_TYPE_BLOB ||
+#define IS_BINARY_DATA(f) ((f).type == MYSQL_TYPE_TINY_BLOB ||
(f).type
== MYSQL_TYPE_BLOB ||
(f).type == MYSQL_TYPE_MEDIUM_BLOB || (f).type ==
MYSQL_TYPE_LONG_BLOB || \
- (f).type == MYSQL_TYPE_VAR_STRING || (f).type ==
MYSQL_TYPE_VARCHAR ||\- (f).type == MYSQL_TYPE_STRING) && (f).charsetnr ==
MYSQL_BINARY_CHARSET_NR)
- (f).type == MYSQL_TYPE_VAR_STRING || (f).type ==
MYSQL_TYPE_STRING)
#endif
-- Dale
--
- -- BuildSmart
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)
iD8DBQFG2CWK0hzWbkf0eKgRAuRsAJ92DTMONMIPvXktdkg5rv+qxMYfkgCgn7mL
Wgb8LWm6JBBGZzf/X5Kh1ys=
=iMCJ
-----END PGP SIGNATURE
Hi Dale,
BuildSmart wrote:
Hi,
BuildSmart wrote:Perhaps you could send the diff to the list, or better yet, an url
pointing to the place you uploaded the diff. And note: it should be
unified diff. (diff -u)I don't understand the intention of the changes? What was the problem?
Compile failures.
The original #if tests had the same data in #else, obviously the
original coder had the right intentions but forgot to check the data types.Things like MYSQL_TYPE_VARCHAR don't exist in 4.1.13 and below, I
checked the header files for 4.1.10 and 4.1.13 and removed the ones that
didn't exist.I can send you the header files if you wish?
Yes, please. I don't have that ancient MySQL 4.1 :)
I have tested with versions like 4.1.19, 20, 21
One of the files didn't check at all and it didn't compensate for the
mysql version differences so the check was added to correct this.
Greets,
Andrey
--Jani
A link to it:
http://daleenterprise.com/patches/mysql.diff
a unified diff:
diff -ur ext.orig/mysql/php_mysql.c ext/mysql/php_mysql.c
--- ext.orig/mysql/php_mysql.c 2007-08-06 11:11:46.000000000 -0400
+++ ext/mysql/php_mysql.c 2007-08-30 15:00:16.000000000 -0400
@@ -1977,11 +1977,9 @@
(f)->type == MYSQL_TYPE_VAR_STRING || (f)->type ==
MYSQL_TYPE_VARCHAR ||
(f)->type == MYSQL_TYPE_STRING)&& (f)->charsetnr ==
MYSQL_BINARY_CHARSET_NR)
#else
-#define IS_BINARY_DATA(f) (((f)->type == MYSQL_TYPE_TINY_BLOB ||
(f)->type == MYSQL_TYPE_BLOB ||
+#define IS_BINARY_DATA(f) ((f)->type == MYSQL_TYPE_TINY_BLOB ||
(f)->type == MYSQL_TYPE_BLOB ||
(f)->type == MYSQL_TYPE_MEDIUM_BLOB || (f)->type ==
MYSQL_TYPE_LONG_BLOB || \
- (f)->type == MYSQL_TYPE_VAR_STRING || \ (f)->type ==
MYSQL_TYPE_VARCHAR || \- (f)->type == MYSQL_TYPE_STRING)&& (f)->charsetnr ==
MYSQL_BINARY_CHARSET_NR)
- (f)->type == MYSQL_TYPE_VAR_STRING || (f)->type ==
MYSQL_TYPE_STRING)
#endif
/* {{{ php_mysql_fetch_hash
diff -ur ext.orig/mysqli/mysqli.c ext/mysqli/mysqli.c
--- ext.orig/mysqli/mysqli.c 2007-07-24 12:13:25.000000000 -0400
+++ ext/mysqli/mysqli.c 2007-08-30 15:01:02.000000000 -0400
@@ -947,11 +947,16 @@
#define MYSQL_BINARY_CHARSET_NR 63
+#if MYSQL_VERSION_ID > 50002 || defined(HAVE_MYSQLND)
#define IS_BINARY_DATA(f) (((f).type == MYSQL_TYPE_TINY_BLOB || (f).type
== MYSQL_TYPE_BLOB ||
(f).type == MYSQL_TYPE_MEDIUM_BLOB || (f).type ==
MYSQL_TYPE_LONG_BLOB ||
(f).type == MYSQL_TYPE_BIT || (f).type == MYSQL_TYPE_VAR_STRING ||
(f).type == MYSQL_TYPE_VARCHAR ||
(f).type == MYSQL_TYPE_STRING) && (f).charsetnr ==
MYSQL_BINARY_CHARSET_NR)
+#else
+#define IS_BINARY_DATA(f) ((f).type == MYSQL_TYPE_TINY_BLOB || (f).type
== MYSQL_TYPE_BLOB || \
- (f).type == MYSQL_TYPE_MEDIUM_BLOB || (f).type ==
MYSQL_TYPE_LONG_BLOB || \- (f).type == MYSQL_TYPE_VAR_STRING || (f).type == MYSQL_TYPE_STRING)
+#endif
/* {{{ php_mysqli_fetch_into_hash
/
diff -ur ext.orig/mysqli/mysqli_api.c ext/mysqli/mysqli_api.c
--- ext.orig/mysqli/mysqli_api.c 2007-07-24 12:13:26.000000000 -0400
+++ ext/mysqli/mysqli_api.c 2007-08-30 15:01:02.000000000 -0400
@@ -759,10 +759,9 @@
(f).type == MYSQL_TYPE_STRING) && (f).charsetnr ==
MYSQL_BINARY_CHARSET_NR)
#else
/ No BIT */
-#define IS_BINARY_DATA(f) (((f).type == MYSQL_TYPE_TINY_BLOB ||
(f).type == MYSQL_TYPE_BLOB ||
+#define IS_BINARY_DATA(f) ((f).type == MYSQL_TYPE_TINY_BLOB || (f).type
== MYSQL_TYPE_BLOB ||
(f).type == MYSQL_TYPE_MEDIUM_BLOB || (f).type ==
MYSQL_TYPE_LONG_BLOB || \
- (f).type == MYSQL_TYPE_VAR_STRING || (f).type ==
MYSQL_TYPE_VARCHAR ||\- (f).type == MYSQL_TYPE_STRING) && (f).charsetnr ==
MYSQL_BINARY_CHARSET_NR)
- (f).type == MYSQL_TYPE_VAR_STRING || (f).type == MYSQL_TYPE_STRING)
#endif
-- Dale
--
-- BuildSmart
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Dale,
BuildSmart wrote:Hi,
BuildSmart wrote:Perhaps you could send the diff to the list, or better yet, an url
pointing to the place you uploaded the diff. And note: it
should be
unified diff. (diff -u)I don't understand the intention of the changes? What was the
problem?Compile failures.
The original #if tests had the same data in #else, obviously the
original coder had the right intentions but forgot to check the
data types.Things like MYSQL_TYPE_VARCHAR don't exist in 4.1.13 and below, I
checked the header files for 4.1.10 and 4.1.13 and removed the
ones that
didn't exist.I can send you the header files if you wish?
Yes, please. I don't have that ancient MySQL 4.1 :)
I have tested with versions like 4.1.19, 20, 21
I've only checked the versions that are vendor supplied (for Darwin /
Mac OS X) 4.1.10, 4.1.13 and 5.0.24 so I couldn't tell you the
specific version that it comes into play, perhaps a check if they are
defined might be a direction to go rather than a version check unless
you can isolate the specific version where these appeared.
http://daleenterprise.com/patches/mysql_headers.tgz
One of the files didn't check at all and it didn't compensate for the
mysql version differences so the check was added to correct this.Greets,
Andrey--Jani
A link to it:
http://daleenterprise.com/patches/mysql.diff
a unified diff:
diff -ur ext.orig/mysql/php_mysql.c ext/mysql/php_mysql.c
--- ext.orig/mysql/php_mysql.c 2007-08-06 11:11:46.000000000
-0400
+++ ext/mysql/php_mysql.c 2007-08-30 15:00:16.000000000 -0400
@@ -1977,11 +1977,9 @@
(f)->type == MYSQL_TYPE_VAR_STRING || (f)->type ==
MYSQL_TYPE_VARCHAR ||
(f)->type == MYSQL_TYPE_STRING)&& (f)->charsetnr ==
MYSQL_BINARY_CHARSET_NR)
#else
-#define IS_BINARY_DATA(f) (((f)->type == MYSQL_TYPE_TINY_BLOB ||
(f)->type == MYSQL_TYPE_BLOB ||
+#define IS_BINARY_DATA(f) ((f)->type == MYSQL_TYPE_TINY_BLOB ||
(f)->type == MYSQL_TYPE_BLOB ||
(f)->type == MYSQL_TYPE_MEDIUM_BLOB || (f)->type ==
MYSQL_TYPE_LONG_BLOB || \
- (f)->type == MYSQL_TYPE_VAR_STRING || \ (f)->type ==
MYSQL_TYPE_VARCHAR || \- (f)->type == MYSQL_TYPE_STRING)&& (f)->charsetnr ==
MYSQL_BINARY_CHARSET_NR)
- (f)->type == MYSQL_TYPE_VAR_STRING || (f)->type ==
MYSQL_TYPE_STRING)
#endif
/* {{{ php_mysql_fetch_hash
diff -ur ext.orig/mysqli/mysqli.c ext/mysqli/mysqli.c
--- ext.orig/mysqli/mysqli.c 2007-07-24 12:13:25.000000000 -0400
+++ ext/mysqli/mysqli.c 2007-08-30 15:01:02.000000000 -0400
@@ -947,11 +947,16 @@
#define MYSQL_BINARY_CHARSET_NR 63
+#if MYSQL_VERSION_ID > 50002 || defined(HAVE_MYSQLND)
#define IS_BINARY_DATA(f) (((f).type == MYSQL_TYPE_TINY_BLOB ||
(f).type
== MYSQL_TYPE_BLOB ||
(f).type == MYSQL_TYPE_MEDIUM_BLOB || (f).type ==
MYSQL_TYPE_LONG_BLOB ||
(f).type == MYSQL_TYPE_BIT || (f).type ==
MYSQL_TYPE_VAR_STRING ||
(f).type == MYSQL_TYPE_VARCHAR ||
(f).type == MYSQL_TYPE_STRING) && (f).charsetnr ==
MYSQL_BINARY_CHARSET_NR)
+#else
+#define IS_BINARY_DATA(f) ((f).type == MYSQL_TYPE_TINY_BLOB ||
(f).type
== MYSQL_TYPE_BLOB || \
- (f).type == MYSQL_TYPE_MEDIUM_BLOB || (f).type ==
MYSQL_TYPE_LONG_BLOB || \- (f).type == MYSQL_TYPE_VAR_STRING || (f).type ==
MYSQL_TYPE_STRING)
+#endif
/* {{{ php_mysqli_fetch_into_hash
/
diff -ur ext.orig/mysqli/mysqli_api.c ext/mysqli/mysqli_api.c
--- ext.orig/mysqli/mysqli_api.c 2007-07-24
12:13:26.000000000 -0400
+++ ext/mysqli/mysqli_api.c 2007-08-30 15:01:02.000000000 -0400
@@ -759,10 +759,9 @@
(f).type == MYSQL_TYPE_STRING) && (f).charsetnr ==
MYSQL_BINARY_CHARSET_NR)
#else
/ No BIT */
-#define IS_BINARY_DATA(f) (((f).type == MYSQL_TYPE_TINY_BLOB ||
(f).type == MYSQL_TYPE_BLOB ||
+#define IS_BINARY_DATA(f) ((f).type == MYSQL_TYPE_TINY_BLOB ||
(f).type
== MYSQL_TYPE_BLOB ||
(f).type == MYSQL_TYPE_MEDIUM_BLOB || (f).type ==
MYSQL_TYPE_LONG_BLOB || \
- (f).type == MYSQL_TYPE_VAR_STRING || (f).type ==
MYSQL_TYPE_VARCHAR ||\- (f).type == MYSQL_TYPE_STRING) && (f).charsetnr ==
MYSQL_BINARY_CHARSET_NR)
- (f).type == MYSQL_TYPE_VAR_STRING || (f).type ==
MYSQL_TYPE_STRING)
#endif
-- Dale
--
-- BuildSmart
- -- Dale
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)
iD8DBQFG2IJD0hzWbkf0eKgRAh9lAJ9fBNIBvYsfxGeSeXoTBDPLVcwT5gCfQ9nk
ooSXEThB5v/U9jCxnhCTS9I=
=f34o
-----END PGP SIGNATURE