59 Commits

Author SHA1 Message Date
cfe594bd42 SQL API: fix prepared statements with FLOAT/DOUBLE type arguments
SQL API failed to prepare correctly SQL statements containing floating
point arguments.
2021-03-25 21:20:15 +03:00
bcd950b714 Merge branch '1.0' 2019-12-08 15:11:02 +03:00
cf310c37c2 regression tests: compatibility fix for PostgreSQL 12 2019-12-08 14:23:21 +03:00
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
27a5b99b90 Merge branch '1.0' 2018-04-03 13:48:08 +03:00
0d0d214266 Fix GH-220: Testsuite api_sql_mysql.t failed ...
api_sql_mysql.t failed if SBTEST_MYSQL_ARGS included an explicit
specification of '--mysql-socket', in which case ignores --mysql-host
and asssumes 'localhost'.
2018-04-03 13:46:19 +03:00
97f1c8cfbf Merge branch '1.0' 2018-03-23 19:14:54 +03:00
7b383cc537 Don't fail when query_row() is called with an empty SELECT. 2018-03-23 19:13:52 +03:00
0eaa7e4697 Merge branch '1.0' 2018-03-22 10:25:14 +03:00
ce5a14b50a Fix PostgreSQL-specific regression tests to work with 10.3.1.
PostgreSQL 10.3.1 changed the dump format of schema objects. We now
remove the schema name to make results compatible across all PostgreSQL
versions.
2018-03-22 10:23:11 +03:00
1036b64d32 Merge branch '1.0' 2018-03-21 22:43:44 +03:00
89e37ba6f7 Don't crash when SQL bulk insert API calls are used out of order. 2018-03-21 22:43:08 +03:00
edb40e012a Remove legacy (0.5) API. 2018-01-07 14:08:27 +03:00
08d4b38bb4 Merge branch '1.0' 2017-12-24 11:50:52 +03:00
6972814378 Replace custom data inspection code in regression tests with inspect.lua. 2017-12-24 11:48:29 +03:00
fc5fa698a3 Merge branch '1.0' 2017-11-10 11:47:43 +03:00
53bcc667ca Sort PostgreSQL index defs in regression tests to make results deterministic. 2017-11-10 11:44:08 +03:00
dbcba59927 Merge branch '1.0' 2017-11-09 14:50:15 +03:00
06c7f55f24 Fix #178: (--tables>1 --threads>1 broken in oltp_insert.lua)
A combination of --tables and --threads with non-default (i.e. higher
than 1) values resulted in incompleted set of tables generated by
"prepare" for the oltp_insert.lua script.
2017-11-09 12:35:17 +03:00
9079e0a271 Merge branch '1.0' 2017-10-26 17:24:19 +03:00
e3ef9b642c Add -q (quiet) flag to psql in pgsql_common.sh. 2017-10-26 15:07:53 +03:00
0bd06b9a47 Fix Postgres-specific regression tests to work with PostgreSQL 10. 2017-10-26 14:59:25 +03:00
ce7770c626 Merge branch '1.0' 2017-03-12 10:46:59 +03:00
89ab44d50e Fix #119 (oltp_insert.lua + --auto-inc=0 fails)
Fix oltp_insert.lua when run with --auto-inc disabled. Add regression tests.
2017-03-12 10:45:03 +03:00
800f2e90e6 Rename the 'prewarm' command to 'warmup'. Keep the old name as an alias. 2017-02-14 14:09:52 +03:00
21d87e792e Run OLTP RW regression tests with a single thread for more deterministic results. 2017-02-05 11:22:47 +01:00
40c14789aa Export mysql_drv_reconnect() to Lua SQL API. 2017-02-02 10:59:51 +03:00
7f56e219f7 Rename --num-threads to --threads.
Accept the old name with a warning for compatibility.
2017-02-01 17:42:39 +03:00
788fcbb30b Rename --max-requests to --events, --max-time to --time.
Print warnings if old names are used, but accept them for compatibility.
2017-02-01 17:20:22 +03:00
d017ae0c85 Support the deprecated --test option for compatibility with legacy scripts. 2017-02-01 10:10:27 +03:00
12e56538f3 Parallel 'prepare' and 'prewarm' (MySQL-only) commands for OLTP benchmarks. 2017-01-28 17:55:29 +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
a4218987cb Fix help_drv_*.t tests broken by the command line syntax change. 2017-01-25 16:23:38 +03:00
45e219d038 Change the command line syntax: remove the --test option. 2017-01-25 00:02:59 +03:00
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