mysql> RENAME TABLE rep TO rep_maint;
Query OK, 0 rows affected (0.01 sec)
mysql> SELECT * FROM rep_maint INTO OUTFILE '/tmp/rep.txt';
Query OK, 0 rows affected (0.01 sec)
mysql> CREATE TABLE rep_new LIKE rep_maint;
Query OK, 0 rows affected (0.00 sec)
mysql> LOAD DATA INFILE '/tmp/rep.txt' INTO TABLE rep_new;
Query OK, 0 rows affected (0.01 sec)
Records: 0 Deleted: 0 Skipped: 0 Warnings: 0
mysql> RENAME TABLE rep_maint TO rep_old, rep_new TO rep;
Query OK, 0 rows affected (0.00 sec)