Hi,

i think there is a bug in the mysql-driver. Since version 4.5.0 beta the 
following code end into a segmentation error.


                QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL","test");

                db.setHostName("127.0.01");
                db.setDatabaseName("CAT");
                db.setUserName("root");
                db.setPassword("password");
                db.setPort(3306);

                if (db.isOpen() == true)
                {
                        QSqlQuery query(db);

                        query.exec("SELECT * FROM objektabrechnung");
                        QSqlError sqlError = query.lastError();
                        if(sqlError.type() != QSqlError::NoError)
                        {
                                ...
                        } else {
                                while(query.next())
                                {

                                        QSqlQuery query2 (db );

                                        query2.exec("SELECT * FROM 
wohnungabrechnung");
                                        QSqlError sqlError2 = 
query2.lastError();
                                        if(sqlError2.type() != 
QSqlError::NoError)
                                        {
                                                ...
                                        } else {
                                                while(query2.next())
                                                {


                                                }
                                        }
                                }
                        }
                }

The problem is that QMYSQLDriverPrivate::preparedQuerys is changed by query2. 
Then query think that it is now a prepared query and try to fetch the next  
results with mysql_stmt_fetch(d->stmt). Stmt is in this moment not initialized 
and then boom.

It comes from the changes that you guys did with QMYSQLDriverPrivate. So ... 
when I move preparedQuerys from QMYSQLDriverPrivate to QMYSQLResultPrivate the 
problems is gone. but I think there could be some with 
QMYSQLDriver::primaryIndex().

I hope you guys understand what I mean and sorry for my bad english.


P.S.
By the way great work with qt..... I love this toolkit.


My System:
Windows Vista x64
Visual Studio 2008 Standard
Qt 4.5.0 beta 1 x64
MySQL 5.1.30 x64




CAC GmbH
Schulstr. 6
90542 Eckental
Telefon: 09126 2841 31
Telefax: 09126 2841 32
E-mail: [email protected]


Sitz der Gesellschaft: Eckental
Registergericht: Amtsgericht Fürth
HRB-Nr.: 9982
Geschäftsführer: Andree Kempny


Diese Information ist ausschließlich für den Adressaten bestimmt und kann 
vertrauliche oder gesetzlich geschützte Informationen enthalten.
Wenn Sie nicht der bestimmungsgemäße Adressat sind, unterrichten Sie bitte den 
Absender und vernichten Sie diese Email. Anderen als dem
bestimmungsgemäßen Adressaten ist es untersagt, diese Email zu lesen, zu 
speichern, weiterzuleiten oder ihren Inhalt, auf welche Weise auch
immer, zu verwenden. Wir verwenden aktuelle Virenprogramme. Für Schäden, die 
dem Empfänger, gleichwohl durch von uns zugesandte
mit Viren befallene Emails entstehen, schließen wir jede Haftung aus.



_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to