I have some code that was working in 3.0.9 that is throwing an exception
after I compile against 3.1.0. The exception message is: "Not enough
parameters to fill the template."
#1 0x00007ffff6d6bfb8 in mysqlpp::Query::proc (this=<value optimized out>,
p=...) at ./lib/query.cpp:446
#2 0x00007ffff6d6c059 in mysqlpp::Query::str (this=0x7fffffffd460, p=...)
#3 0x00007ffff6d6c1af in mysqlpp::Query::use (this=0x7ffff6f8f540, p=...)
#4 0x00007ffff6d6c0ef in mysqlpp::Query::use (this=0x7fffffffd460, s=...)
The code looks something like this:
mysqlpp::Query q = c->query();
q << "SELECT T0.a, T0.b FROM table T0 WHERE c=%0q AND d=%1q";
q.storein(rows, c, d);
As soon as I remove the query template parameters, the exception goes away.
I am building mysql++ and my application with:
$ g++ --version
g++ (Ubuntu 4.4.1-4ubuntu9) 4.4.1
My second issue is when using mysql 3.1.0, I got this exception:
"Option can only be set while the connection is established"
while setting ReconnectOption. So I changed my code to call set_option after
reconnect, despite reconnect working fine when I was setting it before
connect. Then I had to switch back to 3.0.9 because of the query template
problem explain above and my program started segfaulting:
#0 0x00007ffff6d60e36 in mysqlpp::Connection::set_option(mysqlpp::Option*)
() from /usr/lib/libmysqlpp.so.3
The segfault went away when I moved the call to set_option ReconnectOption
back to its previous location, before connect.
The exception you've added in 3.1.0 for ReconnectOption is telling me to do
something that actually breaks code that was working fine.
Server version: 5.1.45-51-log Percona SQL Server (GPL), XtraDB 10
$ aptitude show libmysqlclient15-dev
Automatically installed: yes
Finally, could you please add configure options for static and shared.
Typically libtoolized autoconf projects provide --enable/disable-static
--enable/disable-shared options for configure.