It could also be a newer version of the mysql driver which causes this.
The code I patched receives a list with partially loaded nodes and
converts them to fully loaded nodes. It uses a "select <fields> from
<table> where number in (<numbers>);"
The old code just adds all numbers from the passed-in list to the
<numbers>. Newer versions of mysql remove duplicate numbers and return
the records only once. Older version just returned duplicate records.
The code checked if the passed-in list size is equal to the size of
records returned from the database. This was correct for older version,
but is a wrong assumption.
To verify if it is the above problem, you could change the logging for
org.mmbase.module.database.MultiConnection to debug. This will log all
sql queries. Just look for the queries with the same signature as
mentioned above.
What you also could try is replacing the WEB-INF/lib/mysql*.jar with an
old version. For example use the jar from the old didactor application.
When the errors go away then you don't have to worry other then that the
logfile will be spammed. An easy fix for that is to change the log4j.xml
When the errors still appear then you are in trouble and the database is
inconsistent. In that case some records in the object table don't match
records in other tables. It could also be that the insrel table has
numbers in the snumber and dnumber field which don't exist anymore in
the object table.
Bico
Arjen Roodselaar wrote:
Nico,
Thanks for your input!
On Wednesday 15 March 2006 13:28, Nico Klasens wrote:
let me guess. You have upgraded or started using mysql 4.1. This version
returns an optimized resultset which filters out duplicate nodes.
We're currently using MySQL 4.0.18. The test/staging and production databases
are currently running on the same MySQL server. The only difference between
the test/staging and production environment is the Didactor version. A
developer did mention however that they did something with the storage layer
and since this particular database has been running (and migrated) for quite
some time now it could be we're currently looking at plain old database
inconsistency.
Could you please explain, from a developer perspective, what piece of the code
is triggering this error so I can have one of our developers look into this?
The one question remaining is: how serious is this error? What happens when
this piece of software is put in production without fixing what's causing
this error?
Or you are missing the typerel for allowed relation
learnblocks->pos2rel->images or the application does a call for
relatednodes which is not possible in the current model.
First case is configuration. Second case is code
This could be the missing typerel. I'll have a look at this.
Thanks again!
Arjen
------------------------------------------------------------------------
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers