mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-05-08 09:59:23 -05:00
fixed deprecated MYSQL_OPT_RECONNECT warning
The MYSQL_OPT_RECONNECT option is deprecated from MySQL >=8.1 and >=8.0.24, so don't use it. - updated exception message
This commit is contained in:
@@ -59,9 +59,7 @@ namespace Orm::Connectors
|
||||
|
||||
private:
|
||||
/*! The default QSqlDatabase connection options for the MySqlConnector. */
|
||||
inline static const QVariantHash m_options {
|
||||
{QLatin1String("MYSQL_OPT_RECONNECT"), 0},
|
||||
};
|
||||
inline static const QVariantHash m_options;
|
||||
};
|
||||
|
||||
} // namespace Orm::Connectors
|
||||
|
||||
@@ -49,7 +49,9 @@ MySqlConfigurationParser::throwIfContainsUnsupportedOption(const QVariantHash &o
|
||||
static const std::unordered_map<QString, BannedValue> bannedMap {
|
||||
// We have our own reconnector
|
||||
{QStringLiteral("MYSQL_OPT_RECONNECT"),
|
||||
{1, QStringLiteral(" TinyORM uses its own reconnector.")}},
|
||||
{1, QStringLiteral(" TinyORM uses its own reconnector. Also, be aware that "
|
||||
"the MYSQL_OPT_RECONNECT is deprecated from MySQL >=8.1 "
|
||||
"and >=8.0.24 and will be removed in future versions.")}},
|
||||
};
|
||||
|
||||
for (const auto &[key, banned] : bannedMap) {
|
||||
|
||||
Reference in New Issue
Block a user