Commit Graph

896 Commits

Author SHA1 Message Date
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
b9dab8c0f5 Also close BEGIN/COMMIT statements in oltp_common.lua. 2017-01-30 14:44:34 +03:00
61a167354b Close prepared statements in OLTP scripts. 2017-01-30 14:24:05 +03:00
419be9f8ea Properly close/deallocate connections on 'prepare'. 2017-01-30 13:54:15 +03:00
7c43653e4f Fix memory leaks in drv_pgsql.c. 2017-01-30 13:35:00 +03:00
dbce3039a7 Do not create duplicate connections in sb_lua_db_connect(). 2017-01-30 11:32:11 +03:00
5d36164b98 Cleanup per-thread Lua contexts on exit. 2017-01-30 10:16:23 +03:00
83b0617ee9 Deallocate TLS context when closing the Lua state. 2017-01-30 08:54:50 +03:00
6eb5ede654 Fix a Lua state leak on script termination. 2017-01-30 08:48:26 +03:00
ba312d33fb Revert GCC-related changes from the previous commit. 2017-01-30 08:30:10 +03:00
bcf79d01e7 Use more recent clang and gcc versions. 2017-01-30 08:21:32 +03:00
a4b9f54948 Require sudo in .travis.yml. 2017-01-30 08:09:41 +03:00
ae92b6f45f Update .travis.yml to Ubuntu Trusty. 2017-01-30 08:02:24 +03:00
591c588fa7 Implement custom report hooks. Add CSV and JSON reporters as examples. 2017-01-29 23:46:43 +03:00
36bc3672a0 Small formatting fixes. 2017-01-29 20:42:42 +03:00
34eb53d425 Initialize PRNG for background threads. 2017-01-29 20:15:20 +03:00
1d9f824b34 Fix format specifier for stat->events. 2017-01-29 20:12:39 +03:00
04b4f756d9 Refactor stats reporting to make custom reports possible. 2017-01-29 19:32:14 +03:00
bc531b28ad Get rid of report_interval_mutex. 2017-01-29 14:18:35 +03:00
1cf5b33eda Move counters code from db_driver.c to sb_counter.c. 2017-01-29 13:45:26 +03:00
2a2cd817b9 Silence spurious uninitialized value warnings. 2017-01-28 21:24:13 +03:00
12e56538f3 Parallel 'prepare' and 'prewarm' (MySQL-only) commands for OLTP benchmarks. 2017-01-28 17:55:29 +03:00
49aa0b4322 Fixes #78: better error hints for missing help command
Now if the help command is specified for a script, sysbench first check
if the script impelements a custom help command, and calls it. If no
custom command is defined, it checks whether the script declares any
command line options, in which case it prints their description. If
neither the help() function nor an option declaration is available,
sysbench prints an error message.
2017-01-28 16:20:29 +03:00
49016568ba Implement custom commands + parallel custom commands. 2017-01-28 15:45:16 +03:00
f25422c813 When joining worker threads, decrement sb_globals.num_running atomically. 2017-01-28 14:12:49 +03:00
74d14e764c Signal an error on unknown error codes in drv_pgsql.c. 2017-01-27 21:00:06 +03:00
253dcc4c27 Remove unused function checks from configure.ac. 2017-01-27 19:00:56 +03:00
c9155686b7 Fix syntax error in sysbench.lua. 2017-01-27 17:59:10 +03:00
a5b7f22275 Simplify condition in sysbench.lua:thread_run(). 2017-01-27 16:05:29 +03:00
8d5652699d Fix a typo. 2017-01-27 15:50:45 +03:00
8c4f6f09d5 Remove unnecessary 'local' declarations in oltp_common.lua. 2017-01-27 15:41:25 +03:00
b8745c8a22 Make bundled OLTP Lua scripts executable, add hashbangs. 2017-01-27 14:24:43 +03:00
182743ffee FIx sporadic cmdline.t failures. 2017-01-27 12:50:50 +03:00
fa3d2a80d2 Silence spurious error messages on 'make install'. 2017-01-27 11:51:05 +03:00
06d4f99cb6 Rename the 'sysbench' subdirectory to 'src'. 2017-01-27 09:39:28 +03:00
aa5af68938 Move legacy API to sysbench.compat.lua. 2017-01-26 23:57:54 +03:00
a3b4c0610e Add option declarations to OLTP tests.
All bundled OLTP tests now declare their supported options. Which means:

- unknown options are not be silently accepted, but throw an
  error (fixes #15)
- 'sysbench /any OLTP script/ help' now prints a list of supported
  options, their descriptions, types and default values just as built-in
  tests do (fixes #79)
2017-01-26 14:35:01 +03:00
2c5638ff9e Remove TODO. 2017-01-26 04:33:57 +03:00
9d73ed0865 Allow Lua scripts to declare supported options.
Lua scripts can now declare their supported options, in which case
sysbench validates command line arguments and display usage
information.

This is a prerequisite for fixing #15 and #79.
2017-01-26 04:23:55 +03:00
2cda228c7e Command line options refactoring:
- add support for 'validator' functions
- add support to define command line options after test
initialization. It is a prerequisite for option definitions in Lua
scripts
- various code cleanups
2017-01-25 19:09:44 +03:00
d8e2144ea9 Fix typo in a help string. 2017-01-25 17:16:14 +03:00
a4218987cb Fix help_drv_*.t tests broken by the command line syntax change. 2017-01-25 16:23:38 +03:00
48375407fa Grammar fixes. 2017-01-25 11:04:56 +03:00
96a1ed4049 Adjust cmdline.t to pass on slower machines. 2017-01-25 01:49:51 +03:00
4cf5884ac9 Use cache-aligned allocation for thread_stats. 2017-01-25 01:04:04 +03:00
45e219d038 Change the command line syntax: remove the --test option. 2017-01-25 00:02:59 +03:00
d2b494ac2d Revert .travis.yml changes. 2017-01-23 23:24:03 +03:00
dec61a10e0 Exclude excessive OS combinations from Travis build matrix. 2017-01-23 23:16:25 +03:00
5852c405ff Fix api_sql_mysql.t. 2017-01-23 23:16:12 +03:00