| 1 |
ALTER DATABASE test CHARACTER SET latin1 COLLATE latin1_swedish_ci; |
| 2 |
CREATE TABLE worklog5743 ( |
| 3 |
col_1_text TEXT(4000) , col_2_text TEXT(4000) , |
| 4 |
PRIMARY KEY (col_1_text(3072)) |
| 5 |
) ROW_FORMAT=DYNAMIC, engine = innodb; |
| 6 |
INSERT INTO worklog5743 VALUES(REPEAT("a", 3500) , REPEAT("o", 3500)); |
| 7 |
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM |
| 8 |
worklog5743; |
| 9 |
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500) |
| 10 |
1 1 |
| 11 |
connect con1,localhost,root,,; |
| 12 |
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM |
| 13 |
worklog5743; |
| 14 |
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500) |
| 15 |
1 1 |
| 16 |
SELECT COUNT(*) FROM worklog5743; |
| 17 |
COUNT(*) |
| 18 |
1 |
| 19 |
connect con2,localhost,root,,; |
| 20 |
START TRANSACTION; |
| 21 |
INSERT INTO worklog5743 VALUES(REPEAT("b", 3500) , REPEAT("o", 3500)); |
| 22 |
connection con1; |
| 23 |
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM |
| 24 |
worklog5743; |
| 25 |
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500) |
| 26 |
1 1 |
| 27 |
SELECT COUNT(*) FROM worklog5743; |
| 28 |
COUNT(*) |
| 29 |
1 |
| 30 |
START TRANSACTION; |
| 31 |
connection default; |
| 32 |
SET GLOBAL innodb_fast_shutdown=3; |
| 33 |
# restart |
| 34 |
SELECT COUNT(*) FROM worklog5743; |
| 35 |
COUNT(*) |
| 36 |
1 |
| 37 |
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM |
| 38 |
worklog5743; |
| 39 |
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500) |
| 40 |
1 1 |
| 41 |
disconnect con1; |
| 42 |
disconnect con2; |
| 43 |
connect con1,localhost,root,,; |
| 44 |
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM |
| 45 |
worklog5743; |
| 46 |
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500) |
| 47 |
1 1 |
| 48 |
SELECT COUNT(*) FROM worklog5743; |
| 49 |
COUNT(*) |
| 50 |
1 |
| 51 |
START TRANSACTION; |
| 52 |
INSERT INTO worklog5743 VALUES(REPEAT("b", 3500) , REPEAT("o", 3500)); |
| 53 |
DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 3500); |
| 54 |
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM |
| 55 |
worklog5743; |
| 56 |
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500) |
| 57 |
1 1 |
| 58 |
connection default; |
| 59 |
SET GLOBAL innodb_fast_shutdown=3; |
| 60 |
# restart |
| 61 |
SELECT COUNT(*) FROM worklog5743; |
| 62 |
COUNT(*) |
| 63 |
1 |
| 64 |
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM |
| 65 |
worklog5743; |
| 66 |
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500) |
| 67 |
1 1 |
| 68 |
disconnect con1; |
| 69 |
connect con2,localhost,root,,; |
| 70 |
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM |
| 71 |
worklog5743; |
| 72 |
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500) |
| 73 |
1 1 |
| 74 |
SELECT COUNT(*) FROM worklog5743; |
| 75 |
COUNT(*) |
| 76 |
1 |
| 77 |
START TRANSACTION; |
| 78 |
UPDATE worklog5743 SET col_1_text = REPEAT("b", 3500) WHERE col_1_text = REPEAT("a", 3500); |
| 79 |
SELECT col_1_text = REPEAT("b", 3500) , col_2_text = REPEAT("o", 3500) FROM |
| 80 |
worklog5743; |
| 81 |
col_1_text = REPEAT("b", 3500) col_2_text = REPEAT("o", 3500) |
| 82 |
1 1 |
| 83 |
connection default; |
| 84 |
SET GLOBAL innodb_fast_shutdown=3; |
| 85 |
# restart |
| 86 |
SELECT COUNT(*) FROM worklog5743; |
| 87 |
COUNT(*) |
| 88 |
1 |
| 89 |
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM |
| 90 |
worklog5743; |
| 91 |
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500) |
| 92 |
1 1 |
| 93 |
DROP TABLE worklog5743; |
| 94 |
# |
| 95 |
# MDEV-21245 InnoDB: Using a partial-field key prefix in search |
| 96 |
# |
| 97 |
CREATE TABLE t1 (a VARCHAR(255), KEY k(a)) DEFAULT CHARSET=utf8mb3 |
| 98 |
ENGINE=InnoDB; |
| 99 |
INSERT INTO t1 set a=''; |
| 100 |
alter table t1 change a a varchar(3000); |
| 101 |
affected rows: 0 |
| 102 |
info: Records: 0 Duplicates: 0 Warnings: 1 |
| 103 |
Warnings: |
| 104 |
Note 1071 Specified key was too long; max key length is 3072 bytes |
| 105 |
SELECT * FROM t1 WHERE a IN (''); |
| 106 |
a |
| 107 |
|
| 108 |
DROP TABLE t1; |
| 109 |
# End of 10.4 tests |
| 110 |
ALTER DATABASE test CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci; |