That could happen only with binary results, i.e. with results of
PreparedStatement if useServerPrepStmts option set.
Also the commit contain some performance improvements. In particular for
converting string values to double.
Statement::addBatch was omitted in previous commit. Here it is optimized
as well(in similar way).
Previous commit did not restore the autocommit in the stored server
status, so next query could thing it still off.
Fixed testcases for maxscale and fixing testing with mysql servers.
Using setByte could crash driver at the query execution. Also, all
integer getters - i.e. getBytes, ..., getUInt64 would not return correct
number in case of binary string field. They old would try to use field
value as string data and convert string to the appropriate integer type.
It was revealed by setBytes testcase, as getBytes(for SELECT ? query)
would not return the same value, that had been set, or even throw
exception as "value is out of range"
Fix of test in databasemetadata, that checks functions returning server
version.
Update of Travis matrix
Added couple of tests to prepared statement to test SP with PS instead
of CallableStatement
Also fixed bug in batch execution using param array(aka bulk) method.
Callback for parameters returned wrong type, and sometimes it could be
interpreted as an error, and the whole bulk operation would fail
Fix of the test in databasemetadata, that did not now wxpect server
major version can be 11
Removed 10.3 and added 11.0 to the travic config
These are to decide if string is date, is time, if the statement is Call
and is the statement prepareble/should be prepared on server
Also, removed some regexp references, that are currently not used(i.e.
in parts of code for features we currently not support)
The feature is enabled with useBulkStmts boolean options, that is off by
default. Works only with MariaDB servers >= 10.2.7. It won't be used
with streaming parameters.
For insert queries, rewrites batch of staments to execute in a single
executeQuery. e.g.
insert into ab (i) values (?) with first batch values = 1, second = 2
will be rewritten as insert into ab (i) values (1), (2)
If query cannot be rewriten in "multi-values", rewrite will use
multi-queries, i.e.
insert into ab (i) values (1);insert into ab (i) values (2)
Using this option causes the useServerPrepStmts option to be set to false
The fix sets precision 30 for conversion of the double number to its
string representation, requeired for "client side" statement preparing(server
side wasn't affected by the bug). 30 is taked because it's max number of
decimals for decimal column type. This can cause "overflow" errors if
setDouble is used to populate shorter varchar or other types. SOme older
test have been amended to deal with that.
Testframework was fixed to be more informative about where the error
occured(often it printed line where the exception was caught, and for
some tests that is not very helpful.
Fixed couple of compilation warnings.
The reason was, that filling of vector with executeBatch results was
done using undefined behavior - it was done using [] operator member
access for not existing members. The values were inserted correctly, but
the size of vector happened to not always be reported correctly.
Added similar test to preparedstatement.
Made clearBatch not to reset current set of parameters - that looks
like to be that jdbc specs expect.
Fixed other such cases of wrong vector use.
Made some to/from text conversion to use C locale.
Added missing headers to msi. Headers now installed into include/mariadb
ALl headers have been renamed from .h to .hpp
ConnCpp.hpp renamed to conncpp.hpp(all small letters)
All headers but conncpp.hpp, have been moved to conncpp subdirectory in
include, and in the msi
All exception classes have got explicit (exported from dll on Windows) copyconstructor
decluration, and definition of those constructors in the connector
library. And to stay on the safe side, all other constructors and
destructors definitions have been moved to library side.
Fixed the error, that few exception methods were declared as
dllimported, and defined in the header at the same time.
This includes fixes of various outstanding bugs in CSPS
Made setDouble to accept long double(CONCPP-55)
static_test and driver_test now make one run with default CSPS, and one
with SSPS
Updated README.md with more options info. Changed desription of some
options in DefaultOptions.cpp. Fixed use of autoReconnect and
localSocket
For binary protocol connector expected the string is null-terminated.
Also it getBoolead was subotimal and significantly slowed down the
testsuite running.
Removed 5.5 server from travis config
Fixed database metadata test to skip one check with 10.1 server, as it
returns wrong data in many cases.
Moved common files to the separate OBJECT lib, as it looked like it is
quite difficult for the gcc to chew it.
Skipped tiem-outing test for now. Needs to be fixed.
The commit contains too many fixes to remember all of them, really. May
resultset navigation fixes. Crashes, caused by not initializing of some
properties in some classes, etc.