pgbackrest.git / summary / log / commit / refs
commit 2d56de00fcb04f2f949c1855f68cbeee25cdee6f
Author: Cynthia Shang <cynthia.shang@crunchydata.com>
Commit: David Steele <david@pgmasters.net>
Date: Wed Oct 18 12:42:32 2017 +0000
Fix instances where database-id was not rendered as an integer in JSON info output.
Fixed by Cynthia Shang.
Reported by Jason O'Donnell.
doc/xml/release.xml | 9 +++++++++
lib/pgBackRest/Info.pm | 4 ++--
test/expect/mock-all-001.log | 8 ++++----
test/expect/mock-all-002.log | 8 ++++----
test/expect/mock-all-003.log | 8 ++++----
test/expect/mock-stanza-001.log | 8 ++++----
test/expect/mock-stanza-002.log | 8 ++++----
test/expect/mock-stanza-003.log | 8 ++++----
8 files changed, 35 insertions(+), 26 deletions(-)
diff --git a/doc/xml/release.xml b/doc/xml/release.xml
index fa0f26c09..a7c2061a3 100644
--- a/doc/xml/release.xml
+++ b/doc/xml/release.xml
@@ -20,6 +20,15 @@
<p>Remove error when overlapping timelines are detected. Overlapping timelines are valid in many Point-in-Time-Recovery (PITR) scenarios.</p>
</release-item>
+
+ <release-item>
+ <release-item-contributor-list>
+ <release-item-ideator id="odonnell.jason"/>
+ <release-item-contributor id="shang.cynthia"/>
+ </release-item-contributor-list>
+
+ <p>Fix instances where <id>database-id</id> was not rendered as an integer in JSON info output.</p>
+ </release-item>
</release-bug-list>
<release-refactor-list>
diff --git a/lib/pgBackRest/Info.pm b/lib/pgBackRest/Info.pm
index 548bc13e7..b884c4883 100644
--- a/lib/pgBackRest/Info.pm
+++ b/lib/pgBackRest/Info.pm
@@ -502,7 +502,7 @@ sub backupList
{
my $oDbHash =
{
- &INFO_HISTORY_ID => $iHistoryId,
+ &INFO_HISTORY_ID => $iHistoryId + 0,
&INFO_DB_VERSION =>
$oBackupInfo->get(INFO_BACKUP_SECTION_DB_HISTORY, $iHistoryId, INFO_BACKUP_KEY_DB_VERSION),
&INFO_SYSTEM_ID =>
@@ -660,7 +660,7 @@ sub dbArchiveSection
&INFO_KEY_MAX => $strArchiveStop,
&INFO_SECTION_DB =>
{
- &INFO_HISTORY_ID => $hDbInfo->{&INFO_HISTORY_ID},
+ &INFO_HISTORY_ID => $hDbInfo->{&INFO_HISTORY_ID} + 0,
},
};
}
diff --git a/test/expect/mock-all-001.log b/test/expect/mock-all-001.log
index 8ebc065f3..ceee6cd3e 100644
--- a/test/expect/mock-all-001.log
+++ b/test/expect/mock-all-001.log
@@ -3680,7 +3680,7 @@ info db stanza - normal output (db-master host)
"archive" : [
{
"database" : {
- "id" : "1"
+ "id" : 1
},
"id" : "9.4-1",
"max" : null,
@@ -3939,7 +3939,7 @@ info db stanza - normal output (db-master host)
],
"db" : [
{
- "id" : "1",
+ "id" : 1,
"system-id" : 6353949018581704918,
"version" : "9.4"
}
@@ -4298,7 +4298,7 @@ info all stanzas - normal output (db-master host)
"archive" : [
{
"database" : {
- "id" : "1"
+ "id" : 1
},
"id" : "9.4-1",
"max" : null,
@@ -4369,7 +4369,7 @@ info all stanzas - normal output (db-master host)
],
"db" : [
{
- "id" : "1",
+ "id" : 1,
"system-id" : 6353949018581704918,
"version" : "9.4"
}
diff --git a/test/expect/mock-all-002.log b/test/expect/mock-all-002.log
index 56f889996..1b0f7627c 100644
--- a/test/expect/mock-all-002.log
+++ b/test/expect/mock-all-002.log
@@ -3915,7 +3915,7 @@ info db stanza - normal output (backup host)
"archive" : [
{
"database" : {
- "id" : "1"
+ "id" : 1
},
"id" : "9.4-1",
"max" : null,
@@ -4174,7 +4174,7 @@ info db stanza - normal output (backup host)
],
"db" : [
{
- "id" : "1",
+ "id" : 1,
"system-id" : 6353949018581704918,
"version" : "9.4"
}
@@ -4549,7 +4549,7 @@ info all stanzas - normal output (db-master host)
"archive" : [
{
"database" : {
- "id" : "1"
+ "id" : 1
},
"id" : "9.4-1",
"max" : null,
@@ -4620,7 +4620,7 @@ info all stanzas - normal output (db-master host)
],
"db" : [
{
- "id" : "1",
+ "id" : 1,
"system-id" : 6353949018581704918,
"version" : "9.4"
}
diff --git a/test/expect/mock-all-003.log b/test/expect/mock-all-003.log
index 12a5d6b78..86a5960c3 100644
--- a/test/expect/mock-all-003.log
+++ b/test/expect/mock-all-003.log
@@ -2374,7 +2374,7 @@ info db stanza - normal output (backup host)
"archive" : [
{
"database" : {
- "id" : "1"
+ "id" : 1
},
"id" : "9.4-1",
"max" : null,
@@ -2633,7 +2633,7 @@ info db stanza - normal output (backup host)
],
"db" : [
{
- "id" : "1",
+ "id" : 1,
"system-id" : 6353949018581704918,
"version" : "9.4"
}
@@ -2898,7 +2898,7 @@ info all stanzas - normal output (db-master host)
"archive" : [
{
"database" : {
- "id" : "1"
+ "id" : 1
},
"id" : "9.4-1",
"max" : null,
@@ -2969,7 +2969,7 @@ info all stanzas - normal output (db-master host)
],
"db" : [
{
- "id" : "1",
+ "id" : 1,
"system-id" : 6353949018581704918,
"version" : "9.4"
}
diff --git a/test/expect/mock-stanza-001.log b/test/expect/mock-stanza-001.log
index 7e75b3272..9869df384 100644
--- a/test/expect/mock-stanza-001.log
+++ b/test/expect/mock-stanza-001.log
@@ -847,7 +847,7 @@ info all stanzas - db upgraded - db-1 and db-2 listed (db-master host)
"archive" : [
{
"database" : {
- "id" : "1"
+ "id" : 1
},
"id" : "9.4-2",
"max" : "000000010000000100000001",
@@ -855,7 +855,7 @@ info all stanzas - db upgraded - db-1 and db-2 listed (db-master host)
},
{
"database" : {
- "id" : "2"
+ "id" : 2
},
"id" : "9.5-4",
"max" : "000000010000000100000001",
@@ -924,12 +924,12 @@ info all stanzas - db upgraded - db-1 and db-2 listed (db-master host)
],
"db" : [
{
- "id" : "1",
+ "id" : 1,
"system-id" : 6353949018581704918,
"version" : "9.4"
},
{
- "id" : "2",
+ "id" : 2,
"system-id" : 6392579261579036436,
"version" : "9.5"
}
diff --git a/test/expect/mock-stanza-002.log b/test/expect/mock-stanza-002.log
index 2cee0dc07..be74763a5 100644
--- a/test/expect/mock-stanza-002.log
+++ b/test/expect/mock-stanza-002.log
@@ -889,7 +889,7 @@ info all stanzas - db upgraded - db-1 and db-2 listed (db-master host)
"archive" : [
{
"database" : {
- "id" : "1"
+ "id" : 1
},
"id" : "9.4-2",
"max" : "000000010000000100000001",
@@ -897,7 +897,7 @@ info all stanzas - db upgraded - db-1 and db-2 listed (db-master host)
},
{
"database" : {
- "id" : "2"
+ "id" : 2
},
"id" : "9.5-4",
"max" : "000000010000000100000001",
@@ -966,12 +966,12 @@ info all stanzas - db upgraded - db-1 and db-2 listed (db-master host)
],
"db" : [
{
- "id" : "1",
+ "id" : 1,
"system-id" : 6353949018581704918,
"version" : "9.4"
},
{
- "id" : "2",
+ "id" : 2,
"system-id" : 6392579261579036436,
"version" : "9.5"
}
diff --git a/test/expect/mock-stanza-003.log b/test/expect/mock-stanza-003.log
index a91f49479..ea94543f6 100644
--- a/test/expect/mock-stanza-003.log
+++ b/test/expect/mock-stanza-003.log
@@ -832,7 +832,7 @@ info all stanzas - db upgraded - db-1 and db-2 listed (db-master host)
"archive" : [
{
"database" : {
- "id" : "1"
+ "id" : 1
},
"id" : "9.4-2",
"max" : "000000010000000100000001",
@@ -840,7 +840,7 @@ info all stanzas - db upgraded - db-1 and db-2 listed (db-master host)
},
{
"database" : {
- "id" : "2"
+ "id" : 2
},
"id" : "9.5-4",
"max" : "000000010000000100000001",
@@ -909,12 +909,12 @@ info all stanzas - db upgraded - db-1 and db-2 listed (db-master host)
],
"db" : [
{
- "id" : "1",
+ "id" : 1,
"system-id" : 6353949018581704918,
"version" : "9.4"
},
{
- "id" : "2",
+ "id" : 2,
"system-id" : 6392579261579036436,
"version" : "9.5"
}
[parent: b1efd598cfe8]