[RDD] RDLogmanager and clocks
leblancsebas at gmail.com
Mon Jan 14 10:14:22 EST 2013
On 14 January 2013 09:54, Andy Brown <andy at 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,
> ERROR 1062 (23000): Duplicate entry '47' for key 'PRIMARY'
> rdlogmanager: invalid SQL or failed DB connection: insert into
> `2013_01_15_LOG` set ID=8,COUNT=8,TYPE=1,
> 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.
More information about the Rivendell-dev