This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Tarantool -- an efficient key/value data store".

The branch u64-indeces has been updated
       via  f7e3f794b94898724dc4f718098e89db54edf93e (commit)
      from  6039c2e086d265c073a125c6878dff889ef5579d (commit)

Summary of changes:
 mod/silverbox/index.c |    5 +++++
 mod/silverbox/index.h |    3 +--
 2 files changed, 6 insertions(+), 2 deletions(-)

commit f7e3f794b94898724dc4f718098e89db54edf93e
Author: Yuriy Vostrikov <[email protected]>
Date:   Tue Dec 7 12:34:14 2010 +0300

    [box] Correctly compare multicolumn indeces with NUM64 keys.

diff --git a/mod/silverbox/index.c b/mod/silverbox/index.c
index 6069d22..a1c25cd 100644
--- a/mod/silverbox/index.c
+++ b/mod/silverbox/index.c
@@ -80,6 +80,11 @@ field_compare(struct field *f1, struct field *f2, enum 
field_data_type type)
                        assert(f1->len == sizeof(f1->u32));
 
                        r = f1->u32 >f2->u32 ? 1 : f1->u32 == f2->u32 ? 0 : -1;
+               } else if (type == NUM64) {
+                       assert(f1->len == f2->len);
+                       assert(f1->len == sizeof(f1->u64));
+
+                       r = f1->u64 >f2->u64 ? 1 : f1->u64 == f2->u64 ? 0 : -1;
                } else {
                        i32 cmp;
                        void *f1_data, *f2_data;
diff --git a/mod/silverbox/index.h b/mod/silverbox/index.h
index f52ed38..1d0e523 100644
--- a/mod/silverbox/index.h
+++ b/mod/silverbox/index.h
@@ -33,9 +33,8 @@ struct field {
        u32 len;
        union {
                u32 u32;
-
+               u64 u64;
                u8 data[sizeof(void *)];
-
                void *data_ptr;
        };
 };

-- 
Tarantool -- an efficient key/value data store

_______________________________________________
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