Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki-CVS

SVN: [38353] trunk/extensions/SemanticMediaWiki/includes/storage

 

 

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded


dantman at svn

Aug 1, 2008, 3:45 AM

Post #1 of 1 (72 views)
Permalink
SVN: [38353] trunk/extensions/SemanticMediaWiki/includes/storage

Revision: 38353
Author: dantman
Date: 2008-08-01 10:45:36 +0000 (Fri, 01 Aug 2008)

Log Message:
-----------
The drop statements in the drop functions should be using "IF EXISTS".
We don't care if we drop them or they never existed, just as long as they are gone after this function is run.
This'll avoid any issues if someone mangles a SMW install and decides its easier just to remove the entire store (some of which may already be gone) and set it up again.

Modified Paths:
--------------
trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore.php
trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php

Modified: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore.php
===================================================================
--- trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore.php 2008-08-01 10:38:14 UTC (rev 38352)
+++ trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore.php 2008-08-01 10:45:36 UTC (rev 38353)
@@ -1427,7 +1427,7 @@

foreach ($tables as $table) {
$name = $db->tableName($table);
- $db->query("DROP TABLE $name", 'SMWSQLStore::drop');
+ $db->query("DROP TABLE IF EXISTS $name", 'SMWSQLStore::drop');
$this->reportProgress(" ... dropped table $name.\n", $verbose);
}
$this->reportProgress("All data removed successfully.\n",$verbose);

Modified: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
===================================================================
--- trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php 2008-08-01 10:38:14 UTC (rev 38352)
+++ trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php 2008-08-01 10:45:36 UTC (rev 38353)
@@ -1119,7 +1119,7 @@
'smw_conc2');
foreach ($tables as $table) {
$name = $db->tableName($table);
- $db->query("DROP TABLE $name", 'SMWSQLStore2::drop');
+ $db->query("DROP TABLE IF EXISTS $name", 'SMWSQLStore2::drop');
$this->reportProgress(" ... dropped table $name.\n", $verbose);
}
$this->reportProgress("All data removed successfully.\n",$verbose);



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.