Bug #76055 need more integer types
Description:
8B is a sensible max for integer types (64 bit math and all), but the lack of support for 5,6,7 byte ints is a long-standing annoyance. it's especially odd that there's no 6, as mysql internally uses 6 bytes for so many things. current workarounds (like having a one row table with an 8 byte int, casting it to binary(6)) add unnecessary extra work to busy systems with additional writes and casting operations, and cause unnecessary locking.
How to repeat:
create table test (id biggishint unsigned not null auto_increment, primary key (id));
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'biggishint unsigned not null auto_increment, primary key (id))' at line 1
Suggested fix:
add more int types! in a perfect world, support for definitions like int(bits/bytes) would be great, as the 'display width' concept is archaic, but the lack of backwards compatibility with such a change probably puts it off the table for the time being (though it should be addressed someday...). just add additional data types with the current naming structure, maybe name them something fun, even.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.069 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.