From cf093c0b7c25891e2bb2df415e1da7899276a6f2 Mon Sep 17 00:00:00 2001
From: Roman Tsisyk <roman@tsisyk.com>
Date: Thu, 13 Dec 2012 14:38:14 +0400
Subject: [PATCH] Remove index::findByTuple method

---
 src/box/index.h |  1 -
 src/box/index.m | 17 -----------------
 src/box/tree.m  | 13 -------------
 3 files changed, 31 deletions(-)

diff --git a/src/box/index.h b/src/box/index.h
index c082537338..f38c49c90d 100644
--- a/src/box/index.h
+++ b/src/box/index.h
@@ -194,7 +194,6 @@ enum dup_replace_mode {
 - (struct tuple *) min;
 - (struct tuple *) max;
 - (struct tuple *) findByKey: (void *) key :(int) part_count;
-- (struct tuple *) findByTuple: (struct tuple *) tuple;
 - (struct tuple *) replace: (struct tuple *) old_tuple
 			  :(struct tuple *) new_tuple
 			  :(enum dup_replace_mode) mode;
diff --git a/src/box/index.m b/src/box/index.m
index f8df3ff3b3..125e7700ce 100644
--- a/src/box/index.m
+++ b/src/box/index.m
@@ -229,13 +229,6 @@ replace_check_dup(struct tuple *old_tuple,
 	return NULL;
 }
 
-- (struct tuple *) findByTuple: (struct tuple *) pattern
-{
-	(void) pattern;
-	[self subclassResponsibility: _cmd];
-	return NULL;
-}
-
 - (struct tuple *) replace: (struct tuple *) old_tuple
 			  : (struct tuple *) new_tuple
 			  : (enum dup_replace_mode) mode
@@ -428,16 +421,6 @@ hash_iterator_lstr_eq(struct iterator *it)
 	return NULL;
 }
 
-- (struct tuple *) findByTuple: (struct tuple *) tuple
-{
-	/* Hash index currently is always single-part. */
-	void *field = tuple_field(tuple, key_def->parts[0].fieldno);
-	if (field == NULL)
-		tnt_raise(ClientError, :ER_NO_SUCH_FIELD,
-			  key_def->parts[0].fieldno);
-	return [self findUnsafe :field :1];
-}
-
 @end
 
 /* }}} */
diff --git a/src/box/tree.m b/src/box/tree.m
index 995fbd33a7..069cf5636f 100644
--- a/src/box/tree.m
+++ b/src/box/tree.m
@@ -930,19 +930,6 @@ tree_iterator_gt(struct iterator *iterator)
 	return [self unfold: node];
 }
 
-- (struct tuple *) findByTuple: (struct tuple *) tuple
-{
-	struct key_data *key_data
-		= alloca(sizeof(struct key_data) + _SIZEOF_SPARSE_PARTS(tuple->field_count));
-
-	key_data->data = tuple->data;
-	key_data->part_count = tuple->field_count;
-	fold_with_sparse_parts(key_def, tuple, key_data->parts);
-
-	void *node = sptree_index_find(&tree, key_data);
-	return [self unfold: node];
-}
-
 - (struct tuple *) replace: (struct tuple *) old_tuple
 			  :(struct tuple *) new_tuple
 			  :(enum dup_replace_mode) mode
-- 
GitLab