Commit Graph

839 Commits

Author SHA1 Message Date
cf6e8645fd Travis CI portability fixes for api_sql_pgsql.t. 2017-01-23 10:42:48 +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
4e7d6d87ca Move tx_rate check from thread_run() to sb_event_stop().
This is required for tx_rate to also work with Lua scripts.
2017-01-22 11:17:44 +03:00
b179d21849 Change max_requests and max_time_ns in sb_globals_t to uint64_t. 2017-01-22 11:11:18 +03:00
45830f9cd0 Optimizations and cleanups around sb_next_event(). 2017-01-22 10:45:08 +03:00
21a28231ad Convert main loop functions to FFI.
Convert functions used in the main thread_run loop to use FFI rather
than the traditional Lua calling interface: sysbench.more_events(),
sysbench.event_start() and sysbench. event_stop().
2017-01-22 09:26:53 +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
609f7c4db3 Pass SQL state to Lua in case of errors.
Since PostgreSQL doesn't have SQL error codes, get SQL state in case of
an error for both MySQL and PostgrSQL, and make it available to Lua.
2017-01-20 10:54:01 +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
d767dba581 Move the unused --myisam-max-rows option from drv_mysql.c to legacy API. 2017-01-18 21:52:32 +03:00
5df558c509 In sysbench.sql.lua, report the caller on error, not the check_type() itself. 2017-01-18 19:34:38 +03:00
89d20cc552 Free connection's result set when closing it. 2017-01-18 19:34:16 +03:00
6d38f95b32 Fix a comment typo. 2017-01-18 19:33:45 +03:00
a68ec7512b Fix 'make distcheck'. 2017-01-18 16:56:07 +03:00
0b8bd15242 s/SysBench/sysbench/g 2017-01-18 15:24:50 +03:00
1582a04b72 Move sysbench.rand.* functions to sysbench.rand.lua. 2017-01-18 15:19:19 +03:00
e6849052fe Fix check for event() function in the previous commit. 2017-01-18 13:32:32 +03:00
1168d07ae7 Fixes #103: fail with an error when oltp_common.lua is called directly. 2017-01-18 13:25:42 +03:00
aa7fbce225 Add a comment to oltp_common.lua.
Based on #103, add a comment to oltp_common.lua to explain that it
should not be called directly, but is meant to be included by other OLTP
scripts.
2017-01-18 13:16:40 +03:00
2f865a0053 Use pgsql_common.sh in PostgreSQL-specific regression tests. 2017-01-18 12:13:49 +03:00
9dc835aa48 Disable api_sql_pgsql.t for now. Prepared statements need more work for PostgreSQL. 2017-01-18 00:55:07 +03:00
12184eef13 Fix test_run.sh to work with named tests. 2017-01-18 00:32:31 +03:00
a1d7c7b483 Fix 'make distcheck'. 2017-01-18 00:10:21 +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
50f2c49c93 Improve script_bulk_insert_*.t tests stability. 2017-01-17 12:49:31 +03:00
1afeecf61d Revert unrelated changes from the previous commit. 2017-01-17 12:24:08 +03:00
610c26bf17 Cache-line align important data structures in sb_lua.c. 2017-01-17 12:18:27 +03:00
5cab979e7d Test multiple connections per thread.
Multiple connections per thread were made possible as a part of the SQL
API refactoring. The feature is a pre-requisite for fixing issue #73.

This commit just adds a regression test.
2017-01-17 01:12:31 +03:00
7f0e30c18c Use local counter variables in oltp_common.lua. 2017-01-17 00:41:28 +03:00
950d848fcd Fix oltp_insert.lua, add a regression test. 2017-01-17 00:39:44 +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
33dd1cec69 Exclude third-party libraries from coverage report. 2017-01-16 16:37:16 +03:00
ea500cc834 Presumably better way to suppress SSL errors with coveralls in Travis. 2017-01-16 16:26:07 +03:00
345b60bc7e Suppress urllib3 warnings for coveralls to work in Travis CI. 2017-01-16 16:17:13 +03:00
5a63a124a1 Fix Travis/Coveralls links in the 'master' branch. 2017-01-16 16:13:52 +03:00
819203785f Add select_random*.lua scripts to Makefile.am. 2017-01-16 16:09:08 +03:00
ae2d772ff2 Remove stubs for old Lua scripts. 2017-01-16 16:08:08 +03:00
8925dfdc79 Re-write select_random*.lua benchmarks to the new SQL API. 2017-01-16 16:01:35 +03:00
42ac8f93c9 Merge branch '1.0' 2017-01-16 11:16:13 +03:00
be1cf06df1 Merge branch '0.5' into 1.0 2017-01-16 11:15:13 +03:00
b23a7db377 Merge branch '0.4' into 0.5 2017-01-16 11:14:00 +03:00
ecb0ace49d Fix an incorrect free() in list option handling. 2017-01-16 11:04:41 +03:00
a4ca87f64d Add MemorySanitizer support to configure.ac. Use it in Travis CI when supported. 2017-01-16 10:46:09 +03:00
372bc69792 Check if ASAN is supported by the compiler. 2017-01-16 10:18:47 +03:00
d019abd180 Fix ASAN support in configure.ac. 2017-01-16 09:47:31 +03:00
52e075cb0c Add AddressSanitizer support. Enable it by default in Travis CI builds. 2017-01-16 09:34:13 +03:00
60778578f8 Fixes #101: Obscure ./configure error when pkg-config is not installed
Produce a more meaningful error message at autoconf time when pkg-config
is not installed on the host system.
2017-01-16 08:41:48 +03:00