summaryrefslogtreecommitdiffstats
path: root/myodbc/myodbc-64bit.patch
blob: ac62d816a28ddebb1d3a6778d5c6f7a27646d6d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Fix some 64-bitness issues arising from unixODBC 2.2.14 changes.


diff -Naur mysql-connector-odbc-5.1.8.orig/driver/utility.c mysql-connector-odbc-5.1.8/driver/utility.c
--- mysql-connector-odbc-5.1.8.orig/driver/utility.c	2010-10-28 14:33:18.000000000 -0400
+++ mysql-connector-odbc-5.1.8/driver/utility.c	2010-12-23 17:15:37.516602586 -0500
@@ -1205,7 +1205,7 @@
 {
   /* See comment for fill_transfer_oct_len_buff()*/
   SQLLEN size= get_display_size(stmt, field);
-  sprintf(buff,size == SQL_NO_TOTAL ? "%d" : (sizeof(SQLLEN) == 4 ? "%lu" : "%lld"), size);
+  sprintf(buff, (size == SQL_NO_TOTAL ? "%ld" : "%lu"), size);
 
   return size;
 }
@@ -1228,7 +1228,7 @@
   */
   SQLLEN len= get_transfer_octet_length(stmt, field);
 
-  sprintf(buff, len == SQL_NO_TOTAL ? "%d" : (sizeof(SQLLEN) == 4 ? "%lu" : "%lld"), len );
+  sprintf(buff, (len == SQL_NO_TOTAL ? "%ld" : "%lu"), len );
 
   return len;
 }
@@ -1245,8 +1245,7 @@
 SQLULEN fill_column_size_buff(char *buff, STMT *stmt, MYSQL_FIELD *field)
 {
   SQLULEN size= get_column_size(stmt, field);
-  sprintf(buff, (size== SQL_NO_TOTAL ? "%d" :
-      (sizeof(SQLULEN) == 4 ? "%lu" : "%llu")), size);
+  sprintf(buff, (size== SQL_NO_TOTAL ? "%ld" : "%lu"), size);
   return size;
 }
 
diff -Naur mysql-connector-odbc-5.1.8.orig/test/my_catalog.c mysql-connector-odbc-5.1.8/test/my_catalog.c
--- mysql-connector-odbc-5.1.8.orig/test/my_catalog.c	2010-10-28 14:33:18.000000000 -0400
+++ mysql-connector-odbc-5.1.8/test/my_catalog.c	2010-12-23 17:16:26.284605944 -0500
@@ -599,7 +599,7 @@
     fprintf(stdout, "#  Column Name   : %s\n", szColName);
     fprintf(stdout, "#  NameLengh     : %d\n", pcbColName);
     fprintf(stdout, "#  DataType      : %d\n", pfSqlType);
-    fprintf(stdout, "#  ColumnSize    : %d\n", pcbColDef);
+    fprintf(stdout, "#  ColumnSize    : %ld\n", pcbColDef);
     fprintf(stdout, "#  DecimalDigits : %d\n", pibScale);
     fprintf(stdout, "#  Nullable      : %d\n", pfNullable);
 
@@ -632,7 +632,7 @@
 
     rc = SQLGetConnectAttr(hdbc, SQL_ATTR_CURRENT_CATALOG, db, sizeof(db), &len);
     mycon(hdbc,rc);
-    fprintf(stdout,"current_catalog: %s (%ld)\n", db, len);
+    fprintf(stdout,"current_catalog: %s (%d)\n", db, len);
     is_num(len, 4);
     is_str(db, "test", 5);
 
@@ -653,7 +653,7 @@
 
     rc = SQLGetConnectAttr(hdbc, SQL_ATTR_CURRENT_CATALOG, db, 255, &len);
     mycon(hdbc,rc);
-    fprintf(stdout,"current_catalog: %s (%ld)\n", db, len);
+    fprintf(stdout,"current_catalog: %s (%d)\n", db, len);
     is_num(len, 17);
     is_str(db, cur_db, 18);
 
diff -Naur mysql-connector-odbc-5.1.8.orig/test/my_cursor.c mysql-connector-odbc-5.1.8/test/my_cursor.c
--- mysql-connector-odbc-5.1.8.orig/test/my_cursor.c	2010-10-28 14:33:18.000000000 -0400
+++ mysql-connector-odbc-5.1.8/test/my_cursor.c	2010-12-23 17:12:16.632676933 -0500
@@ -711,7 +711,7 @@
 
     rc = SQLRowCount(hstmt1,&row_count);
     mystmt(hstmt1,rc);
-    fprintf(stdout, "rows affected: %d\n", row_count);
+    fprintf(stdout, "rows affected: %ld\n", row_count);
     myassert(row_count == 1);
 
     rc = SQLExtendedFetch(hstmt,SQL_FETCH_NEXT,1,NULL,&rgfRowStatus);
@@ -732,7 +732,7 @@
 
     rc = SQLRowCount(hstmt1,&row_count);
     mystmt(hstmt1,rc);
-    fprintf(stdout, "rows affected: %d\n", row_count);
+    fprintf(stdout, "rows affected: %ld\n", row_count);
     myassert(row_count == 1);
 
     SQLFreeStmt(hstmt,SQL_UNBIND);