List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:September 24 2004 10:28am
Subject:Re: query.store, query.exec might yield in segmentation fault
View as plain text  
Jose Mortensen wrote:
> 
> I know it should use exec instead, but:

...but you want to be able to misuse the library, and have it read your 
mind as to what you really meant, right?

> 1. C++ code should never produce a segmentation fault. 

C++ code that does not contain bugs should never produce a segfault. 
Your code contains a bug.

> 2. In some cases like, for example, a user console program where the
> query is user defined, it is difficult to predict if the query should
> return something or not. In cases like that better to return an empty
> result. I think.

So what you're saying is, you want me to write a SQL parser that can 
find out enough about the query that it can call exec() or store() 
depending on what kind of query it is...so you don't have to write one 
yourself.  Is that right?

There are two different APIs here because they are very different 
operations.  That's necessary complexity, if we are to avoid writing a 
SQL parser.

> My preference is to return an empty result.

Patches thoughtfully considered.
Thread
query.store, query.exec might yield in segmentation faultJose Mortensen24 Sep
  • Re: query.store, query.exec might yield in segmentation faultWarren Young24 Sep
  • RE: query.store, query.exec might yield in segmentation faultJose Mortensen29 Sep
Re: query.store, query.exec might yield in segmentation faultWarren Young24 Sep
RE: query.store, query.exec might yield in segmentation faultJo Ellen Brandmeyer24 Sep