MySQL: Fix MySQL plugin build with MySQL 5.0
Task-number: QTBUG-55544 Change-Id: Iff4e3109f475f9c3c8764fc6741b8d0547769ba2 Reviewed-by: Jesus Fernandez <jesus.fernandez@qt.io> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
This commit is contained in:
parent
bd9f3c50df
commit
43a710df63
@ -1318,7 +1318,7 @@ bool QMYSQLDriver::open(const QString& db,
|
|||||||
: sslCipher.toLocal8Bit().constData());
|
: sslCipher.toLocal8Bit().constData());
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MYSQL_VERSION_ID >= 50000
|
#if MYSQL_VERSION_ID >= 50100
|
||||||
if (connectTimeout != 0)
|
if (connectTimeout != 0)
|
||||||
mysql_options(d->mysql, MYSQL_OPT_CONNECT_TIMEOUT, &connectTimeout);
|
mysql_options(d->mysql, MYSQL_OPT_CONNECT_TIMEOUT, &connectTimeout);
|
||||||
if (readTimeout != 0)
|
if (readTimeout != 0)
|
||||||
@ -1347,7 +1347,7 @@ bool QMYSQLDriver::open(const QString& db,
|
|||||||
setOpenError(true);
|
setOpenError(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#if MYSQL_VERSION_ID >= 50000
|
#if MYSQL_VERSION_ID >= 50100
|
||||||
if (reconnect)
|
if (reconnect)
|
||||||
mysql_options(d->mysql, MYSQL_OPT_RECONNECT, &reconnect);
|
mysql_options(d->mysql, MYSQL_OPT_RECONNECT, &reconnect);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user