[MDEV-29862] Extracting a subnet from IPv4 with INET6_NTOA & INET6_ATON Created: 2022-10-24 Updated: 2022-10-26 Resolved: 2022-10-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Affects Version/s: | 10.5.15 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Arno | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS 3.10 x86_64 |
||
| Description |
|
I have an issue to extract the subnet part of an IPv4 based on the subnet mask and the ip adress. I'm using this Mysql function to test it: this one work: This don't : And I need the record be able to handle either IPv4 and IPv6. |
| Comments |
| Comment by Sergei Golubchik [ 2022-10-26 ] |
|
This is not a bug. Operator & works with integers, and INET6_ATON returns a string, see https://mariadb.com/kb/en/inet6_aton/ |