Google Summer of Code 2010 Proposal: IPv4, IPv6, MACADDR Native Column Types


IPv4, IPv6, MACADDR Native Column Types


Robert Kuo


Removing the UNSIGNED column type from Drizzle forced IP addresses to be stored as BIGINTs which is inefficient. This project will implement the IPv4, IPv6, and MACADDR native column types for Drizzle and the functions INET_NTOA() and INET_ATON(). This project will include inline documentation, patches to the official documentation, and test cases that verify correct operation and error handling.


Project Title
IPv4, IPv6, MACADDR Native Column Types


Bob Kuo


(removed from here but in my official proposal sent to Google)



This project will implement the IPv4, IPv6, and MACADDR native column types as well as the functions INET_NTOA() and INET_ATON() as well as the documentation and test cases to support this new functionality.

Benefits to the Drizzle Community

According to a message on the mailing list this feature has already been requested by the community. As well as a felt need, this would bring Drizzle closer to MySQL functionality and compatibility.

I’ve worked with MySQL for more than 4 years and would love to get involved with Drizzle but haven’t had the time or resources to do so. I love the idea of a MySQL that is lean, community-driven, and cruft-free and Drizzle seems to fit the bill.


  • The INET_NTOA() and INET_ATON() functions that convert between dotted-quad and an integer network address.
  • The IPv4, IPv6, and MACADDR native column types so that one could type: CREATE TABLE sessions ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY , ip_address IPv4 NOT NULL );
  • Test cases that prove correct operation and error handling of the functions
  • Documentation in whatever format is suitable

Project Details

This project will focus on the functions and then use them internally to convert IP addresses to a space-efficient binary format – e.g., binary(4) for IPv4 and binary(16) for IPv6.

Project Schedule

Before the start date (April 20th – May 23rd)

  • Meet Drizzle community
  • Familiarize myself with Drizzle internals and build process
  • Familiarize myself with bzr (I usually use git)

First half (May 23rd – July 13th)

  • Spec out functionality with documentation and write failing tests
  • Write INET_NTOA() and INET_ATON()
  • Implement the IPv4 native column type

Second half (July 13th – August 10th)

  • Finish documentation and test cases
  • Implement the IPv6 native column type
  • Implement the MACADDR native column type

In the event that I finish early:

  • More documentation and tests
  • Any optimizations that profiling or benchmarking reveals
  • Any other utility functions related to these column types
  • Work on the testing framework


My name is Bob Kuo and I am a 24 year old currently pursuing my masters and living in Champaign-Urbana, IL. My undergrad was in Math and Computer Science at the University of Illinois at Chicago with my classwork focusing on algorithms, coding and number theory, and numerical analysis. I have used MySQL for more than 4 years in both a developer and DBA role. I participated in last year’s Google Summer of Code working for The Perl Foundation and successfully finished the project ahead of schedule. My project code is available on the CPAN and at–primality. I currently work part-time as a web developer for a local company and work in PHP and Ruby and Rails and can work in Perl, PHP, Ruby, C/C++ and with both MySQL and PostgreSQL.

All comments, critiques, or feedback are most welcome.


Bob Kuo

Posted in Google Summer of Code | Comments Off on Google Summer of Code 2010 Proposal: IPv4, IPv6, MACADDR Native Column Types

Comments are closed.