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

COPY INTO fails to import "inet" data type when value has prefix length in CIDR notation #3644

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: 2014-12-25 00:11:46 +0100
From: K <>
To: SQL devs <>
Version: 11.19.7 (Oct2014-SP1)

Last updated: 2015-01-29 14:07:42 +0100

Comment 20546

Date: 2014-12-25 00:11:46 +0100
From: K <>

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0
Build Identifier:

The INSERT INTO command allows networks in CIDR notation (xxx.xxx.xxx.xxx/yy) to be inserted into 'inet' datatype fields, however COPY INTO does not recognize such data values as valid. This has serious implications since it means that large tables cannot be efficiently loaded, and the default output of msqldump (without the -N option) cannot be re-imported back into the database.

Reproducible: Always

Steps to Reproduce:

  1. Create a table with an 'inet' data type column
  2. Use INSERT to add a row with the 'inet' field as a network in CIDR notation
  3. msqldump the table
  4. Try to re-load the table from the msqldump output

Actual Results:

Fails with what appears to be a syntax/parsing error.

Expected Results:

Successful loading of the data

Note that if the 'inet' datatype field is a host address (no /nn prefix length), all is well, so the trouble seems to be the /nn specification. I tried many different ways to quote the data field but none seemed to work, so I perhaps the the parsing routine for COPY INTO is different from that used for INSERT?

Comment 20549

Date: 2014-12-26 12:29:43 +0100
From: @sjoerdmullender

This bug has been fixed with changeset 5b37b295fcac
A test has been added to sql/test/testdb/testdb-dump.

Comment 20609

Date: 2015-01-29 14:07:42 +0100
From: @sjoerdmullender

Oct2014-SP2 has been released.

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