Bug #8535 | Federated Test fails on selecting NULLs in a WHERE clause | ||
---|---|---|---|
Submitted: | 16 Feb 2005 6:57 | Modified: | 5 Apr 2005 21:31 |
Reporter: | Patrick Galbraith | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | OS: | Linux (Linux, SuSe 8.x) | |
Assigned to: | Bugs System | CPU Architecture: | Any |
[16 Feb 2005 6:57]
Patrick Galbraith
[16 Feb 2005 7:21]
Patrick Galbraith
The problem is that Field::quote_data was being called after the if else block: if ((*field)->is_null()) insert_field_value_string.append("NULL"); else (*field)->val_str(&insert_field_value_string); (*field)->quote_data(&insert_field_value_string); Resulting in NULL being quoted on the insert statement on the foreign database, so literal NULLs were being inserted. Whatever change in the core code that broke this was fortunate, because the new behaviour is correct ;) Now, this is done: if ((*field)->is_null()) { insert_field_value_string.append("NULL"); } else { (*field)->val_str(&insert_field_value_string); (*field)->quote_data(&insert_field_value_string); } I will commit this fix tomorrow.
[17 Feb 2005 18:17]
Patrick Galbraith
changeset 1.1856 fixes this, awaiting review. Ingo has reviewed, with minor modifications needed. Waiting for second review.
[5 Apr 2005 21:31]
Patrick Galbraith
This has been fixed in 5.0.3