Skip to content

bug: after hexadecimal data is written to the integer primary key column, a problem occurs #1362

@davidshiz

Description

@davidshiz

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Describe the problem

mysql> create table t1 (a bigint not null, primary key(a));
Query OK, 0 rows affected (0.01 sec)

mysql> insert into t1 values (0xFFFFFFFFFFFFFF);
Query OK, 1 row affected (0.01 sec)

mysql> select * from t1;
+-------------------+
| a                 |
+-------------------+
| 72057594037927936 |
+-------------------+
1 row in set (0.00 sec)

Expected behavior

mysql> select * from t1;
+-------------------+
| a                 |
+-------------------+
| 72057594037927935 |
+-------------------+
1 row in set (0.00 sec)

How To Reproduce

create table t1 (a bigint not null, primary key(a));
insert into t1 values (0xFFFFFFFFFFFFFF);

Environment

root@ub01:/stonedb57/install/bin# ./mysqld --version
./mysqld  Ver 5.7.36-StoneDB-v1.0.2 for Linux on x86_64 (build-)
build information as follow:
        Repository address: https://github.com/stoneatom/stonedb.git:stonedb-5.7-dev
        Branch name: stonedb-5.7-dev
        Last commit ID: d66a3ca70
        Last commit time: Date:   Wed Mar 8 10:28:54 2023 +0800
        Build time: Date: Wed Mar  8 11:35:35 CST 2023

Are you interested in submitting a PR to solve the problem?

  • Yes, I will!

Metadata

Metadata

Assignees

Labels

A-bugSomething isn't working

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions