On 5/21/21 10:14 AM, Eric Bollengier via Bacula-devel wrote: > Hello Phil, > > On 5/21/21 15:49, Phil Stracchino wrote: >> On 5/21/21 3:19 AM, Eric Bollengier via Bacula-devel wrote: >> >> I actually looked at it further and made additional changes to mine that >> resolve that problem. Where the current script does this: >> >> DROP TABLE Filename; >> DROP TABLE File; >> ALTER TABLE file_temp RENAME TO File; >> >> what we SHOULD be doing is this: >> >> RENAME TABLE File to File_old, file_temp to File; > > We support all kind of MySQL/MariaDB versions, can you > confirm that this kind of things will work on all reasonable versions?
Yes, this has been standard MySQL behavior for eternity. I'm running on MariaDB 10.5.9 right now, and the behavior of RENAME TABLE was established LONG before MariaDB was forked from MySQL. It's worked this way at least since 5.1. >> There's also no point in dropping the indexes from the original File >> table AT ALL; it doesn't speed up the copy, may slow it down, and we're >> about to drop the entire table anyway. > > I believe that it's a question of disk space, the indexes on the File table > can be very big, and it's a best practice to have enough space, but > we can help users a little bit. Not having redundant indexes would help there. :) > Thanks for the tips, they are very good. if you can provide a diff of the > update_mysql_tables.in script, I will apply it. > > Best Regards, > Eric OK, let me prepare that diff. -- Phil Stracchino Babylon Communications ph...@caerllewys.net p...@co.ordinate.org Landline: +1.603.293.8485 Mobile: +1.603.998.6958 _______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel