Index: trunk/ippToPsps/jython/mysql.py
===================================================================
--- trunk/ippToPsps/jython/mysql.py	(revision 33491)
+++ trunk/ippToPsps/jython/mysql.py	(revision 33683)
@@ -35,5 +35,5 @@
 
         # set up JDBC connection
-        self.url = "jdbc:mysql://"+self.dbHost+"/"+self.dbName+"?user="+self.dbUser+"&password="+self.dbPass
+        self.url = "jdbc:mysql://"+self.dbHost+"/"+self.dbName+"?autoReconnect=true&user="+self.dbUser+"&password="+self.dbPass
         try:
             self.con = DriverManager.getConnection(self.url)
@@ -148,4 +148,13 @@
 
         return name
+
+    '''
+    Drops a column from a table
+    '''
+    def dropColumn(self, table, column):
+
+        sql = "ALTER TABLE " + table + " DROP " + column
+        try: self.execute(sql)
+        except: return
 
     '''
@@ -355,3 +364,12 @@
             return -1
 
-
+    '''
+    Adds a column to this table which contains a row count
+    '''
+    def addRowCountColumn(self, table, colName):
+
+        self.execute("ALTER TABLE " + table + " ADD COLUMN " + colName + " INTEGER FIRST")
+        self.execute("SET @i = 0")
+        self.execute("UPDATE " + table + " SET " + colName + "=(@i:=@i+1)")
+        self.execute("ALTER TABLE " + table + " ADD PRIMARY KEY (" + colName + ")")
+
