manticoresoftware / manticoresoftware/manticoresearch

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

Open
#64 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement in backlog
Dominant language
C++
Stars
12k
Forks
642
Avg merge
3d 12h
Merged PRs (30d)
47

Description

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)  

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using the provided SQL commands against an RT table, comparing the unaliased and aliased id results for 18446744073709551614. Trace the result conversion or formatting path used for an aliased id, and verify that the aliased query returns the same unsigned value as the unaliased query.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.