MySQL, MariaDB or Percona Server: Which One Do You Run?
Three servers answer to the name MySQL. How to find out which one you run, where they behave differently, and what breaks when you move data from one to another.
Category
MySQL and MariaDB: stored functions, queries, data types and practical database notes.
Three servers answer to the name MySQL. How to find out which one you run, where they behave differently, and what breaks when you move data from one to another.
One column for both address families: INET6_ATON() and INET6_NTOA(), IPv4-mapped addresses, correct sorting, indexed range queries and MariaDB's native INET6 type.
Store IPv4 addresses as INT UNSIGNED and test CIDR membership with a bitmask or, much faster on a big table, an indexed BETWEEN range on network and broadcast.
Work out the network, broadcast address and prefix length of an IPv4 address inside a query, using INET_ATON(), INET_NTOA() and a little bitwise arithmetic.