Skip to content

Commit

Permalink
SQL: Fix column size for IP data type (#53056)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
matriv committed Mar 4, 2020
1 parent 7309024 commit 353128c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ public void testDateTimes() throws IOException {
}

public void testIPs() throws IOException {
assertQuery("SELECT CAST('12.13.14.15' AS IP)", "CAST('12.13.14.15' AS IP)", "ip", "12.13.14.15", 0);
assertQuery("SELECT CAST('12.13.14.15' AS IP)", "CAST('12.13.14.15' AS IP)", "ip", "12.13.14.15", 45);
assertQuery("SELECT CAST('2001:0db8:0000:0000:0000:ff00:0042:8329' AS IP)", "CAST('2001:0db8:0000:0000:0000:ff00:0042:8329' AS IP)",
"ip", "2001:0db8:0000:0000:0000:ff00:0042:8329", 0);
"ip", "2001:0db8:0000:0000:0000:ff00:0042:8329", 45);
}

public void testDateTimeIntervals() throws IOException {
Expand Down
Loading

0 comments on commit 353128c

Please sign in to comment.