From ec8ce55942fd4a978be36aa14e4efcf804c908ce Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 13 Sep 2010 15:08:01 +0200 Subject: Make test options consistent with MySQL --- build/mysql/configure | 4 ++-- build/mysql/mysql | 4 ++-- libcommon/common/common.cxx | 4 ++-- libcommon/common/options.cli | 4 ++-- m4/mysql.m4 | 4 ++-- mysql.options | 13 +++++++------ 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/build/mysql/configure b/build/mysql/configure index c1d6382..a454fc0 100755 --- a/build/mysql/configure +++ b/build/mysql/configure @@ -60,10 +60,10 @@ drv=$dcf_root/db-driver echo "--user '$user'" >$opt if [ "$passwd" != "NULL" ]; then -echo "--passwd '$passwd'" >>$opt +echo "--password '$passwd'" >>$opt fi -echo "--db-name '$db'" >>$opt +echo "--database '$db'" >>$opt echo "--host '$host'" >>$opt echo "--port $port" >>$opt diff --git a/build/mysql/mysql b/build/mysql/mysql index 766e580..c273d56 100755 --- a/build/mysql/mysql +++ b/build/mysql/mysql @@ -19,11 +19,11 @@ while [ $# -gt 0 ]; do opt="$opt --user=$2" shift 2 ;; - --passwd) + --password) opt="$opt --password=$2" shift 2 ;; - --db-name) + --database) opt="$opt --database=$2" shift 2 ;; diff --git a/libcommon/common/common.cxx b/libcommon/common/common.cxx index 960a946..4d2d5f0 100644 --- a/libcommon/common/common.cxx +++ b/libcommon/common/common.cxx @@ -44,8 +44,8 @@ create_database (int argc, char* argv[], size_t max_connections) return auto_ptr ( new mysql::database ( ops.user (), - ops.passwd_specified () ? &ops.passwd () : 0, - ops.db_name (), + ops.password_specified () ? &ops.password () : 0, + ops.database (), ops.host (), ops.port (), ops.socket_specified () ? &ops.socket () : 0, diff --git a/libcommon/common/options.cli b/libcommon/common/options.cli index 5b87d70..b5db026 100644 --- a/libcommon/common/options.cli +++ b/libcommon/common/options.cli @@ -17,13 +17,13 @@ namespace cli "MySQL database user." }; - std::string --passwd + std::string --password { "", "MySQL database password" }; - std::string --db-name + std::string --database { "", "MySQL database name." diff --git a/m4/mysql.m4 b/m4/mysql.m4 index f40ba6d..b1a9d6a 100644 --- a/m4/mysql.m4 +++ b/m4/mysql.m4 @@ -213,12 +213,12 @@ AC_CONFIG_COMMANDS([db.options], fi if test x$mysql_password_set = xyes; then - echo "--passwd '$mysql_password'" >>db.options + echo "--password '$mysql_password'" >>db.options echo 'opt="$opt --password='"$mysql_password"'"' >>db-driver fi if test x$mysql_db_set = xyes; then - echo "--db-name '$mysql_db'" >>db.options + echo "--database '$mysql_db'" >>db.options echo 'opt="$opt --database='"$mysql_db"'"' >>db-driver fi diff --git a/mysql.options b/mysql.options index 54fc174..fe79a7c 100644 --- a/mysql.options +++ b/mysql.options @@ -1,9 +1,10 @@ # Sample MySQL options file used to run the tests. Adjust to # match your MySQL setup. # ---user 'odb_test' ---db-name 'odb_test' -# --password '' -# --host '' -# --port 0 -# --socket '' + +--user odb_test +--database odb_test +# --password +# --host +# --port +# --socket -- cgit v1.1