Fix ASTERIXDB-1192

Change-Id: I3fcdd584d761d0d06a30aad41ea2a14438bb43eb
Reviewed-on: https://asterix-gerrit.ics.uci.edu/507
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <hubailmor@gmail.com>
diff --git a/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/freepage/LinkedMetaDataPageManager.java b/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/freepage/LinkedMetaDataPageManager.java
index 096908c..a89bb0f 100644
--- a/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/freepage/LinkedMetaDataPageManager.java
+++ b/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/freepage/LinkedMetaDataPageManager.java
@@ -273,7 +273,7 @@
         try {
             metaFrame.setPage(metaNode);
             metaFrame.initBuffer(META_PAGE_LEVEL_INDICATOR);
-            metaFrame.setMaxPage(0);
+            metaFrame.setMaxPage(-1);
         } finally {
             confiscatedMetaNode = metaNode;
             appendOnly = true;