Andrew Sayers wrote:
> Apologies if this is the wrong place to send bug reports - I couldn't
> find any hints about where to post this on the mysql++ web page or
> README file.
I thought the MySQL++ page was crystal clear that all correspondence
about MySQL++ should go to the mailing list. If you were looking for a
bug tracker, we do have one of those on the Gna project page, but in
general I'd rather have problems discussed here.
> When running the program below, mysql++ throws an exception to the
> specified query if the query parameter is set as %0, but not if it's set
> as %1.
This is probably yet another single-parameter template query bug. You
can search the list for other reports, including the one from Gregory
Gaus on 5/10. The next release of MySQL++ will be aimed at this. I
have no more details to give you. If you want it fixed faster, please
provide a patch.
> mysql_password.hpp defines mysql_username and mysql_password, which I'd
> rather not post to a public mailing list :)
When posting demonstratino code, it's best to just modify one of the
MySQL++ examples (I'd suggest tquery) to give the same effect. That way
we all have the same database, and the same code.
> I realise this is quite a contrived example - the actual program I'm
> working on needs to do queries where the number of parameters
> isn't known until run-time, and every way of doing that which I can
> think of runs into a version of this bug.
Why not use the stream interface to Query? This will let you build
arbitrary queries as well. You just have a different code path for each
type of query you need, and insert the variables as required. If you
accept the variables as some generic type, say a template or a
mysqlpp::SQLString, you can make this quite flexible.