negative value over 0x40000000 at Integer
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 20
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
Sorry Japanese.
以下のようなmrubyスクリプトでクエリすると30ビット目が立った値がマイナスになるようです。
sel = "select * from fw_sw"
whe = " where datetime(date, time, 'localtime')=?"
db.execute(sel + whe, "2026-02-16 15:43:01") do |row, fields|
p row
val[i] = row
i = i + 1
end
["2026-02-16", "06:43:01", -1072953691, 396496091, 14287984, 19130282, 628332003, 0]
sqlite3コマンドでは正の値が返ります。
2026-02-16|06:43:01|1074529957|396496091|14287984|19130282|628332003|0
マイナスになったら0x80000000を足すというワークアラウンドもできるのですが、仕様となりますか?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the db.execute call in the mruby script and trace how SQLite integer results become mruby Integer values in this binding. Compare the returned value with the sqlite3 command output for the same query, and consider the issue done when the high-bit integer behavior is resolved or clearly documented as specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, ruby, sqlite
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100