Changeset: d4eb822dfa01 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d4eb822dfa01
Modified Files:
Branch: default
Log Message:
Merge with Jun2010 branch.
diffs (141 lines):
diff -r 8563aa91e7a3 -r d4eb822dfa01 clients/src/odbc/driver/ODBCStmt.h
--- a/clients/src/odbc/driver/ODBCStmt.h Mon Jul 19 16:41:53 2010 +0200
+++ b/clients/src/odbc/driver/ODBCStmt.h Mon Jul 19 16:42:26 2010 +0200
@@ -80,9 +80,9 @@
set (0 based); rowSetSize is the number of rows in the
current result set; currentRow is the row number of the
current row within the current result set */
- SQLROWOFFSET currentRow;
- SQLROWOFFSET startRow;
- SQLROWOFFSET rowSetSize;
+ SQLLEN currentRow;
+ SQLLEN startRow;
+ SQLLEN rowSetSize;
unsigned int currentCol; /* used by SQLGetData() */
SQLINTEGER retrieved; /* amount of data retrieved */
diff -r 8563aa91e7a3 -r d4eb822dfa01 clients/src/odbc/driver/SQLExtendedFetch.c
--- a/clients/src/odbc/driver/SQLExtendedFetch.c Mon Jul 19 16:41:53
2010 +0200
+++ b/clients/src/odbc/driver/SQLExtendedFetch.c Mon Jul 19 16:42:26
2010 +0200
@@ -42,8 +42,12 @@
SQLRETURN SQL_API
SQLExtendedFetch(SQLHSTMT hStmt,
SQLUSMALLINT nOrientation,
- SQLROWOFFSET nOffset,
- SQLROWSETSIZE *pnRowCount,
+ SQLLEN nOffset,
+#ifdef BUILD_REAL_64_BIT_MODE /* note: only defined on Debian Lenny */
+ SQLUINTEGER *pnRowCount,
+#else
+ SQLULEN *pnRowCount,
+#endif
SQLUSMALLINT *pRowStatusArray)
{
ODBCStmt *stmt = (ODBCStmt *) hStmt;
@@ -81,8 +85,13 @@
if (SQL_SUCCEEDED(rc) || rc == SQL_NO_DATA)
stmt->State = EXTENDEDFETCHED;
- if (SQL_SUCCEEDED(rc) && pnRowCount)
+ if (SQL_SUCCEEDED(rc) && pnRowCount) {
+#ifdef BUILD_REAL_64_BIT_MODE /* note: only defined on Debian Lenny */
+ *pnRowCount = (SQLUINTEGER) stmt->rowSetSize;
+#else
*pnRowCount = (SQLULEN) stmt->rowSetSize;
+#endif
+ }
return rc;
}
diff -r 8563aa91e7a3 -r d4eb822dfa01 clients/src/odbc/driver/SQLFetch.c
--- a/clients/src/odbc/driver/SQLFetch.c Mon Jul 19 16:41:53 2010 +0200
+++ b/clients/src/odbc/driver/SQLFetch.c Mon Jul 19 16:42:26 2010 +0200
@@ -77,7 +77,7 @@
updating the SQL_DESC_ARRAY_STATUS_PTR */
stmt->rowSetSize = desc->sql_desc_array_size;
- if (stmt->startRow + stmt->rowSetSize > (SQLROWOFFSET)
stmt->rowcount)
+ if (stmt->startRow + stmt->rowSetSize > (SQLLEN) stmt->rowcount)
stmt->rowSetSize = stmt->rowcount - stmt->startRow;
if (stmt->rowSetSize <= 0) {
@@ -85,7 +85,7 @@
return SQL_NO_DATA;
}
if (statusp) {
- for (row = 0; (SQLROWOFFSET) row < stmt->rowSetSize;
row++)
+ for (row = 0; (SQLLEN) row < stmt->rowSetSize; row++)
*statusp++ = SQL_ROW_SUCCESS;
for (; row < desc->sql_desc_array_size; row++)
*statusp++ = SQL_ROW_NOROW;
diff -r 8563aa91e7a3 -r d4eb822dfa01 clients/src/odbc/driver/SQLFetchScroll.c
--- a/clients/src/odbc/driver/SQLFetchScroll.c Mon Jul 19 16:41:53 2010 +0200
+++ b/clients/src/odbc/driver/SQLFetchScroll.c Mon Jul 19 16:42:26 2010 +0200
@@ -45,7 +45,7 @@
SQLRETURN
SQLFetchScroll_(ODBCStmt *stmt,
SQLSMALLINT FetchOrientation,
- SQLROWOFFSET FetchOffset)
+ SQLLEN FetchOffset)
{
assert(stmt->hdl);
@@ -62,7 +62,7 @@
switch (FetchOrientation) {
case SQL_FETCH_NEXT:
- if (stmt->currentRow >= (SQLROWOFFSET) stmt->rowcount) {
+ if (stmt->currentRow >= (SQLLEN) stmt->rowcount) {
stmt->State = FETCHED;
return SQL_NO_DATA;
}
@@ -84,7 +84,7 @@
stmt->State = FETCHED;
return SQL_NO_DATA;
}
- if (stmt->startRow < (SQLROWOFFSET) RowSetSize) {
+ if (stmt->startRow < (SQLLEN) RowSetSize) {
/* Attempt to fetch before the result set
returned the first rowset */
addStmtError(stmt, "01S06", NULL, 0);
@@ -94,7 +94,7 @@
break;
case SQL_FETCH_RELATIVE:
if ((stmt->currentRow != 0 || FetchOffset <= 0) &&
- (stmt->currentRow != (SQLROWOFFSET) stmt->rowcount ||
FetchOffset >= 0)) {
+ (stmt->currentRow != (SQLLEN) stmt->rowcount || FetchOffset
>= 0)) {
if ((stmt->currentRow == 0 && FetchOffset <= 0) ||
(stmt->startRow == 0 && FetchOffset < 0) ||
(stmt->startRow > 0 &&
@@ -114,8 +114,8 @@
addStmtError(stmt, "01S06", NULL, 0);
break;
}
- if (stmt->startRow + FetchOffset >= (SQLROWOFFSET)
stmt->rowcount ||
- stmt->currentRow == (SQLROWOFFSET) stmt->rowcount) {
+ if (stmt->startRow + FetchOffset >= (SQLLEN)
stmt->rowcount ||
+ stmt->currentRow == (SQLLEN) stmt->rowcount) {
stmt->startRow = stmt->rowcount;
stmt->State = FETCHED;
return SQL_NO_DATA;
@@ -169,7 +169,7 @@
SQLRETURN SQL_API
SQLFetchScroll(SQLHSTMT hStmt,
SQLSMALLINT FetchOrientation,
- SQLROWOFFSET FetchOffset)
+ SQLLEN FetchOffset)
{
ODBCStmt *stmt = (ODBCStmt *) hStmt;
diff -r 8563aa91e7a3 -r d4eb822dfa01 clients/src/odbc/samples/Makefile.ag
--- a/clients/src/odbc/samples/Makefile.ag Mon Jul 19 16:41:53 2010 +0200
+++ b/clients/src/odbc/samples/Makefile.ag Mon Jul 19 16:42:26 2010 +0200
@@ -21,7 +21,7 @@
BINS = {
DIR = libdir/MonetDB/Tests
SOURCES = odbcsample1.c testgetinfo.c
- LIBS = ../driver/libMonetODBC
+ LIBS = ../driver/libMonetODBC ../../mapilib/libMapi
}
bin_odbctest = {
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list