On 5/20/21 10:44 AM, Phil Stracchino wrote: > You know, actually, what you can do is the following: > > Go to line 216 of the update_mysql_tables script and look for these two > lines: > > DROP INDEX JobId on File; > DROP INDEX JobId_2 on File; > > ... And just DELETE THEM. They are pointless. They're just dropping > indexes from a table that we're about to drop anyway. > > > Then if you want to be really safe, insert the following line: > > TRUNCATE TABLE file_temp; > > in between the end of the CREATE TABLE file_temp statement and the > INSERT INTO file_temp statement.
And actually I missed a step there: Change 'CREATE TABLE file_temp' to CREATE TABLE IF NOT EXISTS file_temp. This way, when you run the script the first time, it will create the temporary table. If something goes wrong and you have to run it again, it will see that the table already exists, NOT try to create it a second time (which would cause the script to fail), and just erase all the rows in it to get a clean start. -- Phil Stracchino Babylon Communications ph...@caerllewys.net p...@co.ordinate.org Landline: +1.603.293.8485 Mobile: +1.603.998.6958 _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users