mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Very small changes.
storage/maria/ma_locking.c: define 'share' only in block which needs it storage/maria/unittest/ma_test_recovery.pl: more straightforward way to compute file's MD5
This commit is contained in:
parent
351bdaef10
commit
61788ff484
2 changed files with 3 additions and 8 deletions
|
@ -280,7 +280,6 @@ void _ma_get_status(void* param, int concurrent_insert)
|
|||
void _ma_update_status(void* param)
|
||||
{
|
||||
MARIA_HA *info=(MARIA_HA*) param;
|
||||
MARIA_SHARE *share= info->s;
|
||||
/*
|
||||
Because someone may have closed the table we point at, we only
|
||||
update the state if its our own state. This isn't a problem as
|
||||
|
@ -289,6 +288,7 @@ void _ma_update_status(void* param)
|
|||
*/
|
||||
if (info->state == &info->save_state)
|
||||
{
|
||||
MARIA_SHARE *share= info->s;
|
||||
#ifndef DBUG_OFF
|
||||
DBUG_PRINT("info",("updating status: key_file: %ld data_file: %ld",
|
||||
(long) info->state->key_file_length,
|
||||
|
|
|
@ -353,16 +353,11 @@ sub apply_log
|
|||
sub md5_conv
|
||||
{
|
||||
my ($file)= @_;
|
||||
my ($md5);
|
||||
|
||||
open(FILE, $file) or die "Can't open '$file': $!\n";
|
||||
binmode(FILE);
|
||||
|
||||
$md5= Digest::MD5->new;
|
||||
while (<FILE>)
|
||||
{
|
||||
$md5->add($_);
|
||||
}
|
||||
my $md5= Digest::MD5->new;
|
||||
$md5->addfile(FILE);
|
||||
close (FILE);
|
||||
return $md5->hexdigest . "\n";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue