Hmm!
OK, so I decided to compile from source, so I'm now running 2.3.0
updated the database, everything looks pretty good.

Except, same errors! As you mention here its not clear if its dropping
the db connection or dropping because of the fault, I think its because
of the fault, as if I check for example the entry below where the ID=47
I see an entry of 47, but the CART_NUMBER does not match the error.
Checking my carts its inserting the first song and then it fails.


AHA, but I have now found it! I'm curious if this is a bug then!
In my EVENTS, I have a POST-IMPORt CART defined (It is a sweeper). The
idea being after every song that is played it inserts a sweeper.

It is this POST-IMPORT CART that causes the error and the hour to crash.
As soon as I removed the POST-IMPORT CART the hour generation worked
perfectly.
So my question now is, is this a bug? Or how else should I be doing this.
Should I do this with a sweeper Event instead, so my hour clock shows:
TOTH
Latest Music
Sweeper
00s Music
Sweeper

?

On 14/01/13 15:14, Sébastien Leblanc wrote:
> On 14 January 2013 09:54, Andy Brown <a...@thebmwz3.co.uk> wrote:
>> Yeah I'd tried that, the table that was created has ID as a primary key,
>> and its the primary key thats the issue, It's trying to add a duplicate
>> entry for ID:
> 
> That is weird. Usually, in most database implementations for lists,
> the primary key is an ID that is entirely managed by the database. It
> is most often set as an autoincrement key, so that the client should
> not have to worry about counting the primary key, or avoiding
> collisions when others edit the same table at the same time, etc. It
> seems that Rivendell explicitly sets the primary key...
> 
>> insert into `2013_01_15_LOG` set ID=47,COUNT=47,TYPE=0,
>>             SOURCE=3,START_TIME=82807000,GRACE_TIME=0,
>>            CART_NUMBER=999003,TIME_TYPE=0,POST_POINT="N",
>>               TRANS_TYPE=1,COMMENT="";
>> ERROR 1062 (23000): Duplicate entry '47' for key 'PRIMARY'
>> mysql>
> 
>> rdlogmanager: invalid SQL or failed DB connection: insert into
>> `2013_01_15_LOG` set ID=8,COUNT=8,TYPE=1,
>> SOURCE=3,START_TIME=3607000,GRACE_TIME=-1,
>> CART_NUMBER=0,TIME_TYPE=0,POST_POINT="N",
>> TRANS_TYPE=1,COMMENT="End\ song"
> 
> Watch out! Both could be different errors! The one you get by typing
> the command is due to the line already existing in the log. However,
> rdlogmanager is complaining that it either could not even connect to
> the MySQL server, or it got disconnected while executing the query (or
> else MySQL thought the query was syntactically incorrect).
> 
> 
> One thing you could do, is wipe the entire table, do some memorable
> operation (e.g. create some random table named as a timestamp) then
> generate the log with rdlogmanager (make sure it was all set up before
> creating that table; you don't want irrelevant queries to show up in
> the database logs). Afterwards, find the mysql logs with your favorite
> admin tool, and fetch the line containing the timestamp: now
> everything that follows this line is related to the log generation.
> 
> 
> 
> 
> --
> Sébastien Leblanc
> _______________________________________________
> Rivendell-dev mailing list
> Rivendell-dev@lists.rivendellaudio.org
> http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev
> 


-- 
Andy
e: andy @ thebmwz3.co.uk
w: http://www.thebmwz3.co.uk
g: https://github.com/andyb2000/
_______________________________________________
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev

Reply via email to