| 1 |
# |
| 2 |
# Bug #26300119 ASSERTION IN PREBUILT->TRX->ISOLATION_LEVEL == TRX_ISO_READ_UNCOMMITTED |
| 3 |
# |
| 4 |
CREATE PROCEDURE populate_t1(IN BASE INT, IN SIZE INT) |
| 5 |
BEGIN |
| 6 |
DECLARE i INT DEFAULT BASE; |
| 7 |
WHILE (i <= SIZE) DO |
| 8 |
INSERT INTO t1 VALUES (i, repeat('10101010101010101010',2000)); |
| 9 |
SET i = i + 1; |
| 10 |
END WHILE; |
| 11 |
END| |
| 12 |
CREATE TABLE t1 ( |
| 13 |
pk int, |
| 14 |
col_blob_key blob, |
| 15 |
primary key (pk) |
| 16 |
); |
| 17 |
CALL populate_t1(1, 100); |
| 18 |
START TRANSACTION; |
| 19 |
CALL populate_t1(101, 199); |
| 20 |
SET DEBUG_SYNC='before_insertion_of_blob SIGNAL halted_insert WAIT_FOR proceed'; |
| 21 |
INSERT INTO t1 VALUES (200, repeat('10101010101010101010',2000));; |
| 22 |
SET DEBUG_SYNC='now WAIT_FOR halted_insert'; |
| 23 |
SET DEBUG_SYNC='allow_insert SIGNAL proceed'; |
| 24 |
SELECT pk, col_blob_key FROM t1 WHERE pk between 99 and 100; |
| 25 |
COMMIT; |
| 26 |
SET DEBUG_SYNC='RESET'; |
| 27 |
DROP PROCEDURE populate_t1; |
| 28 |
DROP TABLE t1; |
| 29 |
# |
| 30 |
# Bug#32291506 ASSERTION FAILURE: ROW0SEL.CC: MYSQL_COL_LEN == LEN |
| 31 |
# |
| 32 |
CREATE TABLE t1 ( |
| 33 |
c0 int, |
| 34 |
c1 char(200) CHARACTER SET utf32, |
| 35 |
c2 int GENERATED ALWAYS AS (c1) VIRTUAL, |
| 36 |
c3 int, |
| 37 |
PRIMARY KEY (c0, c1), |
| 38 |
KEY i1 (c2, c1(1)) |
| 39 |
); |
| 40 |
INSERT INTO t1(c0,c1,c3) VALUES (1,'1',1); |
| 41 |
START TRANSACTION; |
| 42 |
DELETE FROM t1; |
| 43 |
SET DEBUG = "+d, compare_end_range"; |
| 44 |
# No lock Range select with KEY i1 and end range check |
| 45 |
SELECT * FROM t1 WHERE c2 < 0; |
| 46 |
c0 c1 c2 c3 |
| 47 |
# X lock Range select with KEY i1 and end range check |
| 48 |
DELETE FROM t1 WHERE c2 < 0; |
| 49 |
SET DEBUG = "-d, compare_end_range"; |
| 50 |
COMMIT; |
| 51 |
DROP TABLE t1; |
| 52 |
# |
| 53 |
# Bug#33384537 prebuilt->m_end_range should be reset at fetch_cache initializing at row_search_mvcc() |
| 54 |
# |
| 55 |
create table t10 (i int); |
| 56 |
insert into t10 values (0), (1), (2), (3), (4), (5), (6), (7), (8), (9); |
| 57 |
create table t1000 (i int); |
| 58 |
insert into t1000 select a.i + b.i*10 + c.i*100 from t10 a, t10 b, t10 c; |
| 59 |
create table t (i int, j int, k int, primary key(k, j, i), key(i, j, k)); |
| 60 |
insert into t select 1, 1, i from t10; |
| 61 |
insert into t select 1, 2, i from t10; |
| 62 |
insert into t select 2, 1, i from t10; |
| 63 |
insert into t select 2, 2, i from t10; |
| 64 |
insert into t select 3, 1, i from t10; |
| 65 |
insert into t select 3, 2, i from t10; |
| 66 |
begin; |
| 67 |
select * from t where i = 4; |
| 68 |
i j k |
| 69 |
insert into t select 1, 1, i+10 from t1000 limit 400; |
| 70 |
insert into t select 1, 2, i+10 from t1000; |
| 71 |
insert into t select 2, 1, i+10 from t1000; |
| 72 |
insert into t select 2, 2, i+10 from t1000; |
| 73 |
insert into t select 3, 1, i+10 from t1000; |
| 74 |
insert into t select 3, 2, i+10 from t1000; |
| 75 |
select /*+ SKIP_SCAN(t i) */ * from t where k > 2 and k < 8 order by i, j, k; |
| 76 |
i j k |
| 77 |
1 1 3 |
| 78 |
1 1 4 |
| 79 |
1 1 5 |
| 80 |
1 1 6 |
| 81 |
1 1 7 |
| 82 |
1 2 3 |
| 83 |
1 2 4 |
| 84 |
1 2 5 |
| 85 |
1 2 6 |
| 86 |
1 2 7 |
| 87 |
2 1 3 |
| 88 |
2 1 4 |
| 89 |
2 1 5 |
| 90 |
2 1 6 |
| 91 |
2 1 7 |
| 92 |
2 2 3 |
| 93 |
2 2 4 |
| 94 |
2 2 5 |
| 95 |
2 2 6 |
| 96 |
2 2 7 |
| 97 |
3 1 3 |
| 98 |
3 1 4 |
| 99 |
3 1 5 |
| 100 |
3 1 6 |
| 101 |
3 1 7 |
| 102 |
3 2 3 |
| 103 |
3 2 4 |
| 104 |
3 2 5 |
| 105 |
3 2 6 |
| 106 |
3 2 7 |
| 107 |
drop table t, t10, t1000; |