You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.1 KiB
48 lines
1.1 KiB
--- src/sql/drivers/mysql/qsql_mysql.cpp
|
|
+++ src/sql/drivers/mysql/qsql_mysql.cpp
|
|
@@ -37,7 +37,6 @@
|
|
#include "qsql_mysql.h"
|
|
#include <private/qsqlextension_p.h>
|
|
|
|
-#include <qapplication.h>
|
|
#include <qdatetime.h>
|
|
#include <qvaluevector.h>
|
|
#include <qsqlrecord.h>
|
|
@@ -341,14 +340,6 @@ int QMYSQLResult::numRowsAffected()
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////
|
|
-static void qServerEnd()
|
|
-{
|
|
-#ifndef Q_NO_MYSQL_EMBEDDED
|
|
-# if MYSQL_VERSION_ID >= 40000
|
|
- mysql_server_end();
|
|
-# endif // MYSQL_VERSION_ID
|
|
-#endif // Q_NO_MYSQL_EMBEDDED
|
|
-}
|
|
|
|
static void qServerInit()
|
|
{
|
|
@@ -366,9 +357,7 @@ static void qServerInit()
|
|
qWarning( "QMYSQLDriver::qServerInit: unable to start server." );
|
|
# endif
|
|
}
|
|
- qAddPostRoutine(qServerEnd);
|
|
init = TRUE;
|
|
-
|
|
# endif // MYSQL_VERSION_ID
|
|
#endif // Q_NO_MYSQL_EMBEDDED
|
|
}
|
|
@@ -411,6 +400,11 @@ QMYSQLDriver::~QMYSQLDriver()
|
|
QSqlOpenExtension *ext = qSqlOpenExtDict()->take( this );
|
|
delete ext;
|
|
}
|
|
+#ifndef Q_NO_MYSQL_EMBEDDED
|
|
+# if MYSQL_VERSION_ID > 40000
|
|
+ mysql_server_end();
|
|
+# endif
|
|
+#endif
|
|
}
|
|
|
|
bool QMYSQLDriver::hasFeature( DriverFeature f ) const
|