1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-06-16 23:47:38 +02:00

Set WAL long header flag in test function missed in e938a892.

This was missed because the unit tests were reusing a buffer without resetting it to zero, so this flag ended up still set when the test function was called.

This was not a live issue since it only expressed in tests and this code is not used in master yet.
This commit is contained in:
David Steele
2019-03-26 18:46:44 +02:00
parent 7364d859da
commit 3181cd0ab8
2 changed files with 4 additions and 0 deletions

View File

@ -118,9 +118,11 @@ testRun(void)
"HINT: is this version of PostgreSQL supported?");
//--------------------------------------------------------------------------------------------------------------------------
memset(bufPtr(result), 0, bufSize(result));
TEST_ERROR(pgWalTestToBuffer((PgWal){.version = 0}, result), AssertError, "invalid version 0");
//--------------------------------------------------------------------------------------------------------------------------
memset(bufPtr(result), 0, bufSize(result));
pgWalTestToBuffer((PgWal){.version = PG_VERSION_11, .systemId = 0xECAFECAF}, result);
storagePutNP(storageNewWriteNP(storageTest, walFile), result);
@ -130,6 +132,7 @@ testRun(void)
TEST_RESULT_INT(info.version, PG_VERSION_11, " check version");
//--------------------------------------------------------------------------------------------------------------------------
memset(bufPtr(result), 0, bufSize(result));
pgWalTestToBuffer((PgWal){.version = PG_VERSION_83, .systemId = 0xEAEAEAEA}, result);
storagePutNP(storageNewWriteNP(storageTest, walFile), result);