MySQL のプロトコルについて

まずは MySQL がどういうプロトコルを使っているのかを知っておかないといけないわけですが、MySQL Internals Manual に詳細にドキュメント化されているので、これにしたがって実装していけばひとまず大丈夫そう。

プロトコルのライセンス?

The MySQL Protocol is proprietary.

The MySQL Protocol is part of the MySQL Database Management System. As such, it falls under the provisions of the GNU Public License (GPL). A copy of the GNU Public License is available on MySQL's web site, and in the product download.

Because this is a GPL protocol, any product which uses it to connect to a MySQL server, or to emulate a MySQL server, or to interpose between any client and server which uses the protocol, or for any similar purpose, is also bound by the GPL. Therefore if you use this description to write a program, you must release your program as GPL. Contact MySQL AB if you need clarification of these terms or if you need to ask about alternative arrangements.

うーん、GPL プロトコルとは前代未聞。GPL とはあくまで著作権をベースにソースコードやその派生物の利用を許諾したり制限したりするためのものという理解に基づくと、このようなライセンシングが有効なのか甚だ疑問です。GPL 的にダイナミックリンクが「派生物」を作る行為だとみなされるなら、MySQL プロトコルのデータストリームを包む IP パケットを作ることも、Ethernet のフレームに突っ込むことも派生物を作ることとみなされるんでしょうか *1

とにかくなんとかして MySQL AB はプロプライエタリティを維持したいのでしょう。が、その法理に著作権を用いるのはやや拡大解釈な気がしないでもありません。てか、誤解でしょ。通常こういうケースでは特許という制度を利用するものですが、各方面からソフトウェア特許について批判が集まる今日このごろ、MySQL AB 的には微妙な線を狙ったつもりなのでしょう *2

  • mysql:12565id:elf さんが同様の疑問を抱いてますね。
  • debian-legal にこの件について議論が行われていました。

>>Because this is a GPL protocol, any product which uses it to connect
>>to a MySQL server, or to emulate a MySQL server, or to interpose
>>between any client and server which uses the protocol, or for any
>>similar purpose, is also bound by the GPL. Therefore if you use this
>>description to write a program, you must release your program as
>>GPL. Contact MySQL AB if you need clarification of these terms or if
>>you need to ask about alternative arrangements.
What are those people smoking? Writing a program that implements a
protocol does not in any way I've ever heard of create anything
derived from the protocol specification. 
...

なに吸ってるって、もちろんアレじゃないの? (www

ほかのドキュメント

実は、以前 Perl でクライアントライブラリを書いたことが (正確にはとみたさんのライブラリを基に一から書き直した :) あったのですが、そのときに参照したのが Ian Redfern 氏のすばらしいドキュメント (文章の著作権はいわゆる public domain)でした *3。こっちのほうがさらりと説明しており、分かりやすいです。

*1:蛋白質にバイナリデータ列を表現する技術があるとして、何らかの GPL でカバーされたデータをその技術でシリアライズしたものを食べたらどうなるんでしょうかね :p

*2:そもそも MySQL プロトコルには技術的な画期性や独創性がありませんし、特許が認定されるかも微妙ですよね。

*3:なお、このドキュメントはMySQL Internals ドキュメントにかの一文が追加されるよりも前の 2003 年ごろから存在するようです (Internet Archiveによれば)。