From: Tomas Straupis <tomasstraupis@gm...> - 2011-05-07 13:28:12
I've noticed two problems with MySQL:
1. Losing connection to server and giving errors like "Query
execution was interrupted/Query not active".
2. Data from varbinary type columns is returned as bytearray and not
like text (default option in say mediawiki is to use varbinary which
makes all text fields in wiki database unreadable by TOra).
1. Tried setting options (setConnectOptions)
"MYSQL_OPT_RECONNECT=TRUE;CLIENT_INTERACTIVE=TRUE". Which improves
situation a bit but does not solve the problem entirely and I do not
get a pattern, connection loss seems random... Same query fails one
time and is executed successfully later...
2. Tried updating readValue function. Added following lines after
"val = Query->value(col - 1);" in toqsqlconnection.cpp
if (val.type() == QVariant::ByteArray)
val = val.toString();
This apparently solves the varbinary problem. I've tried connecting
and querying some values in PostgreSQL, nothing looks to be broken by
My questions would be:
1. Does anybody have any additional thoughts on what could be done
with 1st problem?
2. Am I missing something with problem #2 or is it ok and I can commit it?
P.S. Fedora14, qt4.7.2, mysql5.1.56.