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 ) ) {
                    unset($row[$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.

Cheers,
Stephan


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


On 15 January 2013 04:35, Jeroen De Dauw <jeroended...@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.
>
> Cheers
>
> --
> Jeroen De Dauw
> http://www.bn2vs.com
> Don't panic. Don't be evil.
> --
>
------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to