I'm having problems re-importing a database dump created by mysqldump. I ran mysqldump with the order-by-primary parameter, and I ran it in the table with a unique key (and without an explicit primary key, so it was sorted by that unique key). My goal in this case was to recreate the table by entering a unique key in the primary key.
This dump took a very long time (about 10 days), and it would be a big pain in the ass to run it again. I tried to re-import the dump (with the corresponding schema changes), but mysql choked halfway. I looked into the dump file, the place where he suffocated - and it looks like someone pasted a spam email address directly into the text of the dump file.
Fortunately, it seems that the damage was isolated, I can see the key right in front of the trash and right after it.
tl; dr : if I just fastened the garbage, I don’t know how many keys will be missing between the one that was before and after it - the dump is sorted by this unique key, so it makes life easier in this regard. Is there mysql way to get all rows between two records in an index?
The key is a 32-character hexadecimal string stored in a column of type CHAR (32). I'm sure I can’t use <or> line-by-line operators ... so any suggestions?
source
share