---
 mod/silverbox/box.c |   27 ++++++++++-----------------
 mod/silverbox/box.h |    2 +-
 2 files changed, 11 insertions(+), 18 deletions(-)

diff --git a/mod/silverbox/box.c b/mod/silverbox/box.c
index 47a209f..8c7243a 100644
--- a/mod/silverbox/box.c
+++ b/mod/silverbox/box.c
@@ -933,19 +933,14 @@ tuple_add_iov(struct box_txn *txn, struct box_tuple 
*tuple)
 {
        tuple_txn_ref(txn, tuple);
 
-       if (txn->old_format) {
-               add_iov_dup(&tuple->bsize, sizeof(uint16_t));
-               add_iov_dup(&tuple->cardinality, sizeof(uint8_t));
-               add_iov(tuple->data, tuple->bsize);
-       } else
-               add_iov(&tuple->bsize,
-                       tuple->bsize +
-                       field_sizeof(struct box_tuple, bsize) +
-                       field_sizeof(struct box_tuple, cardinality));
+       add_iov(&tuple->bsize,
+               tuple->bsize +
+               field_sizeof(struct box_tuple, bsize) +
+               field_sizeof(struct box_tuple, cardinality));
 }
 
 static int __noinline__
-process_select(struct box_txn *txn, u32 limit, u32 offset, struct tbuf *data, 
bool old_format)
+process_select(struct box_txn *txn, u32 limit, u32 offset, struct tbuf *data)
 {
        struct box_tuple *tuple;
        uint32_t *found;
@@ -988,12 +983,10 @@ process_select(struct box_txn *txn, u32 limit, u32 
offset, struct tbuf *data, bo
                }
        } else {
                for (u32 i = 0; i < count; i++) {
-                       if (!old_format) {
-                               u32 key_len = read_u32(data);
-                               if (key_len != 1)
-                                       box_raise(ERR_CODE_ILLEGAL_PARAMS,
-                                                 "key must be single valued");
-                       }
+                       u32 key_len = read_u32(data);
+                       if (key_len != 1)
+                               box_raise(ERR_CODE_ILLEGAL_PARAMS,
+                                         "key must be single valued");
                        void *key = read_field(data);
                        tuple = txn->index->find(txn->index, key);
                        if (tuple == NULL || tuple->flags & GHOST)
@@ -1200,7 +1193,7 @@ box_dispach(struct box_txn *txn, enum box_mode mode, u16 
op, struct tbuf *data)
                                box_raise(ERR_CODE_ILLEGAL_PARAMS, "index is 
invalid");
 
                        stat_collect(stat_base, op, 1);
-                       return process_select(txn, limit, offset, data, false);
+                       return process_select(txn, limit, offset, data);
                }
 
        case UPDATE_FIELDS:
diff --git a/mod/silverbox/box.h b/mod/silverbox/box.h
index 2c3a51c..505ed88 100644
--- a/mod/silverbox/box.h
+++ b/mod/silverbox/box.h
@@ -130,7 +130,7 @@ struct box_txn {
        struct box_tuple *tuple;
        struct box_tuple *lock_tuple;
 
-       bool in_recover, old_format;
+       bool in_recover;
 };
 
 enum tuple_flags {
-- 
1.7.3.2


_______________________________________________
Mailing list: https://launchpad.net/~tarantool-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~tarantool-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to