diff options
author | unknown <monty@hundin.mysql.fi> | 2001-12-22 15:14:41 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-12-22 15:14:41 +0200 |
commit | 6844ecca88496d29ace4b26dedb574825af89363 (patch) | |
tree | e7bfb1d35578d5456b574e9afc189a529b32fb5f /client | |
parent | 36c20a7db7d56ca2c4072d1eb8f625c5e67c1ca0 (diff) | |
parent | 9625a39ddd2d2e0eb6def99ca1ae34a48c300040 (diff) | |
download | mariadb-git-6844ecca88496d29ace4b26dedb574825af89363.tar.gz |
Merge work:/home/bk/mysql-4.0 into hundin.mysql.fi:/my/bk/mysql-4.0
Docs/manual.texi:
Auto merged
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index 9d98f25eb7b..762589b0374 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1248,7 +1248,8 @@ int close_connection(struct st_query* q) } -/* this one now is a hack - we may want to improve in in the +/* + This one now is a hack - we may want to improve in in the future to handle quotes. For now we assume that anything that is not a comma, a space or ) belongs to the argument. space is a chopper, comma or ) are delimiters/terminators @@ -1291,8 +1292,7 @@ int safe_connect(MYSQL* con, const char* host, const char* user, int i; for (i = 0; i < MAX_CON_TRIES; ++i) { - if(mysql_real_connect(con, host,user, pass, - db, port, sock, 0)) + if (mysql_real_connect(con, host,user, pass, db, port, sock, 0)) { con_error = 0; break; @@ -1365,6 +1365,9 @@ int do_connect(struct st_query* q) con_sock=fn_format(buff, con_sock, TMPDIR, "",0); if (!con_db[0]) con_db=db; + /* Special database to allow one to connect without a database name */ + if (!strcmp(con_db,"*NO-ONE*")) + con_db=0; if ((con_error = safe_connect(&next_con->mysql, con_host, con_user, con_pass, con_db, con_port, con_sock ? con_sock: 0))) |