problems with mysql5

Jeff Mitchell kde-dev at emailgoeshere.com
Wed Aug 9 11:57:07 UTC 2006


"Commands out of sync" is an error that has been in all 5.0 versions, AFAIK
(http://mysql.com/doc/refman/5.0/en/commands-out-of-sync.html)

If it's been working fine for you across 5.0 releases and works fine with 
5.0.22 but suddenly stopped working with 5.0.24, the first place I'd look 
would be MySQL...

Looking at the CollectionDB code for query (MySqlConnection::query), if 
mysql_use_result is successful, mysql_free_result will always be called.  I 
would guess that it does not have to be called if mysql_use_result is 
unsuccessful, but if I'm wrong about that it could be the source of your 
issue if you are having failed queries (in which case the problem is really 
figuring out why you had a failed query in the first place).

I'd see how it behaves with other 5.0.x versions, especially with x > 24.  But 
it really feels like a MySQL bug.

--Jeff

On Wednesday 09 August 2006 02:54, Rich wrote:
> it seems that there are a couple of problems with amarok & mysql5. maybe
> somebody with a knowledge of both could help :)
>
> 1. does not work with mysql 5.0.24
> spits an error on every sql query :
> [CollectionDB] MYSQL QUERY FAILED: Commands out of sync; you can't run
> this command now
>
> http://bugs.kde.org/show_bug.cgi?id=132114
>
> could be mysql problem, could as well be a problem with my system
> (though it works just fine with 5.0.22)
>
> 2. some time ago, amarok used varchar for some columns. later, it was
> changed to varbinary. for new databases, all of these instances are
> varbinarys, but upgrading amarok does not automatically change all of
> these fields. that works just fine with mysql4, but for some reason with
> mysql5 mysqld load is VERY high, and as a result, amarok - very slow.
>
> looking at db dumps before/after, i noticed field changes. somehow i
> decided to try changing data for one table only, and i chose statistics.
> both url & uniqueid had this field type change, so i changed them both.
> from :
> `url` varchar(255) character set latin1 collate latin1_bin NOT NULL default
> to :
> `url` varbinary(255) NOT NULL default ''
>
> the problem is gone.
> it seems that at least one other person has managed to reproduce the
> problem & the "fix" :
> http://bugs.kde.org/show_bug.cgi?id=132012
>
> so, is this a problem with mysql or amarok ?
> even when mysqld load is high, i can execute queries on all tables,
> including statistics, just fine.
> and why did it help to change the field type only on a single table, why
> not all of them ? is stats table queried more often ? (probably not,
> because slowdowns were even when simply expanding a collection browser
> entry).
>
> of course, it could also be not because of the field type but because of
> additional charset/collate options, but finding this out already took me
> awfully lot of time ;)



More information about the Amarok mailing list