[mythtv-users] How to copy 'frontend' portion of mysql database

Ronald Frazier ron at ronfrazier.net
Mon Jan 11 04:52:56 UTC 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)


> 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).


-- 
Ron
Ronald Frazier Photography - http://www.ronfphoto.com/
Blogging About Photography - http://ronfrazier.blogspot.com/


More information about the mythtv-users mailing list