[MDEV-8663] IF Statement returns multiple values erroneously (or Assertion `!null_value' failed in Item::send(Protocol*, String*)) Created: 2015-08-21 Updated: 2015-09-04 Resolved: 2015-09-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Affects Version/s: | 5.5.33a, 5.3.13, 5.5, 10.0, 10.1 |
| Fix Version/s: | 5.5.46, 10.0.22, 10.1.7 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Kyle Misner | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Centos 7 |
||
| Description |
|
Test Case:
The issue is that when an IF statement returns a NULL value and there's a decimal value being returned for one of the upstream IF options then the IF is returning a 0.0 value as well as the expected NULL and therefore causing all further values to be shifted to the next column. If I change the decimal to a string or an integer, then the expected data is returned as shown in the last two SELECT statements. I've tested using MyISAM and InnoDB and it happens to both. I tested and confirmed this happens on MariaDB version "10.0.21-MariaDB-log". This issue does not happen on version "5.5.32-MariaDB-log". It does not happen on 5.6.26 MySQL Community Server (GPL) either. |
| Comments |
| Comment by Elena Stepanova [ 2015-08-22 ] | |||||||||||||||||||||||||||||||||
|
Thanks for the report and the test case.
It was introduced by the following revision in 5.3 tree:
| |||||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2015-09-03 ] | |||||||||||||||||||||||||||||||||
|
revision-id: 62fe87c5a239c7304b245ce5954c87aecb6382ad (mariadb-5.5.45-1-g62fe87c)
keeping contract: NULL value mean NULL pointer in val_str and val_deciman. — |