CentOS 5.2 MySQL 5.1.44にSpider +VPを入れる

 漢のコンピューター道さんのまるで魔法のようなストレージエンジン??VP for MySQLによる驚愕のテーブル操作テクニック。のエントリーを参考に、VPも一緒に入れてみる。

ダウンロード

cd /usr/local/src
wget 'http://launchpad.net/spiderformysql/spider-2.x/2.17-for-5.1.44/+download/spider-src-2.17-for-5.1.44.tgz'
wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.44.tar.gz/from/http://ftp.iij.ad.jp/pub/db/mysql/
tar xvzf mysql-5.1.44.tar.gz
wget 'http://launchpad.net/partitionconditionpushdownformysql/trunk/0.1-for-5.1.44/+download/partition_cond_push-0.1-for-5.1.44.tgz'
wget 'http://launchpad.net/vpformysql/trunk/0.10-for-5.1.44/+download/vp-src-0.10-for-5.1.44.tgz'

アーカイブを展開

tar xvzf mysql-5.1.44.tar.gz
tar xvzf spider-src-2.17-for-5.1.44.tgz
tar xvzf vp-src-0.10-for-5.1.44.tgz 
tar xvzf partition_cond_push-0.1-for-5.1.44.tgz
mv vp mysql-5.1.44/storage/
mv spider mysql-5.1.44/storage/
cd mysql-5.1.44
patch -p2 < ../mysql-5.1.44.partition_cond_push.diff
patch -p2 < ../mysql-5.1.44.spider.diff
patch -p2 < ../mysql-5.1.44.vp.diff
autoconf
automake
./configure \
--prefix=/usr/local/mysql \
--libexecdir=/usr/local/mysql/bin \
--enable-thread-safe-client \
--enable-local-infile \
--with-pic \
--with-client-ldflags=-static \
--with-mysqld-ldflags=-static \
--with-ssl \
--with-readline \
--with-plugins=max-no-ndb \
--with-spider-storage-engine \
--with-extra-charsets=all \
--with-fast-mutexes \
--with-zlib-dir=bundled \
--with-big-tables \
--without-embedded-server
make

 またもやエラー

../storage/vp/libvp.a(libvp_a-vp_param.o):(.data+0x100): multiple definition of `mysql_sysvar_bgs_mode'
../storage/spider/libspider.a(libspider_a-spd_param.o):(.data+0x880): first defined here
collect2: ld returned 1 exit status

なんかsoiderとVPで変数が被っているようなのでgrep

grep -r bgs_mode *
storage/vp/vp_include.h:  int                bgs_mode;
storage/vp/ha_vp.cc:  int bgs_mode =
storage/vp/vp_param.h:extern DECLARE_MYSQL_THDVAR_SIMPLE(bgs_mode, int);
storage/spider/spd_param.cc:  MYSQL_SYSVAR(bgs_mode),
storage/spider/spd_include.h:  int                bgs_mode;

externしているところが仇になっている?。基本、VPとSpiderを同居させるということはない*2から、レアなケースではある。さてどうしたものか。VPをバイナリモジュールで入れようにも64bit版しか提供されていない。まずはSpiderをconfigureから外してVPのモジュールを生成する...か

*1:一部を抜粋

*2:通常Spiderはクライアント?側、VPはサーバー側