dbTalk Databases Forums  

[Bug?] Missing implementation for value_list(vector<bool>*...)

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss [Bug?] Missing implementation for value_list(vector<bool>*...) in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Wolfram Arnold
 
Posts: n/a

Default [Bug?] Missing implementation for value_list(vector<bool>*...) - 05-19-2005 , 05:08 AM






Follow-up to my own message.

I should have looked further in the first place. I see now what the
motivation behind the vector pointer and the del_vector flag was.

The constructors for NAME_cus_[value|field|equal]_list(...bool i1, bool
i2,...) uses this to store the value of the bool flags in the
vector<bool> which it creates dynamically.

The alternative, of course, would be to add an instance of vector<bool>,
not just a pointer, as member to NAME_cus_[value|field|equal]_list. The
downside of this is that it would force an implicit copy construction
(i.e. memory allocation) in the constructor [value|field|
equal]_list(..., vector<bool>,...), at the benefit of a 'safer'
interface signature. I can see the design tradeoff that the authors
must have faced.

A possible way out is to make all the data members of the
NAME_cus_[value|field|equal]_list classes static. At cursory glance,
these objects appear to be used only as return values and their primary
purpose appears to be consumption by operator<<, so that they act as
transient intermediaries in strictly sequential constructions, i.e.
they're singletons (only one instance exists at a time) which would
safely permit static members. But I'm not sure I'm not missing
something again here.

Thanks,

Wolfram


--
Wolfram Arnold <wolfram (AT) arnold (DOT) name>


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
Chris Frey
 
Posts: n/a

Default Re: [Bug?] Missing implementation for value_list(vector<bool>*...) - 05-19-2005 , 08:16 AM






On Thu, May 19, 2005 at 02:31:49AM -0700, Wolfram Arnold wrote:
Quote:
Hi,

I'm learning about SSQL's and want to use the equal_list method with the
vector<bool>* signature. The following example...
What version are you using? There are bugs with the equal_list() feature
that Mark Merendino has already found and fixed. Have you patched your
copy of mysql++-1.7.35 with the patch I sent to the list on May 10?

- Chris


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
Warren Young
 
Posts: n/a

Default Re: [Bug?] Missing implementation for value_list(vector<bool>*...) - 05-19-2005 , 02:29 PM



Wolfram Arnold wrote:
Quote:
A possible way out is to make all the data members of the
NAME_cus_[value|field|equal]_list classes static.
That breaks in the face of threads.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #4  
Old   
Wolfram Arnold
 
Posts: n/a

Default Re: [Bug?] Missing implementation for value_list(vector<bool>*...) - 05-21-2005 , 01:57 AM



Chris,

Yes, that's it. I should have looked. Thanks for pointing it out, and
never mind.

I did fix an additional glitch, namely that the member accessors don't
check the index is valid for the vector provided, resulting in a
segfault if the vector is shorter than the number of elements in the
SSQL.

I'll submit when the next release comes out, I guess. I'm a bit wary of
releasing a patch that depends on a patch, with no intermediate check-in
to version control. (I read the post about hosting subversions
somewhere publicly visible--that would be great to have.) Suggestions?

Wolfram

On Thu, 2005-05-19 at 09:15 -0400, Chris Frey wrote:
Quote:
On Thu, May 19, 2005 at 02:31:49AM -0700, Wolfram Arnold wrote:
Hi,

I'm learning about SSQL's and want to use the equal_list method with the
vector<bool>* signature. The following example...

What version are you using? There are bugs with the equal_list() feature
that Mark Merendino has already found and fixed. Have you patched your
copy of mysql++-1.7.35 with the patch I sent to the list on May 10?

- Chris


--
Wolfram Arnold <wolfram (AT) arnold (DOT) name>


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #5  
Old   
Warren Young
 
Posts: n/a

Default Re: [Bug?] Missing implementation for value_list(vector<bool>*...) - 05-23-2005 , 10:05 AM



Wolfram Arnold wrote:
Quote:
Surely, no argument. I the library otherwise considered thread-safe and
is this one of the design goals?
There has been explicit support for building thread-aware versions of
MySQL++ for the past several releases. No audit has been made to ensure
that it is thread-safe in all situations, but if there are any they will
be considered bugs, not limitations.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #6  
Old   
Warren Young
 
Posts: n/a

Default Re: [Bug?] Missing implementation for value_list(vector<bool>*...) - 05-23-2005 , 10:08 AM



Wolfram Arnold wrote:

Quote:
I'll submit when the next release comes out, I guess. I'm a bit wary of
releasing a patch that depends on a patch, with no intermediate check-in
to version control.
I run a private repository here, so the complete history will still be
recorded. And when I decide on how to get this thing hosted, I hope to
replay the entire history into the public repository.

If you have a patch for a bug, by all means, let me have it.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.