Added protection for syntax errors in Lua scripts when code in the
top-level chunk (i.e. not in one of the functions) tries to access the
database driver.
comma separated list of numeric errors that should be ignored. If
sysbench encounters an ignored error indicating that the server is no
longer available (i.e. one of CR_SERVER_LOST, CR_SERVER_GONE_ERROR,
CR_TCP_CONNECTION, or CR_SERVER_GONE_ERROR), it automatically
reconnects. Otherwise it just restarts the current transaction.
A user can also specify --mysql-ignore-errors=all, in which case all
errors will be ignored.
There are also 2 new counters: ‘reconnects’ and ‘errors’, which are
reported in both interval and final statistics.
In file_fsync(), for the mmap mode of fileio operation, a successful
return sentence was missing, and the catch-all error return sentence was
being activated for this mode. This is fixed by adding a proper return
value for this mode.
Similar to multiple hosts in the --mysql-host option, --mysql-socket can
now accept multiple comma-separated sockets. In which the value of
--mysql-host is ignored, and connections are created to all specified
sockets on the round-robin basis.
Fixed a race condition in the test termination code with respect to
--report-interval: the reporting thread might read a non-zero
report_interval value and call print_stats(). If report_interval is
changed to 0 by the master thread and the test's done() method called,
print_stats() could access some shared resources deallocated in
done().
Fixed by protecting report_interval with a separate mutex which is
locked on updates and during the check by reporting thread and
print_stats().
stats
When --forced-shutdown is used, it prints the currently collected
statistics and terminates without waiting for worker threads to
complete. This was implemented to be able to complete benchmark even
if we have some long running or stuck transactions.
The problem is that unfinished transactions are not reflected in
statistics. So, for example, if we do have stuck transactions that
have been stuck for the entire test duration, their timers will still
be running on forced shutdown and thus, statistics will only show
transactions performed by other threads, if any.
The fix is stop all timers on forced shutdown, so even stuck
transactions are accounted with (forced_shutdown_time -
trx_start_time) duration. Also printing the number of currently
running transactions at the time of forced shutdown would also make
sense.
The problem was in a hard-coded library (-ldl) being added to LIBADD.
Fixed by using the appropriate Libtool/Autoconf macros to check if using
-ldl is necessary.