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

SQL: IP type reported to have column size of 0 #52762

Closed
bpintea opened this issue Feb 25, 2020 · 2 comments · Fixed by #53056
Closed

SQL: IP type reported to have column size of 0 #52762

bpintea opened this issue Feb 25, 2020 · 2 comments · Fixed by #53056
Assignees
Labels

Comments

@bpintea
Copy link
Contributor

bpintea commented Feb 25, 2020

The IP type is currently reported to have the column size (i.e. older "precision") of 0. This is reported in SYS TYPES.
This value is passed to the client applications and older ones use it as-is to allocate buffers to have the values returned in; which results in them getting just a string null-terminator only for the IP fields (i.e. empty string).

The value should contain the maximum length of an IP address in characters (as the type is backed by a KEYWORD).

(Collaterally, the DataType.size for IP value should be corrected from current 39 to 45.)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/SQL)

@matriv matriv self-assigned this Mar 2, 2020
matriv added a commit to matriv/elasticsearch that referenced this issue Mar 3, 2020
Set size/displaySize to 45 which is the maximum string for
an IP (v6), since IPs are returned as strings.

Fixes: elastic#52762
matriv added a commit that referenced this issue Mar 4, 2020
Set size/displaySize to 45 which is the maximum string for
an IP (v6), since IPs are returned as strings.

Fixes: #52762
matriv added a commit that referenced this issue Mar 4, 2020
Set size/displaySize to 45 which is the maximum string for
an IP (v6), since IPs are returned as strings.

Fixes: #52762

(cherry picked from commit 815f017)
matriv added a commit that referenced this issue Mar 4, 2020
Set size/displaySize to 45 which is the maximum string for
an IP (v6), since IPs are returned as strings.

Fixes: #52762

(cherry picked from commit 815f017)
matriv added a commit that referenced this issue Mar 4, 2020
Set size/displaySize to 45 which is the maximum string for
an IP (v6), since IPs are returned as strings.

Fixes: #52762

(cherry picked from commit 815f017)
@matriv
Copy link
Contributor

matriv commented Mar 4, 2020

master : 815f017
7.x : 1d5c842
7.6 : 353128c
6.8 : c5bc9ae

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants