oceanbase / oceanbase/seekdb

mysqltest: static_engine.explicit_cast for DOUBLE 9.22337e18 to integer yields 9223372036854775807, expected 9223372036854775808

Open
#527 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dima type: bug
Dominant language
C++
Stars
2.9k
Forks
339
Avg merge
1d 19h
Merged PRs (30d)
52

Description

Environment

  • Platform: arm64 (Android Studio Emulator, device: emulator-5554)
  • Binary Path: /data/local/tmp/seekdb
  • Startup Command: ./data/local/tmp/seekdb --nodaemon --base-dir /data/local/tmp/seekdb_data --port 5881
  • Listening Port: 5881

Description

In the static_engine.explicit_cast test, explicitly casting the DOUBLE value 9.22337e18 to an integer yields the result 9223372036854775807. This does not match the expected value of 9223372036854775808.

Steps to Reproduce

  1. Access the machine.
  2. Execute the relevant test case.
  3. Observe the actual result 9223372036854775807 versus the expected 9223372036854775808.

Impact

The test case fails due to the incorrect cast result, indicating a potential issue in the explicit type conversion logic for DOUBLE to integer near the upper bounds of the integer range.

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

Start with the static_engine.explicit_cast test using the seekdb binary at /data/local/tmp/seekdb and reproduce the DOUBLE-to-integer conversion on the stated arm64 environment. Trace the explicit cast behavior near the upper integer bound. Done means the test produces the expected 9223372036854775808 instead of 9223372036854775807.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, mysql
Domain
databases, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.