Remove trailing whitespace

Removed trailing whitespace in tests and build scripts.
This commit is contained in:
Markus Mäkelä
2017-05-26 14:29:28 +03:00
parent 5c512a3945
commit 957b50c811
54 changed files with 141 additions and 141 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
# do the real building work # do the real building work
# this script is executed on build VM # this script is executed on build VM
@ -10,7 +10,7 @@ cd ./MaxScale
mkdir _build mkdir _build
cd _build cd _build
cmake .. $cmake_flags cmake .. $cmake_flags
export LD_LIBRARY_PATH=$PWD/log_manager:$PWD/query_classifier export LD_LIBRARY_PATH=$PWD/log_manager:$PWD/query_classifier
make make
@ -26,7 +26,7 @@ sudo rm ../CMakeCache.txt
sudo rm CMakeCache.txt sudo rm CMakeCache.txt
echo "Building tarball..." echo "Building tarball..."
cmake .. $cmake_flags -DTARBALL=Y cmake .. $cmake_flags -DTARBALL=Y
sudo make package sudo make package
@ -69,7 +69,7 @@ if [ "$build_experimental" == "yes" ] ; then
fi fi
if [ "$BUILD_RABBITMQ" == "yes" ] ; then if [ "$BUILD_RABBITMQ" == "yes" ] ; then
cmake ../rabbitmq_consumer/ $cmake_flags cmake ../rabbitmq_consumer/ $cmake_flags
sudo make package sudo make package
res=$? res=$?
if [ $res != 0 ] ; then if [ $res != 0 ] ; then

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
# do the real building work # do the real building work
# this script is executed on build VM # this script is executed on build VM
@ -9,14 +9,14 @@ cd ./MaxScale
mkdir _build mkdir _build
cd _build cd _build
cmake .. $cmake_flags cmake .. $cmake_flags
make make
if [ $remove_strip == "yes" ] ; then if [ $remove_strip == "yes" ] ; then
sudo rm -rf /usr/bin/strip sudo rm -rf /usr/bin/strip
sudo touch /usr/bin/strip sudo touch /usr/bin/strip
sudo chmod a+x /usr/bin/strip sudo chmod a+x /usr/bin/strip
fi fi
sudo make package sudo make package
res=$? res=$?
if [ $res != 0 ] ; then if [ $res != 0 ] ; then
@ -56,7 +56,7 @@ if [ "$build_experimental" == "yes" ] ; then
fi fi
if [ "$BUILD_RABBITMQ" == "yes" ] ; then if [ "$BUILD_RABBITMQ" == "yes" ] ; then
cmake ../rabbitmq_consumer/ $cmake_flags cmake ../rabbitmq_consumer/ $cmake_flags
sudo make package sudo make package
res=$? res=$?
if [ $res != 0 ] ; then if [ $res != 0 ] ; then

View File

