https://bugzilla.wikimedia.org/show_bug.cgi?id=47180

       Web browser: ---
            Bug ID: 47180
           Summary: postgresql problems and patches
           Product: MediaWiki extensions
           Version: master
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: Semantic MediaWiki
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---

Created attachment 12088
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=12088&action=edit
Misc patches to solve postgres-specific issues during installation

I've installed mediawiki and smw from the tip of the master branch in git. 
While installing smw I've encountered multiple problems which I assume is
related to the postgres support - I managed to get through the installation
process by hacking a bit on the php code.  My patches are attached.

Here is the revision info:

Mediawiki core:

commit 3a26db55ab4ba908b76cd9982794d1eeafb4afa0
Merge: 7c9a490 0d086f3
Date:   Fri Apr 12 15:02:41 2013 +0000

smw:

commit a33907d0aafe817c628e1715b424d3749299f55e
Merge: 473ebba 197154e
Date:   Wed Apr 10 21:29:18 2013 +0000

Problems solved by the patch:

1) Index creation:

"CREATE $type $tableName ON $tableName"

Obviously this doesn't work very well, particularly when there are more than
one index on a table.  I've changed to:

"CREATE $type $indexName ON $tableName"

... but even that didn't work too well because indexName contained some badly
placed double quotes.  I changed the index name from "{$tableName}_index{$key}"
to "{$rawTableName}_index{$key}" and that solved the issue.

2) There were multiple references to a non-existent sequence
smw_ids_smw_id_seq.  I did a search'n'replace to smw_object_ids_smw_id_seq and
I hope that's correct.

3) Some error message about some variable not beeing a positive non-zero
integer.  Solved by casting the variable from a string to an int.

I have no experience with neither PHP nor smw, and not much experience with
mediawiki neither, so obviously this patch needs some serious code review ;-)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to