Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] << ] >> ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000005 [qot] general crash always 2008-05-20 02:46 2008-06-10 00:05
Reporter archon810 View Status public  
Assigned To administrator
Priority normal Resolution fixed  
Status resolved   Product Version 0.0.3
Summary 0000005: Various segfaults
Description $ qot --input-file=test.sql --input-query='SELECT channel FROM test where id=5' --info
/* Output produced by qot 0.0.3 GPL */
/*
... all good
*/

$ qot --input-file=test.sql --input-query='SELECT channel FROM test2 where id=5' --info
Segmentation fault

$ qot --input-file=test.sql --input-query='SELECT channel, count(*) FROM test group by channel' --info
Segmentation fault

I really love the idea and I would love to start using qot, but the program so far is missing absolutely basic checks and segfaults with no indication of what's wrong. Granted, the first query tries to use a table that doesn't exist, but the 2nd one uses a perfectly valid count(*), which seems to be the culprit here.
Additional Information $ cat test.sql
CREATE SCHEMA test;

USE test;

CREATE TABLE `test` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `channel` varchar(100) default NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0000010)
administrator (administrator)
2008-05-21 08:55

Thanks for the report and for the examples. I'm really sorry to hear about your frustration and I can understand it. On the other hand I'm just a single developer working on the tool on my free time, and I'm just unable to properly cover all the development aspects keeping any reasonable timelines and I have to go for compromises. One of them is that the tool expects more-or-less valid input (there's some semantic and syntactic checking but that definitely needs an improvement), another is that it's currently unable to process aggregate functions (that is planned to be completely fixed together with adding GROUP BY processing, in the next to the following version (0.0.5) ). Being quite limited in time, I try to rely as much as possible on automated tests and this is where your bug reports are really valuable, so whenever you get a crash or mis-behavior please file a report.
(0000012)
archon810 (reporter)
2008-06-05 09:17

No problem, understood, I'll keep filing bug reports as I see them. Certain parsing errors though can be taken care of quite easily if you sanitize and validate the input a bit more, which is good programming practice. Alternatively, you may try to use Perl for such a program, which gives more meaningful and easily fixable error messages as opposed to 'segfault'.
(0000014)
administrator (administrator)
2008-06-10 00:05

The fix will be included into version 0.0.4. Although don't crash anymore, aggregate functions are not yet processed correctly (an agenda for version 0.0.5).

- Issue History
Date Modified Username Field Change
2008-05-20 02:46 archon810 New Issue
2008-05-20 02:47 archon810 Issue Monitored: archon810
2008-05-21 08:55 administrator Note Added: 0000010
2008-05-21 08:55 administrator Assigned To => administrator
2008-05-21 08:55 administrator Status new => confirmed
2008-06-05 09:17 archon810 Note Added: 0000012
2008-06-10 00:05 administrator Note Added: 0000014
2008-06-10 00:05 administrator Status confirmed => resolved
2008-06-10 00:05 administrator Resolution open => fixed


Mantis 1.1.1[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker