MySQL++ Changelog

What's new in MySQL++ 3.2.2

Mar 26, 2015
  • The DBDriver::operator= would leak a live connection if you assigned a disconnected DBDriver to it.
  • Plugged a potential DBDriver instance leak in Connection ctor.
  • Explicitly #including algorithm.h in examples/multiquery.cpp for std::max().
  • Added missing "break;" statements in Transaction ctor taking an isolation level parameter, which caused only the last one to do the right thing.
  • The bootstrap script now checks for the existence of needed build tools before trying to use them. This lets us emit a clearer error message than the shell will.
  • Fixed a build problem related to std::min/max with Visual C++ 2013 due to a change in the definitions provided by its header files.
  • Tracked several changes made to Connector/C made since 3.2.1.
  • Assorted documentation updates.
  • Generating HTML with UTF-8 encoding, not 8859-1

New in MySQL++ 3.2.1 (Jul 11, 2014)

  • Connection copy ctor wasn't copying the "throw exceptions" flag. The copy always had exceptions enabled.
  • Fixed resetdb's first output message when you run it without arguments. It was giving a misleading message that could confuse someone.
  • Previous release tarball was missing a few text files present in the source repository.
  • Updated build paths for VC++ and MinGW to track a file layout change in Connector/C 6.1.2.

