Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL++ - Programming with the C++ API to MySQL
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
DBD-mysql use of "long long " breaks win32 builds

DBD-mysql use of "long long " breaks win32 builds

2005-04-12       - By Philippe M. Chiasson

 Back
my_ulonglong does correctly map to 'long long' or __int64 on win32 platforms.

The following patch fixes compilation failures on win32:

Index: DBD-mysql/dbdimp.c
--- DBD-mysql/dbdimp.c.~1~   Tue Apr 12 14:57:28 2005
+++ DBD-mysql/dbdimp.c   Tue Apr 12 14:57:28 2005
@@ -1716,7 +1716,7 @@
    else
      rows= mysql_num_rows(*cdaPtr);

-    if ((long long)rows == -1)
+    if ((my_ulonglong)rows == -1)
    {
      if (dbis->debug >= 2)
     PerlIO_printf(DBILOGFP,
@@ -1796,7 +1796,7 @@
         imp_sth->row_num);
    }

-    if ((long long) imp_sth->row_num == -1)
+    if ((my_ulonglong) imp_sth->row_num == -1)
      return -1;
    else
      return (int) imp_sth->row_num;
Index: DBD-mysql/mysql.xs
--- DBD-mysql/mysql.xs.~1~   Tue Apr 12 14:57:28 2005
+++ DBD-mysql/mysql.xs   Tue Apr 12 14:57:28 2005
@@ -300,7 +300,7 @@
  /* fix to make rows able to handle errors and handle max value from
     affected rows
  */
-  if ((long long)imp_sth->row_num ==  -1)
+  if ((my_ulonglong)imp_sth->row_num ==  -1)
    sprintf(buf, "%d", -1);
  else
    sprintf(buf, "%llu", imp_sth->row_num);

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5