Feature Requests item #2871572, was opened at 2009-10-02 00:53 Message generated for change (Settings changed) made by mr-meltdown You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482471&aid=2871572&group_id=56967
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: None >Group: None Status: Open Priority: 5 Private: No Submitted By: Stefan de Konink (skinkie) Assigned to: Niels Nes (nielsnes) >Summary: mclient: QUERY does not report the actual query on error Initial Comment: While loading: http://mirror.openstreetmap.nl/knmi/KNMI.sql I see: MAPI = mone...@localhost:50001 QUERY = # DEZE GEGEVENS MOGEN VRIJ WORDEN GEBRUIKT MITS DE VOLGENDE BRONVERMELDING WORDT GEGEVEN: # KONINKLIJK NEDERLANDS METEOROLOGISCH INSTITUUT (KNMI) # # THESE DATA CAN BE USED FREELY PROVIDED THAT THE FOLLOWING SOURCE IS ACKNOWLEDGED: # ROYAL NETHERLANDS METEOROLOGICAL INSTITUTE # DROP TABLE stations; CREATE TABLE stations (stationid integer, long decimal(5,2), lat decimal(5,2), altitude smallint, name varchar(128), primary key(stationid)); COPY 36 RECORDS INTO stations from stdin USING DELIMITERS '\t', '\n' ERROR = !DROP TABLE: no such table 'stations' Obviously the right query is not selected. ---------------------------------------------------------------------- >Comment By: Fabian (mr-meltdown) Date: 2009-10-02 13:00 Message: Turning this one into a feature request again. After talking to Stefan (dK) it seems that what he expects as output would be: MAPI = mone...@localhost:50001 QUERY = DROP TABLE stations; ERROR = !DROP TABLE: no such table 'stations' This is just the conclusion I made earlier in this bug. We will have to make separate bugs for all issues encountered here that we noticed, as per the "one issue per bug is enough" rule. ---------------------------------------------------------------------- Comment By: Fabian (mr-meltdown) Date: 2009-10-02 11:34 Message: the server actually crashes even ---------------------------------------------------------------------- Comment By: Fabian (mr-meltdown) Date: 2009-10-02 11:34 Message: with -i: % $INSTALL_DIR/bin/mclient -i -dslave ~/tmp/KNMI.sql Welcome to mclient, the MonetDB/SQL interactive terminal Database: MonetDB v5.16.0, 'slave' Type \q to quit, \? for a list of available commands auto commit mode: on DROP TABLE: no such table 'stations' DROP TABLE: no such table 'stations' MALException:!ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument ERROR: madvise on (&b->T->heap) tb failed. OS: Invalid argument COMMIT: failed ERROR: COMMIT: transaction is aborted, will ROLLBACK instead DROP TABLE: no such table 'knmi' 36 affected rows DROP TABLE: no such table 'knmi_tmp' SELECT: no such table 'knmi_tmp' current transaction is aborted (please ROLLBACK) COMMIT: failed ERROR: COMMIT: transaction is aborted, will ROLLBACK instead sql> there is way to much crap here for me to debug/see the right problem. ---------------------------------------------------------------------- Comment By: Fabian (mr-meltdown) Date: 2009-10-02 11:32 Message: without -i I see this: % $INSTALL_DIR/bin/mclient -dslave ~/tmp/KNMI.sql MAPI = mone...@localhost:50000 QUERY = # DEZE GEGEVENS MOGEN VRIJ WORDEN GEBRUIKT MITS DE VOLGENDE BRONVERMELDING WORDT GEGEVEN: # KONINKLIJK NEDERLANDS METEOROLOGISCH INSTITUUT (KNMI) # # THESE DATA CAN BE USED FREELY PROVIDED THAT THE FOLLOWING SOURCE IS ACKNOWLEDGED: # ROYAL NETHERLANDS METEOROLOGICAL INSTITUTE # DROP TABLE stations; CREATE TABLE stations (stationid integer, long decimal(5,2), lat decimal(5,2), altitude smallint, name varchar(128), primary key(stationid)); COPY 36 RECORDS INTO stations from stdin USING DELIMITERS '\t', '\n' ERROR = !DROP TABLE: no such table 'stations' MAPI = mone...@localhost:50000 QUERY = # DEZE GEGEVENS MOGEN VRIJ WORDEN GEBRUIKT MITS DE VOLGENDE BRONVERMELDING WORDT GEGEVEN: # KONINKLIJK NEDERLANDS METEOROLOGISCH INSTITUUT (KNMI) # # THESE DATA CAN BE USED FREELY PROVIDED THAT THE FOLLOWING SOURCE IS ACKNOWLEDGED: # ROYAL NETHERLANDS METEOROLOGICAL INSTITUTE # DROP TABLE stations; CREATE TABLE stations (stationid integer, long decimal(5,2), lat decimal(5,2), altitude smallint, name varchar(128), primary key(stationid)); COPY 36 RECORDS INTO stations from stdin USING DELIMITERS '\t', '\n' ERROR = !DROP TABLE: no such table 'stations' !MALException:!ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !ERROR: madvise on (&b->T->heap) tb failed. !OS: Invalid argument !COMMIT: failed !ERROR: COMMIT: transaction is aborted, will ROLLBACK instead !DROP TABLE: no such table 'knmi' [ 36 ] MAPI = mone...@localhost:50000 QUERY = # DEZE GEGEVENS MOGEN VRIJ WORDEN GEBRUIKT MITS DE VOLGENDE BRONVERMELDING WORDT GEGEVEN: # KONINKLIJK NEDERLANDS METEOROLOGISCH INSTITUUT (KNMI) # # THESE DATA CAN BE USED FREELY PROVIDED THAT THE FOLLOWING SOURCE IS ACKNOWLEDGED: # ROYAL NETHERLANDS METEOROLOGICAL INSTITUTE # DROP TABLE stations; CREATE TABLE stations (stationid integer, long decimal(5,2), lat decimal(5,2), altitude smallint, name varchar(128), primary key(stationid)); COPY 36 RECORDS INTO stations from stdin USING DELIMITERS '\t', '\n' ERROR = !DROP TABLE: no such table 'knmi_tmp' MAPI = mone...@localhost:50000 QUERY = # DEZE GEGEVENS MOGEN VRIJ WORDEN GEBRUIKT MITS DE VOLGENDE BRONVERMELDING WORDT GEGEVEN: # KONINKLIJK NEDERLANDS METEOROLOGISCH INSTITUUT (KNMI) # # THESE DATA CAN BE USED FREELY PROVIDED THAT THE FOLLOWING SOURCE IS ACKNOWLEDGED: # ROYAL NETHERLANDS METEOROLOGICAL INSTITUTE # DROP TABLE stations; CREATE TABLE stations (stationid integer, long decimal(5,2), lat decimal(5,2), altitude smallint, name varchar(128), primary key(stationid)); COPY 36 RECORDS INTO stations from stdin USING DELIMITERS '\t', '\n' ERROR = !SELECT: no such table 'knmi_tmp' !current transaction is aborted (please ROLLBACK) !COMMIT: failed !ERROR: COMMIT: transaction is aborted, will ROLLBACK instead sql> ---------------------------------------------------------------------- Comment By: Martin Kersten (mlkersten) Date: 2009-10-02 11:30 Message: Download the KNMI.sql file and issue the command mclient -lsql -i KNMI.sql ---------------------------------------------------------------------- Comment By: Fabian (mr-meltdown) Date: 2009-10-02 11:25 Message: stmane, how do you reproduce that error? It works fine for me: sql>drop table test; DROP TABLE: no such table 'test' sql>select 1; +--------------+ | single_value | +==============+ | 1 | +--------------+ 1 tuple sql> ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2009-10-02 11:10 Message: The double (first, only) error message also occurs with the Aug2009 release branch. As said, I'm not sure, whether it is a SQL, MAPI, or mclient problem ... ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2009-10-02 10:15 Message: Like others, I could not get this from the original posting of this bug report --- nor can I tell, whether this was the problem that the original poster intended to report ---, but there is indeed an error/bug involved: The correct/expected first error message (DROP TABLE: no such table 'stations') is issued a second time, as soon as the first query result is returned/printed. Looks like some error/output buffer is not initialized or cleared correctly. Might be a bug in SQL, but might also be a bug in MAPI or mclient. ---------------------------------------------------------------------- Comment By: Fabian (mr-meltdown) Date: 2009-10-02 08:23 Message: You are probably using the candidate release (Nov2009) or current, and are piping the output into mclient, or making mclient read from file. Our server doesn't report its state, so we can't do more in that case than we do right now. If you want mclient to process line by line, use the -i flag. It is a feature request to have (any) client to report exactly what went wrong where, based on a state inside the server. ---------------------------------------------------------------------- Comment By: Martin Kersten (mlkersten) Date: 2009-10-02 02:21 Message: mclient -lsql -i KNMI.sql Welcome to mclient, the MonetDB/SQL interactive terminal Database: MonetDB v5.15.0, 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on DROP TABLE: no such table 'stations' DROP TABLE: no such table 'stations' 36 affected rows DROP TABLE: no such table 'knmi_tmp' 544054 affected rows DROP TABLE: no such table 'knmi' 544054 affected rows sql> ---------------------------------------------------------------------- Comment By: Martin Kersten (mlkersten) Date: 2009-10-02 01:25 Message: The conclusion that there is here a MonetDB bug can not be deciphered from this report. Of course it works when you have auto-commit enabled. Moreover, mapi client throws the complete sql script to the server when you pass it as an argument to mclient. If you need line-based errors, then use either <inputfile or the -i option. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482471&aid=2871572&group_id=56967 ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Monetdb-bugs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-bugs
