Commit 77b7f793 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-18496 Crash when Aria encryption is enabled but plugin not available

fix uninitialized struct member
parent 88cbe2f0
...@@ -5,5 +5,11 @@ alter table t1 disable keys; ...@@ -5,5 +5,11 @@ alter table t1 disable keys;
insert into t1 values (1,1); insert into t1 values (1,1);
alter table t1 enable keys; alter table t1 enable keys;
ERROR HY000: Unknown key id 1. Can't continue! 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; drop table t1;
set global aria_encrypt_tables= default; set global aria_encrypt_tables= default;
...@@ -9,5 +9,6 @@ alter table t1 disable keys; ...@@ -9,5 +9,6 @@ alter table t1 disable keys;
insert into t1 values (1,1); insert into t1 values (1,1);
error 192; error 192;
alter table t1 enable keys; alter table t1 enable keys;
repair table t1 use_frm;
drop table t1; drop table t1;
set global aria_encrypt_tables= default; set global aria_encrypt_tables= default;
...@@ -3198,6 +3198,7 @@ static int write_page(MARIA_SHARE *share, File file, ...@@ -3198,6 +3198,7 @@ static int write_page(MARIA_SHARE *share, File file,
args.page= buff; args.page= buff;
args.pageno= (pgcache_page_no_t) (pos / share->block_size); args.pageno= (pgcache_page_no_t) (pos / share->block_size);
args.data= (uchar*) share; args.data= (uchar*) share;
args.crypt_buf= NULL;
(* share->kfile.pre_write_hook)(&args); (* share->kfile.pre_write_hook)(&args);
res= my_pwrite(file, args.page, block_size, pos, myf_rw); res= my_pwrite(file, args.page, block_size, pos, myf_rw);
(* share->kfile.post_write_hook)(res, &args); (* share->kfile.post_write_hook)(res, &args);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment