|
|
f037f8 |
Fix some 64-bitness issues arising from unixODBC 2.2.14 changes.
|
|
|
f037f8 |
|
|
|
f037f8 |
diff -up mysql-connector-odbc-5.2.4-src/driver/utility.c.p3 mysql-connector-odbc-5.2.4-src/driver/utility.c
|
|
|
f037f8 |
--- mysql-connector-odbc-5.2.4-src/driver/utility.c.p3 2013-01-24 18:43:33.000000000 +0100
|
|
|
f037f8 |
+++ mysql-connector-odbc-5.2.4-src/driver/utility.c 2013-02-22 13:22:14.142767103 +0100
|
|
|
f037f8 |
@@ -1219,7 +1219,7 @@ SQLLEN fill_display_size_buff(char *buff
|
|
|
f037f8 |
{
|
|
|
f037f8 |
/* See comment for fill_transfer_oct_len_buff()*/
|
|
|
f037f8 |
SQLLEN size= get_display_size(stmt, field);
|
|
|
f037f8 |
- sprintf(buff,size == SQL_NO_TOTAL ? "%d" : (sizeof(SQLLEN) == 4 ? "%lu" : "%lld"), size);
|
|
|
f037f8 |
+ sprintf(buff, (size == SQL_NO_TOTAL ? "%ld" : "%lu"), size);
|
|
|
f037f8 |
|
|
|
f037f8 |
return size;
|
|
|
f037f8 |
}
|
|
|
f037f8 |
@@ -1242,7 +1242,7 @@ SQLLEN fill_transfer_oct_len_buff(char *
|
|
|
f037f8 |
*/
|
|
|
f037f8 |
SQLLEN len= get_transfer_octet_length(stmt, field);
|
|
|
f037f8 |
|
|
|
f037f8 |
- sprintf(buff, len == SQL_NO_TOTAL ? "%d" : (sizeof(SQLLEN) == 4 ? "%lu" : "%lld"), len );
|
|
|
f037f8 |
+ sprintf(buff, (len == SQL_NO_TOTAL ? "%ld" : "%lu"), len );
|
|
|
f037f8 |
|
|
|
f037f8 |
return len;
|
|
|
f037f8 |
}
|
|
|
f037f8 |
@@ -1259,8 +1259,7 @@ SQLLEN fill_transfer_oct_len_buff(char *
|
|
|
f037f8 |
SQLULEN fill_column_size_buff(char *buff, STMT *stmt, MYSQL_FIELD *field)
|
|
|
f037f8 |
{
|
|
|
f037f8 |
SQLULEN size= get_column_size(stmt, field);
|
|
|
f037f8 |
- sprintf(buff, (size== SQL_NO_TOTAL ? "%d" :
|
|
|
f037f8 |
- (sizeof(SQLULEN) == 4 ? "%lu" : "%llu")), size);
|
|
|
f037f8 |
+ sprintf(buff, (size== SQL_NO_TOTAL ? "%ld" : "%lu"), size);
|
|
|
f037f8 |
return size;
|
|
|
f037f8 |
}
|
|
|
f037f8 |
|
|
|
f037f8 |
diff -up mysql-connector-odbc-5.2.4-src/test/my_catalog1.c.p3 mysql-connector-odbc-5.2.4-src/test/my_catalog1.c
|
|
|
f037f8 |
--- mysql-connector-odbc-5.2.4-src/test/my_catalog1.c.p3 2013-02-22 13:23:30.260761898 +0100
|
|
|
f037f8 |
+++ mysql-connector-odbc-5.2.4-src/test/my_catalog1.c 2013-02-22 13:25:08.554755176 +0100
|
|
|
f037f8 |
@@ -623,7 +623,7 @@ DECLARE_TEST(t_tables_bug)
|
|
|
f037f8 |
fprintf(stdout, "# Column Name : %s\n", szColName);
|
|
|
f037f8 |
fprintf(stdout, "# NameLengh : %d\n", pcbColName);
|
|
|
f037f8 |
fprintf(stdout, "# DataType : %d\n", pfSqlType);
|
|
|
f037f8 |
- fprintf(stdout, "# ColumnSize : %d\n", pcbColDef);
|
|
|
f037f8 |
+ fprintf(stdout, "# ColumnSize : %ld\n", pcbColDef);
|
|
|
f037f8 |
fprintf(stdout, "# DecimalDigits : %d\n", pibScale);
|
|
|
f037f8 |
fprintf(stdout, "# Nullable : %d\n", pfNullable);
|
|
|
f037f8 |
|
|
|
f037f8 |
diff -up mysql-connector-odbc-5.2.4-src/test/my_cursor.c.p3 mysql-connector-odbc-5.2.4-src/test/my_cursor.c
|
|
|
f037f8 |
--- mysql-connector-odbc-5.2.4-src/test/my_cursor.c.p3 2013-01-24 18:43:33.000000000 +0100
|
|
|
f037f8 |
+++ mysql-connector-odbc-5.2.4-src/test/my_cursor.c 2013-02-22 13:22:16.812766920 +0100
|
|
|
f037f8 |
@@ -711,7 +711,7 @@ DECLARE_TEST(t_pos_datetime_delete1)
|
|
|
f037f8 |
|
|
|
f037f8 |
rc = SQLRowCount(hstmt1,&row_count);
|
|
|
f037f8 |
mystmt(hstmt1,rc);
|
|
|
f037f8 |
- fprintf(stdout, "rows affected: %d\n", row_count);
|
|
|
f037f8 |
+ fprintf(stdout, "rows affected: %ld\n", row_count);
|
|
|
f037f8 |
myassert(row_count == 1);
|
|
|
f037f8 |
|
|
|
f037f8 |
rc = SQLExtendedFetch(hstmt,SQL_FETCH_NEXT,1,NULL,&rgfRowStatus);
|
|
|
f037f8 |
@@ -732,7 +732,7 @@ DECLARE_TEST(t_pos_datetime_delete1)
|
|
|
f037f8 |
|
|
|
f037f8 |
rc = SQLRowCount(hstmt1,&row_count);
|
|
|
f037f8 |
mystmt(hstmt1,rc);
|
|
|
f037f8 |
- fprintf(stdout, "rows affected: %d\n", row_count);
|
|
|
f037f8 |
+ fprintf(stdout, "rows affected: %ld\n", row_count);
|
|
|
f037f8 |
myassert(row_count == 1);
|
|
|
f037f8 |
|
|
|
f037f8 |
SQLFreeStmt(hstmt,SQL_UNBIND);
|