diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-05-17 18:44:23 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-07-29 14:56:24 +0200 |
commit | 77b7f793f9e7504b39194f530edc0e314569ea1c (patch) | |
tree | 1c4a14aa68e5bac54e6ae822a568737fb414cf36 | |
parent | 88cbe2f08193054ccf6565c2b27a8d809285a45b (diff) | |
download | mariadb-git-77b7f793f9e7504b39194f530edc0e314569ea1c.tar.gz |
MDEV-18496 Crash when Aria encryption is enabled but plugin not available
fix uninitialized struct member
-rw-r--r-- | mysql-test/suite/maria/encrypt-no-key.result | 6 | ||||
-rw-r--r-- | mysql-test/suite/maria/encrypt-no-key.test | 1 | ||||
-rw-r--r-- | storage/maria/ma_check.c | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/suite/maria/encrypt-no-key.result b/mysql-test/suite/maria/encrypt-no-key.result index 4d15725648f..6745670dfac 100644 --- a/mysql-test/suite/maria/encrypt-no-key.result +++ b/mysql-test/suite/maria/encrypt-no-key.result @@ -5,5 +5,11 @@ alter table t1 disable keys; insert into t1 values (1,1); alter table t1 enable keys; ERROR HY000: Unknown key id 1. Can't continue! +repair table t1 use_frm; +Table Op Msg_type Msg_text +test.t1 repair warning Number of rows changed from 0 to 1 +test.t1 repair Error Unknown key id 1. Can't continue! +test.t1 repair Error Unknown key id 1. Can't continue! +test.t1 repair status OK drop table t1; set global aria_encrypt_tables= default; diff --git a/mysql-test/suite/maria/encrypt-no-key.test b/mysql-test/suite/maria/encrypt-no-key.test index ff2190f5a6e..2d586c50695 100644 --- a/mysql-test/suite/maria/encrypt-no-key.test +++ b/mysql-test/suite/maria/encrypt-no-key.test @@ -9,5 +9,6 @@ alter table t1 disable keys; insert into t1 values (1,1); error 192; alter table t1 enable keys; +repair table t1 use_frm; drop table t1; set global aria_encrypt_tables= default; diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c index 789a4d0d5b6..8231cd47913 100644 --- a/storage/maria/ma_check.c +++ b/storage/maria/ma_check.c @@ -3198,6 +3198,7 @@ static int write_page(MARIA_SHARE *share, File file, args.page= buff; args.pageno= (pgcache_page_no_t) (pos / share->block_size); args.data= (uchar*) share; + args.crypt_buf= NULL; (* share->kfile.pre_write_hook)(&args); res= my_pwrite(file, args.page, block_size, pos, myf_rw); (* share->kfile.post_write_hook)(res, &args); |