Re: [Monetdb-developers] possible bug regarding auto-commit mixing with start transaction?
Hi, Alexandru Toth wrote:
Hi,
Not in console. But if you create a file , it will show up with command line bellow.
mclient -lsql -umonetdb 1.sql Confirmed.
Or, is Mac OS -speciffic ? No, also on Linux PC.
You assume here that auto-commit is re-enabled when the statements fall outside the transaction brackets. The mode change and the consequences should be clearly documented in Mapi. It may indeed be useful to fall-back to auto-commit outside explicit transaction boundaries. regards, Martin
BR, Alex
On May 22, 2007, at 11:43 PM, Martin Kersten wrote:
Hi,
Bug not confirmed on my Linux PC using direct execution at the console, nor using MapiClient.
% sys.tbl_xy, sys.tbl_xy # table_name % x, y # name % int, int # type % 2, 4 # length [ 0, 0 ] [ 1, 1 ] [ 2, 2 ] [ 3, 3 ] [ 4, 4 ] [ 5, 5 ] [ 6, 6 ] [ 7, 7 ] [ -1, -100 ] [ 8, 8 ] [ 9, 9 ] [ 10, 10 ]
Alexandru Toth wrote:
Hi, Test script bellow has few transactions, and statements outside any transaction which are not executed (INSERT negative numbers, easy to spot). Is this a bug? Both MySQL and SQLite inserts the row with negative numbers (after replacing "start transaction" with "begin"). Save the script bellow as 1.sql ----------------- start transaction; create table tbl_xy (x int , y int); insert into tbl_xy values (0,0); insert into tbl_xy values (1,1); commit; start transaction; insert into tbl_xy values (2,2); insert into tbl_xy values (3,3); insert into tbl_xy values (4,4); commit; start transaction; insert into tbl_xy values (5,5); insert into tbl_xy values (6,6); insert into tbl_xy values (7,7); commit; insert into tbl_xy values (-1, -100); start transaction; insert into tbl_xy values (8,8); insert into tbl_xy values (9,9); insert into tbl_xy values (10,10); commit; ---------------- Execution of script: macu:~/Desktop alex$ mclient -lsql -umonetdb ~/Desktop/1.sql [ 1 ] [ 1 ] [ 1 ] [ 1 ] [ 1 ] [ 1 ] [ 1 ] [ 1 ] [ 1 ] [ 1 ] [ 1 ] [ 1 ] -------------------- Looking for negative numbers, none found: macu:~/Desktop alex$ mclient -lsql -umonetdb sql>select * from tbl_xy; % sys.tbl_xy, sys.tbl_xy # table_name % x, y # name % int, int # type % 2, 2 # length [ 0, 0 ] [ 1, 1 ] [ 2, 2 ] [ 3, 3 ] [ 4, 4 ] [ 5, 5 ] [ 6, 6 ] [ 7, 7 ] [ 8, 8 ] [ 9, 9 ] [ 10, 10 ] Version: MonetDB Server v5.0.0_beta2_1 BR, Alex
Hello,
You assume here that auto-commit is re-enabled when the statements fall outside the transaction brackets. The mode change and the consequences should be clearly documented in Mapi. It may indeed be useful to fall-back to auto-commit outside explicit transaction boundaries.
regards, Martin
It is indeed a "SQL style error" to forget the start transaction + commit around some statements. But the same script runs fine in mysql, postgres and sqlite. Would it be possible to fall-back to auto- commit, or to generate an error message? Monet behavior is not intuitive, and it would be hard to find in the documentation. BR, Alex
On Wed, May 23, 2007 at 08:09:15AM +0300, Alexandru Toth wrote:
Hello,
You assume here that auto-commit is re-enabled when the statements fall outside the transaction brackets. The mode change and the consequences should be clearly documented in Mapi. It may indeed be useful to fall-back to auto-commit outside explicit transaction boundaries.
regards, Martin
It is indeed a "SQL style error" to forget the start transaction + commit around some statements. But the same script runs fine in mysql, postgres and sqlite. Would it be possible to fall-back to auto- commit, or to generate an error message? Monet behavior is not intuitive, and it would be hard to find in the documentation. Its clearly a bug. Could you report it as such on the sourceforge bugtracker?
Niels
BR, Alex
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net 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: Niels.Nes@cwi.nl
participants (3)
-
Alexandru Toth
-
Martin Kersten
-
Niels Nes