transaction log logging 0 for NULL INTEGER VALUES
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Undecided
|
Joe Daly | ||
Dexter |
Fix Released
|
Undecided
|
Joe Daly |
Bug Description
The transaction log is using 0 as the logged value for NULL INSERT's. It also logs 0 when the INSERTed value = 0.
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b INT, PRIMARY KEY(a));
INSERT INTO t1 (b) VALUES(NULL);
SELECT PRINT_TRANSACTI
transaction_context {
server_id: 1
transaction_id: 8
START_TIMESTAMP
END_TIMESTAMP
}
statement {
type: INSERT
START_TIMESTAMP
END_TIMESTAMP
insert_header {
table_metadata {
schema_name: "test"
table_name: "t1"
}
field_metadata {
type: INTEGER
name: "a"
}
field_metadata {
type: INTEGER
name: "b"
}
}
insert_data {
segment_id: 1
end_segment: true
record {
insert_value: "3"
insert_value: "0" <-- NOT NULL
}
}
}
Related branches
- Brian Aker: Approve
- Joe Daly: Pending requested
-
Diff: 226 lines (+135/-4)7 files modifieddrizzled/message/statement_transform.cc (+32/-4)
drizzled/message/transaction.proto (+2/-0)
drizzled/transaction_services.cc (+2/-0)
plugin/transaction_log/tests/r/null_values.result (+60/-0)
plugin/transaction_log/tests/t/null_values-master.opt (+1/-0)
plugin/transaction_log/tests/t/null_values.inc (+25/-0)
plugin/transaction_log/tests/t/null_values.test (+13/-0)
Changed in drizzle: | |
assignee: | nobody → Joe Daly (skinny.moey) |
Changed in drizzle: | |
status: | New → Fix Released |
NOTE: The main test case for this is in suite=transacti on_log, test = transaction_ log_data_ types. transaction_ log transaction_ log_data_ types.
./test-run --suite=
The test will be hacked when pushed to the linked branch so that it will fail on such errors.
It should be noted that the transaction log seems to have issues with NULL values for all data types and perhaps a standard 'NULL' value should be created.
See: https:/ /blueprints. launchpad. net/drizzle/ +spec/test- transaction- log for additional, related bug reports.