#ifndef QT_NO_TEXTCODEC
tc(QTextCodec::codecForLocale()),
#else
- tc(Q_NULLPTR),
+ tc(Q_NULLPTR)
#endif
- preparedQuerysEnabled(false) {}
+ { }
MYSQL *mysql;
QTextCodec *tc;
-
- bool preparedQuerysEnabled;
};
static inline QString toUnicode(QTextCodec *tc, const char *str)
if(!d->driver)
return false;
cleanup();
- if (!d->driver->d->preparedQuerysEnabled)
- return QSqlResult::prepare(query);
if (query.isEmpty())
return false;
QMYSQLDriver::QMYSQLDriver(QObject * parent)
: QSqlDriver(parent), d(new QMYSQLDriverPrivate())
{
- d->mysql = Q_NULLPTR;
qMySqlConnectionCount++;
qLibraryInit();
}
return true;
case PreparedQueries:
case PositionalPlaceholders:
- return d->preparedQuerysEnabled;
+ return true;
case MultipleResultSets:
return true;
}
d->tc = codec(d->mysql);
#endif
- d->preparedQuerysEnabled = mysql_get_client_version() >= 40108
- && mysql_get_server_version(d->mysql) >= 40100;
-
mysql_thread_init();