Outbound Link Summary:
2 months ago
p3k dots

Just learned about MariaDB’s create table like and insert select syntax – and an easy way to save a corrupted InnoDB table:

create table shiny_table like tragic_table;
insert shiny_table select * from tragic_table;
drop tragic_table;
rename table shiny_table to tragic_table; # Not so tragic anymore 😅