~percona-toolkit-dev/percona-toolkit/fix-sync-ignore-bug-1002365-2.0

« back to all changes in this revision

Viewing changes to t/pt-table-checksum/samples/not-using-pk-bug.sql

  • Committer: Daniel Nichter
  • Date: 2012-05-08 22:32:27 UTC
  • mto: This revision was merged to the branch mainline in revision 226.
  • Revision ID: daniel@percona.com-20120508223227-vqq8sfaegoi4k0rx
Test that tool chooses the PK.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
DROP DATABASE IF EXISTS test;
 
2
CREATE DATABASE test;
 
3
USE test;
 
4
CREATE TABLE `multi_resource_apt` (
 
5
  `apt_id` int(10) unsigned NOT NULL DEFAULT '0',
 
6
  `res_id` int(10) unsigned NOT NULL DEFAULT '0',
 
7
  PRIMARY KEY (`apt_id`,`res_id`),
 
8
  KEY `resid` (`res_id`)
 
9
) ENGINE=InnoDB;
 
10
INSERT INTO multi_resource_apt VALUES
 
11
  (1, 1),
 
12
  (2, 1),
 
13
  (2, 2),
 
14
  (3, 1),
 
15
  (3, 2),
 
16
  (3, 3),
 
17
  (4, 1),
 
18
  (4, 2),
 
19
  (4, 3),
 
20
  (4, 4);