You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
conversion of whitespaces string to double or float is accepted without an error during insert
Reproducible: Always
Steps to Reproduce:
Start mserver5 (MonetDB v11.19.9 (Oct2014-SP2))
Start mclient
execute SQL commands:
CREATE TABLE DOUBLE_TBL(f1 double);
INSERT INTO DOUBLE_TBL(f1) VALUES (' ');
INSERT INTO DOUBLE_TBL(f1) VALUES ('\t');
INSERT INTO DOUBLE_TBL(f1) VALUES ('\n');
INSERT INTO DOUBLE_TBL(f1) VALUES (' \t \t\t \n ');
SELECT f1 FROM DOUBLE_TBL;
-- lists 4 rows with all null
INSERT INTO DOUBLE_TBL(f1) VALUES ('');
-- this fails
CREATE TABLE FLOAT_TBL(f1 float);
INSERT INTO FLOAT_TBL(f1) VALUES (' ');
INSERT INTO FLOAT_TBL(f1) VALUES ('\t');
INSERT INTO FLOAT_TBL(f1) VALUES ('\n');
INSERT INTO FLOAT_TBL(f1) VALUES (' \t \t\t \n ');
SELECT f1 FROM FLOAT_TBL;
-- lists 4 rows with all null
INSERT INTO FLOAT_TBL(f1) VALUES ('');
-- this fails
Actual Results:
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.19.9 (Oct2014-SP2), 'demo'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>CREATE TABLE DOUBLE_TBL(f1 double);
operation successful (7.731ms)
sql>INSERT INTO DOUBLE_TBL(f1) VALUES (' ');
1 affected row (0.542ms)
sql>INSERT INTO DOUBLE_TBL(f1) VALUES ('\t');
1 affected row (0.308ms)
sql>INSERT INTO DOUBLE_TBL(f1) VALUES ('\n');
1 affected row (0.324ms)
sql>INSERT INTO DOUBLE_TBL(f1) VALUES (' \t \t\t \n ');
1 affected row (0.660ms)
sql>SELECT f1 FROM DOUBLE_TBL;
+--------------------------+
| f1 |
+==========================+
| null |
| null |
| null |
| null |
+--------------------------+
4 tuples (1.040ms)
sql>INSERT INTO DOUBLE_TBL(f1) VALUES ('');
conversion of string '' to type dbl failed.
sql>
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.19.9 (Oct2014-SP2), 'demo'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>CREATE TABLE FLOAT_TBL(f1 float);
operation successful (1.506ms)
sql>INSERT INTO FLOAT_TBL(f1) VALUES (' ');
1 affected row (0.777ms)
sql>INSERT INTO FLOAT_TBL(f1) VALUES ('\t');
1 affected row (0.531ms)
sql>INSERT INTO FLOAT_TBL(f1) VALUES ('\n');
1 affected row (0.509ms)
sql>INSERT INTO FLOAT_TBL(f1) VALUES (' \t \t\t \n ');
1 affected row (0.745ms)
sql>SELECT f1 FROM FLOAT_TBL;
+--------------------------+
| f1 |
+==========================+
| null |
| null |
| null |
| null |
+--------------------------+
4 tuples (1.731ms)
sql>INSERT INTO FLOAT_TBL(f1) VALUES ('');
conversion of string '' to type dbl failed.
sql>
Expected Results:
strings with only whitespace characters do not represent a number and therefore should result in an error, like when the string has length 0.
In default branch the behavior for whitespace string to float has recently changed and it now returns an error.
Date: 2015-03-26 18:42:22 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <>
Version: 11.19.9 (Oct2014-SP2)
Last updated: 2015-05-07 12:37:32 +0200
Comment 20747
Date: 2015-03-26 18:42:22 +0100
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Build Identifier:
conversion of whitespaces string to double or float is accepted without an error during insert
Reproducible: Always
Steps to Reproduce:
CREATE TABLE DOUBLE_TBL(f1 double);
INSERT INTO DOUBLE_TBL(f1) VALUES (' ');
INSERT INTO DOUBLE_TBL(f1) VALUES ('\t');
INSERT INTO DOUBLE_TBL(f1) VALUES ('\n');
INSERT INTO DOUBLE_TBL(f1) VALUES (' \t \t\t \n ');
SELECT f1 FROM DOUBLE_TBL;
-- lists 4 rows with all null
INSERT INTO DOUBLE_TBL(f1) VALUES ('');
-- this fails
CREATE TABLE FLOAT_TBL(f1 float);
INSERT INTO FLOAT_TBL(f1) VALUES (' ');
INSERT INTO FLOAT_TBL(f1) VALUES ('\t');
INSERT INTO FLOAT_TBL(f1) VALUES ('\n');
INSERT INTO FLOAT_TBL(f1) VALUES (' \t \t\t \n ');
SELECT f1 FROM FLOAT_TBL;
-- lists 4 rows with all null
INSERT INTO FLOAT_TBL(f1) VALUES ('');
-- this fails
Actual Results:
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.19.9 (Oct2014-SP2), 'demo'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>CREATE TABLE DOUBLE_TBL(f1 double);
operation successful (7.731ms)
sql>INSERT INTO DOUBLE_TBL(f1) VALUES (' ');
1 affected row (0.542ms)
sql>INSERT INTO DOUBLE_TBL(f1) VALUES ('\t');
1 affected row (0.308ms)
sql>INSERT INTO DOUBLE_TBL(f1) VALUES ('\n');
1 affected row (0.324ms)
sql>INSERT INTO DOUBLE_TBL(f1) VALUES (' \t \t\t \n ');
1 affected row (0.660ms)
sql>SELECT f1 FROM DOUBLE_TBL;
+--------------------------+
| f1 |
+==========================+
| null |
| null |
| null |
| null |
+--------------------------+
4 tuples (1.040ms)
sql>INSERT INTO DOUBLE_TBL(f1) VALUES ('');
conversion of string '' to type dbl failed.
sql>
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.19.9 (Oct2014-SP2), 'demo'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>CREATE TABLE FLOAT_TBL(f1 float);
operation successful (1.506ms)
sql>INSERT INTO FLOAT_TBL(f1) VALUES (' ');
1 affected row (0.777ms)
sql>INSERT INTO FLOAT_TBL(f1) VALUES ('\t');
1 affected row (0.531ms)
sql>INSERT INTO FLOAT_TBL(f1) VALUES ('\n');
1 affected row (0.509ms)
sql>INSERT INTO FLOAT_TBL(f1) VALUES (' \t \t\t \n ');
1 affected row (0.745ms)
sql>SELECT f1 FROM FLOAT_TBL;
+--------------------------+
| f1 |
+==========================+
| null |
| null |
| null |
| null |
+--------------------------+
4 tuples (1.731ms)
sql>INSERT INTO FLOAT_TBL(f1) VALUES ('');
conversion of string '' to type dbl failed.
sql>
Expected Results:
strings with only whitespace characters do not represent a number and therefore should result in an error, like when the string has length 0.
In default branch the behavior for whitespace string to float has recently changed and it now returns an error.
Comment 20751
Date: 2015-03-31 11:31:51 +0200
From: MonetDB Mercurial Repository <>
Changeset 476a699b2b1e made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=476a699b2b1e
Changeset description:
Comment 20754
Date: 2015-04-02 13:31:30 +0200
From: MonetDB Mercurial Repository <>
Changeset c64098b19544 made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the MonetDB repo, refers to this bug.
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c64098b19544
Changeset description:
Comment 20755
Date: 2015-04-02 13:31:38 +0200
From: MonetDB Mercurial Repository <>
Changeset 543a90055d48 made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the MonetDB repo, refers to this bug.
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=543a90055d48
Changeset description:
Comment 20763
Date: 2015-04-08 14:14:35 +0200
From: @sjoerdmullender
It's NEXTRELEASE until the release.
The text was updated successfully, but these errors were encountered: