oceanbase / oceanbase/miniob

mysql中float精度计算误差容忍度太低

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

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
4.4k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Enhancement
MySQL中对float类型的数据计算总是出现让人无法接受的误差。
样例1:
比如在表中执行:
insert into t values(29.14);
select * from t where id < 29.14;
将会看到29.14这条数据。

样例2:
插入稍微大一点的数字,比如10365.23,MySQL中查询数据时会得到10365.2

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

No files, tests, or entry points are named. Start by reproducing the two reported FLOAT SQL examples and trace the value handling and comparison behavior in the database implementation. Done should mean an agreed precision or tolerance rule with tests covering both reported values.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.