Commit Graph

23 Commits

Author SHA1 Message Date
deb4994144 Fix prepared statements for PostgreSQL driver.
libpq requires zero-terminated strings for text arguments.
2017-01-23 22:51:58 +03:00
d89df214f7 Export sysbench.version and sysbench.version_string to Lua. 2017-01-23 14:11:41 +03:00
48ea461dd3 Re-enable api_sql_pgsql.t. 2017-01-23 10:12:39 +03:00
29c0299aef Convert OLTP scripts to prepared statements. 2017-01-23 03:32:27 +03:00
7ddab2dcff Fix api_sql_mysql.t to work with older MySQL versions. 2017-01-21 17:19:59 +03:00
cdabf72b7b Implement customer error hooks.
If a Lua script defines the sysbench.hooks.sql_error_ignorable function,
sysbench calls it whenever an SQL error occurs and passes information
about connection, failed query, SQL error number, state and message as
arguments. If the function returns true, the error is ignored and the
entire event is restarted. Otherwise sysbench aborts scripts execution.
2017-01-21 16:58:38 +03:00
dbb7bbfcd1 Implement error propagation.
SQL query errors can now be propagated to Lua scripts. This is a
prerequisite for custom error hooks.
2017-01-20 02:43:08 +03:00
5e7d79b49f Fixes #13: Export db_fetch_row
Add support for result set retrieving for MySQL and PostgreSQL drivers
and export it to the new Lua SQL API.
2017-01-17 22:58:18 +03:00
a6cebd3a57 Rewrite OLTP benchmarks with the new SQL API + cleanups. 2017-01-17 00:17:17 +03:00
ee22b36298 Rewrite bulk_insert.lua to the new SQL API + regression tests. 2017-01-16 17:54:07 +03:00
378c49b275 Fix legacy OLTP regression tests. 2017-01-15 16:53:00 +03:00
84fed669cc Move oltp_point_select.lua from sysbench/tests/db/ to sysbench/lua/.
Move oltp_point_select.lua to the sysbench/lua/ directory. Add basic
regression tests.
2017-01-15 16:45:38 +03:00
1d434809ec SQL API refactoring, cut #1. 2017-01-14 01:29:57 +03:00
ec2274bf2f Merge branch 'luajit' into concurrency_kit 2016-12-23 17:18:20 +08:00
bee2ed3c00 Rafactor select_random_* benchmarks,
Refactor select_random_*.lua to reuse code from common.lua. Add basic
regression tests.
2016-12-08 22:04:55 +03:00
18b7e914a6 Various test-related fixes.
1. Fix drivers.t so it passes when no DB drivers are available.
2. Make it possible for the test suite to detect if certain DB drivers
are available, so individual tests that require them can be skipped.
2016-12-05 13:25:39 +03:00
aade88ed5e Merge branch '1.0' into concurrency_kit 2016-12-05 12:22:21 +03:00
0a6bc8a9ed Add tests for --oltp-create-secondary. 2016-10-22 21:30:24 +03:00
bf2924b0fc Use an atomic fetch-and-add instead of a global mutex in sb_lua_get_request().
This was a scalability bottleneck with --max-requests>0.
2016-10-16 23:09:51 +03:00
65c083a6ba Report Git commit SHA in configure and "sysbench --version" output. 2016-10-16 22:57:37 +03:00
95885f6a9f Basic tests for oltp.lua against MySQL and PostgreSQL. 2016-09-16 23:48:12 +03:00
2ad038e816 Basic regression tests for MySQL and PostgreSQL drivers.
Add the very basic regression tests for MySQL and PostgreSQL drivers +
necessary Travis CI configuration updates.
2016-09-09 17:26:43 +03:00
0169adc09f Add tests/include/config.h.in. 2016-09-05 10:45:04 +03:00