Contents of /trunk/qt/patches/qt-3.3.8-mysql-unload-crash.patch
Parent Directory | Revision Log
Revision 153 -
(show annotations)
(download)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 1150 byte(s)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 1150 byte(s)
-import
1 | --- src/sql/drivers/mysql/qsql_mysql.cpp |
2 | +++ src/sql/drivers/mysql/qsql_mysql.cpp |
3 | @@ -37,7 +37,6 @@ |
4 | #include "qsql_mysql.h" |
5 | #include <private/qsqlextension_p.h> |
6 | |
7 | -#include <qapplication.h> |
8 | #include <qdatetime.h> |
9 | #include <qvaluevector.h> |
10 | #include <qsqlrecord.h> |
11 | @@ -341,14 +340,6 @@ int QMYSQLResult::numRowsAffected() |
12 | } |
13 | |
14 | ///////////////////////////////////////////////////////// |
15 | -static void qServerEnd() |
16 | -{ |
17 | -#ifndef Q_NO_MYSQL_EMBEDDED |
18 | -# if MYSQL_VERSION_ID >= 40000 |
19 | - mysql_server_end(); |
20 | -# endif // MYSQL_VERSION_ID |
21 | -#endif // Q_NO_MYSQL_EMBEDDED |
22 | -} |
23 | |
24 | static void qServerInit() |
25 | { |
26 | @@ -366,9 +357,7 @@ static void qServerInit() |
27 | qWarning( "QMYSQLDriver::qServerInit: unable to start server." ); |
28 | # endif |
29 | } |
30 | - qAddPostRoutine(qServerEnd); |
31 | init = TRUE; |
32 | - |
33 | # endif // MYSQL_VERSION_ID |
34 | #endif // Q_NO_MYSQL_EMBEDDED |
35 | } |
36 | @@ -411,6 +400,11 @@ QMYSQLDriver::~QMYSQLDriver() |
37 | QSqlOpenExtension *ext = qSqlOpenExtDict()->take( this ); |
38 | delete ext; |
39 | } |
40 | +#ifndef Q_NO_MYSQL_EMBEDDED |
41 | +# if MYSQL_VERSION_ID > 40000 |
42 | + mysql_server_end(); |
43 | +# endif |
44 | +#endif |
45 | } |
46 | |
47 | bool QMYSQLDriver::hasFeature( DriverFeature f ) const |