rollback to savepoint not handled correctly in transaction log
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Medium
|
Joe Daly | ||
7.0 |
Fix Released
|
Medium
|
Joe Daly | ||
Dexter |
Won't Fix
|
Medium
|
Joe Daly |
Bug Description
Running the following will cause the value 2 to be inserted into the transaction log it should not be, below is the message
SET AUTOCOMMIT = 0;
CREATE TABLE t1(a INT NOT NULL, PRIMARY KEY(a));
START TRANSACTION;
INSERT INTO t1 VALUES (1);
SAVEPOINT `savept1`;
INSERT INTO t1 VALUES (2);
ROLLBACK TO SAVEPOINT savept1;
COMMIT;
produces a message of:
+PRINT_
+transaction_
+ server_id: 1
+ transaction_id: 3
+ 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"
+ }
+ }
+ insert_data {
+ segment_id: 1
+ end_segment: true
+ record {
+ insert_value: "1"
+ }
+ record {
+ insert_value: "2"
+ }
+ }
+}
Related branches
- Drizzle Merge Team: Pending requested
-
Diff: 194 lines (+102/-1)4 files modifieddrizzled/named_savepoint.h (+17/-1)
drizzled/transaction_services.cc (+49/-0)
plugin/transaction_log/tests/r/rollback.result (+20/-0)
plugin/transaction_log/tests/t/rollback.inc (+16/-0)
Changed in drizzle: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in drizzle: | |
assignee: | nobody → David Shrewsbury (dshrews) |
tags: | added: replication |
We should take a look at this today.
Cheers,
--Brian
On Aug 12, 2010, at 8:06 AM, Joe Daly <email address hidden> wrote:
> ** Changed in: drizzle/dexter /bugs.launchpad .net/bugs/ 600032 TRANSACTION_ MESSAGE( 'transaction. log',(select max(entry_offset) from DATA_DICTIONARY .TRANSACTION_ LOG_TRANSACTION S)) context {
> Assignee: David Shrewsbury (dshrews) => Joe Daly (skinny.moey)
>
> --
> rollback to savepoint not handled correctly in transaction log
> https:/
> You received this bug notification because you are a member of Drizzle-
> developers, which is subscribed to Drizzle.
>
> Status in A Lightweight SQL Database for Cloud and Web: Confirmed
> Status in Drizzle dexter series: Confirmed
>
> Bug description:
> Running the following will cause the value 2 to be inserted into the transaction log it should not be, below is the message
>
> SET AUTOCOMMIT = 0;
> CREATE TABLE t1(a INT NOT NULL, PRIMARY KEY(a));
>
> START TRANSACTION;
>
> INSERT INTO t1 VALUES (1);
> SAVEPOINT `savept1`;
> INSERT INTO t1 VALUES (2);
>
> ROLLBACK TO SAVEPOINT savept1;
>
> COMMIT;
>
> produces a message of:
>
> +PRINT_
> +transaction_
> + server_id: 1
> + transaction_id: 3
> + 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"
> + }
> + }
> + insert_data {
> + segment_id: 1
> + end_segment: true
> + record {
> + insert_value: "1"
> + }
> + record {
> + insert_value: "2"
> + }
> + }
> +}
>
>