MySQL Forums
Forum List  »  MyISAM

the data of some tables are not consistent when i do recovery from backup
Posted by: h ch
Date: April 18, 2011 09:02PM

i write a backup script which use mysqlhotcopy backup my DB and rsync binary logs
every two hours, and i do recover test today ,use the backup file,and all these
operations happened on a read only slave DB,so i can not warry about losing some
update on DB,In order to compare,i use mysqlhostcopy get the data when i stop my
backup script,and i build two DB ,dump the backup data and the compare sample
data,and i use mk-tables-checksum see if the backup data is equal with the sample
data,and i find data of some table have different primary key,following is the
data

i do not know why?


===================

mysql> show create table interfix_products\G
*************************** 1. row ***************************
Table: interfix_products
Create Table: CREATE TABLE `interfix_products` (
`id` int(10) NOT NULL auto_increment,
`saleman_id` int(11) NOT NULL COMMENT '???ID?',
`comp_id` int(11) NOT NULL COMMENT '??ID?',
`product_id` int(11) NOT NULL COMMENT '????ID?',
`post_time` datetime default NULL,
`post_ip` varchar(50) collate utf8_unicode_ci default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_key` (`comp_id`,`product_id`,`saleman_id`),
KEY `comp_id` (`comp_id`),
KEY `product_id` (`product_id`),
KEY `saleman_id` (`saleman_id`)
) ENGINE=MyISAM AUTO_INCREMENT=100591156 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='??????'
1 row in set (0.01 sec)

=====

data from backup data from sample
100336909 178058 168460 2486 2011-04-18 00:01:02 | 100336908 178058 168460 2486 2011-04-18 00:01:02
100336911 178058 168460 2481 2011-04-18 00:01:02 | 100336910 178058 168460 2481 2011-04-18 00:01:02
100336913 178058 168460 2487 2011-04-18 00:01:02 | 100336912 178058 168460 2487 2011-04-18 00:01:02
100337010 178058 168020 4048 2011-04-18 00:01:02 | 100337009 178058 168020 4048 2011-04-18 00:01:02

Options: ReplyQuote


Subject
Views
Written By
Posted
the data of some tables are not consistent when i do recovery from backup
2430
April 18, 2011 09:02PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.