1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325
|
##############################################
# Test instant ADD/DROP COLUMN for REDUNDANT format
##############################################
SET @saved_innodb_strict_mode=@@SESSION.innodb_strict_mode;
# ------------------------------------------------------------
# Create a table with 3 columns. [id, c2, c3]
# ------------------------------------------------------------
CREATE TABLE t1(id INT PRIMARY KEY, c1 VARCHAR(4000), c2 VARCHAR(4000)) ROW_FORMAT=REDUNDANT;;
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1 6 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
id 0 6 1283 0
c1 1 12 16715791 0
c2 2 12 16715791 0
SET SESSION innodb_strict_mode=OFF;
# ------------------------------------------------------------
# Add a new column. It causes max_row_size > permissible size
# ------------------------------------------------------------
ALTER TABLE t1 ADD COLUMN c3 VARCHAR(500) NOT NULL DEFAULT 'dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd', ALGORITHM=INSTANT;
ERROR HY000: Column can't be added or dropped with ALGORITHM=INSTANT as either max possible row size already crosses max permissible row size or may cross it after add. Try ALGORITHM=INPLACE/COPY.
ALTER TABLE t1 ADD COLUMN c3 VARCHAR(500) NOT NULL DEFAULT 'dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd';
Warnings:
Warning 139 Row size too large (> 1979). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
Warning 139 Row size too large (> 1979). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1 7 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
id 0 6 1283 0
c1 1 12 16715791 0
c2 2 12 16715791 0
c3 3 12 16716047 0
INSERT INTO t1 (id, c1, c2) VALUES(1, repeat('a', 4000), repeat('b', 4000));
ERROR 42000: Row size too large (> 1979). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
INSERT INTO t1 (id, c1, c2) VALUES(1, repeat('a', 4), repeat('b', 4));
SELECT id, LEFT(c1 , 10), LEFT(c2, 10), LEFT(c3, 10) FROM t1 ORDER BY id;
id LEFT(c1 , 10) LEFT(c2, 10) LEFT(c3, 10)
1 aaaa bbbb dddddddddd
ALTER TABLE t1 ADD COLUMN c4 INT, ALGORITHM=INSTANT;
ERROR HY000: Column can't be added or dropped with ALGORITHM=INSTANT as either max possible row size already crosses max permissible row size or may cross it after add. Try ALGORITHM=INPLACE/COPY.
ALTER TABLE t1 DROP COLUMN c3, ALGORITHM=INSTANT;
ERROR HY000: Column can't be added or dropped with ALGORITHM=INSTANT as either max possible row size already crosses max permissible row size or may cross it after add. Try ALGORITHM=INPLACE/COPY.
###########
# CLEANUP #
###########
DROP TABLE t1;
SET SESSION innodb_strict_mode=@saved_innodb_strict_mode;
# ------------------------------------------------------------
# Create a partition table with 3 columns. [c1, c2, c3, c4]
# ------------------------------------------------------------
CREATE TABLE t1 (c1 INT, c2 INT, c3 INT, c4 TEXT) ROW_FORMAT=REDUNDANT PARTITION BY RANGE(c1 * 2) ( PARTITION p0 VALUES LESS THAN (128), PARTITION p1 VALUES LESS THAN (256) , PARTITION p2 VALUES LESS THAN (384) , PARTITION p3 VALUES LESS THAN MAXVALUE);;
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1#p#p0 7 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
c1 0 6 1027 0
c2 1 6 1027 0
c3 2 6 1027 0
c4 3 5 16711932 0
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1#p#p1 7 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
c1 0 6 1027 0
c2 1 6 1027 0
c3 2 6 1027 0
c4 3 5 16711932 0
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1#p#p2 7 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
c1 0 6 1027 0
c2 1 6 1027 0
c3 2 6 1027 0
c4 3 5 16711932 0
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1#p#p3 7 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
c1 0 6 1027 0
c2 1 6 1027 0
c3 2 6 1027 0
c4 3 5 16711932 0
SET SESSION innodb_strict_mode=OFF;
# ------------------------------------------------------------
# Add new columns. It causes max_row_size > permissible size
# ------------------------------------------------------------
ALTER TABLE t1 ADD COLUMN c5 VARCHAR(500) NOT NULL DEFAULT 'dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd', ADD COLUMN c6 TEXT, ALGORITHM=INSTANT;
ERROR HY000: Column can't be added or dropped with ALGORITHM=INSTANT as either max possible row size already crosses max permissible row size or may cross it after add. Try ALGORITHM=INPLACE/COPY.
ALTER TABLE t1 ADD COLUMN c5 VARCHAR(500) NOT NULL DEFAULT 'dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd', ADD COLUMN c6 TEXT;
Warnings:
Warning 139 Row size too large (> 1979). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
Warning 139 Row size too large (> 1979). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
Warning 139 Row size too large (> 1979). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
Warning 139 Row size too large (> 1979). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1#p#p0 9 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
c1 0 6 1027 0
c2 1 6 1027 0
c3 2 6 1027 0
c4 3 5 16711932 0
c5 4 12 16716047 0
c6 5 5 16711932 0
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1#p#p1 9 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
c1 0 6 1027 0
c2 1 6 1027 0
c3 2 6 1027 0
c4 3 5 16711932 0
c5 4 12 16716047 0
c6 5 5 16711932 0
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1#p#p2 9 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
c1 0 6 1027 0
c2 1 6 1027 0
c3 2 6 1027 0
c4 3 5 16711932 0
c5 4 12 16716047 0
c6 5 5 16711932 0
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1#p#p3 9 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
c1 0 6 1027 0
c2 1 6 1027 0
c3 2 6 1027 0
c4 3 5 16711932 0
c5 4 12 16716047 0
c6 5 5 16711932 0
INSERT INTO t1 (c1, c2, c3, c4, c6) VALUES(1, 2, 3, repeat('a', 1000), repeat('c', 1000));
ERROR 42000: Row size too large (> 1979). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
INSERT INTO t1 (c1, c2, c3, c4, c6) VALUES(1, 2, 3, 'abcdefg', 'hijklmnop');
SELECT c1, c2, c3, c4, LEFT(c5 , 10), c6 from t1;
c1 c2 c3 c4 LEFT(c5 , 10) c6
1 2 3 abcdefg dddddddddd hijklmnop
ALTER TABLE t1 ADD COLUMN c7 INT, ALGORITHM=INSTANT;
ERROR HY000: Column can't be added or dropped with ALGORITHM=INSTANT as either max possible row size already crosses max permissible row size or may cross it after add. Try ALGORITHM=INPLACE/COPY.
ALTER TABLE t1 DROP COLUMN c6, ALGORITHM=INSTANT;
ERROR HY000: Column can't be added or dropped with ALGORITHM=INSTANT as either max possible row size already crosses max permissible row size or may cross it after add. Try ALGORITHM=INPLACE/COPY.
###########
# CLEANUP #
###########
DROP TABLE t1;
SET SESSION innodb_strict_mode=@saved_innodb_strict_mode;
############################################
# No need to run for DYNAMIC
############################################
############################################
# Test instant ADD/DROP COLUMN for COMPACT format
############################################
SET @saved_innodb_strict_mode=@@SESSION.innodb_strict_mode;
# ------------------------------------------------------------
# Create a table with 3 columns. [id, c2, c3]
# ------------------------------------------------------------
CREATE TABLE t1(id INT PRIMARY KEY, c1 VARCHAR(4000), c2 VARCHAR(4000)) ROW_FORMAT=COMPACT;;
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1 6 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
id 0 6 1283 0
c1 1 12 16715791 0
c2 2 12 16715791 0
SET SESSION innodb_strict_mode=OFF;
# ------------------------------------------------------------
# Add a new column. It causes max_row_size > permissible size
# ------------------------------------------------------------
ALTER TABLE t1 ADD COLUMN c3 VARCHAR(500) NOT NULL DEFAULT 'dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd', ALGORITHM=INSTANT;
ERROR HY000: Column can't be added or dropped with ALGORITHM=INSTANT as either max possible row size already crosses max permissible row size or may cross it after add. Try ALGORITHM=INPLACE/COPY.
ALTER TABLE t1 ADD COLUMN c3 VARCHAR(500) NOT NULL DEFAULT 'dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd';
Warnings:
Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1 7 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
id 0 6 1283 0
c1 1 12 16715791 0
c2 2 12 16715791 0
c3 3 12 16716047 0
INSERT INTO t1 (id, c1, c2) VALUES(1, repeat('a', 4000), repeat('b', 4000));
ERROR 42000: Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
INSERT INTO t1 (id, c1, c2) VALUES(1, repeat('a', 4), repeat('b', 4));
SELECT id, LEFT(c1 , 10), LEFT(c2, 10), LEFT(c3, 10) FROM t1 ORDER BY id;
id LEFT(c1 , 10) LEFT(c2, 10) LEFT(c3, 10)
1 aaaa bbbb dddddddddd
ALTER TABLE t1 ADD COLUMN c4 INT, ALGORITHM=INSTANT;
ERROR HY000: Column can't be added or dropped with ALGORITHM=INSTANT as either max possible row size already crosses max permissible row size or may cross it after add. Try ALGORITHM=INPLACE/COPY.
ALTER TABLE t1 DROP COLUMN c3, ALGORITHM=INSTANT;
ERROR HY000: Column can't be added or dropped with ALGORITHM=INSTANT as either max possible row size already crosses max permissible row size or may cross it after add. Try ALGORITHM=INPLACE/COPY.
###########
# CLEANUP #
###########
DROP TABLE t1;
SET SESSION innodb_strict_mode=@saved_innodb_strict_mode;
# ------------------------------------------------------------
# Create a partition table with 3 columns. [c1, c2, c3, c4]
# ------------------------------------------------------------
CREATE TABLE t1 (c1 INT, c2 INT, c3 INT, c4 TEXT) ROW_FORMAT=COMPACT PARTITION BY RANGE(c1 * 2) ( PARTITION p0 VALUES LESS THAN (128), PARTITION p1 VALUES LESS THAN (256) , PARTITION p2 VALUES LESS THAN (384) , PARTITION p3 VALUES LESS THAN MAXVALUE);;
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1#p#p0 7 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
c1 0 6 1027 0
c2 1 6 1027 0
c3 2 6 1027 0
c4 3 5 16711932 0
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1#p#p1 7 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
c1 0 6 1027 0
c2 1 6 1027 0
c3 2 6 1027 0
c4 3 5 16711932 0
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1#p#p2 7 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
c1 0 6 1027 0
c2 1 6 1027 0
c3 2 6 1027 0
c4 3 5 16711932 0
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1#p#p3 7 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
c1 0 6 1027 0
c2 1 6 1027 0
c3 2 6 1027 0
c4 3 5 16711932 0
SET SESSION innodb_strict_mode=OFF;
# ------------------------------------------------------------
# Add new columns. It causes max_row_size > permissible size
# ------------------------------------------------------------
ALTER TABLE t1 ADD COLUMN c5 VARCHAR(500) NOT NULL DEFAULT 'dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd', ADD COLUMN c6 TEXT, ALGORITHM=INSTANT;
ERROR HY000: Column can't be added or dropped with ALGORITHM=INSTANT as either max possible row size already crosses max permissible row size or may cross it after add. Try ALGORITHM=INPLACE/COPY.
ALTER TABLE t1 ADD COLUMN c5 VARCHAR(500) NOT NULL DEFAULT 'dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd', ADD COLUMN c6 TEXT;
Warnings:
Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1#p#p0 9 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
c1 0 6 1027 0
c2 1 6 1027 0
c3 2 6 1027 0
c4 3 5 16711932 0
c5 4 12 16716047 0
c6 5 5 16711932 0
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1#p#p1 9 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
c1 0 6 1027 0
c2 1 6 1027 0
c3 2 6 1027 0
c4 3 5 16711932 0
c5 4 12 16716047 0
c6 5 5 16711932 0
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1#p#p2 9 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
c1 0 6 1027 0
c2 1 6 1027 0
c3 2 6 1027 0
c4 3 5 16711932 0
c5 4 12 16716047 0
c6 5 5 16711932 0
# Metadata from INFORMATION_SCHEMA.TABLES
NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS
test/t1#p#p3 9 0 0
# Metadata from INFORMATION_SCHEMA.COLUMNS
NAME POS MTYPE PRTYPE HAS_DEFAULT
c1 0 6 1027 0
c2 1 6 1027 0
c3 2 6 1027 0
c4 3 5 16711932 0
c5 4 12 16716047 0
c6 5 5 16711932 0
INSERT INTO t1 (c1, c2, c3, c4, c6) VALUES(1, 2, 3, repeat('a', 1000), repeat('c', 1000));
ERROR 42000: Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
INSERT INTO t1 (c1, c2, c3, c4, c6) VALUES(1, 2, 3, 'abcdefg', 'hijklmnop');
SELECT c1, c2, c3, c4, LEFT(c5 , 10), c6 from t1;
c1 c2 c3 c4 LEFT(c5 , 10) c6
1 2 3 abcdefg dddddddddd hijklmnop
ALTER TABLE t1 ADD COLUMN c7 INT, ALGORITHM=INSTANT;
ERROR HY000: Column can't be added or dropped with ALGORITHM=INSTANT as either max possible row size already crosses max permissible row size or may cross it after add. Try ALGORITHM=INPLACE/COPY.
ALTER TABLE t1 DROP COLUMN c6, ALGORITHM=INSTANT;
ERROR HY000: Column can't be added or dropped with ALGORITHM=INSTANT as either max possible row size already crosses max permissible row size or may cross it after add. Try ALGORITHM=INPLACE/COPY.
###########
# CLEANUP #
###########
DROP TABLE t1;
SET SESSION innodb_strict_mode=@saved_innodb_strict_mode;
|