I am creating an IPAddress Vault for my apps, each of which is asssigned to some specific piece of h/w.
Ideally the range should be from 192.168.100.mmm all the way to 192.168.900.nnn
So, this is a snippet:
START TRANSACTION;
DROP TABLE IF EXISTS TestIP;
CREATE TABLE TestIP (IPAddress INT UNSIGNED
, TestBy_ID INT NOT NULL
, InsertDateTime TIMESTAMP DEFAULT CURRENT_TIMESTAMP
, PRIMARY KEY (IPAddress)
) ENGINE=INNODB AUTO_INCREMENT= 10 CHARACTER SET utf8 COLLATE utf8_general_ci;
INSERT INTO TestIP(IPAddress
, TestBy_ID
, InsertDateTime)
VALUES(inet_aton('192.168.600.10'), 12345, default);
SELECT inet_ntoa(IPAddress), TestBy_ID, InsertDateTime FROM TestIP
COMMIT;
mySQL workbench cannot insert address range bigger than 192.168.250.mmm, throws following error:
Incorrect string value: ''192.168.260.10'' for function inet_aton, but okay for 192.168.250.10
Weird!