summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/grant_repair.test
blob: f07e4df3ae6abe0c154bc4d732748be639cc7fde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;