New in MySQL++ 3.2.0 (Jul 11, 2014)

  • References to MySQL 5.1 have been replaced with 5.6, that being the current GA release.
  • All Windows builds now assume you're using Connector/C 6.1 instead of having installed the MySQL server on your machine just to get development files. If you are running a MySQL server on your development machine and don't want to install Connector/C just to make MySQL++ happy, see the README-*.txt file for your platform to get instructions on fixing the paths so the build system finds the development files under the MySQL server directory.
  • The generated VC++ 2008 project files now assume you want 64-bit executables. (It is 2013 now, after all.)
  • Since the VC++ 2005 project files continue to be configured for 32-bit builds, the easiest way to get a 32-bit project in VC++ 2008+ is to import the VC++ *2005* project files, rather than adjust the build target settings of all 44 vc2008/*.vcproj files within the IDE.
  • Added Query::replacefrom(): like insertfrom() but it uses REPLACE statements instead of INSERT. Patch by Adrian Cornish.
  • Added support for SQL "unsigned float" columns.
  • Added "abicheck" top-level build target, which runs the ISPRAS ABI checker tool (http://goo.gl/e19lD) against a predecided "ABI-stable" version of MySQL++, comparing it against the current version. This should help avoid future unplanned ABI breakages, as happened between 3.0.9 and 3.1.0.
  • We have chosen not to revert those changes that broke the ABI, but instead have chosen to accept the 3.1.0 ABI as the new stable ABI for the rest of the 3.x series. Running the ABI checker is now part of the release process, so we should not change the ABI again until 4.0!
  • The Query::insert() and replace() overloads that take a pair of iterators now work with containers that only provide forward iterators.
  • Using libtool again on Autotools systems. It gives us relocatable libraries, which is needed in some linking situations.
  • VC++ release builds now have optimization enabled. This might also affect other toolchains that create separate Debug and Release builds, if Bakefile obeys the directive for those systems. (Such as, perhaps, Xcode.)
  • Fixed a crash in CommandLine mechanism when the usage message is called up for programs that have no "extra" parameter and corresponding usage appendage.
  • Query::storein() now tolerates empty result sets, due either to DBMS failure or passing a query that never returns results, such as INSERT.
  • Exposed DBDriver::result_empty() as Query::result_empty(). We did this primarily because it was needed as a helper for the previous fix, but it could also be useful more broadly.
  • Added -Wextra to the pedantic build flags.
  • Fixed the "escape" manipulator so it will work with Null wrapped types.
  • ssqls2parse now depends on libmysqlpp. (It wasn't getting relinked when you changed the library.)
  • The configure script's test for the existence of mysql_ssl_set() got broken by a change in the mysql_loc.m4 test, causing it to always return "no" even if the platform's MySQL C API library did have the function. Therefore, the SslOption could never be set.
  • Fixed a missing a "buried headers" ifdef wrapper for type_info.cpp.
  • We now export the DBDriver class from the MySQL++ DLL when building on Windows. Client programs can now access it directly, instead of being able to access only the fields and members exposed through Connection and Query.
  • MinGW builds no longer require that you manually create an import library for the MySQL C API DLL from a .def file we provide, which would inevitably get outdated. We can now link directly to the DLL, and rely on the MinGW linker to figure out the imports.
  • Split the -l flags out of LDFLAGS in the userman's example Makefiles. They're now in LDLIBS, which causes them to be put after -o $(EXE) by the default GNU make rules, where they should be.
  • Assorted documentation and build system improvements.
  • Assorted fixes for newer GCCs.

New in MySQL++ 3.1.0 (Jul 11, 2014)

  • Default MySQL version now 5.1, having entered GA since 3.0.9.
  • Lots of platform updates tracked, lots of warnings from newer compilers squished.
  • Added Query::insertfrom(), plus associated classes SQLStream, NoTransactions, and the InsertPolicy hierarchy. Also adds examples/ssqls6.cpp, which shows how to use this new feature.
  • Added comparison operators to tiny_int.
  • Added SQLTypeAdapter::is_null(). This lets you retrieve a nullable column from the DB, then re-insert a value from that column back into the DB via a template query without explicit checks for null-ness; it will do the right thing now.
  • Added -f flags to lib/*.pl header file generating scripts to allow overriding the default limit of 25 fields for tqueries and SSQLSes without having to edit the file, as in previous versions of MySQL++. Also added --with-field-limit option to the configure script so you can give both -f options at once during the build process. This latter is especially useful for automated binary package builders.
  • The file lib/querydef.h (generated by lib/querydef.pl) now defines the MYSQLPP_TQUERY_MAX_PARAMETERS macro, giving the maximum number of parameters the functions in the generated file allow for template queries. Similarly, lib/ssqls.h (generated by lib/ssqls.pl) defines MYSQLPP_SSQLS_MAX_MEMBERS.
  • Added ConnectionPool::safe_grab(), which pings the grabbed connection before returning it. If the ping fails, we remove the dead connection from the pool and try again. This doesn't eliminate the possibility of returning a dead connection; there is no protection against race conditions. It is merely a best-effort attempt.
  • Added ConnectionPool::remove(Connection*), which removes a connection from the pool.
  • Added ConnectionPool::exchange(), which wraps remove() and grab(). It works like a customer support counter in a store: "I'm sorry, but this Connection is defective. Can I have another, please?"
  • Added a feature to Transaction, where it can send a SET TRANSACTION ISOLATION LEVEL query before it starts the transaction proper, affecting the isolation level and the scope of that change.
  • Added ScopedConnection class. Initial version by Joel Fielder, lots of changes by me. Using it instead of explicit safe_grab() and release() calls on the pool in examples/cpool.cpp.
  • Added FieldNames::operator[](size_type) overloads. This is necessary to correctly overload the base class versions inherited from std::vector.
  • FieldNames wasn't doing field-by-name matches case insentitively, most likely since 3.0.0 when we changed it to derive from std::vector. This caused SSQLS (at least) to be case sensitive. Fixed this and renamed the stock.sdate field in the SSQLS examples to stock.sDate to test this.
  • Added Query::replace(iter, iter), on the model of existing insert(iter, iter).
  • Added Query::operator!(), overriding basic_ios version so that
  • "if (!query)" does the right thing. Fixes problem report in
  • thread http://lists.mysql.com/plusplus/8594
  • Query copy ctor and assignment operator now perform deeper copies, so you can pass Query objects around in certain ways that used to cause crashes.
  • Defined *_null variants for every sql_* typedef, wrapping all those earlier types in Null. All example programs now use these types instead of explicit Null-wrapped types.
  • Created a C++ command line parsing mechanism for the examples today, and for programs coming in the future. It uses the platform version of getopt() if available, substituting a public-domain implementation that gets built into MySQL++ itself otherwise. It's documented in the refman -- see the CommandLineBase class -- but it's in the newly created mysqlpp::internal namespace, which means we don't promise any sort of ABI or API stability for it. You're welcome to use it in your own programs, but expect it to change without warning.
  • Added a few missing MYSQLPP_EXPORTs to operator

New in MySQL++ 3.0.9 (Dec 14, 2011)

  • Default MySQL version now 5.1, having entered GA since 3.0.9.
  • Lots of platform updates tracked, lots of warnings from newer compilers squished.
  • Added Query::insertfrom(), plus associated classes SQLStream, NoTransactions, and the InsertPolicy hierarchy. Alsadds
  • examples/ssqls6.cpp, which shows how tuse this new feature.
  • Added comparison operators ttiny_int.
  • Added SQLTypeAdapter::is_null(). This lets you retrieve a nullable column from the DB, then re-insert a value from that column back intthe DB via a template query without explicit checks for null-ness; it will dthe right thing now.
  • Added -f flags tlib/*.pl header file generating scripts to allow overriding the default limit of 25 fields for tqueries and SSQLSes without having tedit the file, as in previous versions of MySQL++. Alsadded --with-field-limit option to
  • the configure script syou can give both -f options at once during the build process. This latter is especially useful for automated binary package builders.
  • The file lib/querydef.h (generated by lib/querydef.pl) now defines the MYSQLPP_TQUERY_MAX_PARAMETERS macro, giving the maximum number of parameters the functions in the generated file allow for template queries. Similarly, lib/ssqls.h (generated by lib/ssqls.pl) defines MYSQLPP_SSQLS_MAX_MEMBERS.
  • Added ConnectionPool::safe_grab(), which pings the grabbed connection before returning it. If the ping fails, we remove the dead connection from the pool and try again. This doesn't eliminate the possibility of returning a dead connection; there is nprotection against race conditions. It is merely
  • a best-effort attempt.
  • Added ConnectionPool::remove(Connection*), which removes a connection from the pool.
  • Added ConnectionPool::exchange(), which wraps remove() and grab().
  • Added a feature tTransaction, where it can send a SET TRANSACTION ISOLATION LEVEL query before it starts the transaction proper, affecting the isolation level and the scope of that change.
  • Added ScopedConnection class.
  • Using it instead of explicit safe_grab() and release() calls on the pool in examples/cpool.cpp.
  • Added FieldNames::operator[](size_type) overloads. This is necessary tcorrectly overload the base class versions inherited
  • from std::vector.
  • FieldNames wasn't doing field-by-name matches case insentitively, most likely since 3.0.0 when we changed it tderive from std::vector. This caused SSQLS (at least) tbe case sensitive.
  • Fixed this and renamed the stock.sdate field in the SSQLS examples tstock.sDate ttest this.
  • Added Query::replace(iter, iter), on the model of existing insert(iter, iter).
  • Added Query::operator!(), overriding basic_ios version sthat "if (!query)" does the right thing. Fixes problem report in
  • thread http://lists.mysql.com/plusplus/8594
  • Query copy ctor and assignment operator now perform deeper copies, syou can pass Query objects around in certain ways that used tcause crashes.
  • Defined *_null variants for every sql_* typedef, wrapping all those earlier types in Null. All example programs now use these types instead of explicit Null-wrapped types.
  • Created a C++ command line parsing mechanism for the examples today, and for programs coming in the future. It uses the platform version of getopt() if available, substituting a public-domain implementation that gets built intMySQL++ itself otherwise. It's documented in the refman -- see
  • the CommandLineBase class -- but it's in the newly created mysqlpp::internal namespace, which means we don't promise any sort of ABI or API stability for it. You're welcome tuse it in your own programs, but expect it tchange without warning.
  • Added a few missing MYSQLPP_EXPORTs toperator

New in MySQL++ 3.0.9 (Dec 14, 2011)

  • It is now possible to use Null objects in const context.
  • Query was emitting thousands separators when used in some locales.
  • Restored support for using Query::storein() with template queries. Was mistakenly removed in the 3.0.0 development process.
  • GCC 4.4 build fixes.

New in MySQL++ 3.0.8 (Dec 14, 2011)

  • Fixed a VC++ build error introduced in 3.0.7 in the Sun CC fix.
  • Fixed the Makefile we generate from Makefile.simple for the devel RPM. The recent Bakefile upgrade changed the output so our munger stopped munging.
  • Changed all instances of "CREDITS" in header comments to
  • "CREDITS.txt".
  • Brought ebuild file up tdate with what Gentohas been using for 2.3.2.

New in MySQL++ 3.0.7 (Dec 14, 2011)

  • Fixed bug where initting a Query with a query string and then appending more tit with operator

New in MySQL++ 3.0.6 (Dec 14, 2011)

  • Several fixes to allow thread-aware build on Solaris
  • More improvements to search for Fink version of C API library.
  • Various improvements to Windows installer (install.hta)

New in MySQL++ 3.0.5 (Dec 14, 2011)

  • Replaced install.bat with new install.hta, which has a GUI and a lot of embeded logic for doing The Right Thing, which we couldn't din a dumb batch file.
  • Several fixes tallow it tbuild on Solaris 10.
  • Fixed a bug in comparison of Null tT: wouldn't always give the right result for one particular combination of argument values and order of parameters toperator

New in MySQL++ 3.0.4 (Dec 14, 2011)

  • Fixed a few bugs in SslOption that prevented it from actually working. If you've been having SSL problems since upgrading tMySQL++ v3, this is why.
  • Changed type of String's internal "size" typedefs sit'll build without errors on 64-bit systems where these ints are different sizes.
  • Many user manual improvements.

New in MySQL++ 3.0.3 (Dec 14, 2011)

  • Fixed query well-formedness handling in Query::store() and use().
  • It was quietly eating these errors, confusing them with the
  • no-results case.
  • Fixed examples/cpool.cpp tbuild without thread support.
  • Nlonger hiding all stdint.h typedefs inside namespace mysqlpp.
  • Fixed mysqlpp::String comparisons of empty strings against
  • nonempty strings; if the empty string was on the left hand side,
  • it would succeed because it was only comparing against characters
  • in the empty side, which matches everything.

New in MySQL++ 3.0.2 (Dec 14, 2011)

  • Increased float tstring conversion precision from 7 t9 and
  • double from 16 t17 digits. Previous values weren't enough
  • near the maximum values that each can hold.
  • Replaced Query's safe bool mechanism with an override of
  • basic_ios::operator void*() tavoid a conflict between the
  • twmechanisms. As the base class version isn't virtual,
  • this is arguably evil, but it should be harmless in typical use.
  • Besides, testing Query in bool context usually isn't the right
  • thing anyway: test the result set instead.
  • Made ConnectionPool::grab() virtual.
  • Overriding ConnectionPool::grab() and release() in
  • examples/cpool.cpp tshow how tdconnection-in-use count
  • limiting. Also, added a few more output indicator states to
  • allow one tbetter understand program flow.

New in MySQL++ 3.0.1 (Dec 14, 2011)

  • String objects can now be compared tmysqlpp::null directly.
  • Added a template operator== and operator!= tString, syntactic
  • sugar for the existing String::compare() methods.
  • String::compare() now returns 0 ("equal") when one of the
  • strings is an uninitialized String() (nrefcounted buffer)
  • and the other is empty. It used tconsider any initialized
  • string greater than an uninitted one. An uninitialized String
  • appears empty, though, sthis was incorrect.
  • Made Connection::thread_aware(), thread_start() and thread_end()
  • static methods, sthey can be called before you create your
  • first connection. Dittfor DBDriver versions of these methods.
  • Calling Connection::thread_start() and thread_end() in
  • examples/cpool.cpp, as appropriate. Above changes were necessary
  • tmake this work sensibly.
  • Made ConnectionPool::release() virtual, syour pool subclass can
  • override it.
  • Added ConnectionPool::size(), sa subclass can know the current
  • number of extant connections.
  • Nlonger single-quoting NOW() call generated for default
  • init of DateTime type when building queries from SSQLS objects
  • in Query::insert(), replace() and update(). The template query
  • and stream interfaces of Query treated NOW() correctly already.
  • Fixed a bug that left SSQLS::table_override_ uninitted if
  • you used certain of the generated ctors or set() member
  • functions instead of others used by the examples. This could
  • cause a crash any time you caused SSQLS.table() tbe called,
  • such as when passing the SSQLS tQuery::insert().
  • Minor memset bug fixed in test/uds.cpp.