r47135 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47134‎ | r47135 | r47136 >
Date:10:45, 11 February 2009
Author:mkroetzsch
Status:deferred
Tags:
Comment:
missing IGNORE in SQL :-/
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2_Queries.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2_Queries.php
@@ -769,7 +769,7 @@
770770 $this->m_dbs->query("INSERT " . (($wgDBtype=='postgres')?"":"IGNORE") . " INTO $tmpnew (id) VALUES $values", 'SMW::executeHierarchyQuery');
771771
772772 for ($i=0; $i<$depth; $i++) {
773 - $this->m_dbs->query("INSERT INTO $tmpres (id) SELECT s_id" . ($wgDBtype=='postgres'?'::integer':'') . " FROM $smw_subs2, $tmpnew WHERE o_id=id",
 773+ $this->m_dbs->query("INSERT " . (($wgDBtype=='postgres')?'':'IGNORE ') . "INTO $tmpres (id) SELECT s_id" . ($wgDBtype=='postgres'?'::integer':'') . " FROM $smw_subs2, $tmpnew WHERE o_id=id",
774774 'SMW::executeHierarchyQuery');
775775 if ($this->m_dbs->affectedRows() == 0) { // no change, exit loop
776776 break;

Status & tagging log