From 2f13b967f7624c6efcc83b815cf9f7e0329fdc7c Mon Sep 17 00:00:00 2001
From: Konstantin Osipov <kostja@tarantool.org>
Date: Sat, 6 Feb 2016 01:31:47 +0300
Subject: [PATCH] gh-1311: increase BOX_INDEX_MAX to 128

---
 src/box/key_def.h            |  2 +-
 src/box/space.cc             | 20 --------------------
 src/box/space.h              | 14 --------------
 test/box/alter_limits.result |  2 +-
 4 files changed, 2 insertions(+), 36 deletions(-)

diff --git a/src/box/key_def.h b/src/box/key_def.h
index 3db35fc120..5a444cd03a 100644
--- a/src/box/key_def.h
+++ b/src/box/key_def.h
@@ -49,7 +49,7 @@ enum {
 	BOX_ENGINE_MAX = 3, /* + 1 to the actual number of engines */
 	BOX_SPACE_MAX = INT32_MAX,
 	BOX_FUNCTION_MAX = 32000,
-	BOX_INDEX_MAX = 10,
+	BOX_INDEX_MAX = 128,
 	BOX_NAME_MAX = 32,
 	BOX_FIELD_MAX = INT32_MAX,
 	BOX_USER_MAX = 32,
diff --git a/src/box/space.cc b/src/box/space.cc
index c7ad0ee3c2..69d0c4ee5a 100644
--- a/src/box/space.cc
+++ b/src/box/space.cc
@@ -209,26 +209,6 @@ space_run_triggers(struct space *space, bool yesno)
 	space->run_triggers = yesno;
 }
 
-struct space_stat *
-space_stat(struct space *sp)
-{
-	static __thread struct space_stat space_stat;
-
-	space_stat.id = space_id(sp);
-	unsigned i = 0;
-	for (; i < sp->index_id_max; i++) {
-		Index *index = space_index(sp, i);
-		if (index) {
-			space_stat.index[i].id      = i;
-			space_stat.index[i].keys    = index->size();
-			space_stat.index[i].bsize   = index->bsize();
-		} else
-			space_stat.index[i].id = -1;
-	}
-	space_stat.index[i].id = -1;
-	return &space_stat;
-}
-
 /**
  * We do not allow changes of the primary key during
  * update.
diff --git a/src/box/space.h b/src/box/space.h
index 6ae177de75..8b71bdc4f2 100644
--- a/src/box/space.h
+++ b/src/box/space.h
@@ -217,20 +217,6 @@ index_find_system(struct space *space, uint32_t index_id)
 extern "C" void
 space_run_triggers(struct space *space, bool yesno);
 
-struct index_stat {
-	int32_t id;
-	int64_t keys;
-	int64_t bsize;
-};
-
-struct space_stat {
-	int32_t id;
-	struct index_stat index[BOX_INDEX_MAX];
-};
-
-struct space_stat *
-space_stat(struct space *space);
-
 /**
  * Checks that primary key of a tuple did not change during update,
  * otherwise throws ClientError.
diff --git a/test/box/alter_limits.result b/test/box/alter_limits.result
index 6003083000..c254d3d463 100644
--- a/test/box/alter_limits.result
+++ b/test/box/alter_limits.result
@@ -33,7 +33,7 @@ box.schema.SPACE_ID
 ...
 box.schema.INDEX_MAX
 ---
-- 10
+- 128
 ...
 box.schema.SPACE_MAX
 ---
-- 
GitLab