Transaction reader not properly converting all NULL values into usable SQL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
High
|
Joe Daly | ||
7.0 |
Fix Released
|
High
|
Joe Daly |
Bug Description
drizzled/
The data below shows that the transaction log itself is capturing the data properly (is_null is noted correctly). However, transaction reader is not reassembling the log into proper SQL - the generated INSERT fails.
Original data:
INSERT INTO `c` VALUES (1,NULL,
Transaction_reader output, note how we don't have NULL between 't' and 'd', between NULL and 'n'
INSERT INTO `test`.`c` (`pk`,`
statement {
type: INSERT
start_timestamp: 1284763044959043
end_timestamp: 1284763045008367
insert_header {
table_metadata {
schema_name: "test"
table_name: "c"
}
field_metadata {
type: INTEGER
name: "pk"
}
field_metadata {
type: INTEGER
name: "col_int_key"
}
field_metadata {
type: BLOB
name: "col_text_
}
field_metadata {
type: BIGINT
name: "col_bigint_key"
}
field_metadata {
type: VARCHAR
name: "col_char_
}
field_metadata {
type: BLOB
name: "col_text_key"
}
field_metadata {
type: VARCHAR
name: "col_char_
}
field_metadata {
type: ENUM
name: "col_enum"
}
field_metadata {
type: BLOB
name: "col_text_not_null"
}
field_metadata {
type: ENUM
name: "col_enum_key"
}
field_metadata {
type: BIGINT
name: "col_bigint_
}
field_metadata {
type: ENUM
name: "col_enum_not_null"
}
field_metadata {
type: INTEGER
name: "col_int_
}
field_metadata {
type: VARCHAR
name: "col_char_1024"
}
field_metadata {
type: INTEGER
name: "col_int"
}
field_metadata {
type: BLOB
name: "col_text"
}
field_metadata {
type: ENUM
name: "col_enum_
}
field_metadata {
type: VARCHAR
name: "col_char_10"
}
field_metadata {
type: BIGINT
name: "col_bigint_
}
field_metadata {
type: INTEGER
name: "col_int_not_null"
}
field_metadata {
type: VARCHAR
name: "col_char_
}
field_metadata {
type: VARCHAR
name: "col_char_
}
field_metadata {
type: VARCHAR
name: "col_char_10_key"
}
field_metadata {
type: VARCHAR
name: "col_char_1024_key"
}
field_metadata {
type: BIGINT
name: "col_bigint"
}
}
insert_data {
segment_id: 1
end_segment: true
record {
insert_value: "1"
insert_value: ""
insert_value: ""
insert_value: "2"
insert_value: "t"
insert_value: ""
insert_value: "d"
insert_value: "v"
insert_value: ""
insert_value: "h"
insert_value: "32518804059382
insert_value: "v"
insert_value: "0"
insert_value: "q"
insert_value: ""
insert_value: ""
insert_value: "n"
insert_value: "h"
insert_value: "1"
insert_value: "6"
insert_value: "look"
insert_value: "TYZGK"
insert_value: "b"
insert_value: "JRKMQ"
insert_value: ""
is_null: false
is_null: true
is_null: false
is_null: false
is_null: false
is_null: true
is_null: false
is_null: false
is_null: false
is_null: false
is_null: false
is_null: false
is_null: false
is_null: false
is_null: true
is_null: true
is_null: false
is_null: false
is_null: false
is_null: false
is_null: false
is_null: false
is_null: false
is_null: false
is_null: true
}
}
}
Related branches
- Drizzle Merge Team: Pending requested
-
Diff: 173 lines (+72/-30)3 files modifieddrizzled/message/statement_transform.cc (+26/-26)
plugin/transaction_log/tests/r/blob.result (+33/-2)
plugin/transaction_log/tests/t/blob.inc (+13/-2)
Changed in drizzle: | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → David Shrewsbury (dshrews) |
Changed in drizzle: | |
status: | Confirmed → Fix Committed |
Ill take a look at this as I made the original null changes