Ok, I think there is something seriously wrong with SMWSQLStore3Writers.

getCurrentPropertyTableContents only fetches one row and returns it as an array. It should probably return several rows as an array of arrays. Something like this:

        $result = array();

        $resultWrapper = $dbr->select( $propertyTable->getName(), '*', array( 's_id' => $sid ), __METHOD__ );
        while($row=$dbr->fetchRow($resultWrapper)) {
            foreach($row as $key=>$value ){ //need to remove numeric keys; bug or feature in MW's DatabaseMysql::fetchRow?
                if ( is_int( $key ) ) {
            $result[] = $row;

        return $result;

Even then (with the array structures properly aligned) the array_diff_assoc in preparePropertyTableUpdates is not going to work, because it does not work recursively. Instead it just uses string representations of the top-level elements. Which are all "Array" or some such for an array of arrays. I don't know, how to fix it short of handcrafting some kind of recursive diff.


Jeroen: Sorry for sending this twice. Hit Reply instead of Reply all.

On 15 January 2013 04:35, Jeroen De Dauw <jeroendedauw@gmail.com> wrote:
Hey Stephan,

As Nischay pointed out, that's not an issue with your setup. Reverting the mentioned change will not get rid of the bug (in fact you'll have a few more then), though it will make them all fail more silently. The issue here is that an empty string is passed as property id toaddToUsageCount. If you could pinpoint where this empty string is coming from, that'd be great.


Jeroen De Dauw
Don't panic. Don't be evil.