Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

casting text column to inet truncating text column and resulting inet for first occurrence only #3666

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2015-02-05 12:26:39 +0100
From: Asif Khan Suri <<asif.suri>>
To: SQL devs <>
Version: 11.19.9 (Oct2014-SP2)

Last updated: 2015-05-07 12:38:08 +0200

Comment 20632

Date: 2015-02-05 12:26:39 +0100
From: Asif Khan Suri <<asif.suri>>

User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:38.0) Gecko/20100101 Firefox/38.0
Build Identifier:

select cast(textip as inet) from iptable; destroying the the table by truncating the column textip to first part of the ip. Additionally from same ip stored in text column, only first occurrence results into inet rest appears as nil.
I am doing the binary copy from the files where no support for inet column there fore binary loading the ips as text into landing table. while inserting to final table where ip is defined as inet same behavior is happening. in SP2 transfer is not happening any more. and giving parser error of empty string where no text column is not empty.

Reproducible: Always

Steps to Reproduce:

  1. create table iptable with textip column as varchar(20).
  2. insert '192.168.0.1' three times and 192.168.10.2 one times.
  3. select cast(textip as inet) from iptable

Actual Results:

192.168.0.1
nil
nil
192.168.10.2

Expected Results:

192.168.0.1
192.168.0.1
192.168.0.1
192.168.10.2

loss of original column values

Comment 20633

Date: 2015-02-05 12:33:14 +0100
From: Asif Khan Suri <<asif.suri>>

in SP2 its giving an error "ERROR: GDKerror:!ERROR: Error while parsing, unexpected string ''" and truncating the column.

Comment 20635

Date: 2015-02-05 17:22:04 +0100
From: MonetDB Mercurial Repository <>

Changeset dedb4c1b64ce 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=dedb4c1b64ce

Changeset description:

Do not modify input arguments.
This fixes bug #3666.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant