Hi Everyone,

FYI - I went ahead and logged this: http://bugs.monetdb.org/show_bug.cgi?id=3205

BTW. I've really been enjoying using MonetDB.  Everyone on my team is just blown away by the performance and it's proving to be a very useful tool for many of our modes of analysis.  Having JDBC connectivity works out very well for us too.

Thanks!
Percy


On Tue, Nov 20, 2012 at 7:56 AM, Percy Wegmann <percy@clicksecurity.com> wrote:
Hi MonetDB Team,

I encountered a strange problem related to querying against an INET column.

To reproduce:

percy@percy-sandbox:~$ uname -a
Linux percy-sandbox 3.2.0-33-generic #52-Ubuntu SMP Thu Oct 18 16:29:15 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

percy@percy-sandbox:~$ mclient -u monetdb -d click
password:
Welcome to mclient, the MonetDB/SQL interactive terminal (Oct2012)
Database: MonetDB v11.13.3 (Oct2012), 'mapi:monetdb://percy-sandbox:50000/click'
Type \q to quit, \? for a list of available commands
auto commit mode: on

sql>create table test_table(col inet);
operation successful (27.394ms)

sql>insert into test_table values('127.0.0.1');
1 affected row (20.370ms)

sql>insert into test_table values(inet '127.0.0.1');
1 affected row (19.654ms)

sql>insert into test_table values(cast('127.0.0.1' as inet));
1 affected row (25.038ms)

sql>select count(*) from test_table where col = '127.0.0.1';
+------+
| L1   |
+======+
|    3 |
+------+
1 tuple (1.547ms)

sql>select count(*) from test_table where col = inet '127.0.0.1';
+------+
| L1   |
+======+
|    0 |
+------+
1 tuple (0.946ms)

sql>select count(*) from test_table where col = cast('127.0.0.1' as inet);
+------+
| L1   |
+======+
|    2 |
+------+
1 tuple (0.982ms)

sql>select count(*) from test_table where col = inet '127.0.0.1';
+------+
| L1   |
+======+
|    2 |
+------+
1 tuple (0.937ms)

sql>select count(*) from test_table where col = inet '127.0.0.1';
+------+
| L1   |
+======+
|    0 |
+------+
1 tuple (0.801ms)

Expected Result: All queries return a count of 3

Actual Result: Queries return different counts depending on how INET value was bound to query.  Particularly interesting is that the output when using the inet '127.0.0.1' syntax is non-deterministic.

Does this ring any bells?  Should I log it?

Cheers,

--

Percy Wegmann




--

Percy Wegmann
+1 512 637 8500 ext 148