Se si desidera testare o usare handlersocket con una installazione dai sorgenti di MariaDB, ecco come fare:

  1. Si compili con uno o più script di build che abbia l'opzione -max, per esempio BUILD/compile-pentium64-max o BUILD/compile-pentium64-debug-max
  2. Si avvii mysqld con il framework di test
    cd mysql-test
    LD_LIBRARY_PATH=../plugin/handler_socket/libhsclient/.libs \
    MTR_VERSION=1 perl mysql-test-run.pl --start-and-exit 1st \
    --mysqld=--plugin-dir=../plugin/handler_socket/handlersocket/.libs \
    --mysqld=--loose-handlersocket_port=9998 \
    --mysqld=--loose-handlersocket_port_wr=9999 \
    --master_port=9306 --mysqld=--innodb
  3. Si ottiene il seguente messaggio:
    Servers started, exiting
  4. Si carichi handlersocket
    client/mysql -uroot --protocol=tcp --port=9306 \
    -e 'INSTALL PLUGIN handlersocket soname "handlersocket.so"'
  5. Si configuri e si compili il modulo Perl di handlersocket
    cd plugin/handler_socket/perl-Net-HandlerSocket
    perl Makefile.PL
    make
  6. Se si desidera installare permanentemente il modulo Perl di handlersocket perl, si esegua:
    make install
    Se si fa questo, non bisogna impostare PERL5LIB sotto.
  7. Si esegua la test suite di handlersocket
    cd plugin/handler_socket/regtest/test_01_lib
    MYHOST=127.0.0.1 MYPORT=9306 LD_LIBRARY_PATH=../../libhsclient/.libs/ \
    PERL5LIB=../common:../../perl-Net-HandlerSocket/lib:../../perl-Net-HandlerSocket/blib/arch/auto/Net/HandlerSocket/ ./run.sh

Commenti

Sto caricando i commenti......