Replication - Tables with multi-column primary keys not replicated correctly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
High
|
Jay Pipes | ||
Cherry |
Fix Released
|
High
|
Jay Pipes |
Bug Description
Use this test:
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1 (
k1 INT NOT NULL
, k2 INT NOT NULL
, padding VARCHAR(200) NOT NULL
, PRIMARY KEY (k1, k2)
);
INSERT INTO t1 VALUES (1, 1, "I love testing.");
INSERT INTO t1 VALUES (2, 2, "I hate testing.");
INSERT INTO t1 VALUES (2, 3, "I hate and love testing.");
INSERT INTO t1 VALUES (3, 3, "I adore testing.");
# Simple PK update on both columns
UPDATE t1 SET padding= "XXX" WHERE k1= 1 AND k2= 1;
# UPDATE all records in table matching first column
# in primary key
UPDATE t1 SET padding= "YYY" WHERE k1= 2;
# UPDATE all records in table matching second column
# in primary key
UPDATE t1 SET padding= "ZZZ" WHERE k2= 3;
# UPDATE all records in table
UPDATE t1 SET padding= "AAA";
DROP TABLE t1;
You will notice that only the first field is used in WHERE output in trx log entries
Changed in drizzle: | |
assignee: | nobody → Jay Pipes (jaypipes) |
importance: | Undecided → High |
status: | New → Fix Committed |
milestone: | none → 2010-03-01 |