List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:July 11 2014 8:17pm
Subject:Re: Problem with attempt to share a Connection between threads
View as plain text  
On 7/11/2014 14:03, Damien Kick wrote:
>
>> […] I had been assuming that in this case (Connection per thread)
>> there was/is no need for mysqlpp::Connection::thread_start(); i.e.,
>> the manual states that "you don’t need to call it when you use the
>> simpleConnection-per-thread strategy, because this function is
>> implicitly called the first time you create a Connection in a thread."
>> However, I had found <http://lists.mysql.com/bugs/15740> which
>> mentioned "My apologies, I haven't tested yet, but I am pretty sure it
>> is because I forgot to use mysql_thread_init()/mysql_thread_end()," so
>> I was not sure if I was understanding correctly.
>
> Yeah, and adding a call to mysqlpp::Connection::thread_start() even
> though it seems to contradict my current understanding of the tutorial
> doesn't help, either.  So … I don't know <shrug/>

That assertion in the user manual is based on this part of the MySQL C 
API reference manual:

    https://dev.mysql.com/doc/refman/5.0/en/mysql-thread-init.html

So, it doesn't surprise me that adding those calls did not help.

By the way, the user manual sources are also in the MySQL++ source code 
repository.  Once you get this sorted out, if you can think of a clearer 
presentation, patches to the docs are even more likely to be accepted 
than patches to the code.

(We don't have to worry about ABI and API compatibility in the docs, 
leaving correctness as the main reason a patch will be rejected.)

See doc/userman/README.txt for info on building the docs.  It gives the 
Fink option for getting a DocBook toolchain, but the tools are also 
available via "brew install docbook-xsl", and presumably via MacPorts, too.
Thread
Problem with attempt to share a Connection between threadsDamien Kick10 Jul 2014
  • Re: Problem with attempt to share a Connection between threadsWarren Young11 Jul 2014
    • Re: Problem with attempt to share a Connection between threadsDamien Kick11 Jul 2014
      • Re: Problem with attempt to share a Connection between threadsWarren Young11 Jul 2014
        • Re: Problem with attempt to share a Connection between threadsDamien Kick11 Jul 2014
          • Re: Problem with attempt to share a Connection between threadsWarren Young11 Jul 2014
            • Re: Problem with attempt to share a Connection between threadsDamien Kick11 Jul 2014
              • Re: Problem with attempt to share a Connection between threadsDamien Kick11 Jul 2014
                • Re: Problem with attempt to share a Connection between threadsWarren Young11 Jul 2014
              • Re: Problem with attempt to share a Connection between threadsWarren Young11 Jul 2014
                • Re: Problem with attempt to share a Connection between threadsDamien Kick11 Jul 2014
                  • Re: Problem with attempt to share a Connection between threadsWarren Young11 Jul 2014
                    • Re: Problem with attempt to share a Connection between threadsDamien Kick11 Jul 2014
                      • Re: Problem with attempt to share a Connection between threadsAdrian Cornish11 Jul 2014
  • Re: Problem with attempt to share a Connection between threadsChris Frey13 Jul 2014
Re: Problem with attempt to share a Connection between threadsDamien Kick11 Jul 2014
  • Re: Problem with attempt to share a Connection between threadsWarren Young11 Jul 2014