Functionality added or changed:
Implemented
getScale(),getPrecision()andgetColumnDisplaySize()forMySQL_ResultSetMetaDataandMySQL_Prepared_ResultSetMetaData.Changed
ResultSetMetaDatamethodsgetColumnDisplaySize(),getPrecision(),getScale()to returnunsigned intinstead ofsigned int.DATE,DATETIMEandTIMEare now being handled when calling theMySQL_PreparedResultSetmethodsgetString(),getDouble(),getInt(),getLong(),getBoolean().Reverted implementation of
MySQL_DatabaseMetaData::getTypeInfo(). Now unimplemented. In addition, removedcppconn/datatype.hfor now, until a more robust implementation of the types can be developed.Implemented
MySQL_PreparedStatement::setNull().Implemented
MySQL_PreparedStatement::clearParameters().Added PHP script
examples/cpp_trace_analyzer.phpto filter the output of the debug trace. Please see the inline comments for documentation. This script is unsupported.Implemented
MySQL_ResultSetMetaData::getPrecision()andMySQL_Prepared_ResultSetMetaData::getPrecision(), updating example.Added new unit test framework for JDBC compliance and regression testing.
Added
test/unitas a basis for general unit tests using the new test framework, seetest/unit/examplefor basic usage examples.
Bugs fixed:
Fixed
MySQL_PreparedStatementResultSet::getDouble()to return the correct value when the underlying type isMYSQL_TYPE_FLOAT.Fixed bug in
MySQL_ConnectionMetaData::getIndexInfo(). The method did not work because the schema name wasn't included in the query sent to the server.Fixed a bug in
MySQL_ConnectionMetaData::getColumns()which was performing a cartesian product of the columns in the table times the columns matchingcolumnNamePattern. The exampleexample/connection_meta_schemaobj.cppwas extended to cover the function.Fixed bugs in
MySQL_DatabaseMetaData. AllsupportsCatalogXXXXXmethods were incorrectly returningtrueand allsupportsSchemaXXXXmethods were incorrectly returningfalse. NowsupportsCatalogXXXXXreturnsfalseandsupportsSchemaXXXXXreturnstrue.Fixed bugs in the
MySQL_PreparedStatementsmethodssetBigInt()andsetDatetime(). They decremented the internal column index before forwarding the request. This resulted in a double-decrement and therefore the wrong internal column index. The error message generated was:setString() ... invalid "parameterIndex"
Fixed a bug in
getString().getString()is now binary safe. A new example was also added.Fixed bug in
FLOAThandling.Fixed
MySQL_PreparedStatement::setBlob(). In the tests there is a simple example of a class implementingsql::Blob.