Last modified: 2014-02-12 23:39:59 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.
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.
Created attachment 6801 [details] Move the sqlEscape to MySQLTraits and PostgreSQLTraits + defer constraints in PostgreSQL
*** Bug 21548 has been marked as a duplicate of this bug. ***
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.