Delete within a transaction does not generate the correct statements in the transaction log

Bug #496101 reported by Marcus Eriksson on 2009-12-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Critical
Jay Pipes

Bug Description

The following SQL commands:
drizzle> begin;
Query OK, 0 rows affected (0 sec)

drizzle> insert into test1 values(102,"",""),(103,"","");
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

Jay Pipes (jaypipes) on 2009-12-14
Changed in drizzle:
assignee: nobody → Jay Pipes (jaypipes)
importance: Undecided → Critical
status: New → Confirmed
milestone: none → bell
Jay Pipes (jaypipes) on 2009-12-14
Changed in drizzle:
status: Confirmed → In Progress
Jay Pipes (jaypipes) on 2009-12-23
Changed in drizzle:
status: In Progress → Fix Committed
Jay Pipes (jaypipes) on 2009-12-27
Changed in drizzle:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers