diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/grant_repair.test | |
parent | Initial commit. (diff) | |
download | mariadb-upstream.tar.xz mariadb-upstream.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/grant_repair.test')
-rw-r--r-- | mysql-test/main/grant_repair.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/main/grant_repair.test b/mysql-test/main/grant_repair.test new file mode 100644 index 00000000..f07e4df3 --- /dev/null +++ b/mysql-test/main/grant_repair.test @@ -0,0 +1,21 @@ +# +# MDEV-20257 Server crashes in Grant_table_base::init_read_record upon crash-upgrade +# +source include/not_embedded.inc; + +call mtr.add_suppression("mysql.user"); +source include/switch_to_mysql_user.inc; + +let mysql_datadir=`select @@datadir`; +flush tables; +perl; + $f=$ENV{mysql_datadir} . '/mysql/user.MAI'; + sysopen F, $f, 2 or die "sysopen $f: $!"; + # set the open_count to 1, "table was not closed properly" + sysseek F, 24, O_RDWR or die "sysseek: $!"; + syswrite F, 1, 1 or die "syswrite: $!"; +EOF +replace_result \\ /; +flush privileges; + +source include/switch_to_mysql_global_priv.inc; |