Bugs item #1850187, was opened at 2007-12-13 18:03
Message generated for change (Comment added) made by romulog
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1850187&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL/Core
Group: SQL 2.20
>Status: Closed
>Resolution: Rejected
Priority: 5
Private: No
Submitted By: Romulo Goncalves (romulog)
Assigned to: Niels Nes (nielsnes)
Summary: length function is not working properly 

Initial Comment:
The following SQL execution will show the problem:
sql>create table test ( str VARCHAR(20), str2 VARCHAR(20));
sql>insert into test values (' test ','');
Rows affected 1
sql>select length(str), str from test;
+------------+-------+
| length_str |str    |
+============+=======+
|          5 | test  |
+------------+-------+
sql>

The length of the string is 6 and not 5 ;)

Regards,
Romulo

----------------------------------------------------------------------

>Comment By: Romulo Goncalves (romulog)
Date: 2007-12-13 19:29

Message:
Logged In: YES 
user_id=1498628
Originator: YES

does '  test ' result in 5 too?
No its result in 6...

we currently do a special length(rtrim(x)).
The white spaces, after the last work, are not counted...
Niels just told me that, so I will close the bug. 
The resolution will be rejected.

If it is not the proper choice please let me know.

Regards,
Romulo


----------------------------------------------------------------------

Comment By: Fabian (mr-meltdown)
Date: 2007-12-13 18:42

Message:
Logged In: YES 
user_id=963970
Originator: NO

looks like there is an ltrim going on.

does '  test ' result in 5 too?

----------------------------------------------------------------------

Comment By: Romulo Goncalves (romulog)
Date: 2007-12-13 18:06

Message:
Logged In: YES 
user_id=1498628
Originator: YES

The problem is the space used in string: Look to the following example:
sql>insert into test values (' ','');
Rows affected 1
sql>select length(str), str from test;
+------------+-------+
| length_str |str    |
+============+=======+
|          5 | test  |
|          0 |       |
+------------+-------+
sql>


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1850187&group_id=56967

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to