On Sun, Dec 09, 2007 at 02:55:13PM +0100, Fabian Groffen wrote: > 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...
Sounds like a good idea. Lets up the protocol, its slightly changed, the &2 now gets 2 values, ie a rowcount and a last_id. Niels > > > > 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 > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins > > ------------------------------------------------------------------------- > 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-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/monetdb-developers -- Niels Nes, Centre for Mathematics and Computer Science (CWI) Kruislaan 413, 1098 SJ Amsterdam, The Netherlands room C0.02, phone ++31 20 592-4098, fax ++31 20 592-4312 url: http://www.cwi.nl/~niels e-mail: [EMAIL PROTECTED] ------------------------------------------------------------------------- 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-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-developers
