[MDEV-14419] clang x86_64 test failure - main.select - converting strings of numbers to compare against large bigint - loss of precision Created: 2017-11-16 Updated: 2018-06-29 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Affects Version/s: | 10.2 |
| Fix Version/s: | 10.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Daniel Black | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | clang | ||
| Environment: |
clang 3.9, 4.0, 5.0 |
||
| Description |
|
As discovered on travis, clang test (simplified as below fail). Simplified test
This returns no results. As discovered with cvicentiu, the error manifests in stored_field_cmp_to_item. item_cmp_type returns a common factor of REAL between string and INT types and therefore adopts a double based equality test at the end of the stored_field_cmp_to_item function. Unfortunately the results for the conversion from the ulonglong in item->val_real() and field->val_real() differ by ~80 resulting in no equally and the SQL statement returning the wrong result. Options include: |
| Comments |
| Comment by Daniel Black [ 2017-12-01 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
On 10.2 branch at f59a1826f81e3246735c2ca61daec794170b61d1 fails:$ clang --version (from: clang-4.0.1-5.fc26.src.rpm) fails:clang version 5.0.0 (git://gitlab.ozlabs.ibm.com/mirror/llvm-clang.git 79a6eca386d468058b31e2d4f54b1b736a12f558) (git://gitlab.ozlabs.ibm.com/mirror/llvm.git 31f450353208e4d108fff264a2eba433758a0709) circa march 2017 (https://github.com/llvm-mirror/clang/commit/79a6eca386d468058b31e2d4f54b1b736a12f558). Git commits correspond to upstream git mirror.
works: clang-6.0 from November 2017
|