Skip to content

Commit 141cf43

Browse files
committed
Fixed assert in Aria on SHOW PROCEDURE STATUS
MDEV-18457 Assertion `(bitmap->map + (bitmap->full_head_size/6*6)) <= full_head_end failed The problem was that full_head_size was not calculated correctly in the case when insert_order was inforced, which is the case for SHOW commands.
1 parent 5b6bcb5 commit 141cf43

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

mysql-test/r/sp2.result

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
CREATE DATABASE test1;
2+
CREATE PROCEDURE test1.sp3() BEGIN END;
3+
SHOW PROCEDURE STATUS;
4+
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
5+
mtr add_suppression PROCEDURE root@localhost # # DEFINER utf8 utf8_general_ci latin1_swedish_ci
6+
mtr check_testcase PROCEDURE root@localhost # # DEFINER utf8 utf8_general_ci latin1_swedish_ci
7+
mtr check_warnings PROCEDURE root@localhost # # DEFINER utf8 utf8_general_ci latin1_swedish_ci
8+
mysql AddGeometryColumn PROCEDURE root@localhost # # INVOKER latin1 latin1_swedish_ci latin1_swedish_ci
9+
mysql DropGeometryColumn PROCEDURE root@localhost # # INVOKER latin1 latin1_swedish_ci latin1_swedish_ci
10+
test sp2 PROCEDURE root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
11+
test1 sp1 PROCEDURE root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
12+
test1 sp3 PROCEDURE root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
13+
DROP PROCEDURE sp2;
14+
DROP DATABASE test1;
15+
select count(*) from mysql.event;
16+
count(*)
17+
416
18+
flush tables;
19+
show events;
20+
truncate table mysql.event;

mysql-test/t/sp2.test

Lines changed: 35 additions & 0 deletions
Large diffs are not rendered by default.

storage/maria/ma_bitmap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,7 @@ static my_bool allocate_head(MARIA_FILE_BITMAP *bitmap, uint size,
12881288
uint byte= 6 * (last_insert_page / 16);
12891289
first_pattern= last_insert_page % 16;
12901290
data= bitmap->map+byte;
1291+
first_found= 0; /* Don't update full_head_size */
12911292
DBUG_ASSERT(data <= end);
12921293
}
12931294
else

0 commit comments

Comments
 (0)