mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +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)
|
void _ma_update_status(void* param)
|
||||||
{
|
{
|
||||||
MARIA_HA *info=(MARIA_HA*) param;
|
MARIA_HA *info=(MARIA_HA*) param;
|
||||||
MARIA_SHARE *share= info->s;
|
|
||||||
/*
|
/*
|
||||||
Because someone may have closed the table we point at, we only
|
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
|
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)
|
if (info->state == &info->save_state)
|
||||||
{
|
{
|
||||||
|
MARIA_SHARE *share= info->s;
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
DBUG_PRINT("info",("updating status: key_file: %ld data_file: %ld",
|
DBUG_PRINT("info",("updating status: key_file: %ld data_file: %ld",
|
||||||
(long) info->state->key_file_length,
|
(long) info->state->key_file_length,
|
||||||
|
|
|
@ -353,16 +353,11 @@ sub apply_log
|
||||||
sub md5_conv
|
sub md5_conv
|
||||||
{
|
{
|
||||||
my ($file)= @_;
|
my ($file)= @_;
|
||||||
my ($md5);
|
|
||||||
|
|
||||||
open(FILE, $file) or die "Can't open '$file': $!\n";
|
open(FILE, $file) or die "Can't open '$file': $!\n";
|
||||||
binmode(FILE);
|
binmode(FILE);
|
||||||
|
my $md5= Digest::MD5->new;
|
||||||
$md5= Digest::MD5->new;
|
$md5->addfile(FILE);
|
||||||
while (<FILE>)
|
|
||||||
{
|
|
||||||
$md5->add($_);
|
|
||||||
}
|
|
||||||
close (FILE);
|
close (FILE);
|
||||||
return $md5->hexdigest . "\n";
|
return $md5->hexdigest . "\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue