Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit51be673

Browse files
committed
Fix some issues with TAP tests of pg_basebackup
ee9e145 has fixed the tests of pg_basebackup for checksums a first time,still one seek() call missed the shot. Also, the data written in filesto emulate corruptions was not actually writing zeros as the quotingstyle was incorrect.Author: Michael BanckDiscussion:https://postgr.es/m/1550153276.796.35.camel@credativ.deBackpatch-through: 11
1 parent1d93d18 commit51be673

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/bin/pg_basebackup/t/010_pg_basebackup.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@
502502
system_or_bail'pg_ctl','-D',$pgdata,'stop';
503503
open$file,'+<',"$pgdata/$file_corrupt1";
504504
seek($file,$pageheader_size, 0);
505-
syswrite($file,'\0\0\0\0\0\0\0\0\0');
505+
syswrite($file,"\0\0\0\0\0\0\0\0\0");
506506
close$file;
507507
system_or_bail'pg_ctl','-D',$pgdata,'start';
508508

@@ -521,7 +521,7 @@
521521
{
522522
my$offset =$pageheader_size +$i *$block_size;
523523
seek($file,$offset, 0);
524-
syswrite($file,'\0\0\0\0\0\0\0\0\0');
524+
syswrite($file,"\0\0\0\0\0\0\0\0\0");
525525
}
526526
close$file;
527527
system_or_bail'pg_ctl','-D',$pgdata,'start';
@@ -537,8 +537,8 @@
537537
# induce corruption in a second file
538538
system_or_bail'pg_ctl','-D',$pgdata,'stop';
539539
open$file,'+<',"$pgdata/$file_corrupt2";
540-
seek($file,4000, 0);
541-
syswrite($file,'\0\0\0\0\0\0\0\0\0');
540+
seek($file,$pageheader_size, 0);
541+
syswrite($file,"\0\0\0\0\0\0\0\0\0");
542542
close$file;
543543
system_or_bail'pg_ctl','-D',$pgdata,'start';
544544

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp