title: Check if IP is in subnet
body: <p>I have a table A with IP addresses (ipNumeric) stored as unsigned ints and a table B with subnets (subnetNumeric):</p>
  
  <pre><code>INET_NTOA(ipNumeric) = 192.168.0.1
  INET_NTOA(subnetNumeric) = 192.168.0.0
  </code></pre>
  
  <p>I'd like to check if this IP is a member of a subnet.</p>
  
  <p>The subnets are Class A, B and C.</p>
  
  <p>Is this possible to do in reasonable time in MySQL on the fly or should the subnet ranges be precomputed?</p>