1DROP TABLE IF EXISTS t1; 2SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; 3Warnings: 4Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release. 5CREATE TABLE t1 (sint8 tinyint not null); 6INSERT INTO t1 VALUES ('0.1'); 7INSERT INTO t1 VALUES ('0.5'); 8INSERT INTO t1 VALUES ('127.4'); 9INSERT INTO t1 VALUES ('127.5'); 10Warnings: 11Warning 1264 Out of range value for column 'sint8' at row 1 12INSERT INTO t1 VALUES ('-0.1'); 13INSERT INTO t1 VALUES ('-0.5'); 14INSERT INTO t1 VALUES ('-127.4'); 15INSERT INTO t1 VALUES ('-127.5'); 16INSERT INTO t1 VALUES ('-128.4'); 17INSERT INTO t1 VALUES ('-128.5'); 18Warnings: 19Warning 1264 Out of range value for column 'sint8' at row 1 20SELECT * FROM t1; 21sint8 220 231 24127 25127 260 27-1 28-127 29-128 30-128 31-128 32DROP TABLE t1; 33CREATE TABLE t1 (uint8 tinyint unsigned not null); 34INSERT INTO t1 VALUES ('0.1'); 35INSERT INTO t1 VALUES ('0.5'); 36INSERT INTO t1 VALUES ('127.4'); 37INSERT INTO t1 VALUES ('127.5'); 38INSERT INTO t1 VALUES ('-0.1'); 39INSERT INTO t1 VALUES ('-0.5'); 40Warnings: 41Warning 1264 Out of range value for column 'uint8' at row 1 42INSERT INTO t1 VALUES ('255.4'); 43INSERT INTO t1 VALUES ('255.5'); 44Warnings: 45Warning 1264 Out of range value for column 'uint8' at row 1 46SELECT * FROM t1; 47uint8 480 491 50127 51128 520 530 54255 55255 56DROP TABLE t1; 57CREATE TABLE t1 (sint16 smallint not null); 58INSERT INTO t1 VALUES ('0.1'); 59INSERT INTO t1 VALUES ('0.5'); 60INSERT INTO t1 VALUES ('32767.4'); 61INSERT INTO t1 VALUES ('32767.5'); 62Warnings: 63Warning 1264 Out of range value for column 'sint16' at row 1 64INSERT INTO t1 VALUES ('-0.1'); 65INSERT INTO t1 VALUES ('-0.5'); 66INSERT INTO t1 VALUES ('-32767.4'); 67INSERT INTO t1 VALUES ('-32767.5'); 68INSERT INTO t1 VALUES ('-32768.4'); 69INSERT INTO t1 VALUES ('-32768.5'); 70Warnings: 71Warning 1264 Out of range value for column 'sint16' at row 1 72SELECT * FROM t1; 73sint16 740 751 7632767 7732767 780 79-1 80-32767 81-32768 82-32768 83-32768 84DROP TABLE t1; 85CREATE TABLE t1 (uint16 smallint unsigned not null); 86INSERT INTO t1 VALUES ('0.1'); 87INSERT INTO t1 VALUES ('0.5'); 88INSERT INTO t1 VALUES ('32767.4'); 89INSERT INTO t1 VALUES ('32767.5'); 90INSERT INTO t1 VALUES ('-0.1'); 91INSERT INTO t1 VALUES ('-0.5'); 92Warnings: 93Warning 1264 Out of range value for column 'uint16' at row 1 94INSERT INTO t1 VALUES ('65535.4'); 95INSERT INTO t1 VALUES ('65535.5'); 96Warnings: 97Warning 1264 Out of range value for column 'uint16' at row 1 98SELECT * FROM t1; 99uint16 1000 1011 10232767 10332768 1040 1050 10665535 10765535 108DROP TABLE t1; 109CREATE TABLE t1 (sint24 mediumint not null); 110INSERT INTO t1 VALUES ('0.1'); 111INSERT INTO t1 VALUES ('0.5'); 112INSERT INTO t1 VALUES ('8388607.4'); 113INSERT INTO t1 VALUES ('8388607.5'); 114Warnings: 115Warning 1264 Out of range value for column 'sint24' at row 1 116INSERT INTO t1 VALUES ('-0.1'); 117INSERT INTO t1 VALUES ('-0.5'); 118INSERT INTO t1 VALUES ('-8388607.4'); 119INSERT INTO t1 VALUES ('-8388607.5'); 120INSERT INTO t1 VALUES ('-8388608.4'); 121INSERT INTO t1 VALUES ('-8388608.5'); 122Warnings: 123Warning 1264 Out of range value for column 'sint24' at row 1 124SELECT * FROM t1; 125sint24 1260 1271 1288388607 1298388607 1300 131-1 132-8388607 133-8388608 134-8388608 135-8388608 136DROP TABLE t1; 137CREATE TABLE t1 (uint24 mediumint unsigned not null); 138INSERT INTO t1 VALUES ('0.1'); 139INSERT INTO t1 VALUES ('0.5'); 140INSERT INTO t1 VALUES ('8388607.4'); 141INSERT INTO t1 VALUES ('8388607.5'); 142INSERT INTO t1 VALUES ('-0.1'); 143INSERT INTO t1 VALUES ('-0.5'); 144Warnings: 145Warning 1264 Out of range value for column 'uint24' at row 1 146INSERT INTO t1 VALUES ('16777215.4'); 147INSERT INTO t1 VALUES ('16777215.5'); 148Warnings: 149Warning 1264 Out of range value for column 'uint24' at row 1 150SELECT * FROM t1; 151uint24 1520 1531 1548388607 1558388608 1560 1570 15816777215 15916777215 160DROP TABLE t1; 161CREATE TABLE t1 (sint64 bigint not null); 162INSERT INTO t1 VALUES ('0.1'); 163INSERT INTO t1 VALUES ('0.5'); 164INSERT INTO t1 VALUES ('9223372036854775807.4'); 165INSERT INTO t1 VALUES ('9223372036854775807.5'); 166Warnings: 167Warning 1264 Out of range value for column 'sint64' at row 1 168INSERT INTO t1 VALUES ('-0.1'); 169INSERT INTO t1 VALUES ('-0.5'); 170INSERT INTO t1 VALUES ('-9223372036854775807.4'); 171INSERT INTO t1 VALUES ('-9223372036854775807.5'); 172INSERT INTO t1 VALUES ('-9223372036854775808.4'); 173INSERT INTO t1 VALUES ('-9223372036854775808.5'); 174Warnings: 175Warning 1264 Out of range value for column 'sint64' at row 1 176SELECT * FROM t1; 177sint64 1780 1791 1809223372036854775807 1819223372036854775807 1820 183-1 184-9223372036854775807 185-9223372036854775808 186-9223372036854775808 187-9223372036854775808 188DROP TABLE t1; 189CREATE TABLE t1 (uint64 bigint unsigned not null); 190INSERT INTO t1 VALUES ('0.1'); 191INSERT INTO t1 VALUES ('0.5'); 192INSERT INTO t1 VALUES ('9223372036854775807.4'); 193INSERT INTO t1 VALUES ('9223372036854775807.5'); 194INSERT INTO t1 VALUES ('-0.1'); 195INSERT INTO t1 VALUES ('-0.5'); 196Warnings: 197Warning 1264 Out of range value for column 'uint64' at row 1 198INSERT INTO t1 VALUES ('18446744073709551615.4'); 199INSERT INTO t1 VALUES ('18446744073709551615.5'); 200Warnings: 201Warning 1264 Out of range value for column 'uint64' at row 1 202INSERT INTO t1 VALUES ('1844674407370955161.0'); 203INSERT INTO t1 VALUES ('1844674407370955161.1'); 204INSERT INTO t1 VALUES ('1844674407370955161.2'); 205INSERT INTO t1 VALUES ('1844674407370955161.3'); 206INSERT INTO t1 VALUES ('1844674407370955161.4'); 207INSERT INTO t1 VALUES ('1844674407370955161.5'); 208INSERT INTO t1 VALUES ('1844674407370955161.0e1'); 209INSERT INTO t1 VALUES ('1844674407370955161.1e1'); 210INSERT INTO t1 VALUES ('1844674407370955161.2e1'); 211INSERT INTO t1 VALUES ('1844674407370955161.3e1'); 212INSERT INTO t1 VALUES ('1844674407370955161.4e1'); 213INSERT INTO t1 VALUES ('1844674407370955161.5e1'); 214INSERT INTO t1 VALUES ('18446744073709551610e-1'); 215INSERT INTO t1 VALUES ('18446744073709551611e-1'); 216INSERT INTO t1 VALUES ('18446744073709551612e-1'); 217INSERT INTO t1 VALUES ('18446744073709551613e-1'); 218INSERT INTO t1 VALUES ('18446744073709551614e-1'); 219INSERT INTO t1 VALUES ('18446744073709551615e-1'); 220SELECT * FROM t1; 221uint64 2220 2231 2249223372036854775807 2259223372036854775808 2260 2270 22818446744073709551615 22918446744073709551615 2301844674407370955161 2311844674407370955161 2321844674407370955161 2331844674407370955161 2341844674407370955161 2351844674407370955162 23618446744073709551610 23718446744073709551611 23818446744073709551612 23918446744073709551613 24018446744073709551614 24118446744073709551615 2421844674407370955161 2431844674407370955161 2441844674407370955161 2451844674407370955161 2461844674407370955161 2471844674407370955162 248DROP TABLE t1; 249CREATE TABLE t1 (str varchar(128), sint64 bigint not null default 0); 250INSERT INTO t1 (str) VALUES ('1.5'); 251INSERT INTO t1 (str) VALUES ('1.00005e4'); 252INSERT INTO t1 (str) VALUES ('1.0005e3'); 253INSERT INTO t1 (str) VALUES ('1.005e2'); 254INSERT INTO t1 (str) VALUES ('1.05e1'); 255INSERT INTO t1 (str) VALUES ('1.5e0'); 256INSERT INTO t1 (str) VALUES ('100005e-1'); 257INSERT INTO t1 (str) VALUES ('100050e-2'); 258INSERT INTO t1 (str) VALUES ('100500e-3'); 259INSERT INTO t1 (str) VALUES ('105000e-4'); 260INSERT INTO t1 (str) VALUES ('150000e-5'); 261UPDATE t1 SET sint64=str; 262SELECT * FROM t1; 263str sint64 2641.5 2 2651.00005e4 10001 2661.0005e3 1001 2671.005e2 101 2681.05e1 11 2691.5e0 2 270100005e-1 10001 271100050e-2 1001 272100500e-3 101 273105000e-4 11 274150000e-5 2 275DROP TABLE t1; 276SET sql_mode = default; 277