Need more robust read/write bit tests for Field and derivatives
At issue is the prior macros, previously defined in field.cc:
#define ASSERT_
#define ASSERT_
When replacing DBUG_ASSERT calls with standard assert, tests failed spectacularly for some unknown reason (core dumps in 10/14 tests)
The macros are ostensibly designed to ensure that when certain Field:: methods are called, that the storage engine certifies the field in a table is writeable or readable. For instance, in Field::store(), the ASSERT_
However, the logic in the macros is weird -- it's essentially a triple-negative logical test.
Jay thinks the test should instead be along these lines:
assert(table && table->write_set && bitmap_
But, for now, these macro tests have been removed to finalize the remove-dbug tree and push forward.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Low
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- Patrick Crews
- Definition:
- Pending Approval
- Series goal:
- Accepted for trunk
- Implementation:
- Unknown
- Milestone target:
- future
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
> assert(table && table->write_set && bitmap_
In the original assert, table being NULL is fine. In yours, it's not.
I think the original one is good.
Olaf