[mythtv-users] How to copy 'frontend' portion of mysql database
Jeffrey J. Kosowsky
mythtv at kosowsky.org
Mon Jan 11 06:32:24 UTC 2010
Ronald Frazier wrote at about 23:52:56 -0500 on Sunday, January 10, 2010:
> > I think there is a bug somewhere though in your creation of the
> > ProfileIDMAP tables. It seems to make *multiple* copies of each entry
> > (since the "SELECT DISTINCT profileid, @lastprofileid :=
> > @lastprofileid+1" is doing an outer-product) -- see below for what happens.)
>
> Interesting. Must be a bug that only affects certain versions of
> mysql. When I wrote that code, it immediately popped into my head
> "wait....is mysql not going to think they are distinct based on the
> auto generated newid field?". So I actually created a test table and
> tried it out to see what happened. It worked perfectly, so I figured
> that I guess mysql was just smarter than I gave it credit for. I just
> tried my code again now, and it works perfectly.
>
> Out of curiosity...which version of mysql are you running. I've got
> 5.0.51a-24+lenny2 (it's a debian package)
mysql-5.1.41-2.fc12 (Fedora)
And more generally "SELECT DISTINCT var 1, var2..." always seems to
give me the outer-product which I guess makes sense since there is no
real grouping there...
> > Now I am literally only learning SQL on the fly by trial-and-error,
> > but this code seems to work instead
>
> Well, you're doing a pretty good job of it. Yes, your method appears
> to be fine (and is what I was going to do had my initial suspicion
> been true in my testing).
>
Thanks!
More information about the mythtv-users
mailing list