[mythtv] channel.channum too narrow

Tom E. Craddock Jr. sigtom at sigtom.com
Wed Jan 18 18:11:43 UTC 2006


Tony Brummett wrote:
> I recently got my hd-3000 card tuning QAM channels from my cable
> provider, and some of the channum strings that the channel scanner
> tried to insert into the database were longer than 5 characters.  For
> example, '102#10' was silently truncated to '102#1' , resulting in 2
> rows with channum '102#1'.  Making that column 6 characters wide
> seemed to fix the problem for me.
> 
> I believe this patch should fix it, if I understand the way schema
> updates are done...
> 
> Index: libs/libmythtv/dbcheck.cpp
> ===================================================================
> --- libs/libmythtv/dbcheck.cpp  (revision 8641)
> +++ libs/libmythtv/dbcheck.cpp  (working copy)
> @@ -10,7 +10,7 @@
>  #include "mythdbcon.h"
> 
>  /// This is the DB schema version expected by the running MythTV instance.
> -const QString currentDatabaseVersion = "1121";
> +const QString currentDatabaseVersion = "1122";
> 
>  static bool UpdateDBVersionNumber(const QString &newnumber);
>  static bool performActualUpdate(const QString updates[], QString version,
> @@ -1980,6 +1980,16 @@
>              return false;
>      }
> 
> +    if (dbver == "1121")
> +    {
> +        const QString updates[] = {
> +"ALTER TABLE channel CHANGE channum channum VARCHAR(5) NOT NULL DEFAULT '';",
> +""
> +};
> +        if (!performActualUpdate(updates, "1122", dbver))
> +            return false;
> +    }
> +
>  // Drop xvmc_buffer_settings table in 0.20
>  // Drop dvb_dmx_buf_size and dvb_pkt_buf_size columns of channel in 0.20
> 
> 
> -- Tony  brummett at gmail.com
> _______________________________________________


Tony,

Thanks, Im having the same problem, havent been able to get my local NBC 
in HD over QAM.  A coupld of questions, then a suggestion:

#1 Is this against SVN and if so, which version?
#2 Can you make the columns 8 strings long? I get channel #s that are 
1008_608, 1008_609 for example.

My suggestion is that you open a ticket on trac (at svn.mythtv.org) and 
post your patch there so that a dev will review/note/(hopefully) apply 
it to SVN Head.


Tom


More information about the mythtv-dev mailing list