[mythtv] [patch] Various SQL compability fixes and dbwrapper work-in-progress

David Härdeman david at 2gen.com
Mon Nov 15 17:51:58 UTC 2004

Ok, third times a charm I hope...

First message was rejected due to size and second message I believe was 
lost due to me not being subscribed (due to DNS errors).
So, lets try a third time...I hope the patches havent gotten too far out 
of sync with regards to CVS...

I tried sending this two days ago but it was rejected due to size, the 
patches referred to below can be found at:

Oh, and the dbwrapper patch should now be able to bootstrap a database 
both in PostgreSQL and in Mysql....hopefully =)

--------- Original message --------


reviving the old PostgreSQL support thread, heres two patches.

The first one (myth-fixes.patch) contains:

o Fixes for some weird SQL queries (like INSERT INTO ... SET ...)
o Changes a lot of calls to numAffectedRows() to size() which is the 
  correct function to use on the result of SELECT queries (AffectedRows 
  should only be used on DELETE, UPDATE etc).
o Moves all DB-opening code into one function
o Adds the possibility of setting the DB driver to use by setting 
  DBType=something in mysql.txt (default is still QMYSQL3 so no changes 
  necessary for regular users).
o Changes a lot of double quotes to single quotes in SQL queries

I've done some testing on it (compile, run mythtv, play around with some 
settings, etc) and everything seems to work as previously. I'm hoping 
this patch can be added to CVS since it's mostly fixes.

The second one (myth-dbwrapper.patch) contains:
o A dbwrapper class which is the first step towards a db-unaware 
  dbcheck.cpp. Should work with MySQL (I've bootstrapped a database with 
  it), does not work 100% with Postgresql yet (some more functions needs 
  to be implemented).
o A conversion of dbcheck.cpp to use the dbwrapper class

Must be applied on top of previous patch, with DBType=QPGSQL7 in 
mysql.txt, you can try bootstrapping a PostgreSQL database (will only 
work partially).

The second patch is not to be integrated...it's rather a display of what 
I've got so far and a request for comments.

Testing and comments are welcome =) 


More information about the mythtv-dev mailing list