From 3a595ff70b522c8c1c9e36bbb493d3fa8b8df86f Mon Sep 17 00:00:00 2001
From: Tomas Cohen Arazi <tomascohen@gmail.com>
Date: Wed, 10 Apr 2013 11:13:10 -0300
Subject: [PATCH] Bug 9819 - Make updatedatabase.pl remove the 'stopwords'
 table
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

To test:
- Apply the patch
- Will be prompted to run the updater
- The 'stopwords' database should be removed
  ( test on a mysql prompt with
    > SHOW TABLES LIKE 'stopwords';
   and should get no results)

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
---
 installer/data/mysql/updatedatabase.pl |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index f8ab41e..4d52222 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -11390,6 +11390,15 @@ if ( CheckVersion($DBversion) ) {
     SetVersion ($DBversion);
 }
 
+$DBversion = "XXX";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(q{
+        DROP TABLE IF EXISTS `stopwords`;
+    });
+    print "Upgrade to $DBversion done (Removed obsolete 'stopwords' table)\n";
+    SetVersion($DBversion);
+}
+
 # DEVELOPER PROCESS, search for anything to execute in the db_update directory
 # SEE bug 13068
 # if there is anything in the atomicupdate, read and execute it.
-- 
1.7.10.4