Resolved PHP 4.0 Bug #6073: mysql_field_type()

From: Date: Fri, 12 Jan 2001 05:14:33 +0000
Subject: Resolved PHP 4.0 Bug #6073: mysql_field_type()
Groups: php.dev 
Request: Send a blank email to php-dev+get-43830@lists.php.net to get a copy of this message
Hi there. This patch should fix Bug #6073. Sometime before 3.21.33 the FIELD_TYPE_TINY define was removed from mysql_com.h and #ifdefs don't work if FIELD_TYPE_TINY is part of the enum. The version number is not exact, but this is the earliest version of mysql I could find anywhere. Could someone apply this and close off the bug? Thanks, Sean ====================================== Sean Bright elixer@erols.com / sean@seanbright.com ====================================== --- php_mysql.c.orig Thu Jan 11 23:46:05 2001 +++ php_mysql.c Fri Jan 12 00:12:32 2001 @@ -73,6 +73,10 @@ # endif #endif +#if MYSQL_VERSION_ID > 32133 || defined(FIELD_TYPE_TINY) +#define MYSQL_HAS_TINY +#endif + #define MYSQL_ASSOC 1<<0 #define MYSQL_NUM 1<<1 #define MYSQL_BOTH (MYSQL_ASSOC|MYSQL_NUM) @@ -1528,7 +1532,7 @@ case FIELD_TYPE_VAR_STRING: return "string"; break; -#ifdef FIELD_TYPE_TINY +#ifdef MYSQL_HAS_TINY case FIELD_TYPE_TINY: #endif case FIELD_TYPE_SHORT:

« previous php.dev (#43830) next »