From: Warren Young
Date: March 31 2011 3:08am
Subject: Re: thread_start() should ALWAYS be called after mysql_init()
List-Archive: http://lists.mysql.com/plusplus/9294
Message-Id: <1FC0617C-1C06-4290-85CC-AC1FBF95F53D@etr-usa.com>
MIME-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
On Mar 30, 2011, at 2:49 PM, KiberGus wrote:
> I tend to interpret it as a requirement that application MUST start
> it's work with library with call to mysql_init(),
> mysql_library_init(), mysql_server_init(), mysql_connect() or
> my_init(). And then it is documented feature of mysql library and bug
> is in mysql++ rather than in mysql_thread_init.
There are two ways to fix it:
1. Make the MySQL++ docs reflect the underlying C API requirement
2. Somehow protect all calls to MySQL++ so that it inits the underlying =
C API library no matter which code path you use, thereby wrapping up all =
this complexity inside MySQL++.
It sounds like you want #2. That sounds like a fine idea, but =
personally, I don't use threads with MySQL++ -- as if you you'd never =
guess from the second paragraph of the userman chapter you link to -- so =
I have little incentive to fix it. It's your itch. Scratch it.
If you leave it to me, I'll likely either continue to ignore the issue =
or do #1.=