Merge lp:~dshrews/drizzle/bug599582 into lp:~drizzle-trunk/drizzle/development
Status: | Merged |
---|---|
Approved by: | Monty Taylor |
Approved revision: | 1733 |
Merged at revision: | 1734 |
Proposed branch: | lp:~dshrews/drizzle/bug599582 |
Merge into: | lp:~drizzle-trunk/drizzle/development |
Diff against target: |
297 lines (+215/-10) 5 files modified
drizzled/cursor.cc (+7/-2) drizzled/transaction_services.cc (+22/-5) drizzled/transaction_services.h (+4/-3) plugin/transaction_log/tests/r/replace.result (+138/-0) plugin/transaction_log/tests/t/replace.inc (+44/-0) |
To merge this branch: | bzr merge lp:~dshrews/drizzle/bug599582 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jay Pipes (community) | Approve | ||
Drizzle Merge Team | Pending | ||
Review via email: mp+33815@code.launchpad.net |
Description of the change
This modifies transaction services logging to use the row stored in table->record[1] (which will be the row causing the unique key conflict) to log any DELETEs resulting from a REPLACE statement. This is also the record sent to the storage engine for deleting. Note: This will happen only for REPLACE.
We don't have Field pointers for the update row (table->record[1]), only the insert row (table->record[0]), so I have to "borrow" the value parsing abilities from the insert row Field pointers to get at the value in the update row. This seemed to be least expensive way to do this, and the Field::val_str() calls don't appear to modify anything in Field, so this seems to be safe.
Also added some tests to make sure this functions properly.
Very nice work, David. ++ for comments explaining code. :)