[MCOL-351] logical or resolves to null for some negative cases Created: 2016-10-07 Updated: 2016-11-08 Resolved: 2016-11-08 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | DMLProc |
| Affects Version/s: | None |
| Fix Version/s: | Icebox |
| Type: | Bug | Priority: | Major |
| Reporter: | David Thompson (Inactive) | Assignee: | Andrew Hutchings (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
under certain circumstances seems to be based on negative input values, logical or returns null rather than a value, to repro:
You'll see that for every other negative number the expression is null. In myisam it returns a large double number. This can be tested using similar table and an LDI to load the data:
|
| Comments |
| Comment by David Thompson (Inactive) [ 2016-10-07 ] |
|
This happens with different behavior for different constant values as well. |
| Comment by Andrew Hutchings (Inactive) [ 2016-11-08 ] |
|
The reason for this is the column gets cast as a 64bit unsigned int. The resulting 'or' for even numbers therefore turns into 0xffffffffffffffe which equates to NULL, this is the same behaviour as MyISAM but MyISAM doesn't have that as a magic number. The behaviour for ColumnStore is correct given our documented ranges. This is therefore a duplicate of |
| Comment by Andrew Hutchings (Inactive) [ 2016-11-08 ] |
|
Closing as duplicate due to explanation of issue. |