[mythtv-users] Switching to DataDirect

James Pifer jep at obrien-pifer.com
Tue May 25 14:31:48 EDT 2004


On Tue, 2004-05-25 at 14:10, Jason Lee wrote:
> James Pifer wrote:
> 
> > I'm trying to convert to DataDirect for channel data. I'm following the
> > howto in the docs from the CVS tarball. I'm getting this:
> > 
> > mysql> create table channel_temp;
> > ERROR 1113: A table must have at least 1 column
> 
> How about this?
> 
> CREATE TABLE channel_copy SELECT * FROM channel;
> 
>  From http://www.mythtv.org/docs/mythtv-HOWTO-21.html#MigratingtoDD
> 
> Hope that helps.  A coworker of mine did it with great success...

I've already done that step. The rest of the doc you sent looks like it
is for mysql 4 when comparing to the docs that come with the tarball.
The step you said comes before the steps below:

If you're running MySQL v3, execute the following. Note that the select
command is very long. You can press ENTER at the end of each line; the
command won't be evaluated until you end the statement with a semicolon.

$ mysql -u root mythconverg
mysql>create table channel_temp;
mysql>select c.chanid, c.channum, c.sourceid, c.callsign, c.name,
cb.icon,
c.finetune, c.videofilters, c.xmltvid, c.contrast, c.brightness,
c.colour, c.freqid, c.recpriority, c.hue, c.tvformat,
c.commfree, c.visible, c.outputfilters
from channel c
left join channel_copy cb on (c.callsign = cb.callsign);
mysql>truncate channel;
mysql>insert channel select * from channel_temp;
mysql>drop table channel_temp;
mysql>drop table channel_copy;
mysql>exit
$

If you are running MySQL v4, it's a little simpler. The next command is
one long string:

$ mysql -u root mythconverg
mysql>UPDATE channel,channel_copy SET channel.icon = channel_copy.icon
WHERE channel.callsign = channel_copy.callsign;
mysql>drop table channel_copy;
mysql>exit
$

Since I'm running mysql3....

Thanks,
James



More information about the mythtv-users mailing list