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 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490
|
# Tests for setting innodb-page-size=4k
SET default_storage_engine=InnoDB;
--disable_query_log
let $MYSQLD_DATADIR = `select @@datadir`;
let $INNODB_PAGE_SIZE = `select @@innodb_page_size`;
call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is");
--enable_query_log
--echo # Test 1) Show the page size from Information Schema
--disable_warnings
SELECT variable_value FROM performance_schema.global_status
WHERE LOWER(variable_name) = 'innodb_page_size';
--enable_warnings
--echo # Test 2) The number of buffer pool pages is dependent upon the page size.
--disable_warnings
--replace_result 6144 {checked_valid}
SELECT variable_value FROM performance_schema.global_status
WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
--enable_warnings
--echo # Test 3) Query some information_shema tables that are dependent upon
--echo # the page size.
# Show the metadata for tables in schema 'mysql'.
# Pulled from innodb-system-table-view.test
# The IDs of mysql.innodb_table_stats and mysql.innodb_index_stats are
# unpredictable. They depend on whether mtr has created the database for
# this test from scratch or is using a previously created database where
# those tables have been dropped and recreated. Since we cannot force mtr
# to use a freshly created database for this test we do not return the
# table or index IDs. We can return the space IS of mysql schema tables
# since they are created consistently during bootstrap.
SELECT t.name table_name, t.n_cols, t.flag table_flags,
i.name index_name, i.page_no root_page, i.type,
i.n_fields, i.merge_threshold
FROM INFORMATION_SCHEMA.INNODB_TABLES t,
INFORMATION_SCHEMA.INNODB_INDEXES i
WHERE t.table_id = i.table_id
AND t.name LIKE 'mysql%'
AND t.name NOT LIKE 'mysql/ndb_binlog_index'
ORDER BY t.name, i.index_id;
CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb;
CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb;
CREATE TABLE t4 (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb;
# Show the metadata for tables in schema 'test'.
# Do not return the space ID since this tablespace may have existed before
# this test runs. The root page number of each index should be consistent
# within a file-per-table tablespace.
SELECT t.name table_name, t.n_cols, t.flag table_flags,
i.name index_name, i.page_no root_page, i.type,
i.n_fields, i.merge_threshold
FROM INFORMATION_SCHEMA.INNODB_TABLES t,
INFORMATION_SCHEMA.INNODB_INDEXES i
WHERE t.table_id = i.table_id
AND t.name LIKE 'test%'
ORDER BY t.name, i.name;
--source suite/innodb/include/show_i_s_tablespaces.inc
DROP TABLE t1, t2, t3, t4;
--echo # Test 4) The maximum row size is dependent upon the page size.
--echo # Redundant: 1979, Compact: 1982.
--echo # Compressed: 1982, Dynamic: 1982.
--echo # Each row format has its own amount of overhead that
--echo # varies depending on number of fields and other overhead.
SET SESSION innodb_strict_mode = ON;
# Redundant table; 1978 bytes with 10 CHAR fields
# Calculation :
# 6 (extra bytes)
# 2 * 13 = 26 (fields len) = 2 * n_fields (3 system fields + 10 user fields)
# 6 + 6 + 7 = 19 (ROW_ID, TRX_ID, ROLL_PTR)
# 200 * 9 = 1800 (each char(200) field)
# 127 = (char(127))
# T0tal = 1978
# NOTE : charset latin1 causes each char to have max 1 bytes. If we use default
# (utf8_mb4) then each char will need 4 bytes. So char(200) will need
# max 800 bytes.
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(127)
) charset latin1 ROW_FORMAT=redundant;
DROP TABLE t1;
# Redundant table; 1979 bytes with 10 CHAR fields
--replace_regex /> [0-9]*/> max_row_size/
--error ER_TOO_BIG_ROWSIZE
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(128)
) charset latin1 ROW_FORMAT=redundant;
# Compact table; 1981 bytes with 10 CHAR fields
# Calculation :
# 5 (extra bytes)
# 2 (null bitmap)
# 6 + 6 + 7 = 19 (ROW_ID, TRX_ID, ROLL_PTR)
# 200 * 9 = 1800 (each char(200) field)
# 155 = (char(155))
# Total = 1981
# NOTE : charset latin1 causes each char to have max 1 bytes. If we use default
# (utf8_mb4) then each char will need 4 bytes. So char(200) will need
# max 800 bytes.
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155)
) charset latin1 ROW_FORMAT=compact;
DROP TABLE t1;
# Compact table; 1982 bytes with 10 CHAR fields
--replace_regex /> [0-9]*/> max_row_size/
--error ER_TOO_BIG_ROWSIZE
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156)
) charset latin1 ROW_FORMAT=compact;
# Compressed table; 1878 bytes with 10 CHAR fields
# Bug#13391353 Limit is 1876 on 32-Linux only
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(76)
) ROW_FORMAT=compressed;
DROP TABLE t1;
--replace_regex /> [0-9]*/> max_row_size/
--error ER_TOO_BIG_ROWSIZE
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(79)
) charset latin1 ROW_FORMAT=compressed;
# Dynamic table; 1955 bytes with 10 CHAR fields
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155)
) ROW_FORMAT=dynamic;
DROP TABLE t1;
--replace_regex /> [0-9]*/> max_row_size/
--error ER_TOO_BIG_ROWSIZE
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156)
) charset latin1 ROW_FORMAT=dynamic;
#
# Test the maximum key length
# Moved from innodb-index.test since each page size has its own max key length.
# Max Key Length is 768 for 4k pages.
#
# InnoDB assumes 3 bytes for each UTF8 character.
#
CREATE TABLE t1 (a varchar(64) character set utf8,
b varchar(64) character set utf8,
c varchar(64) character set utf8,
d varchar(64) character set utf8,
PRIMARY KEY (a,b,c,d))
charset latin1
ENGINE=innodb;
DROP TABLE t1;
--error ER_TOO_LONG_KEY
CREATE TABLE t1 (a varchar(64) character set utf8,
b varchar(64) character set utf8,
c varchar(64) character set utf8,
d varchar(65) character set utf8,
PRIMARY KEY (a,b,c,d))
charset latin1
ENGINE=innodb;
CREATE TABLE t1 (a varchar(64) character set utf8,
b varchar(64) character set utf8,
c varchar(64) character set utf8,
d varchar(64) character set utf8,
e varchar(64) character set utf8,
PRIMARY KEY (a), KEY (b,c,d,e))
charset latin1
ENGINE=innodb;
DROP TABLE t1;
--error ER_TOO_LONG_KEY
CREATE TABLE t1 (a varchar(64) character set utf8,
b varchar(64) character set utf8,
c varchar(64) character set utf8,
d varchar(64) character set utf8,
e varchar(65) character set utf8,
PRIMARY KEY (a), KEY (b,c,d,e))
charset latin1
ENGINE=innodb;
--echo # Test 5) Make sure that KEY_BLOCK_SIZE=4, 2 & 1 are all
--echo # accepted and that KEY_BLOCK_SIZE=16 & 8 are rejected
--echo # in strict mode and converted to 4 in non-strict mode.
SET SESSION innodb_strict_mode = ON;
--error ER_ILLEGAL_HA
CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
SHOW WARNINGS;
--error ER_ILLEGAL_HA
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
SHOW WARNINGS;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
SHOW WARNINGS;
SELECT table_name, row_format, create_options
FROM information_schema.tables WHERE table_name = 't1';
ALTER TABLE t1 KEY_BLOCK_SIZE=2;
SHOW WARNINGS;
SELECT table_name, row_format, create_options
FROM information_schema.tables WHERE table_name = 't1';
ALTER TABLE t1 KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
SELECT table_name, row_format, create_options
FROM information_schema.tables WHERE table_name = 't1';
ALTER TABLE t1 KEY_BLOCK_SIZE=0;
SHOW WARNINGS;
SELECT table_name, row_format, create_options
FROM information_schema.tables WHERE table_name = 't1';
DROP TABLE t1;
SET SESSION innodb_strict_mode = OFF;
CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
SHOW WARNINGS;
SELECT table_name, row_format, create_options
FROM information_schema.tables WHERE table_name = 't1';
DROP TABLE t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
SHOW WARNINGS;
SELECT table_name, row_format, create_options
FROM information_schema.tables WHERE table_name = 't1';
DROP TABLE t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
SHOW WARNINGS;
SELECT table_name, row_format, create_options
FROM information_schema.tables WHERE table_name = 't1';
ALTER TABLE t1 KEY_BLOCK_SIZE=2;
SHOW WARNINGS;
SELECT table_name, row_format, create_options
FROM information_schema.tables WHERE table_name = 't1';
ALTER TABLE t1 KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
SELECT table_name, row_format, create_options
FROM information_schema.tables WHERE table_name = 't1';
ALTER TABLE t1 KEY_BLOCK_SIZE=0;
SHOW WARNINGS;
SELECT table_name, row_format, create_options
FROM information_schema.tables WHERE table_name = 't1';
DROP TABLE t1;
--echo # Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16
--echo # are both rejected when innodb_file_per_table=OFF
# Moved from innodb-zip.test
SET SESSION innodb_strict_mode = ON;
SET GLOBAL innodb_file_per_table = OFF;
SHOW VARIABLES LIKE 'innodb_file_per_table';
--error ER_ILLEGAL_HA
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
SHOW WARNINGS;
--error ER_ILLEGAL_HA
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
SHOW WARNINGS;
SET GLOBAL innodb_file_per_table = ON;
--error ER_ILLEGAL_HA
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
SHOW WARNINGS;
--error ER_ILLEGAL_HA
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
SHOW WARNINGS;
--echo # Test 7) Not included here; 16k only
--echo # Test 8) Test creating a table that could lead to undo log overflow.
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
o blob,p blob,q blob,r blob,s blob,t blob,u blob)
ENGINE=InnoDB ROW_FORMAT=dynamic;
SET @a = repeat('a', 767);
SET @b = repeat('b', 767);
SET @c = repeat('c', 767);
SET @d = repeat('d', 767);
SET @e = repeat('e', 767);
# With no indexes defined, we can update all columns to max key part length.
INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a);
UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
# With one index defined, we can still update all fields.
CREATE INDEX t1a ON t1 (a(767));
UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
# Add one more index and the UNDO record becomes too big to update all columns.
# But a single transaction can update the columns in separate statements.
# because the UNDO records will be smaller.
CREATE INDEX t1b ON t1 (b(767));
--error ER_UNDO_RECORD_TOO_BIG
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
BEGIN;
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
COMMIT;
# Another index can still be added and a single field can still be updated
CREATE INDEX t1c ON t1 (c(767));
UPDATE t1 SET c=@e;
# Add one more index and we cannot update a column to its defined index length.
# This is a problem. It means that the DDL is allowed to create a table
# that CANNOT be updated. See bug#12953735.
CREATE INDEX t1d ON t1 (d(767));
# NOTE: bug#12953735 seems to become a little more rare case by fixing bug#29536710
# Reproducing doesn't seem to be so needed. And just comment out for now.
#--error ER_UNDO_RECORD_TOO_BIG
#UPDATE t1 SET d=@e;
--replace_regex /> [0-9]*/> max_row_size/
CREATE INDEX t1e ON t1 (e(767));
SHOW CREATE TABLE t1;
DROP TABLE t1;
#
# Bug #13336585 - INNODB: CHANGE BUFFERING WITH 4K PAGES CAN ASSERT
# IF SECONDARY KEY IS NEAR MAX
# If the secondary index tuple is close to half the page size,
# ibuf_insert_low() could return DB_TOO_BIG_RECORD, which is not expected
# in ibuf_insert(). In order to insure this does not happen, WL5756
# imposes a maximum key length of 768 for 4k pages and 1536 for 8k pages.
# The existing max key Size for 16k pages is 3072.
#
#-- disable_query_log
# The flag innodb_change_buffering_debug is only available in debug builds.
# It instructs InnoDB to try to evict pages from the buffer pool when
# change buffering is possible, so that the change buffer will be used
# whenever possible.
# This flag is not used currently since it exposes valgrind error in ibuf
# code with the following SQL
#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
#SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug;
#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
#SET GLOBAL innodb_change_buffering_debug = 1;
#-- enable_query_log
# make sure the largest possible key entry can be added to the insert buffer.
# Make enough records so that the root page is not a leaf page.
SET SESSION innodb_strict_mode = OFF;
--replace_regex /> [0-9]*/> max_row_size/
CREATE TABLE t1(
pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48),
pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48),
pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48),
pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48),
sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48),
sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48),
sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48),
sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48),
PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
charset latin1
ROW_FORMAT=Redundant ENGINE=InnoDB;
SET @r = repeat('a', 48);
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
SET @r = repeat('b', 48);
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
SET @r = repeat('c', 48);
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
SET @r = repeat('d', 48);
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
SET @r = repeat('e', 48);
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
DELETE from t1;
DROP TABLE t1;
# Compressed tables do not compress parent pages. So the whole uncompressed
# secondary tuple including the primary key must be able to fit in half the
# compressed page size. This record length is enforced at index creation.
# So the only way to get an ibuf tuple too big is to make the KEY_BLOCK_SIZE
# the same as the page size.
CREATE TABLE t1(
pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48),
pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48),
pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48),
pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48),
sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48),
sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48),
sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48),
sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48),
PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
charset latin1
ROW_FORMAT=Compressed KEY_BLOCK_SIZE=4 ENGINE=InnoDB;
SET @r = repeat('a', 48);
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
SET @r = repeat('b', 48);
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
SET @r = repeat('c', 48);
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
SET @r = repeat('d', 48);
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
SET @r = repeat('e', 48);
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
DELETE from t1;
DROP TABLE t1;
#-- disable_query_log
#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
#SET GLOBAL innodb_change_buffering_debug = 0;
#-- enable_query_log
# The following should fail in non-strict mode too.
# (The fix of Bug #50945 only affects REDUNDANT and COMPACT tables.)
SET SESSION innodb_strict_mode = off;
--replace_regex /> [0-9]*/> max_row_size/
CREATE TABLE t1(
c text NOT NULL, d text NOT NULL,
PRIMARY KEY (c(767)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
DROP TABLE t1;
CREATE TABLE t1(
c text NOT NULL, d text NOT NULL,
PRIMARY KEY (c(767)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII;
drop table t1;
CREATE TABLE t1(
c text NOT NULL, d text NOT NULL,
PRIMARY KEY (c(767)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII;
drop table t1;
--replace_regex /> [0-9]*/> max_row_size/
CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
DROP TABLE t1;
CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
DROP TABLE t1;
--echo #
--echo # Bug #29283055: CLASS.CC:2604: VOID THD::SEND_STATEMENT_STATUS(): ASSERTION `0' FAILED.
--echo #
USE mysql;
RENAME TABLE mysql.slave_master_info to mysql.slave_master_info_28490361;
# Should fail because its not an InnoDB Table
--error ER_UNSUPPORTED_ENGINE
CREATE TABLE mysql.slave_master_info(Number_of_lines int(10)unsigned COMMENT 'Number of lines in the file.',Master_log_name text COLLATE utf8_bin COMMENT 'The name of the master binary log currently being read from the master.',Master_log_pos INT(20) unsigned COMMENT 'The master log position of the last read event.',Host char(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT''COMMENT 'The host name of the master.',User_name text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The user name used to connect to the master.',User_password text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The password used to connect to the master.',Port int(10) unsigned COMMENT 'The network port used to connect to the master.',Connect_retry int(10) unsigned COMMENT 'The period (in seconds) that the slave will wait before trying to reconnect to the master.',Enabled_ssl INT(1) COMMENT 'Indicates whether the server supports SSL connections.',Ssl_ca text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The file used for the Certificate Authority (CA) certificate.',Ssl_capath text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The path to the Certificate Authority (CA) certificates.',Ssl_cert text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the SSL certificate file.',Ssl_cipher text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the cipher in use for the SSL connection.',Sslk text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the SSL key file.',Ssl_verify_server_cert INT(1) COMMENT 'Whether to verify the server certificate.',Heartbeat float,Bind text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'Displays which interface is employed when connecting to the MySQL server',Ignored_server_ids text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The number of server IDs to be ignored,followed by the actual server IDs',Uuid text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The master server uuid.',Retry_count INT(20) unsigned COMMENT 'Number of reconnect attempts,to the master,before giving up.',Ssl_crl text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The file used for the Certificate Revocation List (CRL)',Ssl_crlpath text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The path used for Certificate Revocation List (CRL) files',Enabled_auto_position INT(1) COMMENT 'Indicates whether GTIDs will be used to retrieve events from the master.',PRIMARY KEY (Host,Port)) DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Master Information' ENGINE=ARCHIVE;
# Should fail because its a temporary table
--error ER_TOO_LONG_KEY
create temporary table mysql.slave_master_info (a varchar(334) character set utf32 primary key) ROW_FORMAT=COMPACT ENGINE=INNODB;
# Should pass
create table mysql.slave_master_info (a varchar(334) character set utf32 primary key) ROW_FORMAT=COMPACT ENGINE=INNODB;
--echo # Cleanup
DROP TABLE mysql.slave_master_info;
RENAME TABLE mysql.slave_master_info_28490361 to mysql.slave_master_info;
|