Delete within a transaction does not generate the correct statements in the transaction log
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Critical
|
Jay Pipes |
Bug Description
The following SQL commands:
drizzle> begin;
Query OK, 0 rows affected (0 sec)
drizzle> insert into test1 values(
Query OK, 2 rows affected (0 sec)
Records: 2 Duplicates: 0 Warnings: 0
drizzle> delete from test1 where id=102;
Query OK, 1 row affected (0 sec)
drizzle> commit;
Generates the following transaction (i.e. no new statement for the delete, it just adds the delete data to the INSERT statement):
transaction_context {
server_id: 1
transaction_id: 9
start_timestamp: 1260690935750204
end_timestamp: 1260690955262155
}
statement {
type: INSERT
start_timestamp: 1260690935750205
end_timestamp: 1260690955262155
insert_header {
table_metadata {
schema_name: "unittests"
table_name: "test1"
}
field_metadata {
type: INTEGER
name: "id"
}
field_metadata {
type: VARCHAR
name: "test"
}
field_metadata {
type: VARCHAR
name: "ignored"
}
}
insert_data {
segment_id: 1
end_segment: true
record {
insert_value: "102"
insert_value: ""
insert_value: ""
}
record {
insert_value: "103"
insert_value: ""
insert_value: ""
}
}
delete_data {
segment_id: 1
end_segment: true
record {
key_value: "102"
}
}
}
Related branches
- Brian Aker: Pending requested
- Drizzle Developers: Pending requested
-
Diff: 1072 lines (+497/-37)26 files modifieddrizzled/message/statement_transform.cc (+8/-7)
drizzled/message/statement_transform.h (+2/-1)
drizzled/message/transaction_reader.cc (+6/-1)
plugin/transaction_log/tests/r/alter.result (+16/-0)
plugin/transaction_log/tests/r/auto_commit.result (+24/-10)
plugin/transaction_log/tests/r/blob.result (+12/-0)
plugin/transaction_log/tests/r/create_select.result (+16/-0)
plugin/transaction_log/tests/r/database.result (+4/-0)
plugin/transaction_log/tests/r/delete.result (+57/-1)
plugin/transaction_log/tests/r/filtered_replicator.result (+154/-12)
plugin/transaction_log/tests/r/insert.result (+8/-0)
plugin/transaction_log/tests/r/insert_multi.result (+4/-0)
plugin/transaction_log/tests/r/insert_on_duplicate_update.result (+12/-0)
plugin/transaction_log/tests/r/insert_select.result (+12/-0)
plugin/transaction_log/tests/r/no_modification.result (+8/-0)
plugin/transaction_log/tests/r/no_primary_key.result (+6/-0)
plugin/transaction_log/tests/r/rand.result (+10/-0)
plugin/transaction_log/tests/r/rename.result (+8/-0)
plugin/transaction_log/tests/r/replace.result (+28/-0)
plugin/transaction_log/tests/r/rollback.result (+6/-0)
plugin/transaction_log/tests/r/select_for_update.result (+12/-0)
plugin/transaction_log/tests/r/temp_tables.result (+8/-0)
plugin/transaction_log/tests/r/truncate.result (+10/-0)
plugin/transaction_log/tests/r/update.result (+36/-0)
plugin/transaction_log/tests/t/alter.inc (+3/-5)
plugin/transaction_log/tests/t/delete.inc (+27/-0)
Changed in drizzle: | |
assignee: | nobody → Jay Pipes (jaypipes) |
importance: | Undecided → Critical |
status: | New → Confirmed |
milestone: | none → bell |
Changed in drizzle: | |
status: | Confirmed → In Progress |
Changed in drizzle: | |
status: | In Progress → Fix Committed |
Changed in drizzle: | |
status: | Fix Committed → Fix Released |