Some annoying bugs with date and number operations
Hello Developers, Firstly, I must say thank you for releasing MonetDb Jul2015. Secondly, Problem 1: Following query crashes the mserver5:
SELECT ~0; -- here can be any number or numeric column
There is NULL dereference problem in rel_select.c file at line 3915 (rel_binop function). dl->next->next is null, but rel_value_exp receives dl->next->next->data.sym as argument.
How correctly use bitwise NOT operator with SQL?
Problem 2: Following queries produces incorrect results:
SELECT ( (current_timestamp - str_to_timestamp('2015-09-30', '%Y-%m-%d'))/86400 , BIGINT);
SELECT CONVERT( CONVERT( (current_timestamp - str_to_timestamp('2015-09-30', '%Y-%m-%d')) , BIGINT) /86400 , BIGINT);
SELECT (current_timestamp - str_to_timestamp('2015-09-30', '%Y-%m-%d'))/86400.0;
Server info: # MonetDB 5 server v11.21.5 "Jul2015" # Serving database 'demo', using 4 threads # Compiled for x86_64-pc-winnt/64bit with 64bit OIDs dynamically linked # Found 15.916 GiB available main-memory.
----- On Oct 1, 2015, at 12:48 PM, Sherzod Mutalov shmutalov@gmail.com wrote:
Hello Developers, Firstly, I must say thank you for releasing MonetDb Jul2015. Secondly, Problem 1: Following query crashes the mserver5:
SELECT ~0; -- here can be any number or numeric column There is NULL dereference problem in rel_select.c file at line 3915 (rel_binop function). dl->next->next is null, but rel_value_exp receives dl->next->next->data.sym as argument.
A crash / segfault is alwasy a bug. Please file a bug report via bugs.monetdb.org .
How correctly use bitwise NOT operator with SQL? Problem 2: Following queries produces incorrect results: SELECT ( (current_timestamp - str_to_timestamp('2015-09-30', '%Y-%m-%d'))/86400 , BIGINT); SELECT CONVERT( CONVERT( (current_timestamp - str_to_timestamp('2015-09-30', '%Y-%m-%d')) , BIGINT) /86400 , BIGINT); SELECT (current_timestamp - str_to_timestamp('2015-09-30', '%Y-%m-%d'))/86400.0;
Could you explain what results you'd expect, and what results you get?
Preferably also via a bug report.
Thanks! Stefan
Server info: # MonetDB 5 server v11.21.5 "Jul2015" # Serving database 'demo', using 4 threads # Compiled for x86_64-pc-winnt/64bit with 64bit OIDs dynamically linked
# Found 15.916 GiB available main-memory.
Best regards, Sherzod mailto:shmutalov@gmail.com
developers-list mailing list developers-list@monetdb.org https://www.monetdb.org/mailman/listinfo/developers-list
I send bug reports:
https://www.monetdb.org/bugzilla/show_bug.cgi?id=3814
https://www.monetdb.org/bugzilla/show_bug.cgi?id=3815
participants (2)
-
Sherzod Mutalov
-
Stefan Manegold