Hi Niels,

this is now fixed. Thanks for the test case.

2011/6/17 Mattias Persson <matt...@neotechnology.com>

> I'm on this one, since I'm assuming I'm the one introducing it. And yes
> there are some tests around this that I wrote for these changes...
> apparently now good enough.
>
>
> 2011/6/17 Jim Webber <j...@neotechnology.com>
>
>> Michael,
>>
>> No we don't. Do you want to put together a test of {normal, edge positive,
>> edge negative} case (where applicable) for each type we support in the
>> kernel tests?
>>
>> D'oh.
>>
>> Jim
>>
>>
>> On 16 Jun 2011, at 23:14, Michael Hunger wrote:
>>
>> > Damn, do we have tests for storing values and retrieving them.
>> >
>> > Anfang der weitergeleiteten E-Mail:
>> >
>> >> Von: Niels Hoogeveen <pd_aficion...@hotmail.com>
>> >> Datum: 16. Juni 2011 23:52:50 MESZ
>> >> An: <user@lists.neo4j.org>
>> >> Betreff: Re: [Neo4j] storing long values overflow
>> >> Antwort an: Neo4j user discussions <user@lists.neo4j.org>
>> >>
>> >>
>> >> I just tested the long property overflow behaviour against different
>> neo4j 1.4 releases and found out it was introduced between M03 and M04.
>> >> M03 correctly returns -134217729 when storing a property with value
>> -134217729l.M04 and SNAPSHOT return 134217727 when storing a property with
>> value -134217729l.
>> >> Niels
>> >>
>> >>> From: pd_aficion...@hotmail.com
>> >>> To: user@lists.neo4j.org
>> >>> Date: Thu, 16 Jun 2011 23:21:54 +0200
>> >>> Subject: Re: [Neo4j] storing long values overflow
>> >>>
>> >>>
>> >>> Thank Marco,
>> >>> Hope this looks better.
>> >>> import org.neo4j.kernel.EmbeddedGraphDatabase;import
>> org.neo4j.graphdb.GraphDatabaseService;
>> >>> import org.neo4j.graphdb.Transaction;
>> >>> import org.neo4j.graphdb.Node;
>> >>>
>> >>> public class Test2 {
>> >>>
>> >>>     public static void main(String args[]){
>> >>>
>> >>>             GraphDatabaseService db = new
>>  EmbeddedGraphDatabase("var/db");
>> >>>             Transaction tx = db.beginTx();
>> >>>             try{
>> >>>                     Node n = db.getReferenceNode();
>> >>>                     long l = -134217728l;
>> >>>                     n.setProperty("testvalue", l);
>> >>>                     System.out.println(n.getProperty("testvalue"));
>> >>>                     long l2 = -134217729l;
>> >>>                     n.setProperty("testvalue2", l2);
>> >>>                     System.out.println(n.getProperty("testvalue2"));
>> >>>                     tx.success();
>> >>>             }finally{
>> >>>                     tx.finish();
>> >>>             }
>> >>>
>> >>>     }
>> >>> }
>> >>>> From: okramma...@gmail.com
>> >>>> Date: Thu, 16 Jun 2011 15:06:23 -0600
>> >>>> To: user@lists.neo4j.org
>> >>>> Subject: Re: [Neo4j] storing long values overflow
>> >>>>
>> >>>> Hi,
>> >>>>
>> >>>> Try using:
>> >>>>
>> >>>>    http://paste.pocoo.org/
>> >>>>
>> >>>> Great for sending color formatted code snippets.
>> >>>>
>> >>>> Marko.
>> >>>>
>> >>>> http://markorodriguez.com
>> >>>>
>> >>>> On Jun 16, 2011, at 2:48 PM, Niels Hoogeveen wrote:
>> >>>>
>> >>>>>
>> >>>>> Don't know how to send a properly formatted email.
>> >>>>>
>> >>>>> Anyway, when storing a long value -134217728l in a node property,
>> retrieving the value of the property is again -134217728.
>> >>>>> When storing a long value -134217729l in a node property, retrieving
>> the value of that property overflows and 134217727 is returned.
>> >>>>> Kind regards,Niels Hoogeveen
>> >>>>>
>> >>>>>> From: pd_aficion...@hotmail.com
>> >>>>>> To: user@lists.neo4j.org
>> >>>>>> Date: Thu, 16 Jun 2011 22:40:24 +0200
>> >>>>>> Subject: [Neo4j] storing long values overflow
>> >>>>>>
>> >>>>>>
>> >>>>>> Using neo4j 1.4-SNAPSHOT it seems the storage or retrieval of long
>> values no longer works properly.package com.multispective.snippet;import
>> org.neo4j.kernel.EmbeddedGraphDatabase;import
>> org.neo4j.graphdb.GraphDatabaseService;import
>> org.neo4j.graphdb.Transaction;import org.neo4j.graphdb.Node;public class
>> Test2 { public static void main(String args[]){
>> GraphDatabaseService db = new  EmbeddedGraphDatabase("var/db");
>> Transaction tx = db.beginTx();          try{                    Node n =
>> db.getReferenceNode();                 long l = -134217728l;
>>   n.setProperty("testvalue", l);
>>  System.out.println(n.getProperty("testvalue"));                 long l2 =
>> -134217729l;                  n.setProperty("testvalue2", l2);
>>          System.out.println(n.getProperty("testvalue2"));
>>      tx.success();           }finally{                       tx.finish();
>>          }       }}Result:-134217728134217727Kind regards,Niels Hoogeveen
>> >>>>>> _______________________________________________
>> >>>>>> Neo4j mailing list
>> >>>>>> User@lists.neo4j.org
>> >>>>>> https://lists.neo4j.org/mailman/listinfo/user
>> >>>>>
>> >>>>> _______________________________________________
>> >>>>> Neo4j mailing list
>> >>>>> User@lists.neo4j.org
>> >>>>> https://lists.neo4j.org/mailman/listinfo/user
>> >>>>
>> >>>> _______________________________________________
>> >>>> Neo4j mailing list
>> >>>> User@lists.neo4j.org
>> >>>> https://lists.neo4j.org/mailman/listinfo/user
>> >>>
>> >>> _______________________________________________
>> >>> Neo4j mailing list
>> >>> User@lists.neo4j.org
>> >>> https://lists.neo4j.org/mailman/listinfo/user
>> >>
>> >> _______________________________________________
>> >> Neo4j mailing list
>> >> User@lists.neo4j.org
>> >> https://lists.neo4j.org/mailman/listinfo/user
>> >
>>
>>
>
>
> --
> Mattias Persson, [matt...@neotechnology.com]
> Hacker, Neo Technology
> www.neotechnology.com
>



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to