summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2016-02-22 12:13:35 -0600
committerSlávek Banko <slavek.banko@axis.cz>2016-02-27 01:15:53 +0100
commit688cd47b1a45cdf03ba88bbccba91be5b3b490ac (patch)
tree4194a543c4ec89d0c012a4b68646de5bd8365585
parenteae0369d1cfbe2ae18373e33cfaf5be8d85896d0 (diff)
downloadtqt3-688cd47b1a45cdf03ba88bbccba91be5b3b490ac.tar.gz
tqt3-688cd47b1a45cdf03ba88bbccba91be5b3b490ac.zip
Automated update from Qt3
(cherry picked from commit b99016b854c76cef7bb7869faeadc9e0ce398db7)
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp
index 9d49c962e..9d2f6c570 100644
--- a/src/sql/drivers/mysql/qsql_mysql.cpp
+++ b/src/sql/drivers/mysql/qsql_mysql.cpp
@@ -495,6 +495,7 @@ bool TQMYSQLDriver::open( const TQString& db,
return FALSE;
}
+ my_bool reconnect = 0;
for ( it = opts.begin(); it != opts.end(); ++it ) {
TQString opt( (*it).upper() );
if ( opt == "CLIENT_COMPRESS" )
@@ -512,11 +513,13 @@ bool TQMYSQLDriver::open( const TQString& db,
else if ( opt == "CLIENT_SSL" )
clientOptionFlags |= CLIENT_SSL;
else if ( opt == "MYSQL_OPT_RECONNECT" )
- mysql_options(d->mysql, MYSQL_OPT_RECONNECT, NULL);
- else
+ reconnect = 1;
+ else
tqWarning( "TQMYSQLDriver::open: Unknown connect option '%s'", (*it).latin1() );
}
+ mysql_options(d->mysql, MYSQL_OPT_RECONNECT, &reconnect);
+
if ( mysql_real_connect( d->mysql,
host,
user,