From: Radoslaw G. <rga...@ay...> - 2005-03-08 12:48:23
|
Hello, I am the newbe with using the sourceforge so sorry for my lack of knowledg= e. I have been using the mysqlcppapi library successfully for some time, so a= t=20 first I would like to thank all maintainers and developers for the good wor= k=20 they have done. I did some slight changes to the package and I would like to ask where she= ll=20 I send the patch? Is the sourceforge project's <patches> link the right pla= ce=20 to do it? The changes are quite minor - I just got rid of few warnings during the=20 compilation (defined but not used methods' parameters) and corrected=20 "mysql_shutdown" invocation to match the new MySQL interface (4.1.10) - but= =20 without preprocessor directives to check the MySQL version (sorry).=20 =20 I would like to ask, if it was possible, for the more complex exceptions=20 scheme - for now I have to check the exception's description to check the=20 reason (e.g. all "artificial deadlocks" of MySQL which, as they suggest,=20 should cause transactions retrial). Thanks in advance for any suggestions and help about my question and the=20 changes I made as well. =2D-=20 Mit freundlichen Gr=FC=DFen Best regards =20 // Radoslaw Garbacz // aycan Digitalsysteme GmbH // Innere Aumuehlstrasse 5 // 97076 Wuerzburg // Germany // phone: +49 931.270 40 90 // fax: +49 931.270 40 91 // mailto:rga...@ay... // http://www.aycan.de |
From: Jonathan W. <co...@co...> - 2005-03-08 13:20:29
|
On Tue, Mar 08, 2005 at 01:48:04PM +0100, Radoslaw Garbacz wrote: > Hello, Hi, > I am the newbe with using the sourceforge so sorry for my lack of knowledge. > > I have been using the mysqlcppapi library successfully for some time, so at > first I would like to thank all maintainers and developers for the good work > they have done. Thanks for the kind words (I am the current maintainer but can't take credit for much of the library myself). > I did some slight changes to the package and I would like to ask where shell > I send the patch? Is the sourceforge project's <patches> link the right place > to do it? Yes, or sending it to this list might get a quicker response. > The changes are quite minor - I just got rid of few warnings during the > compilation (defined but not used methods' parameters) and corrected > "mysql_shutdown" invocation to match the new MySQL interface (4.1.10) - but > without preprocessor directives to check the MySQL version (sorry). Please check the latest version from CVS, at least the mysql_shutdown change is already done. I *badly* need to make a new release incorporating those changes. > 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. jon -- "You will find that the state is the kind of organization which, though it does big things badly, does small things badly too." - John Kenneth Galbraith |
From: Radoslaw G. <rga...@ay...> - 2005-03-10 09:35:07
Attachments:
mysqlcppapi.patch.gz
mysqlcppapi.spec.gz
|
Hi, Thank you for the quick response. 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= =20 nothing to change, just the file: mysqlcppapi/ColData.h @@ -221,7 +221,7 @@ =20 =20 template <class T_Str> template<class Type>=20 =2DType 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); > > I would like to ask, if it was possible, for the more complex exceptio= ns > > scheme - for now I have to check the exception's description to check t= he > > 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() =3D=3D "Duplicate entry" the_proposal: ex_DuplicateEntry 2. mysqlcppapi::ex_BadQuery.what() =3D=3D "mysql_real_connect() failed" the_proposal:ex_ConnectionFailure 3. mysqlcppapi::ex_BadQuery.what() =3D=3D ".*try restarting transaction.*" The suggestion to restart the transaction can happen in various situations= , =20 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 I also added files such as: AUTHOR, COPYING, etc. to the set of files bein= g=20 installed - it is prepared for SuSE like directories scheme (packages'=20 documentation is placed in "/usr/share/doc/packages/<package>") - to make i= t=20 in a traditional way ("/usr/share/package") just the line: pkgdatadir =3D $(datadir)/doc/packages/@PACKAGE@ has to be removed from the main Makefile.am I have the SPEC to build RPMs so if you were interested you can use it=20 (please check whether there is no LGPL license violation). Attached:=20 =2D the patch against the version 1.9.3 =2D the spec file =2D-=20 Mit freundlichen Gr=FC=DFen Best regards =20 // Radoslaw Garbacz // aycan Digitalsysteme GmbH // Innere Aumuehlstrasse 5 // 97076 Wuerzburg // Germany // phone: +49 931.270 40 90 // fax: +49 931.270 40 91 // mailto:rga...@ay... // http://www.aycan.de |
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 |
From: Radoslaw G. <rga...@ay...> - 2005-03-10 10:55:31
|
On Thursday 10 March 2005 11:10, Jonathan Wakely wrote: > That change is also in CVS already. I'll try to make a release this > weekend. I see that everything has already been done :-) - sorry for not checking the CVS. > 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 defi= ne > a whole hierarchy of classes. I'll have a think about it when I get a > chance at the weekend. Yes, this is the best solution, and it would be enough for me. Thank you for your help. =2D-=20 Mit freundlichen Gr=FC=DFen Best regards =20 // Radoslaw Garbacz // aycan Digitalsysteme GmbH // Innere Aumuehlstrasse 5 // 97076 Wuerzburg // Germany // phone: +49 931.270 40 90 // fax: +49 931.270 40 91 // mailto:rga...@ay... // http://www.aycan.de |
From: Jonathan W. <co...@co...> - 2005-03-10 15:51:08
|
On Thu, Mar 10, 2005 at 11:55:07AM +0100, Radoslaw Garbacz wrote: > On Thursday 10 March 2005 11:10, Jonathan Wakely wrote: > > That change is also in CVS already. I'll try to make a release this > > weekend. > > I see that everything has already been done :-) > - sorry for not checking the CVS. No, it's my fault for not releasing the improvements properly. > > 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. > > Yes, this is the best solution, and it would be enough for me. OK, I'll do something along these lines. jon |