diff --git a/src/db_driver.c b/src/db_driver.c index 1416e07..3fb843c 100644 --- a/src/db_driver.c +++ b/src/db_driver.c @@ -77,7 +77,13 @@ static int db_free_results_int(db_conn_t *con); static sb_arg_t db_args[] = { SB_OPT("db-driver", "specifies database driver to use " - "('help' to get list of available drivers)", NULL, STRING), + "('help' to get list of available drivers)", +#ifdef USE_MYSQL + "mysql", +#else + NULL, +#endif + STRING), SB_OPT("db-ps-mode", "prepared statements usage mode {auto, disable}", "auto", STRING), SB_OPT("db-debug", "print database-specific debug information", "off", BOOL), diff --git a/tests/t/help_drv_mysql.t b/tests/t/help_drv_mysql.t index 5924d00..b0988f4 100644 --- a/tests/t/help_drv_mysql.t +++ b/tests/t/help_drv_mysql.t @@ -5,6 +5,9 @@ Skip test if the MySQL driver is not available. > exit 80 > fi + $ sysbench --help | grep -- '--db-driver' + --db-driver=STRING specifies database driver to use ('help' to get list of available drivers) [mysql] + $ sysbench --help | sed -n '/mysql options:/,/^$/p' mysql options: --mysql-host=[LIST,...] MySQL server host [localhost] diff --git a/tests/t/opt_help.t b/tests/t/opt_help.t index 9a1fd87..3334394 100644 --- a/tests/t/opt_help.t +++ b/tests/t/opt_help.t @@ -50,7 +50,7 @@ separately. General database options: - --db-driver=STRING specifies database driver to use ('help' to get list of available drivers) + --db-driver=STRING specifies database driver to use \('help' to get list of available drivers\)( \[mysql\])? (re) --db-ps-mode=STRING prepared statements usage mode {auto, disable} [auto] --db-debug[=on|off] print database-specific debug information [off]