|
From: Jonathan W. <co...@co...> - 2005-03-10 10:11:20
|
On Thu, Mar 10, 2005 at 10:34:48AM +0100, Radoslaw Garbacz wrote:
> Hi,
>
> Thank you for the quick response.
Hi Radoslaw,
> On Tuesday 08 March 2005 14:19, you wrote:
> > Yes, or sending it to this list might get a quicker response.
>
> Considering the fact that "mysql_shutdown" is already done there is almost
> nothing to change, just the file: mysqlcppapi/ColData.h
> @@ -221,7 +221,7 @@
>
>
> template <class T_Str> template<class Type>
> -Type ColData_Generic<T_Str>::conv(Type dummy) const
> +Type ColData_Generic<T_Str>::conv(Type /*dummy*/) const
> {
> std::string strbuf(buf);
> strip_all_blanks(strbuf);
That change is also in CVS already. I'll try to make a release this weekend.
> > > I would like to ask, if it was possible, for the more complex exceptions
> > > scheme - for now I have to check the exception's description to check the
> > > reason (e.g. all "artificial deadlocks" of MySQL which, as they suggest,
> > > should cause transactions retrial).
> >
> > That's a good idea, feel free to post suggestions to this list.
>
> The failure reasons I have to check by comparing strings:
> 1. mysqlcppapi::ex_BadQuery.what() == "Duplicate entry"
> the_proposal: ex_DuplicateEntry
>
> 2. mysqlcppapi::ex_BadQuery.what() == "mysql_real_connect() failed"
> the_proposal:ex_ConnectionFailure
>
> 3. mysqlcppapi::ex_BadQuery.what() == ".*try restarting transaction.*"
> The suggestion to restart the transaction can happen in various situations,
> so I check the existence of this phrase inside the exception description.
> the_proposal: ex_InternalTimeout | ex_TransRestart
> e.g. ex_InternalDeadLock: public ex_InternalTimeout
Another, simpler alternative would be to allow you to check an error code.
That would mean you don't need to match strings but we don't have to define
a whole hierarchy of classes. I'll have a think about it when I get a
chance at the weekend.
> I also added files such as: AUTHOR, COPYING, etc. to the set of files being
btw I plan to rename COPYING to COPYING.LIB since the file is a copy of
the LGPL.
> installed - it is prepared for SuSE like directories scheme (packages'
> documentation is placed in "/usr/share/doc/packages/<package>") - to make it
> in a traditional way ("/usr/share/package") just the line:
> pkgdatadir = $(datadir)/doc/packages/@PACKAGE@
> has to be removed from the main Makefile.am
OK, I might ask you more about this when I prepare a release.
> I have the SPEC to build RPMs so if you were interested you can use it
> (please check whether there is no LGPL license violation).
Thanks, there are a couple of things I'd change. The library is LGPL
licensed, but the spec file says GPL. I would also change the
description to make it clear mysqlcppapi is an incompatible fork, not
just a modified version of mysql++.
Thanks again for your suggestions, I'll be in touch again soon
jon
--
"Fanaticism consists in redoubling your efforts when you have forgotten
your aims."
- George Santayana
|