[mythtv-commits] mythtv commits

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Wed Feb 23 05:05:03 UTC 2005


----------------------------------------------------------------------------
Changes committed by avalanche on Wed Feb 23 05:04:35 2005

Modified Files:
   in mythtv/libs/libmyth:
        langsettings.cpp managedlist.h mythcontext.cpp mythcontext.h 
        mythdbcon.cpp mythdbcon.h mythdialogs.cpp settings.cpp 
        settings.h 
   in mythtv/libs/libmythtv:
        NuppelVideoPlayer.cpp NuppelVideoPlayer.h 
        NuppelVideoRecorder.cpp avformatdecoder.cpp avformatdecoder.h 
        channel.cpp channelbase.h channeleditor.cpp channeleditor.h 
        channelsettings.cpp channelsettings.h datadirect.cpp 
        dbcheck.cpp decoderbase.cpp decoderbase.h dtvrecorder.cpp 
        dvbchannel.cpp dvbchannel.h dvbrecorder.cpp 
        dvbsignalmonitor.cpp dvbtransporteditor.cpp 
        dvbtransporteditor.h guidegrid.cpp guidegrid.h 
        hdtvrecorder.cpp infodialog.cpp ivtvdecoder.cpp ivtvdecoder.h 
        jobqueue.cpp jobqueue.h mpegrecorder.cpp nuppeldecoder.cpp 
        nuppeldecoder.h profilegroup.cpp profilegroup.h progfind.cpp 
        progfind.h proglist.cpp proglist.h programinfo.cpp 
        programinfo.h recorderbase.cpp recorderbase.h 
        recordingprofile.cpp recordingprofile.h scanwizard.cpp 
        scanwizard.h scheduledrecording.cpp scheduledrecording.h 
        siparser.cpp siparser.h siscan.cpp siscan.h sr_items.h 
        tv_play.cpp tv_play.h tv_rec.cpp tv_rec.h videosource.cpp 
        videosource.h 
   in mythtv/programs/mythbackend:
        autoexpire.cpp autoexpire.h housekeeper.cpp housekeeper.h 
        main.cpp mainserver.cpp mainserver.h scheduler.cpp scheduler.h 
   in mythtv/programs/mythcommflag:
        main.cpp 
   in mythtv/programs/mythepg:
        main.cpp 
   in mythtv/programs/mythfilldatabase:
        filldata.cpp 
   in mythtv/programs/mythfrontend:
        channelrecpriority.cpp channelrecpriority.h customrecord.cpp 
        globalsettings.cpp main.cpp manualbox.cpp manualschedule.cpp 
        playbackbox.cpp previousbox.cpp previousbox.h 
        programrecpriority.cpp programrecpriority.h statusbox.cpp 
        viewscheduled.cpp viewscheduled.h 
   in mythtv/programs/mythjobqueue:
        main.cpp 
   in mythtv/programs/mythlcd:
        main.cpp 
   in mythtv/programs/mythprogfind:
        main.cpp 
   in mythtv/programs/mythtranscode:
        main.cpp transcode.cpp transcode.h 
   in mythtv/programs/mythtv:
        main.cpp 
   in mythtv/programs/mythuitest:
        main.cpp 
   in mythtv/setup:
        main.cpp 
Log Message:

This 15262 (that's fifteenthousendtwohundredsomething) line patch is my
entry in the category for "Biggest consecutive patch that does, well, uh,
nothing". From a users point of view that is.

This patch converts Myth's internals to use a connection pool for database
stuff, mostly driven by the need to workaround a bug in Qt/MySql. DB 
connections crash if closed and reopened, as debugged by Jim Perry & 
others, see -dev list for details.

Added benefit, all DB stuff is simplified. No more passing DB connections
& locks around. Here's some info for working with the new DB stuff:

Rule #1: Never use QSqlQuery or QSqlDatabase directly.
Rule #2: Never use QSqlQuery or QSqlDatabase directly.
Rule #3: Use MSqlQuery for all DB stuff.

MSqlQuery is tied to a connection pool in Mythcontext. DB connections are
automatically set up by creating an MSqlQuery object. Use the helper 
functions to create an MSqlQuery object e.g. 
MSqlQuery query(MSqlQuery::InitCon());
The MSqlQuery object gets exclusive access to the connection for its 
lifetime. The connection is automatically returned when the MSqlQuery 
object is destroyed.

For more details look at libmyth/mythdbcon.cpp/h, that's where most of 
the DB action is now going on.

*Note: This will break the plugins, they should be updated shortly.

----------------------------------------------------------------------------


More information about the mythtv-commits mailing list