I have a table that is roughly 290,000 rows long. Before backup, it probably took <200 MB. When I created a backup of this table using mysqldump, the backup file takes ~800 MB, and when I reload from the backup file using mysql, I now see that it has ~430,000 rows, way more than the original table (I am checking via HeidiSQL UI). But if I do a query on the total range of the primary key, it is the same as the old table (~290,000). What could have possibly gone wrong?
Here is the CREATE code for the particular table in concern. It is just a list of variables (of DECIMAL type)
CREATE TABLE `ciceroout` (
`runID` INT(11) NOT NULL AUTO_INCREMENT,
`IterationNum` DECIMAL(20,10) NULL DEFAULT NULL,
`IterationCount` DECIMAL(20,10) NULL DEFAULT NULL,
`RunningCounter` DECIMAL(20,10) NULL DEFAULT NULL,
\* more 100 variables like this *\
PRIMARY KEY (`runID`)
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
AUTO_INCREMENT=287705
;
EDIT: Here is the actual dump and restore commands I used. Our database has six tables, and I already dumped one table so here I am dumping the remaining five tables.
dump tables :
mysqldump -u root --single-transaction=true --verbose -p [dbname] --ignore-table=[dbname].images > \path\[backupname].sql
restore tables (after dropping the original database, and starting an empty one):
mysql -u root -p [db name] < \path\[backupname].sql
