[mythtv] MySQL 4.1.7 segfaults in mythtv

Jim Perry azibp4 at lfx.org
Tue Feb 15 01:13:34 UTC 2005


Hi!  I noticed that a few people were having problem with MythTV and newer 
versions of MySQL.  Well, I installed MythTV about a month ago and had 
pretty much the same problem (seemingly random crashes, traces showing it 
was in libmysqlclient).

So, I debugged it.  It is (was?) an error in MySQL's client library that 
was showing up because QT makes an embedded call even when you're not 
compiled in embedded mode.  This should do nothing, but I guess that they 
didn't have time to test it extensively, and it only crashes if you call 
the embedded functions more than once (which is why the crash is annoyingly 
rare when you're trying to debug it).

This is the fix I used (no guarantees!!) for mysql 4.1.7.  Maybe it's been 
fixed in newer versions or maybe QT has stopped calling the embedded 
calls...I don't know.  Hopefully it'll help somebody.  Worth a try if 
you're segfaulting in mysqlclient.

 > Solution: edit libmysql/my_init.c
 > search for "my_once_free" (it only occurs once)
 > add "free_charsets();" immediately before it.
 > recompile, etc etc.

I posted the bug to http://bugs.mysql.com/7344 if you want to follow up, 
but I don't think they understood my crappy explaination.  Oh, well.

-jim



More information about the mythtv-dev mailing list