On 09-12-2007 13:14:22 +0000, Niels Nes wrote:
Update of /cvsroot/monetdb/sql/src/backends/monet4 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1301/src/backends/monet4
Modified Files: sql_result.mx Log Message: output the last_id (the last inserted value in a auto_increment column)
Shouldn't we upgrade the protocol version for this? If I "fix" JDBC to use it now, it will crash on a server not sending this extra value...
Index: sql_result.mx =================================================================== RCS file: /cvsroot/monetdb/sql/src/backends/monet4/sql_result.mx,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- sql_result.mx 3 Dec 2007 08:51:13 -0000 1.70 +++ sql_result.mx 9 Dec 2007 13:14:20 -0000 1.71 @@ -956,12 +956,12 @@ */ if (!s) return 0;
-#ifdef NDEBUG - (void) m; /* pacify compiler in case asserts are disabled */ -#endif assert(m->type == Q_UPDATE); - if (stream_write(s, "&2 ", 3, 1) != 1 || !mvc_send_lng(s, val) || - stream_write(s, "\n", 1, 1) != 1) + if (stream_write(s, "&2 ", 3, 1) != 1 || + !mvc_send_lng(s, val) || + stream_write(s, " ", 1, 1) != 1 || + !mvc_send_lng(s, m->last_id) || + stream_write(s, "\n", 1, 1) != 1) return -1; if (mvc_export_warning(s, w) != 1) return -1;
------------------------------------------------------------------------- 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-sql-checkins mailing list Monetdb-sql-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins