Update of /cvsroot/monetdb/clients/src/mapilib
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16047
Modified Files:
Mapi.mx
Log Message:
switched to smaller type ids (int). Last_id should return a 64 bit id,
but that currently gives to many config problems.
Index: Mapi.mx
===================================================================
RCS file: /cvsroot/monetdb/clients/src/mapilib/Mapi.mx,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- Mapi.mx 9 Dec 2007 13:39:35 -0000 1.28
+++ Mapi.mx 9 Dec 2007 13:49:12 -0000 1.29
@@ -436,7 +436,7 @@
If possible, return the number of rows in the last select call. A -1
is returned if this information is not available.
[EMAIL PROTECTED] mapi_int64 mapi_get_last_id(Mapi mid)
[EMAIL PROTECTED] int mapi_get_last_id(Mapi mid)
If possible, return the last inserted id of auto_increment (or alike) column.
A -1 is returned if this information is not available. We restrict this to
@@ -926,7 +926,7 @@
int tableid; /* SQL id of current result set */
int querytype; /* type of SQL query */
int row_count;
- mapi_int64 last_id;
+ int last_id;
int fieldcnt;
int maxfields;
char *errorstr; /* error from server */
@@ -1022,16 +1022,6 @@
#define mapi_export extern
#endif
-#ifdef HAVE_LONG_LONG
-typedef unsigned long long mapi_uint64;
-typedef long long mapi_int64;
-#else
-#ifdef HAVE___INT64
-typedef unsigned __int64 mapi_uint64;
-typedef __int64 mapi_int64;
-#endif
-#endif
-
/* three structures used for communicating date/time information */
/* these structs are deliberately compatible with the ODBC versions
SQL_DATE_STRUCT, SQL_TIME_STRUCT, and SQL_TIMESTAMP_STRUCT */
@@ -1126,7 +1116,7 @@
mapi_export int mapi_fetch_all_rows(MapiHdl hdl);
mapi_export int mapi_get_field_count(MapiHdl hdl);
mapi_export int mapi_get_row_count(MapiHdl hdl);
-mapi_export mapi_int64 mapi_get_last_id(MapiHdl hdl);
+mapi_export int mapi_get_last_id(MapiHdl hdl);
mapi_export int mapi_rows_affected(MapiHdl hdl);
mapi_export char *mapi_fetch_field(MapiHdl hdl, int fnr);
@@ -1180,6 +1170,16 @@
static int mapi_initialized = 0;
+#ifdef HAVE_LONG_LONG
+typedef unsigned long long mapi_uint64;
+typedef long long mapi_int64;
+#else
+#ifdef HAVE___INT64
+typedef unsigned __int64 mapi_uint64;
+typedef __int64 mapi_int64;
+#endif
+#endif
+
#define check_stream(mid,s,msg,f,e) \
do { \
if ((s) == NULL || stream_errnr(s)) { \
@@ -4780,7 +4780,7 @@
return hdl->result ? hdl->result->row_count : 0;
}
-mapi_int64
+int
mapi_get_last_id(MapiHdl hdl)
{
mapi_hdl_check(hdl, "mapi_get_last_id");
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins