manticoresoftware / manticoresearch

Easy to use open source fast database for search | Good alternative to Elasticsearch now | Drop-in replacement for E in the ELK soon
https://manticoresearch.com
GNU General Public License v3.0
9.03k stars 506 forks source link

GitHub#64 ⁃ Wrong result for id column under certain conditions #64

Open dennis-gr opened 6 years ago

dennis-gr commented 6 years ago

Manticore Search version: 2.6.2

Description of the issue:

Manticore sends a wrong result for the id column if value is greater than int64 and the column is aliased.

Steps to reproduce:

Welcome to the MySQL monitor.  Commands end with ; or \g.  
Your MySQL connection id is 1  
Server version: 2.6.2 0bbd194@180223 release  

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.  

Oracle is a registered trademark of Oracle Corporation and/or its  
affiliates. Other names may be trademarks of their respective  
owners.  

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.  

mysql> insert into rt (id) values (18446744073709551614);  
Query OK, 1 row affected (0.00 sec)  

mysql> select id from rt;  
+----------------------+  
| id                   |  
+----------------------+  
| 18446744073709551614 |  
+----------------------+  
1 row in set (0.00 sec)  

mysql> select id as c1 from rt;  
+------+  
| c1   |  
+------+  
|   -2 |  
+------+  
1 row in set (0.00 sec)  
tomatolog commented 6 years ago

Yes, we got only bigint attribute type however ID is unsigned and not real attribute - there is conversion issue pops up.

airolg commented 6 years ago

Added to backlog, thank you