mysql5.4.1-betaにPBXTをインストールしてみた

何か今日はMySQLのサイトがメンテ中みたいなので

MySQLcluster7.0を試そうと思ったけどダウンロードできない・・・

なので昨日の環境にpbxtをインストールしてみた

ここからコードをダウンロード

最新版のpbxt-1.0.08-rc.tar.gzを使用する

前回MySQLコンパイルしたときのディレクトリを指定してコンパイル

shell> ./configure --with-mysql=/home/mochi/work/mysql-5.4.1-beta

shell> make && sudo make install

mysqlにログインしてプラグイン確認

mysql> show plugins;

Name Status Type Library License
binlog ACTIVE STORAGE ENGINE NULL GPL
partition ACTIVE STORAGE ENGINE NULL GPL
ARCHIVE ACTIVE STORAGE ENGINE NULL GPL
BLACKHOLE ACTIVE STORAGE ENGINE NULL GPL
CSV ACTIVE STORAGE ENGINE NULL GPL
FEDERATED DISABLED STORAGE ENGINE NULL GPL
MEMORY ACTIVE STORAGE ENGINE NULL GPL
InnoDB ACTIVE STORAGE ENGINE NULL GPL
MyISAM ACTIVE STORAGE ENGINE NULL GPL
MRG_MYISAM ACTIVE STORAGE ENGINE NULL GPL
ndbcluster DISABLED STORAGE ENGINE NULL GPL

11 rows in set (0.33 sec)

で、次のコマンドでインストール

mysql> INSTALL PLUGIN PBXT SONAME 'libpbxt.so'

で確認

mysql> show plugins;

Name Status Type Library License
binlog ACTIVE STORAGE ENGINE NULL GPL
partition ACTIVE STORAGE ENGINE NULL GPL
ARCHIVE ACTIVE STORAGE ENGINE NULL GPL
BLACKHOLE ACTIVE STORAGE ENGINE NULL GPL
CSV ACTIVE STORAGE ENGINE NULL GPL
FEDERATED DISABLED STORAGE ENGINE NULL GPL
MEMORY ACTIVE STORAGE ENGINE NULL GPL
InnoDB ACTIVE STORAGE ENGINE NULL GPL
MyISAM ACTIVE STORAGE ENGINE NULL GPL
MRG_MYISAM ACTIVE STORAGE ENGINE NULL GPL
ndbcluster DISABLED STORAGE ENGINE NULL GPL
PBXT ACTIVE STORAGE ENGINE libpbxt.so GPL

12 rows in set (0.00 sec)

一番下に追加されてるのを確認

実際にテーブル作成してみる


CREATE TABLE pbxt_t1 (
id int(9) unsigned not null auto_increment primary key,
nickname varchar(255) not null,
birth_year year null,
birth_month varchar(2) null,
birth_day varchar(2) null,
sex enum('male','female','secret') not null default 'secret',
image mediumblob null,
favorite text null,
register_date datetime not null,
update_date timestamp not null
) engine=PBXT;

INSERT INTO pbxt_t1 (
nickname,
birth_year,
birth_month,
birth_day,
register_date
) VALUES (
'mochi',
'1981',
'12',
'20',
now()
)

でステータス確認


Name: pbxt_t1
Engine: PBXT
Version: 10
Row_format: Dynamic
Rows: 1
Avg_row_length: 1086
Data_length: 2
Max_data_length: 16777215
Index_length: 20480
Data_free: 0
Auto_increment: 2
Create_time: NULL
Update_time: NULL
Check_time: NULL
Collation: utf8_general_ci
Checksum: NULL
Create_options:
Comment:
1 row in set (0.00 sec)