transaction log incorrectly records NULL INSERT into an ENUM as the first permissible value
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Undecided
|
Joe Daly |
Bug Description
The transaction log is incorrectly registering a NULL insert into an ENUM column as the first permissible value:
test case: Run with ./test-run --start-and-exit --mysqld=
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT NOT NULL, b ENUM ('1','2'), PRIMARY KEY(a));
INSERT INTO t1 VALUES (1,NULL);
# This will let us see what the trans_log has for the last registered transaction
SELECT PRINT_TRANSACTI
Results in:
| transaction_context {
server_id: 1
transaction_id: 60354
start_timestamp: 1276642396658190
end_timestamp: 1276642396700337
}
statement {
type: INSERT
start_timestamp: 1276642396658192
end_timestamp: 1276642396700336
insert_header {
table_metadata {
schema_name: "test"
table_name: "t1"
}
field_metadata {
type: INTEGER
name: "a"
}
field_metadata {
type: ENUM
name: "b"
}
}
insert_data {
segment_id: 1
end_segment: true
record {
insert_value: "1"
insert_value: "1" <--- Not NULL
}
}
}
|
Related branches
- Stewart Smith (community): Approve
- Drizzle Developers: Pending requested
- Brian Aker: Pending requested
-
Diff: 122 lines (+48/-10)3 files modifieddrizzled/transaction_services.cc (+22/-6)
plugin/transaction_log/tests/r/null_values.result (+20/-2)
plugin/transaction_log/tests/t/null_values.inc (+6/-2)
Changed in drizzle: | |
status: | New → Confirmed |
Changed in drizzle: | |
status: | Confirmed → Fix Released |
milestone: | none → 2010-08-02 |
NOTE:
This bug is not present in lp:~/mordred/drizzle/publisher
It only appeared when I merged that branch with trunk.