Testare HandlerSocket in una distribuzione dei sorgenti

MariaDB 5.5

In MariaDB 5.5, che è creata usando cmake, Makefile.PL non viene generato automaticamente. Se si desidera eseguire i test perl, occorre crearlo manualmente da Makefile.PL.in. E' un'operazione abbastanza semplice, si sostituiscono i valori LIB e INC con quelli corretti. Inoltre, libhsclient.so non viene creato per default; libhsclient.a si trova nella cartella plugin/handler_socket.

MariaDB 5.3

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......
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.