Commit Graph

28 Commits

Author SHA1 Message Date
ad2b1bf1e7 Merge branch '1.0' 2018-12-16 17:27:36 +03:00
b017a998ef Fix GH-282: Mysql's fetch_row() is broken
Fix both MySQL and PostgreSQL drivers to return an error when
fetch_row() is called after retrieving all rows in the result set.
2018-12-16 17:21:39 +03:00
a245b2f531 OLTP scripts: add --reconnect option.
oltp_*.lua scripts now support the --reconnect=N option. When specified,
sysbench will reconnect after every N events.

Fixes GH-90.
2018-12-11 23:22:56 +03:00
3a5475b53e Remove Windows support which was broken in 1.0. 2018-04-21 15:19:36 +03:00
565e93cf37 Update copyright years. 2018-04-21 08:14:20 +03:00
8ded1d9f10 Remove unsupported Oracle, Drizzle and AttachSQL drivers from the source tree. 2018-04-21 08:08:48 +03:00
e5c8052027 Make --mysql-ssl behave like --ssl-mode in MySQL client utilities.
The problem with MySQL 5.7+ client libraries was that there was no way
to disable SSL usage from the sysbench command line, because the client
library defaults to MYSQL_OPT_SSL_MODE = SSL_MODE_REQUIRED, even if
--mysql-ssl is not used. So the only way to disable it was disabling SSL
on the server.

Now --mysql-ssl behaves like the --ssl-mode option in MySQL client
utilities. It accepts the following values (with "disabled" being the
default):

disabled, preferred, required, verify_ca, verify_identity.

When sysbench is built With pre-5.6 MySQL client libraries or MariaDB
client libraries, where support for SSL modes is not available,
--mysql-ssl behavior is not affected by this change, i.e. it remains a
boolean variable accepting the on/off values, with "off" being the
default.
2018-03-31 20:32:09 +03:00
9ebe81693f Update copyright year in drv_mysql.c 2018-03-31 16:03:25 +03:00
b1a0694cc0 Added --mysql-ssl-key, --mysql-ca and --mysql-ssl-cert.
Replace hard-coded values for client SSL path names with driver options,
at the same time making it possible to skip those options even when
--mysql-ssl is used.
2018-03-31 15:28:29 +03:00
81ae246691 Do not error if SSL files are missing 2018-03-29 12:52:08 +02:00
0169d42681 Fix #180: Add support for CockroachDB (PostgreSQL protocol)
Add '40001' (serialization_failure) to the list of ignored SQL states in
drv_pgsql.c. The error appears to be specific to CockroachDB, but
restarting the current transaction is the only reasonable way to handle
it.
2017-11-14 11:30:12 +03:00
f5fa7800cb A better version of the fix for #172. 2017-09-17 23:32:38 +03:00
cd13882cb6 Fix #172: sysbench 1.0.9 doesn't build with mariadb 10.2.8
Add a configure check for <server/mysql_version.h> which appears to be
the most portable way to fix MariaDB builds (see MDEV-13773).
2017-09-17 22:23:30 +03:00
9ca119c9c7 Add workaround for MySQL #87337 to build against 8.0.2. 2017-08-21 19:24:13 +03:00
0c12758222 Fix building against MariaDB 10.2 (thanks to Xavier Bachelot). 2017-07-13 15:29:02 +03:00
538521184a Compatibility fix for MySQL 8.0 client libraries.
The type of MYSQL_BIND::is_null has been changed from my_bool* to bool*
in MySQL 8.0. Since the size bool is not defined by the standard, we
either need to change the DB and Lua APIs to ensure is_null points to a
large enough buffer for MySQL API to store a bool, or do conversions
between sysbench and MySQL data structures. For now, just assert that
sizeof(bool) == 1, which is likely the case on all supported platforms.
2017-05-15 14:17:21 +03:00
75b530c7fc Fix builds with MariaDB client libraries. 2017-04-12 19:34:30 +03:00
6ad3f09a07 Fix builds with MySQL 8.0.1 client libraries.
my_bool has been replaced with bool in MySQL 8.0.1.
2017-04-12 00:24:34 +03:00
3348e8dfa3 Remove unused gresults variable from drv_mysql.c. 2017-04-12 00:21:46 +03:00
40c14789aa Export mysql_drv_reconnect() to Lua SQL API. 2017-02-02 10:59:51 +03:00
cdc450a258 Fix a comment typo. 2017-01-30 17:24:56 +03:00
1363264c61 Handle more cases where drv_pgsql.c may leak memory. 2017-01-30 16:04:39 +03:00
55aca14d92 Add a missing PQclear() call in pgsql_drv_bind_param(). 2017-01-30 15:22:21 +03:00
ca0da79d82 Call PQclear() for non-SELECT queries explicitly in drv_pgsql.c. 2017-01-30 15:13:05 +03:00
7c43653e4f Fix memory leaks in drv_pgsql.c. 2017-01-30 13:35:00 +03:00
1cf5b33eda Move counters code from db_driver.c to sb_counter.c. 2017-01-29 13:45:26 +03:00
74d14e764c Signal an error on unknown error codes in drv_pgsql.c. 2017-01-27 21:00:06 +03:00
06d4f99cb6 Rename the 'sysbench' subdirectory to 'src'. 2017-01-27 09:39:28 +03:00