1# 2# INT column types 3# 4 5--disable_warnings 6DROP TABLE IF EXISTS t1; 7--enable_warnings 8 9eval CREATE TABLE t1 ( 10 i INT $extra_col_opts, 11 i0 INT(0) $extra_col_opts, 12 i1 INT(1) $extra_col_opts, 13 i20 INT(20) $extra_col_opts, 14 t TINYINT $extra_col_opts, 15 t0 TINYINT(0) $extra_col_opts, 16 t1 TINYINT(1) $extra_col_opts, 17 t20 TINYINT(20) $extra_col_opts, 18 s SMALLINT $extra_col_opts, 19 s0 SMALLINT(0) $extra_col_opts, 20 s1 SMALLINT(1) $extra_col_opts, 21 s20 SMALLINT(20) $extra_col_opts, 22 m MEDIUMINT $extra_col_opts, 23 m0 MEDIUMINT(0) $extra_col_opts, 24 m1 MEDIUMINT(1) $extra_col_opts, 25 m20 MEDIUMINT(20) $extra_col_opts, 26 b BIGINT $extra_col_opts, 27 b0 BIGINT(0) $extra_col_opts, 28 b1 BIGINT(1) $extra_col_opts, 29 b20 BIGINT(20) $extra_col_opts, 30 pk INT AUTO_INCREMENT PRIMARY KEY 31) ENGINE=rocksdb; 32 33SHOW COLUMNS IN t1; 34 35# Always valid values 36 37INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) VALUES (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20); 38INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) VALUES (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); 39INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) VALUES (2147483647,2147483647,2147483647,2147483647,127,127,127,127,32767,32767,32767,32767,8388607,8388607,8388607,8388607,9223372036854775807,9223372036854775807,9223372036854775807,9223372036854775807); 40--sorted_result 41SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1; 42 43# Values which can be valid or not, 44# depending on whether columns are SIGNED or UNSIGNED 45# (if not valid should produce warnings) 46 47INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) VALUES (-2147483648,-2147483648,-2147483648,-2147483648,-128,-128,-128,-128,-32768,-32768,-32768,-32768,-8388608,-8388608,-8388608,-8388608,-9223372036854775808,-9223372036854775808,-9223372036854775808,-9223372036854775808); 48INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) VALUES (4294967295,4294967295,4294967295,4294967295,255,255,255,255,65535,65535,65535,65535,16777215,16777215,16777215,16777215,18446744073709551615,18446744073709551615,18446744073709551615,18446744073709551615); 49 50--sorted_result 51SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1; 52 53# Invalid values 54 55INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) VALUES (-2147483649,-2147483649,-2147483649,-2147483649,-129,-129,-129,-129,-32769,-32769,-32769,-32769,-8388609,-8388609,-8388609,-8388609,-9223372036854775809,-9223372036854775809,-9223372036854775809,-9223372036854775809); 56 57INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) VALUES (4294967296,4294967296,4294967296,4294967296,256,256,256,256,65536,65536,65536,65536,16777216,16777216,16777216,16777216,18446744073709551616,18446744073709551616,18446744073709551616,18446744073709551616); 58 59INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) SELECT b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b FROM t1 WHERE b IN (-9223372036854775808,9223372036854775807,18446744073709551615); 60 61--sorted_result 62SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1; 63 64--error ER_TOO_BIG_DISPLAYWIDTH 65eval ALTER TABLE t1 ADD COLUMN i257 INT(257) $extra_col_opts; 66 67DROP TABLE t1; 68 69