@ -3,10 +3,10 @@
### Full build and test environment setup ### Full build and test environment setup
<pre> <pre>
# install ruby # install ruby
sudo apt-get install ruby sudo apt-get install ruby
# install all needed libraries # install all needed libraries
sudo apt-get install libxslt-dev libxml2-dev libvirt-dev zlib1g-dev sudo apt-get install libxslt-dev libxml2-dev libvirt-dev zlib1g-dev
# install vagrant # install vagrant
@ -35,7 +35,7 @@ sudo apt-get install cmake gcc g++ libssl-dev
sudo apt-get install mariadb-client shellcheck sudo apt-get install mariadb-client shellcheck
# install MariaDB development library # install MariaDB development library
sudo apt-get install libmariadbclient-dev sudo apt-get install libmariadbclient-dev
# Ubuntu repos can contain the sa,e package with different name 'libmariadb-client-lgpl-dev' # Ubuntu repos can contain the sa,e package with different name 'libmariadb-client-lgpl-dev'
# but it can not be used to build maxscale-system-test; please use mariadb.org repositories # but it can not be used to build maxscale-system-test; please use mariadb.org repositories
# https://downloads.mariadb.org/mariadb/repositories/ # https://downloads.mariadb.org/mariadb/repositories/
@ -67,7 +67,7 @@ make
cd .. cd ..
mv sysbench sysbench_deb7 mv sysbench sysbench_deb7
# for OVH servers it is needed to move 'docker' and 'libvirt' working directories to /home # for OVH servers it is needed to move 'docker' and 'libvirt' working directories to /home
# (replace 'vagrant' to your home directory name) # (replace 'vagrant' to your home directory name)
cd /var/lib/ cd /var/lib/
sudo mv docker /home/vagrant/ sudo mv docker /home/vagrant/
@ -127,14 +127,14 @@ for AWS machines:
} }
</pre> </pre>
Following boxes are availabe: Following boxes are availabe:
* qemu: debian_7.5_libvirt, ubuntu_trusty_libvirt, centos_7.0_libvirt, centos_6.5_libvirt * qemu: debian_7.5_libvirt, ubuntu_trusty_libvirt, centos_7.0_libvirt, centos_6.5_libvirt
* AWS: rhel5, rhel6, rhel7, sles11, sles12, fedora20, fedora21, fediora22, ubuntu_wily, ubuntu_vivid, centos7, deb_jessie * AWS: rhel5, rhel6, rhel7, sles11, sles12, fedora20, fedora21, fediora22, ubuntu_wily, ubuntu_vivid, centos7, deb_jessie
#### Maxscale and backend machines creation #### Maxscale and backend machines creation
* Generation of Maxscale repository description * Generation of Maxscale repository description
It is necessary to generate descriptions of MariaDB and Maxscale repositories before bringin up Maxscale machine with Vagrant It is necessary to generate descriptions of MariaDB and Maxscale repositories before bringin up Maxscale machine with Vagrant
<pre> <pre>
export ci_url="http://my_repository_site.com/repostory/" export ci_url="http://my_repository_site.com/repostory/"
~/mdbci-repository-config/generate_all.sh $repo_dir ~/mdbci-repository-config/generate_all.sh $repo_dir
@ -153,7 +153,7 @@ export ci_url="http://max-tst-01.mariadb.com/ci-repository/"
</pre> </pre>
More information can be found in the [MDBCI documentation](https://github.com/OSLL/mdbci#repod-files) and in the [mdbci-repository-config documentaion](https://github.com/mariadb-corporation/mdbci-repository-config#mdbci-repository-config) More information can be found in the [MDBCI documentation](https://github.com/OSLL/mdbci#repod-files) and in the [mdbci-repository-config documentaion](https://github.com/mariadb-corporation/mdbci-repository-config#mdbci-repository-config)
* Preparing configuration description * Preparing configuration description
Virtual machines should be described in JSON format. Example template can be found in the [build-scripts package](https://github.com/mariadb-corporation/build-scripts-vagrant/blob/master/test/template.libvirt.json). Virtual machines should be described in JSON format. Example template can be found in the [build-scripts package](https://github.com/mariadb-corporation/build-scripts-vagrant/blob/master/test/template.libvirt.json).
MariaDB machine description example: MariaDB machine description example:

View File

@ -7,7 +7,7 @@ For detailed function and properties description and thier full list please see
For every test case following should be created: For every test case following should be created:
- test executable - test executable
- record in the 'templates' file - record in the 'templates' file
- Maxscale configuration template (if test requires special Maxscale configuration) - Maxscale configuration template (if test requires special Maxscale configuration)
- [CMakeLists.txt](CMakeLists.txt) record: - [CMakeLists.txt](CMakeLists.txt) record:
- add_test_executable(<source.cpp> <binary_name> <cnf_template_name>) - add_test_executable(<source.cpp> <binary_name> <cnf_template_name>)
@ -47,7 +47,7 @@ Template can contain following varables:
* use TestConnections::add_result() to idicate test failure and print explanation message * use TestConnections::add_result() to idicate test failure and print explanation message
* execute TestConnections::copy_all_logs at the end of test * execute TestConnections::copy_all_logs at the end of test
* return TestConnections::global_result value * return TestConnections::global_result value
* do not leave any node blocked by firewall * do not leave any node blocked by firewall
## Class TestConnections ## Class TestConnections
@ -55,7 +55,7 @@ This class contains all information about Maxscale node and about all backend no
to handle Maxscale and backends, interact with Maxscale routers and Maxadmin. to handle Maxscale and backends, interact with Maxscale routers and Maxadmin.
Here is only list of main functions, for all details see Doxygen comments in [testconnections.h](testconnections.h) Here is only list of main functions, for all details see Doxygen comments in [testconnections.h](testconnections.h)
Currently two backend sets are supported (represented by Mariadb_nodes class objects): 'repl' and 'galera' Currently two backend sets are supported (represented by Mariadb_nodes class objects): 'repl' and 'galera'
- contains all info and operations for Master/Slave and Galera setups - contains all info and operations for Master/Slave and Galera setups
(see Doxygen comments in [mariadb_nodes.h](mariadb_nodes.h) ) (see Doxygen comments in [mariadb_nodes.h](mariadb_nodes.h) )
@ -80,14 +80,14 @@ Please check Doxygen comments for details
* create maxscale.cnf out of template and copy it to Maxscale node * create maxscale.cnf out of template and copy it to Maxscale node
* create needed directories, set access righs for them, cleanup logs, coredumps * create needed directories, set access righs for them, cleanup logs, coredumps
* start Maxscale * start Maxscale
* initialize internal structures * initialize internal structures
#### Timeout functions #### Timeout functions
int set_timeout(int timeout_seconds) int set_timeout(int timeout_seconds)
stop_timeout() stop_timeout()
If after set_timeout() a new call of set_timeout() or stop_timeout() is not done the test execution terminated, If after set_timeout() a new call of set_timeout() or stop_timeout() is not done the test execution terminated,
logs from Maxscale are copied to host. logs from Maxscale are copied to host.
#### Open connection functions #### Open connection functions
@ -96,10 +96,10 @@ logs from Maxscale are copied to host.
| int connect_maxscale();<br> int connect_rwsplit();<br> int connect_readconn_master();<br> int connect_maxscale_slave();|store MYSQL handler in TestConnections object (only one cnnection can be created by them, second call leads to MYSQL handler leak)| | int connect_maxscale();<br> int connect_rwsplit();<br> int connect_readconn_master();<br> int connect_maxscale_slave();|store MYSQL handler in TestConnections object (only one cnnection can be created by them, second call leads to MYSQL handler leak)|
|MYSQL * open_rwsplit_connection() <br> MYSQL * open_readconn_master_connection() <br> MYSQL * open_readconn_slave_connection() |returns MYSQL handler (can be used to create a number of connections to each router)| |MYSQL * open_rwsplit_connection() <br> MYSQL * open_readconn_master_connection() <br> MYSQL * open_readconn_slave_connection() |returns MYSQL handler (can be used to create a number of connections to each router)|
| int create_connections(int conn_N) |- open and then close N connections to each router| | int create_connections(int conn_N) |- open and then close N connections to each router|
A number of useful wrappers for mysql_real_connect() are not included into TestConnections class, but A number of useful wrappers for mysql_real_connect() are not included into TestConnections class, but
they are availve from [mariadb_func.h](mariadb_func.h) they are availve from [mariadb_func.h](mariadb_func.h)
#### Backend check and setup functions #### Backend check and setup functions
|Function|Short description| |Function|Short description|
|----|---| |----|---|
@ -114,7 +114,7 @@ they are availve from [mariadb_func.h](mariadb_func.h)
|add_result()|failure printing, increase global_result| |add_result()|failure printing, increase global_result|
|tprint()| printing with timestamp| |tprint()| printing with timestamp|
|copy_logs()|copy Maxscale log, maxscale.cnf file and core dump from Maxscale machine to current directory| |copy_logs()|copy Maxscale log, maxscale.cnf file and core dump from Maxscale machine to current directory|
#### Different checks functions #### Different checks functions
|Function|Short description| |Function|Short description|
|----|---| |----|---|
@ -133,7 +133,7 @@ they are availve from [mariadb_func.h](mariadb_func.h)
|restart_maxscale()|| |restart_maxscale()||
|execute_ssh_maxscale()|execute command on Maxscale node via ssh| |execute_ssh_maxscale()|execute command on Maxscale node via ssh|
#### Properties #### Properties
|Name|Short description|Corresponding env variable| |Name|Short description|Corresponding env variable|
|----|-----|----| |----|-----|----|
|global_result|0 if there is not single failure during the test| - | |global_result|0 if there is not single failure during the test| - |
@ -183,7 +183,7 @@ they are availve from [mariadb_func.h](mariadb_func.h)
|flush_hosts()|Execute 'mysqladmin flush-hosts' on all nodes| |flush_hosts()|Execute 'mysqladmin flush-hosts' on all nodes|
|execute_query_all_nodes()|Execute same query on all nodes| |execute_query_all_nodes()|Execute same query on all nodes|
#### Properties #### Properties
|Name|Short description|Corresponding env variable| |Name|Short description|Corresponding env variable|
|----|-----|----| |----|-----|----|
|N|Number of nodes|node_N <br> galera_N| |N|Number of nodes|node_N <br> galera_N|

View File

@ -5,7 +5,7 @@ drop table if exists t1;
--enable_warnings --enable_warnings
create table t1 (id integer); create table t1 (id integer);
set autocommit=0; # open transaction set autocommit=0; # open transaction
begin; begin;
insert into t1 values(1); # write to master insert into t1 values(1); # write to master
commit; commit;
drop table t1; drop table t1;

View File

@ -6,7 +6,7 @@ drop table if exists t1;
create table t1 (id integer); create table t1 (id integer);
set autocommit=0; # open transaction set autocommit=0; # open transaction
begin; begin;
insert into t1 values(1); # write to master insert into t1 values(1); # write to master
commit; commit;
select count(*) from t1; # read from master since autocommit is disabled select count(*) from t1; # read from master since autocommit is disabled

View File

@ -6,7 +6,7 @@ drop table if exists t1;
create table t1 (id integer); create table t1 (id integer);
set autocommit=0; # open transaction set autocommit=0; # open transaction
begin; begin;
insert into t1 values(1); # write to master insert into t1 values(1); # write to master
commit; commit;
select count(*) from t1; # read from master since autocommit is disabled select count(*) from t1; # read from master since autocommit is disabled

View File

@ -1,16 +1,16 @@
--source testconf.inc --source testconf.inc
USE test; USE test;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS myCity; DROP TABLE IF EXISTS myCity;
--enable_warnings --enable_warnings
SET autocommit = 0; SET autocommit = 0;
START TRANSACTION; START TRANSACTION;
CREATE TABLE myCity (a int, b char(20)); CREATE TABLE myCity (a int, b char(20));
INSERT INTO myCity VALUES (1, 'Milan'); INSERT INTO myCity VALUES (1, 'Milan');
INSERT INTO myCity VALUES (2, 'London'); INSERT INTO myCity VALUES (2, 'London');
COMMIT; COMMIT;
START TRANSACTION; START TRANSACTION;
DELETE FROM myCity; DELETE FROM myCity;
SELECT COUNT(*) FROM myCity; # read transaction's modifications from master SELECT COUNT(*) FROM myCity; # read transaction's modifications from master
COMMIT; COMMIT;
DROP TABLE myCity; DROP TABLE myCity;

View File

@ -1,15 +1,15 @@
--source testconf.inc --source testconf.inc
USE test; USE test;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS myCity; DROP TABLE IF EXISTS myCity;
--enable_warnings --enable_warnings
SET autocommit = Off; SET autocommit = Off;
START TRANSACTION; START TRANSACTION;
CREATE TABLE myCity (a int, b char(20)); CREATE TABLE myCity (a int, b char(20));
INSERT INTO myCity VALUES (1, 'Milan'); INSERT INTO myCity VALUES (1, 'Milan');
INSERT INTO myCity VALUES (2, 'London'); INSERT INTO myCity VALUES (2, 'London');
COMMIT; COMMIT;
START TRANSACTION; START TRANSACTION;
DELETE FROM myCity; DELETE FROM myCity;
SELECT COUNT(*) FROM myCity; # read transaction's modifications from master SELECT COUNT(*) FROM myCity; # read transaction's modifications from master
COMMIT; COMMIT;

View File

@ -1,13 +1,13 @@
--source testconf.inc --source testconf.inc
USE test; USE test;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS myCity; DROP TABLE IF EXISTS myCity;
--enable_warnings --enable_warnings
SET autocommit = 0; SET autocommit = 0;
CREATE TABLE myCity (a int, b char(20)); CREATE TABLE myCity (a int, b char(20));
INSERT INTO myCity VALUES (1, 'Milan'); INSERT INTO myCity VALUES (1, 'Milan');
INSERT INTO myCity VALUES (2, 'London'); INSERT INTO myCity VALUES (2, 'London');
COMMIT; COMMIT;
DELETE FROM myCity; # implicit transaction started DELETE FROM myCity; # implicit transaction started
SELECT COUNT(*) FROM myCity; # read transaction's modifications from master SELECT COUNT(*) FROM myCity; # read transaction's modifications from master

View File

@ -1,13 +1,13 @@
--source testconf.inc --source testconf.inc
USE test; USE test;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS myCity; DROP TABLE IF EXISTS myCity;
--enable_warnings --enable_warnings
SET autocommit = oFf; SET autocommit = oFf;
CREATE TABLE myCity (a int, b char(20)); CREATE TABLE myCity (a int, b char(20));
INSERT INTO myCity VALUES (1, 'Milan'); INSERT INTO myCity VALUES (1, 'Milan');
INSERT INTO myCity VALUES (2, 'London'); INSERT INTO myCity VALUES (2, 'London');
COMMIT; COMMIT;
DELETE FROM myCity; # implicit transaction started DELETE FROM myCity; # implicit transaction started
SELECT COUNT(*) FROM myCity; # read transaction's modifications from master SELECT COUNT(*) FROM myCity; # read transaction's modifications from master

View File

@ -1,4 +1,4 @@
# Jenkins # Jenkins
## List of Jenkins installations ## List of Jenkins installations
@ -8,7 +8,7 @@
|[maxscale-jenkins.mariadb.com:8089/](http://maxscale-jenkins.mariadb.com:8089/)|AWS, VBox; Regular builds for all distributions, build for Coverity, regular test VBox+CentOS6+MariaDB5.5| |[maxscale-jenkins.mariadb.com:8089/](http://maxscale-jenkins.mariadb.com:8089/)|AWS, VBox; Regular builds for all distributions, build for Coverity, regular test VBox+CentOS6+MariaDB5.5|
|[maxscale-jenkins.mariadb.com:8090](http://maxscale-jenkins.mariadb.com:8090/)|MDBCI testing and debugging, Jenkins experiments| |[maxscale-jenkins.mariadb.com:8090](http://maxscale-jenkins.mariadb.com:8090/)|MDBCI testing and debugging, Jenkins experiments|
## Basic Jenkins jobs ## Basic Jenkins jobs
### [max-tst-01.mariadb.com:8089](http://max-tst-01.mariadb.com:8089) ### [max-tst-01.mariadb.com:8089](http://max-tst-01.mariadb.com:8089)
@ -22,30 +22,30 @@
|[destroy](http://max-tst-01.mariadb.com:8089/view/axilary/job/destroy/)|Destroy VMs created by [run_test](http://max-tst-01.mariadb.com:8089/view/test/job/run_test/) or [create_env](http://max-tst-01.mariadb.com:8089/view/env/job/create_env/)| |[destroy](http://max-tst-01.mariadb.com:8089/view/axilary/job/destroy/)|Destroy VMs created by [run_test](http://max-tst-01.mariadb.com:8089/view/test/job/run_test/) or [create_env](http://max-tst-01.mariadb.com:8089/view/env/job/create_env/)|
|[remove_lock](http://max-tst-01.mariadb.com:8089/view/axilary/job/remove_lock/)|Remove Vagrant lock set by [run_test](http://max-tst-01.mariadb.com:8089/view/test/job/run_test/) or [create_env](http://max-tst-01.mariadb.com:8089/view/env/job/create_env/)| |[remove_lock](http://max-tst-01.mariadb.com:8089/view/axilary/job/remove_lock/)|Remove Vagrant lock set by [run_test](http://max-tst-01.mariadb.com:8089/view/test/job/run_test/) or [create_env](http://max-tst-01.mariadb.com:8089/view/env/job/create_env/)|
Every test run should have unique name (parameter 'name'). This name is used as a name of MDBCI configuration. Every test run should have unique name (parameter 'name'). This name is used as a name of MDBCI configuration.
If parameter 'do_not_destroy' is set to 'yes' virtual machines (VM) are not destroyed after tests execution and can be laters used If parameter 'do_not_destroy' is set to 'yes' virtual machines (VM) are not destroyed after tests execution and can be laters used
for debugging or new test runs (see [run_test_no_env_rebuild](http://max-tst-01.mariadb.com:8089/view/test/job/run_test_no_env_rebuild/)) for debugging or new test runs (see [run_test_no_env_rebuild](http://max-tst-01.mariadb.com:8089/view/test/job/run_test_no_env_rebuild/))
VMs can be accessed from vagrant@max-tst-01.mariadb.com machine using 'mdbci ssh' or 'vagrant ssh' as well as direct ssh VMs can be accessed from vagrant@max-tst-01.mariadb.com machine using 'mdbci ssh' or 'vagrant ssh' as well as direct ssh
access using environmental variables provided by access using environmental variables provided by
[set_env_vagrant.sh](https://github.com/mariadb-corporation/maxscale-system-test/blob/master/ENV_SETUP.md#access-vms) [set_env_vagrant.sh](https://github.com/mariadb-corporation/maxscale-system-test/blob/master/ENV_SETUP.md#access-vms)
script. script.
Parameter 'box' defines type of VM and Linux distribution to be used for tests. Parameter 'box' defines type of VM and Linux distribution to be used for tests.
Test results go to [CDash](http://jenkins.engskysql.com/CDash/index.php?project=MaxScale), logs and core dumps are Test results go to [CDash](http://jenkins.engskysql.com/CDash/index.php?project=MaxScale), logs and core dumps are
stored [here](http://max-tst-01.mariadb.com/LOGS/). stored [here](http://max-tst-01.mariadb.com/LOGS/).
[create_env](http://max-tst-01.mariadb.com:8089/view/env/job/create_env/) job allows to create a set of VMs [create_env](http://max-tst-01.mariadb.com:8089/view/env/job/create_env/) job allows to create a set of VMs
(for backend and Maxscale) and does Maxscale build on the Maxscale VM. After execution this job Maxscale machine (for backend and Maxscale) and does Maxscale build on the Maxscale VM. After execution this job Maxscale machine
contains Maxscale source and binaries. *NOTE:* to properly configure Maxscale init scripts it is necessary to contains Maxscale source and binaries. *NOTE:* to properly configure Maxscale init scripts it is necessary to
use rpm/dpkg tool to install Maxscale package (package can be found in the Maxscale build directory). use rpm/dpkg tool to install Maxscale package (package can be found in the Maxscale build directory).
[run_test](http://max-tst-01.mariadb.com:8089/view/test/job/run_test/) and [run_test](http://max-tst-01.mariadb.com:8089/view/test/job/run_test/) and
[create_env](http://max-tst-01.mariadb.com:8089/view/env/job/create_env/) [create_env](http://max-tst-01.mariadb.com:8089/view/env/job/create_env/)
jobs create Vagrant lock which prevents running two Vagrant instances in parallel (such parallel execution can jobs create Vagrant lock which prevents running two Vagrant instances in parallel (such parallel execution can
cause Vagrant of VM provider failures). In case of job crash or interruption by user Vagrant lock stays in locked state cause Vagrant of VM provider failures). In case of job crash or interruption by user Vagrant lock stays in locked state
and prevents any new VM creation. To remove lock job and prevents any new VM creation. To remove lock job
[remove_lock](http://max-tst-01.mariadb.com:8089/view/axilary/job/remove_lock/) [remove_lock](http://max-tst-01.mariadb.com:8089/view/axilary/job/remove_lock/)
should be used. should be used.
## Process examples ## Process examples
@ -54,20 +54,20 @@ should be used.
Execute [build_and_test](http://max-tst-01.mariadb.com:8089/view/test/job/build_and_test/) Execute [build_and_test](http://max-tst-01.mariadb.com:8089/view/test/job/build_and_test/)
Recommendations regarding parameters: Recommendations regarding parameters:
* 'name' - unique name: it can be any text string, but as a good practice rule: 'name' should refer to branch, * 'name' - unique name: it can be any text string, but as a good practice rule: 'name' should refer to branch,
Linux distribution, date/time of testing, MariaDB version Linux distribution, date/time of testing, MariaDB version
* 'box' - most recommended boxes are 'centos_7.0_libvirt' (QEMU box) and 'centos7' (Amazon Web Services box) * 'box' - most recommended boxes are 'centos_7.0_libvirt' (QEMU box) and 'centos7' (Amazon Web Services box)
* 'source' - which type of source to use. BRANCH for git branch, TAG for a git tag and COMMIT for a commit ID. * 'source' - which type of source to use. BRANCH for git branch, TAG for a git tag and COMMIT for a commit ID.
* 'value' - name of the branch (if 'source' is BRANCH), name of the GIT tag (if 'source' is TAG) or commint ID (if 'source' is COMMIT) * 'value' - name of the branch (if 'source' is BRANCH), name of the GIT tag (if 'source' is TAG) or commint ID (if 'source' is COMMIT)
### Build MaxScale ### Build MaxScale
Execute [build](http://max-tst-01.mariadb.com:8089/job/build/build) job. Execute [build](http://max-tst-01.mariadb.com:8089/job/build/build) job.
Parameter 'target' means a name of repository to put packages: Parameter 'target' means a name of repository to put packages:
e.g. if 'target' is 'develop' packages are going to e.g. if 'target' is 'develop' packages are going to
[http://max-tst-01.mariadb.com/ci-repository/develop/](http://max-tst-01.mariadb.com/ci-repository/develop) [http://max-tst-01.mariadb.com/ci-repository/develop/](http://max-tst-01.mariadb.com/ci-repository/develop)
NOTE: building is executed only for selected distribution ('box' parameter). Be careful with other distributions: if build is not executed for same distribution old version can be in the repository (from some old builds). Later tests have to be executed against the same distribution otherwise they can be run against old version of MaxScale. It is recommended to use unique name for 'target'. NOTE: building is executed only for selected distribution ('box' parameter). Be careful with other distributions: if build is not executed for same distribution old version can be in the repository (from some old builds). Later tests have to be executed against the same distribution otherwise they can be run against old version of MaxScale. It is recommended to use unique name for 'target'.
@ -78,23 +78,23 @@ To debug failed build:
<pre> <pre>
ssh -i vagrant.pem vagrant@max-tst-01.mariadb.com ssh -i vagrant.pem vagrant@max-tst-01.mariadb.com
cd ~/mdbci/build-&lt;box&gt;-&lt;date&gt;&lt;time&gt; cd ~/mdbci/build-&lt;box&gt;-&lt;date&gt;&lt;time&gt;
vagrant ssh vagrant ssh
</pre> </pre>
For example: For example:
<pre> <pre>
ssh -i vagrant.pem vagrant@max-tst-01.mariadb.com ssh -i vagrant.pem vagrant@max-tst-01.mariadb.com
cd ~/mdbci/build_centos6-20160119-0935 cd ~/mdbci/build_centos6-20160119-0935
vagrant ssh vagrant ssh
</pre> </pre>
### Create set of Master/Slave and Galera nodes and setup build environment for Maxscale on one more node ### Create set of Master/Slave and Galera nodes and setup build environment for Maxscale on one more node
Execute [create_env](http://max-tst-01.mariadb.com:8089/view/env/job/create_env/) job. Execute [create_env](http://max-tst-01.mariadb.com:8089/view/env/job/create_env/) job.
Login to Maxscale machine (see [environment documentation](ENV_SETUP.md#access-vms)). Login to Maxscale machine (see [environment documentation](ENV_SETUP.md#access-vms)).
MaxScale source code, binaries and packages can be found in the ~/workspace/ directory. MaxScale source code, binaries and packages can be found in the ~/workspace/ directory.
All build tools are installed. GIT can be used to go trough source code. All build tools are installed. GIT can be used to go trough source code.
It is not recommended to commit anything from virtual machine to GitHub. It is not recommended to commit anything from virtual machine to GitHub.
Please use 'rpm' or 'dpkg' to properly install Maxscale package (/etc/init.d/maxscale script will not be Please use 'rpm' or 'dpkg' to properly install Maxscale package (/etc/init.d/maxscale script will not be
@ -107,12 +107,12 @@ Execute [run_test](http://max-tst-01.mariadb.com:8089/view/test/job/run_test/) j
Be sure Maxscale binary repository is present on the Be sure Maxscale binary repository is present on the
[http://max-tst-01.mariadb.com/ci-repository/](http://max-tst-01.mariadb.com/ci-repository/) [http://max-tst-01.mariadb.com/ci-repository/](http://max-tst-01.mariadb.com/ci-repository/)
server. Please check: server. Please check:
* there is a directory with the name equal to 'target' parameter * there is a directory with the name equal to 'target' parameter
* there is sub-directory for selected distribution ('box' parameter) * there is sub-directory for selected distribution ('box' parameter)
e.g. if 'target' is 'develop' and distribution is CentOS7 (boxes 'centos7' or 'centos_7.0_libvirt') the directory [http://max-tst-01.mariadb.com/ci-repository/develop/mariadb-maxscale/centos/7/x86_64/](http://max-tst-01.mariadb.com/ci-repository/develop/mariadb-maxscale/centos/7/x86_64/) have to contain Maxscale RPM packages. e.g. if 'target' is 'develop' and distribution is CentOS7 (boxes 'centos7' or 'centos_7.0_libvirt') the directory [http://max-tst-01.mariadb.com/ci-repository/develop/mariadb-maxscale/centos/7/x86_64/](http://max-tst-01.mariadb.com/ci-repository/develop/mariadb-maxscale/centos/7/x86_64/) have to contain Maxscale RPM packages.
If parameter 'do_not_destroy' set to 'yes' after the test virtual machine will not be destroyed and If parameter 'do_not_destroy' set to 'yes' after the test virtual machine will not be destroyed and
can be used for debugging. See [environment documentation](ENV_SETUP.md#access-vms) to get know how to access virtual machines. can be used for debugging. See [environment documentation](ENV_SETUP.md#access-vms) to get know how to access virtual machines.
### Maintenance operations ### Maintenance operations
@ -122,6 +122,6 @@ If test run was executed with parameter 'do_not_destroy' set yo 'yes' please do
This job also have to be executed if test run job crashed or it was interrupted. This job also have to be executed if test run job crashed or it was interrupted.
In case of build or test job crash, interruption, Jenkins crash during Vagrant operation it is possible that Vagrant lock In case of build or test job crash, interruption, Jenkins crash during Vagrant operation it is possible that Vagrant lock
stays in locked state and no other job can progress (job can be started, but it is waiting for Vagrant lock - stays in locked state and no other job can progress (job can be started, but it is waiting for Vagrant lock -
'/home/vagrant/vagrant_lock' can be seen in the job log). In this case lock can be removed by [remove_lock](http://max-tst-01.mariadb.com:8089/view/axilary/job/remove_lock/) job. '/home/vagrant/vagrant_lock' can be seen in the job log). In this case lock can be removed by [remove_lock](http://max-tst-01.mariadb.com:8089/view/axilary/job/remove_lock/) job.

View File

@ -15,10 +15,10 @@ For access to VMs see [environment documentation](ENV_SETUP.md#access-vms)
Jenkins job log consists of following parts: Jenkins job log consists of following parts:
* Vagrant output: VMs creation priocess, MariaDB Master/Slave and MariaDB Galera stuff installation, MaxScale installation * Vagrant output: VMs creation priocess, MariaDB Master/Slave and MariaDB Galera stuff installation, MaxScale installation
* [set_env_vagrant.sh](https://github.com/mariadb-corporation/build-scripts-vagrant/blob/master/test/set_env_vagrant.sh) output: retrieval of all VM parameters * [set_env_vagrant.sh](https://github.com/mariadb-corporation/build-scripts-vagrant/blob/master/test/set_env_vagrant.sh) output: retrieval of all VM parameters
* setup scripts output: MariaDB initialisation on backend nodes, DB users setup, enabling core dump on MaxScale VM * setup scripts output: MariaDB initialisation on backend nodes, DB users setup, enabling core dump on MaxScale VM
* test application output for all tests: eevry line starts from test case number and ':' (can be grepped) * test application output for all tests: eevry line starts from test case number and ':' (can be grepped)
* CTest final printing: N of M tests passed, CTest warnings, email sending logs * CTest final printing: N of M tests passed, CTest warnings, email sending logs
To check presence of core dumps: To check presence of core dumps:
<pre> <pre>

View File

@ -3,7 +3,7 @@
### ###
## @file bug561.sh Regression case for the bug "Different error messages from MariaDB and Maxscale" ## @file bug561.sh Regression case for the bug "Different error messages from MariaDB and Maxscale"
## - try to connect to non existing DB directly to MariaDB server and via Maxscale ## - try to connect to non existing DB directly to MariaDB server and via Maxscale
## - compare error messages ## - compare error messages
## - repeat for RWSplit, ReadConn ## - repeat for RWSplit, ReadConn
@ -13,7 +13,7 @@ export test_name=`basename $rp`
$test_dir/non_native_setup $test_name $test_dir/non_native_setup $test_name
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo "configuring maxscale failed" echo "configuring maxscale failed"
exit 1 exit 1
fi fi

View File

@ -3,7 +3,7 @@
### ###
## @file bug562.sh Regression case for the bug "Wrong error message for Access denied error" ## @file bug562.sh Regression case for the bug "Wrong error message for Access denied error"
## - try to connect with bad credestials directly to MariaDB server and via Maxscale ## - try to connect with bad credestials directly to MariaDB server and via Maxscale
## - compare error messages ## - compare error messages
rp=`realpath $0` rp=`realpath $0`
export test_dir=`dirname $rp` export test_dir=`dirname $rp`
@ -11,7 +11,7 @@ export test_name=`basename $rp`
$test_dir/non_native_setup $test_name $test_dir/non_native_setup $test_name
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo "configuring maxscale failed" echo "configuring maxscale failed"
exit 1 exit 1
fi fi

View File

@ -3,14 +3,14 @@
### ###
## @file bug564.sh Regression case for the bug "Wrong charset settings" ## @file bug564.sh Regression case for the bug "Wrong charset settings"
## - call MariaDB client with different --default-character-set= settings ## - call MariaDB client with different --default-character-set= settings
## - check output of SHOW VARIABLES LIKE 'char%' ## - check output of SHOW VARIABLES LIKE 'char%'
rp=`realpath $0` rp=`realpath $0`
export test_dir=`dirname $rp` export test_dir=`dirname $rp`
export test_name=`basename $rp` export test_name=`basename $rp`
$test_dir/non_native_setup $test_name $test_dir/non_native_setup $test_name
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo "configuring maxscale failed" echo "configuring maxscale failed"
exit 1 exit 1
fi fi
@ -31,9 +31,9 @@ do
res3=$? res3=$?
if [[ $res1 != 0 ]] || [[ $res2 != 0 ]] || [[ $res3 != 0 ]] ; then if [[ $res1 != 0 ]] || [[ $res2 != 0 ]] || [[ $res3 != 0 ]] ; then
echo "charset is ignored" echo "charset is ignored"
mysql -u$node_user -p$node_password -h $maxscale_IP -P 4006 $ssl_options --default-character-set="latin2" -e "SHOW VARIABLES LIKE 'char%'" mysql -u$node_user -p$node_password -h $maxscale_IP -P 4006 $ssl_options --default-character-set="latin2" -e "SHOW VARIABLES LIKE 'char%'"
$test_dir/copy_logs.sh bug564 $test_dir/copy_logs.sh bug564
exit 1 exit 1
fi fi

View File

@ -10,7 +10,7 @@ export test_dir=`dirname $rp`
export test_name=`basename $rp` export test_name=`basename $rp`
$test_dir/non_native_setup $test_name $test_dir/non_native_setup $test_name
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo "configuring maxscale failed" echo "configuring maxscale failed"
exit 1 exit 1
fi fi

View File

@ -16,7 +16,7 @@ router= readwritesplit
servers=server1,server2,server3,server4 servers=server1,server2,server3,server4
user=maxskysql user=maxskysql
passwd=skysql passwd=skysql
max_slave_connections=100% max_slave_connections=100%
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
ssl=required ssl=required
ssl_cert=/###access_homedir###/certs/server-cert.pem ssl_cert=/###access_homedir###/certs/server-cert.pem

View File

@ -36,8 +36,8 @@ module=qlafilter
filebase=/tmp/QueryLog filebase=/tmp/QueryLog
[duplicate] [duplicate]
type=filter type=filter
module=tee module=tee
service=RW Split2 service=RW Split2
[testfilter] [testfilter]

View File

@ -32,8 +32,8 @@ module=qlafilter
filebase=/tmp/QueryLog filebase=/tmp/QueryLog
[duplicate] [duplicate]
type=filter type=filter
module=tee module=tee
service=RW Split2 service=RW Split2
[RW Split Router] [RW Split Router]

View File

@ -16,7 +16,7 @@ router= readwritesplit
servers=server1,server2,server3,server4 servers=server1,server2,server3,server4
user=maxskysql user=maxskysql
passwd=skysql passwd=skysql
max_slave_connections=100% max_slave_connections=100%
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
[Read Connection Router Slave] [Read Connection Router Slave]

View File

@ -16,7 +16,7 @@ router= readwritesplit
servers=server1,server2,server3,server4 servers=server1,server2,server3,server4
user=maxskysql user=maxskysql
passwd=skysql passwd=skysql
max_slave_connections=100% max_slave_connections=100%
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
[Read Connection Router Slave] [Read Connection Router Slave]

View File

@ -16,7 +16,7 @@ router= readwritesplit
servers=server1,server2,server3,server4 servers=server1,server2,server3,server4
user=maxskysql user=maxskysql
passwd=skysql passwd=skysql
max_slave_connections=100% max_slave_connections=100%
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
[Read Connection Router Slave] [Read Connection Router Slave]

View File

@ -16,7 +16,7 @@ router= readwritesplit
servers=server1,server2,server3,server4 servers=server1,server2,server3,server4
user=maxskysql user=maxskysql
passwd=skysql passwd=skysql
max_slave_connections=100% max_slave_connections=100%
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
[Read Connection Router Slave] [Read Connection Router Slave]

View File

@ -16,7 +16,7 @@ router= readwritesplit
servers=server1,server2,server3,server4 servers=server1,server2,server3,server4
user=maxskysql user=maxskysql
passwd=skysql passwd=skysql
max_slave_connections=100% max_slave_connections=100%
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
[Read Connection Router Slave] [Read Connection Router Slave]

View File

@ -16,7 +16,7 @@ router= readwritesplit
servers=server1,server2,server3,server4 servers=server1,server2,server3,server4
user=maxskysql user=maxskysql
passwd=skysql passwd=skysql
max_slave_connections=100% max_slave_connections=100%
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
[Read Connection Router Slave] [Read Connection Router Slave]

View File

@ -9,7 +9,7 @@ module=mysqlmon
servers= server1, server2,server3 ,server4 servers= server1, server2,server3 ,server4
user=maxskysql user=maxskysql
passwd= skysql passwd= skysql
monitor_interval=100 monitor_interval=100
[RW Split Router] [RW Split Router]
type=service type=service

View File

@ -9,7 +9,7 @@ module=mysqlmon
servers= server1, server2,server3 ,server4 servers= server1, server2,server3 ,server4
user=maxskysql user=maxskysql
passwd= skysql passwd= skysql
monitor_interval=100 monitor_interval=100
[RW Split Router] [RW Split Router]
type=service type=service

View File

@ -16,7 +16,7 @@ router= readwritesplit
servers=server1,server2,server3,server4 servers=server1,server2,server3,server4
user=maxskysql user=maxskysql
passwd=skysql passwd=skysql
max_slave_connections=100% max_slave_connections=100%
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
[Read Connection Router Slave] [Read Connection Router Slave]

View File

@ -16,7 +16,7 @@ router= readwritesplit
servers=server1,server2,server3,server4 servers=server1,server2,server3,server4
user=maxskysql user=maxskysql
passwd=skysql passwd=skysql
max_slave_connections=100% max_slave_connections=100%
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
[Read Connection Router Slave] [Read Connection Router Slave]

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
echo "DROP USER '$node_user'@'%'" | sudo mysql $1 echo "DROP USER '$node_user'@'%'" | sudo mysql $1
echo "grant all privileges on *.* to '$node_user'@'%' identified by '$node_password' require ssl WITH GRANT OPTION" echo "grant all privileges on *.* to '$node_user'@'%' identified by '$node_password' require ssl WITH GRANT OPTION"
echo "grant all privileges on *.* to '$node_user'@'%' identified by '$node_password' require ssl WITH GRANT OPTION" | sudo mysql $1 echo "grant all privileges on *.* to '$node_user'@'%' identified by '$node_password' require ssl WITH GRANT OPTION" | sudo mysql $1
echo "grant all privileges on *.* to 'maxskysql'@'%' identified by 'skysql' require ssl WITH GRANT OPTION" | sudo mysql $1 echo "grant all privileges on *.* to 'maxskysql'@'%' identified by 'skysql' require ssl WITH GRANT OPTION" | sudo mysql $1

View File

@ -1,4 +1,4 @@
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (x1 int, fl int); CREATE TABLE t1 (x1 int, fl int);
select sleep(5); select sleep(5);
delete from t1 where x1 like '_'; delete from t1 where x1 like '_';

View File

@ -1,3 +1,3 @@
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (x1 int, fl int); CREATE TABLE t1 (x1 int, fl int);
SELECT fl FROM t1; SELECT fl FROM t1;

View File

@ -1,4 +1,4 @@
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (x1 int, fl int); CREATE TABLE t1 (x1 int, fl int);
select sleep(5); select sleep(5);
SELECT fl FROM t1; SELECT fl FROM t1;

View File

@ -1,4 +1,4 @@
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (x1 int, fl int); CREATE TABLE t1 (x1 int, fl int);
select sleep(5); select sleep(5);
delete from t1 where x1=0; delete from t1 where x1=0;

View File

@ -1,4 +1,4 @@
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (x1 INT, fl INT); CREATE TABLE t1 (x1 INT, fl INT);
DELETE FROM t1 WHERE x1=0; DELETE FROM t1 WHERE x1=0;
SELECT fl FROM t1 WHERE x1=0; SELECT fl FROM t1 WHERE x1=0;

View File

@ -1,4 +1,4 @@
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (x1 int, fl int); CREATE TABLE t1 (x1 int, fl int);
delete from t1; delete from t1;
UPDATE t1 SET fl=1; UPDATE t1 SET fl=1;

View File

@ -1,4 +1,4 @@
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (x1 int, fl int); CREATE TABLE t1 (x1 int, fl int);
select sleep(5); select sleep(5);
delete from t1; delete from t1;

View File

@ -1,4 +1,4 @@
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (x1 int, fl int); CREATE TABLE t1 (x1 int, fl int);
select sleep(5); select sleep(5);
SELECT fl FROM t1; SELECT fl FROM t1;

View File

@ -7,7 +7,7 @@ if [ $maxscale_IP != "127.0.0.1" ] ; then
scp -i $maxscale_sshkey -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=quiet $maxscale_access_user@$maxscale_IP:logs/* . scp -i $maxscale_sshkey -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=quiet $maxscale_access_user@$maxscale_IP:logs/* .
scp -i $maxscale_sshkey -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=quiet $maxscale_access_user@$maxscale_IP:$maxscale_cnf . scp -i $maxscale_sshkey -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=quiet $maxscale_access_user@$maxscale_IP:$maxscale_cnf .
else else
mkdir -p logs; mkdir -p logs;
sudo cp $maxscale_log_dir/* logs/ sudo cp $maxscale_log_dir/* logs/
cp $maxscale_cnf logs/ cp $maxscale_cnf logs/
sudo chmod a+r logs/* sudo chmod a+r logs/*

View File

@ -1 +1 @@
ctest --print-labels | grep " " | sed "s/ //g" | tr '\n' ',' ctest --print-labels | grep " " | sed "s/ //g" | tr '\n' ','

View File

@ -1,4 +1,4 @@
#create user repl@'%' identified by 'repl'; #create user repl@'%' identified by 'repl';
grant replication slave on *.* to repl@'%' identified by 'repl'; grant replication slave on *.* to repl@'%' identified by 'repl';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;

View File

@ -1,6 +1,6 @@
create user skysql@'%' identified by 'skysql'; create user skysql@'%' identified by 'skysql';
create user skysql@'localhost' identified by 'skysql'; create user skysql@'localhost' identified by 'skysql';
GRANT ALL PRIVILEGES ON *.* TO skysql@'%' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO skysql@'%' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO skysql@'localhost' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO skysql@'localhost' WITH GRANT OPTION;
create user maxuser@'%' identified by 'maxpwd'; create user maxuser@'%' identified by 'maxpwd';

View File

@ -22,7 +22,7 @@ pid-file = /var/run/mysqld/mysqld1.pid
socket = /var/run/mysqld/mysqld1.sock socket = /var/run/mysqld/mysqld1.sock
port = 3301 port = 3301
datadir = /data/mysql/mysql1 datadir = /data/mysql/mysql1
[mysqld2] [mysqld2]
log-bin=mar-bin log-bin=mar-bin
binlog-format=row binlog-format=row
@ -48,7 +48,7 @@ pid-file = /var/run/mysqld/mysqld3.pid
socket = /var/run/mysqld/mysqld3.sock socket = /var/run/mysqld/mysqld3.sock
port = 3303 port = 3303
datadir = /data/mysql/mysql3 datadir = /data/mysql/mysql3
[mysqld4] [mysqld4]
log-bin=mar-bin log-bin=mar-bin
binlog-format=row binlog-format=row

View File

@ -16,7 +16,7 @@ sleep 20
for i in `seq 1 $servers`; for i in `seq 1 $servers`;
do do
sudo mysql_install_db --defaults-file=$dir/multiple_servers.cnf --user=mysql --datadir=/data/mysql/mysql$i sudo mysql_install_db --defaults-file=$dir/multiple_servers.cnf --user=mysql --datadir=/data/mysql/mysql$i
done done
sudo mysqld_multi --defaults-file=$dir/multiple_servers.cnf start & sudo mysqld_multi --defaults-file=$dir/multiple_servers.cnf start &

View File

@ -11,15 +11,15 @@ IP=$Maxscale_IP
mysql -h $IP -P 4006 -u $node_user -p$node_password $ssl_options < $test_dir/long_insert_sql/test_init.sql mysql -h $IP -P 4006 -u $node_user -p$node_password $ssl_options < $test_dir/long_insert_sql/test_init.sql
echo "RWSplit router:" echo "RWSplit router:"
for ((i=0 ; i<1000 ; i++)) ; do for ((i=0 ; i<1000 ; i++)) ; do
echo "iteration: $i" echo "iteration: $i"
mysql -h $IP -P 4006 -u $node_user -p$node_password $ssl_options < $test_dir/long_insert_sql/test_query.sql mysql -h $IP -P 4006 -u $node_user -p$node_password $ssl_options < $test_dir/long_insert_sql/test_query.sql
done done
echo "ReadConn router (master):" echo "ReadConn router (master):"
for ((i=0 ; i<1000 ; i++)) ; do for ((i=0 ; i<1000 ; i++)) ; do
echo "iteration: $i" echo "iteration: $i"
mysql -h $IP -P 4008 -u $node_user -p$node_uassword $ssl_options < $test_dir/long_insert_sql/test_query.sql mysql -h $IP -P 4008 -u $node_user -p$node_uassword $ssl_options < $test_dir/long_insert_sql/test_query.sql
done done

View File

@ -42,7 +42,7 @@ macro(check_dirs)
set(DEPS_OK TRUE CACHE BOOL "If all the dependencies were found.") set(DEPS_OK TRUE CACHE BOOL "If all the dependencies were found.")
# Find the MySQL headers if they were not defined # Find the MySQL headers if they were not defined
if(DEFINED MYSQL_DIR) if(DEFINED MYSQL_DIR)
if(DEBUG_OUTPUT) if(DEBUG_OUTPUT)
message(STATUS "Searching for MySQL headers at: ${MYSQL_DIR}") message(STATUS "Searching for MySQL headers at: ${MYSQL_DIR}")
@ -51,11 +51,11 @@ macro(check_dirs)
else() else()
find_path(MYSQL_DIR_LOC mysql.h PATH_SUFFIXES mysql mariadb) find_path(MYSQL_DIR_LOC mysql.h PATH_SUFFIXES mysql mariadb)
endif() endif()
if(DEBUG_OUTPUT) if(DEBUG_OUTPUT)
message(STATUS "Search returned: ${MYSQL_DIR_LOC}") message(STATUS "Search returned: ${MYSQL_DIR_LOC}")
endif() endif()
if(${MYSQL_DIR_LOC} MATCHES "NOTFOUND") if(${MYSQL_DIR_LOC} MATCHES "NOTFOUND")
set(DEPS_OK FALSE CACHE BOOL "If all the dependencies were found.") set(DEPS_OK FALSE CACHE BOOL "If all the dependencies were found.")
message(FATAL_ERROR "Fatal Error: MySQL headers were not found.") message(FATAL_ERROR "Fatal Error: MySQL headers were not found.")

View File

@ -16,7 +16,7 @@ public class BatchInsert {
try { try {
Connection connection = maxscale.getConnRw(); Connection connection = maxscale.getConnRw();
Statement stmt = connection.createStatement(); Statement stmt = connection.createStatement();
stmt.execute("DROP TABLE IF EXISTS tt"); stmt.execute("DROP TABLE IF EXISTS tt");
stmt.execute("CREATE TABLE tt (d int)"); stmt.execute("CREATE TABLE tt (d int)");

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
$test_dir/non_native_setup $test_name $test_dir/non_native_setup $test_name
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo "configuring maxscale failed" echo "configuring maxscale failed"
exit 1 exit 1
fi fi

View File

@ -19,6 +19,6 @@ int main(int argc, char** argv)
test.add_result(strstr(mysql_error(mysql), "using password: YES") == NULL, "Missing (using password: YES) error message, got this instead: %s", mysql_error(mysql)); test.add_result(strstr(mysql_error(mysql), "using password: YES") == NULL, "Missing (using password: YES) error message, got this instead: %s", mysql_error(mysql));
test.tprintf("MySQL error: %s", mysql_error(mysql)); test.tprintf("MySQL error: %s", mysql_error(mysql));
mysql_close(mysql); mysql_close(mysql);
return test.global_result; return test.global_result;
} }

View File

@ -15,7 +15,7 @@ fi
$test_dir/non_native_setup $test_name $test_dir/non_native_setup $test_name
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo "configuring maxscale failed" echo "configuring maxscale failed"
exit 1 exit 1
fi fi

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
for ((i=0 ; i<100 ; i++)) ; for ((i=0 ; i<100 ; i++)) ;
do do
mysql --host=$maxscale_IP -P 4006 -u $node_user -p$node_password --verbose --force --unbuffered=true --disable-reconnect $ssl_options > /dev/null < $test_dir/session_hang/setmix.sql >& /dev/null mysql --host=$maxscale_IP -P 4006 -u $node_user -p$node_password --verbose --force --unbuffered=true --disable-reconnect $ssl_options > /dev/null < $test_dir/session_hang/setmix.sql >& /dev/null
done done

View File

@ -4,14 +4,14 @@ $maxscale_access_sudo service maxscale stop
hm=`pwd` hm=`pwd`
$hm/start_killer.sh & $hm/start_killer.sh &
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
exit 1 exit 1
fi fi
T="$(date +%s)" T="$(date +%s)"
$maxscale_access_sudo maxscale -d $maxscale_access_sudo maxscale -d
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
exit 1 exit 1
fi fi