summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2003-12-19 16:42:17 +0200
committerunknown <monty@mysql.com>2003-12-19 16:42:17 +0200
commit6988eaffade652053ab5154ace6a321e4d2ff9c6 (patch)
tree1bc701f03b8b7eee26e53e61cad701ad3bbf621d /client
parent245b1385a10a12a955c95338b08190cac5cfcbd4 (diff)
parenta7d8af9b08363808c2e2ec9e26ae67a5616bb746 (diff)
downloadmariadb-git-6988eaffade652053ab5154ace6a321e4d2ff9c6.tar.gz
merge with 4.0.18
Build-tools/Bootstrap: Auto merged client/mysql.cc: Auto merged mysql-test/r/auto_increment.result: Auto merged mysql-test/t/auto_increment.test: Auto merged mysql-test/t/type_decimal.test: Auto merged sql/opt_range.cc: Auto merged sql/share/czech/errmsg.txt: Auto merged sql/share/english/errmsg.txt: Auto merged sql/share/estonian/errmsg.txt: Auto merged sql/slave.cc: Auto merged sql/share/french/errmsg.txt: Auto merged sql/share/greek/errmsg.txt: Auto merged sql/share/hungarian/errmsg.txt: Auto merged sql/share/japanese/errmsg.txt: Auto merged sql/share/korean/errmsg.txt: Auto merged sql/share/norwegian-ny/errmsg.txt: Auto merged sql/share/norwegian/errmsg.txt: Auto merged sql/share/polish/errmsg.txt: Auto merged sql/share/romanian/errmsg.txt: Auto merged sql/share/slovak/errmsg.txt: Auto merged
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index df55ebcfab0..d2bed5519bf 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -2545,8 +2545,11 @@ static int
sql_real_connect(char *host,char *database,char *user,char *password,
uint silent)
{
- mysql_close(&mysql);
- connected= 0;
+ if (connected)
+ {
+ connected= 0;
+ mysql_close(&mysql);
+ }
mysql_init(&mysql);
if (opt_connect_timeout)
{