Last modified: 2014-02-12 23:39:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T21883, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19883 - Errors dumping into PostgreSQL database
Errors dumping into PostgreSQL database
Status: NEW
Product: Utilities
Classification: Unclassified
mwdumper (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Brion Vibber
: patch, patch-need-review
: 21548 (view as bug list)
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2009-07-22 20:23 UTC by grdscarabe
Modified: 2014-02-12 23:39 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Move the sqlEscape to MySQLTraits and PostgreSQLTraits + insert anonymous contributor when none is provided in the xml (4.67 KB, patch)
2009-07-22 20:23 UTC, grdscarabe
Details
Move the sqlEscape to MySQLTraits and PostgreSQLTraits + defer constraints in PostgreSQL (4.70 KB, patch)
2009-11-18 13:58 UTC, grdscarabe
Details
Move the sqlEscape to MySQLTraits and PostgreSQLTraits + defer constraints in PostgreSQL (4.89 KB, patch)
2009-11-18 16:44 UTC, grdscarabe
Details

Description grdscarabe 2009-07-22 20:23:36 UTC
Created attachment 6381 [details]
Move the sqlEscape to MySQLTraits and PostgreSQLTraits + insert anonymous contributor when none is provided in the xml

When dumping a wikinews dump into a PostgreSQL database I encountered several errors concerning mostly the escaping of the strings. I propose a patch in attachment that move the sqlEscape(String) into MySQLTraits and PostgreSQL traits. However a better way would be to use PreparedStatement capabilities of jdbc...

Another error I encountered concerned the presence of a non existing contributor into the XML file getting the whole dump to fail, I instead propose (in the same patch in attachment) to use an anonymous contributor to prevent failing.
Comment 1 grdscarabe 2009-11-18 13:56:13 UTC
I created a new patch that get rids of the TRIGGER prologue in order for the dumping to work even for not super-users in PostgreSQL. This new patch replaces the previous one and can resolve the bug 21548.
Comment 2 grdscarabe 2009-11-18 13:58:37 UTC
Created attachment 6801 [details]
Move the sqlEscape to MySQLTraits and PostgreSQLTraits + defer constraints in PostgreSQL
Comment 3 grdscarabe 2009-11-18 13:59:16 UTC
*** Bug 21548 has been marked as a duplicate of this bug. ***
Comment 4 grdscarabe 2009-11-18 16:44:33 UTC
Created attachment 6802 [details]
Move the sqlEscape to MySQLTraits and PostgreSQLTraits + defer constraints in PostgreSQL

New patch version, the constraints are also deferred at each new checkpoint.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links