Error building dbdimp.c

Error building dbdimp.c

am 14.12.2005 12:46:24 von Martin.Evans

Just tried to build 30002_4 on Linux with gcc 2.95.3 and it fails because:

o there is an ifdef which is really a test
o there is a variable declared half way down a function

Patch below fixes:


bash-2.05$ diff -u dbdimp.c /tmp/dbdimp.c.mysql30002_4
--- dbdimp.c Sun Nov 6 21:32:01 2005
+++ /tmp/dbdimp.c.mysql30002_4 Wed Dec 14 11:41:25 2005
@@ -260,7 +260,7 @@
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_TINY_BLOB:
-#ifdef MYSQL_VERSION_ID > NEW_DATATYPE_VERSION
+#if (MYSQL_VERSION_ID > NEW_DATATYPE_VERSION)
case MYSQL_TYPE_GEOMETRY:
#endif
case MYSQL_TYPE_TIMESTAMP:
@@ -2530,7 +2530,9 @@
}
else
{
- /*if (dbis->debug >= 2)
+ int num_fields;
+
+ /*if (dbis->debug >= 2)
PerlIO_printf(DBILOGFP,
" <- dbd_st_more_rows use_mysql_use_result=%d\n",
use_mysql_use_result);
@@ -2570,7 +2572,7 @@

/** Store the result in the current statement handle */
DBIc_ACTIVE_on(imp_sth);
- int num_fields=mysql_num_fields(imp_sth->result);
+ num_fields=mysql_num_fields(imp_sth->result);

DBIc_NUM_FIELDS(imp_sth) = num_fields;


Martin
--
Martin J. Evans
Easysoft Ltd, UK
Development


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org