-
-
Notifications
You must be signed in to change notification settings - Fork 142
Closed
Labels
A-bugSomething isn't workingSomething isn't workingB-storagedata type, data storage, insert,update,delete, transactionsdata type, data storage, insert,update,delete, transactionsgood first issueGood for newcomersGood for newcomersprio: highHigh priorityHigh priority
Milestone
Description
Have you read the Contributing Guidelines on issues?
- I have 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
create table ttt(id bigint unsigned);
mysql> insert into ttt values(0);
Query OK, 1 row affected (0.01 sec)
mysql> insert into ttt values(9223372036854775807);
Query OK, 1 row affected (0.00 sec)
mysql> select * from ttt;
+---------------------+
| id |
+---------------------+
| 0 |
| 9223372036854775807 |
+---------------------+
2 rows in set (0.00 sec)
mysql> insert into ttt values(9223372036854775808);
Query OK, 1 row affected (0.00 sec)
mysql> insert into ttt values(9223372036854775809);
Query OK, 1 row affected (0.01 sec)
mysql> select * from ttt;
+---------------------+
| id |
+---------------------+
| 0 |
| 9223372036854775807 |
| NULL |
| NULL |
+---------------------+
4 rows in set (0.01 sec)
mysql> insert into ttt values(9223372036854775810);
Query OK, 1 row affected (0.00 sec)
mysql> insert into ttt values(18446744073709551615);
Query OK, 1 row affected (0.01 sec)
mysql> select * from ttt;
+----------------------+
| id |
+----------------------+
| 0 |
| 9223372036854775807 |
| NULL |
| NULL |
| 9223372036854775810 |
| 18446744073709551615 |
+----------------------+
6 rows in set (0.00 sec)
mysql> insert into ttt values(18446744073709551616);
ERROR 1264 (22003): Out of range value for column 'id' at row 1
The value range is [0,18446744073709551615].However, if you insert a value(9223372036854775808、9223372036854775809), null is inserted by default.mysql> create table ttt(id bigint);
Query OK, 0 rows affected (0.01 sec)
mysql> insert into ttt values(-9223372036854775806);
Query OK, 1 row affected (0.01 sec)
mysql> insert into ttt values(9223372036854775807);
Query OK, 1 row affected (0.01 sec)
mysql> select * from ttt;
+----------------------+
| id |
+----------------------+
| -9223372036854775806 |
| 9223372036854775807 |
+----------------------+
2 rows in set (0.01 sec)
mysql> insert into ttt values(-9223372036854775807);
Query OK, 1 row affected (0.00 sec)
mysql> insert into ttt values(-9223372036854775808);
Query OK, 1 row affected (0.00 sec)
mysql> select * from ttt;
+----------------------+
| id |
+----------------------+
| -9223372036854775806 |
| 9223372036854775807 |
| NULL |
| NULL |
+----------------------+
4 rows in set (0.01 sec)
mysql> insert into ttt values(-9223372036854775809);
ERROR 1264 (22003): Out of range value for column 'id' at row 1
The value range is [-9223372036854775808,9223372036854775807,].However, if you insert a value(-9223372036854775807、-9223372036854775808), null is inserted by default.Expected behavior
How To Reproduce
No response
Environment
./mysqld Ver 5.7.36-StoneDB-debug 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: 562afcb
Last commit time: Date: Mon Jan 9 07:11:42 2023 +0000
Build time: Date: Mon Jan 9 17:33:31 CST 2023
Are you interested in submitting a PR to solve the problem?
- Yes, I will!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-bugSomething isn't workingSomething isn't workingB-storagedata type, data storage, insert,update,delete, transactionsdata type, data storage, insert,update,delete, transactionsgood first issueGood for newcomersGood for newcomersprio: highHigh priorityHigh priority
Type
Projects
Status
Done