diff --git a/BUILD/build_deb_local.sh b/BUILD/build_deb_local.sh index e176153b9..2a3cc8352 100755 --- a/BUILD/build_deb_local.sh +++ b/BUILD/build_deb_local.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash # do the real building work # this script is executed on build VM @@ -10,7 +10,7 @@ cd ./MaxScale mkdir _build cd _build -cmake .. $cmake_flags +cmake .. $cmake_flags export LD_LIBRARY_PATH=$PWD/log_manager:$PWD/query_classifier make @@ -26,7 +26,7 @@ sudo rm ../CMakeCache.txt sudo rm CMakeCache.txt echo "Building tarball..." -cmake .. $cmake_flags -DTARBALL=Y +cmake .. $cmake_flags -DTARBALL=Y sudo make package @@ -69,7 +69,7 @@ if [ "$build_experimental" == "yes" ] ; then fi if [ "$BUILD_RABBITMQ" == "yes" ] ; then - cmake ../rabbitmq_consumer/ $cmake_flags + cmake ../rabbitmq_consumer/ $cmake_flags sudo make package res=$? if [ $res != 0 ] ; then diff --git a/BUILD/build_rpm_local.sh b/BUILD/build_rpm_local.sh index 9f6a29428..ae78b6698 100755 --- a/BUILD/build_rpm_local.sh +++ b/BUILD/build_rpm_local.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash # do the real building work # this script is executed on build VM @@ -9,14 +9,14 @@ cd ./MaxScale mkdir _build cd _build -cmake .. $cmake_flags +cmake .. $cmake_flags make if [ $remove_strip == "yes" ] ; then sudo rm -rf /usr/bin/strip sudo touch /usr/bin/strip sudo chmod a+x /usr/bin/strip -fi +fi sudo make package res=$? if [ $res != 0 ] ; then @@ -56,7 +56,7 @@ if [ "$build_experimental" == "yes" ] ; then fi if [ "$BUILD_RABBITMQ" == "yes" ] ; then - cmake ../rabbitmq_consumer/ $cmake_flags + cmake ../rabbitmq_consumer/ $cmake_flags sudo make package res=$? if [ $res != 0 ] ; then diff --git a/maxscale-system-test/ENV_SETUP.md b/maxscale-system-test/ENV_SETUP.md index 700d648e3..4a03242e9 100644 --- a/maxscale-system-test/ENV_SETUP.md +++ b/maxscale-system-test/ENV_SETUP.md @@ -3,10 +3,10 @@ ### Full build and test environment setup
-# install ruby +# 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 # install vagrant @@ -35,7 +35,7 @@ sudo apt-get install cmake gcc g++ libssl-dev sudo apt-get install mariadb-client shellcheck # 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' # but it can not be used to build maxscale-system-test; please use mariadb.org repositories # https://downloads.mariadb.org/mariadb/repositories/ @@ -67,7 +67,7 @@ make cd .. 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) cd /var/lib/ sudo mv docker /home/vagrant/ @@ -127,14 +127,14 @@ for AWS machines: }-Following boxes are availabe: +Following boxes are availabe: * 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 #### Maxscale and backend machines creation * 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
export ci_url="http://my_repository_site.com/repostory/" ~/mdbci-repository-config/generate_all.sh $repo_dir @@ -153,7 +153,7 @@ export ci_url="http://max-tst-01.mariadb.com/ci-repository/"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). MariaDB machine description example: diff --git a/maxscale-system-test/HOW_TO_WRITE_TEST.md b/maxscale-system-test/HOW_TO_WRITE_TEST.md index 74c9d7dc0..3d82c1c03 100644 --- a/maxscale-system-test/HOW_TO_WRITE_TEST.md +++ b/maxscale-system-test/HOW_TO_WRITE_TEST.md @@ -7,7 +7,7 @@ For detailed function and properties description and thier full list please see For every test case following should be created: - test executable -- record in the 'templates' file +- record in the 'templates' file - Maxscale configuration template (if test requires special Maxscale configuration) - [CMakeLists.txt](CMakeLists.txt) record: - add_test_executable(
ssh -i vagrant.pem vagrant@max-tst-01.mariadb.com cd ~/mdbci/build-<box>-<date><time> -vagrant ssh +vagrant sshFor example:
ssh -i vagrant.pem vagrant@max-tst-01.mariadb.com cd ~/mdbci/build_centos6-20160119-0935 -vagrant ssh +vagrant ssh### 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. -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. -All build tools are installed. GIT can be used to go trough source code. +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. +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. 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 [http://max-tst-01.mariadb.com/ci-repository/](http://max-tst-01.mariadb.com/ci-repository/) 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) 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. ### 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. -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 - +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 - '/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. diff --git a/maxscale-system-test/TEST_RUSULTS.md b/maxscale-system-test/TEST_RUSULTS.md index 56f5fac16..b8750f54c 100644 --- a/maxscale-system-test/TEST_RUSULTS.md +++ b/maxscale-system-test/TEST_RUSULTS.md @@ -15,10 +15,10 @@ For access to VMs see [environment documentation](ENV_SETUP.md#access-vms) Jenkins job log consists of following parts: * 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 * 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:
diff --git a/maxscale-system-test/bug561.sh b/maxscale-system-test/bug561.sh index 981401005..9ceb8c16a 100755 --- a/maxscale-system-test/bug561.sh +++ b/maxscale-system-test/bug561.sh @@ -3,7 +3,7 @@ ### ## @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 -## - compare error messages +## - compare error messages ## - repeat for RWSplit, ReadConn @@ -13,7 +13,7 @@ export test_name=`basename $rp` $test_dir/non_native_setup $test_name -if [ $? -ne 0 ] ; then +if [ $? -ne 0 ] ; then echo "configuring maxscale failed" exit 1 fi diff --git a/maxscale-system-test/bug562.sh b/maxscale-system-test/bug562.sh index 336547717..a19907a6f 100755 --- a/maxscale-system-test/bug562.sh +++ b/maxscale-system-test/bug562.sh @@ -3,7 +3,7 @@ ### ## @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 -## - compare error messages +## - compare error messages rp=`realpath $0` export test_dir=`dirname $rp` @@ -11,7 +11,7 @@ export test_name=`basename $rp` $test_dir/non_native_setup $test_name -if [ $? -ne 0 ] ; then +if [ $? -ne 0 ] ; then echo "configuring maxscale failed" exit 1 fi diff --git a/maxscale-system-test/bug564.sh b/maxscale-system-test/bug564.sh index 53dc50e08..1113d74dc 100755 --- a/maxscale-system-test/bug564.sh +++ b/maxscale-system-test/bug564.sh @@ -3,14 +3,14 @@ ### ## @file bug564.sh Regression case for the bug "Wrong charset 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` export test_dir=`dirname $rp` export test_name=`basename $rp` $test_dir/non_native_setup $test_name -if [ $? -ne 0 ] ; then +if [ $? -ne 0 ] ; then echo "configuring maxscale failed" exit 1 fi @@ -31,9 +31,9 @@ do res3=$? - if [[ $res1 != 0 ]] || [[ $res2 != 0 ]] || [[ $res3 != 0 ]] ; then + if [[ $res1 != 0 ]] || [[ $res2 != 0 ]] || [[ $res3 != 0 ]] ; then 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 exit 1 fi diff --git a/maxscale-system-test/bug567.sh b/maxscale-system-test/bug567.sh index 3799e4317..06de54fd7 100755 --- a/maxscale-system-test/bug567.sh +++ b/maxscale-system-test/bug567.sh @@ -10,7 +10,7 @@ export test_dir=`dirname $rp` export test_name=`basename $rp` $test_dir/non_native_setup $test_name -if [ $? -ne 0 ] ; then +if [ $? -ne 0 ] ; then echo "configuring maxscale failed" exit 1 fi diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.bad_ssl b/maxscale-system-test/cnf/maxscale.cnf.template.bad_ssl index 8f1d24c19..4d4c0a525 100755 --- a/maxscale-system-test/cnf/maxscale.cnf.template.bad_ssl +++ b/maxscale-system-test/cnf/maxscale.cnf.template.bad_ssl @@ -16,7 +16,7 @@ router= readwritesplit servers=server1,server2,server3,server4 user=maxskysql passwd=skysql -max_slave_connections=100% +max_slave_connections=100% router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS ssl=required ssl_cert=/###access_homedir###/certs/server-cert.pem diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.bug643_1 b/maxscale-system-test/cnf/maxscale.cnf.template.bug643_1 index 04952b30e..5651c65cf 100755 --- a/maxscale-system-test/cnf/maxscale.cnf.template.bug643_1 +++ b/maxscale-system-test/cnf/maxscale.cnf.template.bug643_1 @@ -36,8 +36,8 @@ module=qlafilter filebase=/tmp/QueryLog [duplicate] -type=filter -module=tee +type=filter +module=tee service=RW Split2 [testfilter] diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.bug670 b/maxscale-system-test/cnf/maxscale.cnf.template.bug670 index 08bd193dd..7576b054e 100755 --- a/maxscale-system-test/cnf/maxscale.cnf.template.bug670 +++ b/maxscale-system-test/cnf/maxscale.cnf.template.bug670 @@ -32,8 +32,8 @@ module=qlafilter filebase=/tmp/QueryLog [duplicate] -type=filter -module=tee +type=filter +module=tee service=RW Split2 [RW Split Router] diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.load b/maxscale-system-test/cnf/maxscale.cnf.template.load index ed8851054..aa6eb2ec9 100755 --- a/maxscale-system-test/cnf/maxscale.cnf.template.load +++ b/maxscale-system-test/cnf/maxscale.cnf.template.load @@ -16,7 +16,7 @@ router= readwritesplit servers=server1,server2,server3,server4 user=maxskysql passwd=skysql -max_slave_connections=100% +max_slave_connections=100% router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS [Read Connection Router Slave] diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.load_galera b/maxscale-system-test/cnf/maxscale.cnf.template.load_galera index c9bf14fda..c68d8cdea 100755 --- a/maxscale-system-test/cnf/maxscale.cnf.template.load_galera +++ b/maxscale-system-test/cnf/maxscale.cnf.template.load_galera @@ -16,7 +16,7 @@ router= readwritesplit servers=server1,server2,server3,server4 user=maxskysql passwd=skysql -max_slave_connections=100% +max_slave_connections=100% router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS [Read Connection Router Slave] diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.load_galera_pers1 b/maxscale-system-test/cnf/maxscale.cnf.template.load_galera_pers1 index 5d51a9781..0087b964a 100755 --- a/maxscale-system-test/cnf/maxscale.cnf.template.load_galera_pers1 +++ b/maxscale-system-test/cnf/maxscale.cnf.template.load_galera_pers1 @@ -16,7 +16,7 @@ router= readwritesplit servers=server1,server2,server3,server4 user=maxskysql passwd=skysql -max_slave_connections=100% +max_slave_connections=100% router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS [Read Connection Router Slave] diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.load_galera_pers10 b/maxscale-system-test/cnf/maxscale.cnf.template.load_galera_pers10 index ee3cd6bc8..553ed8cb6 100755 --- a/maxscale-system-test/cnf/maxscale.cnf.template.load_galera_pers10 +++ b/maxscale-system-test/cnf/maxscale.cnf.template.load_galera_pers10 @@ -16,7 +16,7 @@ router= readwritesplit servers=server1,server2,server3,server4 user=maxskysql passwd=skysql -max_slave_connections=100% +max_slave_connections=100% router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS [Read Connection Router Slave] diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.load_pers1 b/maxscale-system-test/cnf/maxscale.cnf.template.load_pers1 index df99fcaae..6bb7af479 100755 --- a/maxscale-system-test/cnf/maxscale.cnf.template.load_pers1 +++ b/maxscale-system-test/cnf/maxscale.cnf.template.load_pers1 @@ -16,7 +16,7 @@ router= readwritesplit servers=server1,server2,server3,server4 user=maxskysql passwd=skysql -max_slave_connections=100% +max_slave_connections=100% router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS [Read Connection Router Slave] diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.load_pers10 b/maxscale-system-test/cnf/maxscale.cnf.template.load_pers10 index 204ef156a..8c0949bce 100755 --- a/maxscale-system-test/cnf/maxscale.cnf.template.load_pers10 +++ b/maxscale-system-test/cnf/maxscale.cnf.template.load_pers10 @@ -16,7 +16,7 @@ router= readwritesplit servers=server1,server2,server3,server4 user=maxskysql passwd=skysql -max_slave_connections=100% +max_slave_connections=100% router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS [Read Connection Router Slave] diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.mxs361 b/maxscale-system-test/cnf/maxscale.cnf.template.mxs361 index f1f4a3a90..8f85d4b8a 100755 --- a/maxscale-system-test/cnf/maxscale.cnf.template.mxs361 +++ b/maxscale-system-test/cnf/maxscale.cnf.template.mxs361 @@ -9,7 +9,7 @@ module=mysqlmon servers= server1, server2,server3 ,server4 user=maxskysql passwd= skysql -monitor_interval=100 +monitor_interval=100 [RW Split Router] type=service diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.pers_01 b/maxscale-system-test/cnf/maxscale.cnf.template.pers_01 index 7519176c9..df4e68712 100755 --- a/maxscale-system-test/cnf/maxscale.cnf.template.pers_01 +++ b/maxscale-system-test/cnf/maxscale.cnf.template.pers_01 @@ -9,7 +9,7 @@ module=mysqlmon servers= server1, server2,server3 ,server4 user=maxskysql passwd= skysql -monitor_interval=100 +monitor_interval=100 [RW Split Router] type=service diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.ssl_load b/maxscale-system-test/cnf/maxscale.cnf.template.ssl_load index 65021601c..9f6faa5f5 100755 --- a/maxscale-system-test/cnf/maxscale.cnf.template.ssl_load +++ b/maxscale-system-test/cnf/maxscale.cnf.template.ssl_load @@ -16,7 +16,7 @@ router= readwritesplit servers=server1,server2,server3,server4 user=maxskysql passwd=skysql -max_slave_connections=100% +max_slave_connections=100% router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS [Read Connection Router Slave] diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.ssl_load_galera b/maxscale-system-test/cnf/maxscale.cnf.template.ssl_load_galera index 194eef2e8..477816318 100755 --- a/maxscale-system-test/cnf/maxscale.cnf.template.ssl_load_galera +++ b/maxscale-system-test/cnf/maxscale.cnf.template.ssl_load_galera @@ -16,7 +16,7 @@ router= readwritesplit servers=server1,server2,server3,server4 user=maxskysql passwd=skysql -max_slave_connections=100% +max_slave_connections=100% router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS [Read Connection Router Slave] diff --git a/maxscale-system-test/create_user_ssl.sh b/maxscale-system-test/create_user_ssl.sh index 5617a0735..539809a88 100755 --- a/maxscale-system-test/create_user_ssl.sh +++ b/maxscale-system-test/create_user_ssl.sh @@ -1,7 +1,7 @@ #!/bin/bash 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 'maxskysql'@'%' identified by 'skysql' require ssl WITH GRANT OPTION" | sudo mysql $1 diff --git a/maxscale-system-test/fw/pass1 b/maxscale-system-test/fw/pass1 index 9d6c23e48..244cad7fd 100644 --- a/maxscale-system-test/fw/pass1 +++ b/maxscale-system-test/fw/pass1 @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t1; CREATE TABLE t1 (x1 int, fl int); select sleep(5); delete from t1 where x1 like '_'; diff --git a/maxscale-system-test/fw/pass11 b/maxscale-system-test/fw/pass11 index 4b0b05d42..50d4cb06f 100644 --- a/maxscale-system-test/fw/pass11 +++ b/maxscale-system-test/fw/pass11 @@ -1,3 +1,3 @@ -DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t1; CREATE TABLE t1 (x1 int, fl int); SELECT fl FROM t1; diff --git a/maxscale-system-test/fw/pass3 b/maxscale-system-test/fw/pass3 index 5c08ac68c..a090fe4f0 100644 --- a/maxscale-system-test/fw/pass3 +++ b/maxscale-system-test/fw/pass3 @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t1; CREATE TABLE t1 (x1 int, fl int); select sleep(5); SELECT fl FROM t1; diff --git a/maxscale-system-test/fw/pass4 b/maxscale-system-test/fw/pass4 index 8a2562b84..a0389cd31 100644 --- a/maxscale-system-test/fw/pass4 +++ b/maxscale-system-test/fw/pass4 @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t1; CREATE TABLE t1 (x1 int, fl int); select sleep(5); delete from t1 where x1=0; diff --git a/maxscale-system-test/fw/pass5 b/maxscale-system-test/fw/pass5 index c3c9032f5..ac3f1e6af 100644 --- a/maxscale-system-test/fw/pass5 +++ b/maxscale-system-test/fw/pass5 @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t1; CREATE TABLE t1 (x1 INT, fl INT); DELETE FROM t1 WHERE x1=0; SELECT fl FROM t1 WHERE x1=0; diff --git a/maxscale-system-test/fw/pass6 b/maxscale-system-test/fw/pass6 index 8bf19d04b..d70392d53 100644 --- a/maxscale-system-test/fw/pass6 +++ b/maxscale-system-test/fw/pass6 @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t1; CREATE TABLE t1 (x1 int, fl int); delete from t1; UPDATE t1 SET fl=1; diff --git a/maxscale-system-test/fw/pass7 b/maxscale-system-test/fw/pass7 index d0b03895d..61932ee28 100644 --- a/maxscale-system-test/fw/pass7 +++ b/maxscale-system-test/fw/pass7 @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t1; CREATE TABLE t1 (x1 int, fl int); select sleep(5); delete from t1; diff --git a/maxscale-system-test/fw/pass9 b/maxscale-system-test/fw/pass9 index f513744b4..cc18ab41e 100644 --- a/maxscale-system-test/fw/pass9 +++ b/maxscale-system-test/fw/pass9 @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t1; CREATE TABLE t1 (x1 int, fl int); select sleep(5); SELECT fl FROM t1; diff --git a/maxscale-system-test/get_logs.sh b/maxscale-system-test/get_logs.sh index 4d174b112..b97a52999 100755 --- a/maxscale-system-test/get_logs.sh +++ b/maxscale-system-test/get_logs.sh @@ -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:$maxscale_cnf . else - mkdir -p logs; + mkdir -p logs; sudo cp $maxscale_log_dir/* logs/ cp $maxscale_cnf logs/ sudo chmod a+r logs/* diff --git a/maxscale-system-test/labels_list.sh b/maxscale-system-test/labels_list.sh index 08c8cb777..97628c6ef 100755 --- a/maxscale-system-test/labels_list.sh +++ b/maxscale-system-test/labels_list.sh @@ -1 +1 @@ -ctest --print-labels | grep " " | sed "s/ //g" | tr '\n' ',' +ctest --print-labels | grep " " | sed "s/ //g" | tr '\n' ',' diff --git a/maxscale-system-test/local_tests/create_repl_user.sql b/maxscale-system-test/local_tests/create_repl_user.sql index 98431e94e..91e4a71a1 100644 --- a/maxscale-system-test/local_tests/create_repl_user.sql +++ b/maxscale-system-test/local_tests/create_repl_user.sql @@ -1,4 +1,4 @@ -#create user repl@'%' identified by 'repl'; -grant replication slave on *.* to repl@'%' identified by 'repl'; +#create user repl@'%' identified by 'repl'; +grant replication slave on *.* to repl@'%' identified by 'repl'; FLUSH PRIVILEGES; diff --git a/maxscale-system-test/local_tests/create_skysql_user.sql b/maxscale-system-test/local_tests/create_skysql_user.sql index 668190d4f..32cac7019 100644 --- a/maxscale-system-test/local_tests/create_skysql_user.sql +++ b/maxscale-system-test/local_tests/create_skysql_user.sql @@ -1,6 +1,6 @@ create user skysql@'%' 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; create user maxuser@'%' identified by 'maxpwd'; diff --git a/maxscale-system-test/local_tests/multiple_servers.cnf b/maxscale-system-test/local_tests/multiple_servers.cnf index b49106b8e..87bf29365 100644 --- a/maxscale-system-test/local_tests/multiple_servers.cnf +++ b/maxscale-system-test/local_tests/multiple_servers.cnf @@ -22,7 +22,7 @@ pid-file = /var/run/mysqld/mysqld1.pid socket = /var/run/mysqld/mysqld1.sock port = 3301 datadir = /data/mysql/mysql1 - + [mysqld2] log-bin=mar-bin binlog-format=row @@ -48,7 +48,7 @@ pid-file = /var/run/mysqld/mysqld3.pid socket = /var/run/mysqld/mysqld3.sock port = 3303 datadir = /data/mysql/mysql3 - + [mysqld4] log-bin=mar-bin binlog-format=row diff --git a/maxscale-system-test/local_tests/start_multiple_mariadb.sh b/maxscale-system-test/local_tests/start_multiple_mariadb.sh index 926514509..52e59d1b6 100755 --- a/maxscale-system-test/local_tests/start_multiple_mariadb.sh +++ b/maxscale-system-test/local_tests/start_multiple_mariadb.sh @@ -16,7 +16,7 @@ sleep 20 for i in `seq 1 $servers`; 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 sudo mysqld_multi --defaults-file=$dir/multiple_servers.cnf start & diff --git a/maxscale-system-test/long_insert.sh b/maxscale-system-test/long_insert.sh index 4b67df2e9..17e146d78 100755 --- a/maxscale-system-test/long_insert.sh +++ b/maxscale-system-test/long_insert.sh @@ -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 echo "RWSplit router:" -for ((i=0 ; i<1000 ; i++)) ; do +for ((i=0 ; i<1000 ; i++)) ; do 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 echo "ReadConn router (master):" -for ((i=0 ; i<1000 ; i++)) ; do +for ((i=0 ; i<1000 ; i++)) ; do 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 diff --git a/maxscale-system-test/macros.cmake b/maxscale-system-test/macros.cmake index 9aaa77673..c304a2b53 100644 --- a/maxscale-system-test/macros.cmake +++ b/maxscale-system-test/macros.cmake @@ -42,7 +42,7 @@ macro(check_dirs) set(DEPS_OK TRUE CACHE BOOL "If all the dependencies were found.") # Find the MySQL headers if they were not defined - + if(DEFINED MYSQL_DIR) if(DEBUG_OUTPUT) message(STATUS "Searching for MySQL headers at: ${MYSQL_DIR}") @@ -51,11 +51,11 @@ macro(check_dirs) else() find_path(MYSQL_DIR_LOC mysql.h PATH_SUFFIXES mysql mariadb) endif() - + if(DEBUG_OUTPUT) message(STATUS "Search returned: ${MYSQL_DIR_LOC}") endif() - + if(${MYSQL_DIR_LOC} MATCHES "NOTFOUND") set(DEPS_OK FALSE CACHE BOOL "If all the dependencies were found.") message(FATAL_ERROR "Fatal Error: MySQL headers were not found.") diff --git a/maxscale-system-test/maxscale/java/batch/BatchInsert.java b/maxscale-system-test/maxscale/java/batch/BatchInsert.java index 68b47fdd9..567b9221a 100644 --- a/maxscale-system-test/maxscale/java/batch/BatchInsert.java +++ b/maxscale-system-test/maxscale/java/batch/BatchInsert.java @@ -16,7 +16,7 @@ public class BatchInsert { try { Connection connection = maxscale.getConnRw(); Statement stmt = connection.createStatement(); - + stmt.execute("DROP TABLE IF EXISTS tt"); stmt.execute("CREATE TABLE tt (d int)"); diff --git a/maxscale-system-test/maxscale/java/mariadb-java-client-1.5.4.jar b/maxscale-system-test/maxscale/java/mariadb-java-client-1.5.4.jar index 07bfa4687..5f138e467 100644 Binary files a/maxscale-system-test/maxscale/java/mariadb-java-client-1.5.4.jar and b/maxscale-system-test/maxscale/java/mariadb-java-client-1.5.4.jar differ diff --git a/maxscale-system-test/mxs791_base.sh b/maxscale-system-test/mxs791_base.sh index fbc992515..f22643e33 100755 --- a/maxscale-system-test/mxs791_base.sh +++ b/maxscale-system-test/mxs791_base.sh @@ -1,7 +1,7 @@ #!/bin/bash $test_dir/non_native_setup $test_name -if [ $? -ne 0 ] ; then +if [ $? -ne 0 ] ; then echo "configuring maxscale failed" exit 1 fi diff --git a/maxscale-system-test/no_password.cpp b/maxscale-system-test/no_password.cpp index 36085c4d3..8eeac22d9 100644 --- a/maxscale-system-test/no_password.cpp +++ b/maxscale-system-test/no_password.cpp @@ -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.tprintf("MySQL error: %s", mysql_error(mysql)); mysql_close(mysql); - + return test.global_result; } diff --git a/maxscale-system-test/run_ctrl_c.sh b/maxscale-system-test/run_ctrl_c.sh index 018878b18..d636eed1e 100755 --- a/maxscale-system-test/run_ctrl_c.sh +++ b/maxscale-system-test/run_ctrl_c.sh @@ -15,7 +15,7 @@ fi $test_dir/non_native_setup $test_name -if [ $? -ne 0 ] ; then +if [ $? -ne 0 ] ; then echo "configuring maxscale failed" exit 1 fi diff --git a/maxscale-system-test/session_hang/run_setmix.sh b/maxscale-system-test/session_hang/run_setmix.sh index 07970853a..2510d2637 100755 --- a/maxscale-system-test/session_hang/run_setmix.sh +++ b/maxscale-system-test/session_hang/run_setmix.sh @@ -1,5 +1,5 @@ #!/bin/bash -for ((i=0 ; i<100 ; i++)) ; +for ((i=0 ; i<100 ; i++)) ; 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 done diff --git a/maxscale-system-test/test_ctrl_c/test_ctrl_c.sh b/maxscale-system-test/test_ctrl_c/test_ctrl_c.sh index 0b43551c7..85e0952d6 100755 --- a/maxscale-system-test/test_ctrl_c/test_ctrl_c.sh +++ b/maxscale-system-test/test_ctrl_c/test_ctrl_c.sh @@ -4,14 +4,14 @@ $maxscale_access_sudo service maxscale stop hm=`pwd` $hm/start_killer.sh & -if [ $? -ne 0 ] ; then +if [ $? -ne 0 ] ; then exit 1 fi T="$(date +%s)" $maxscale_access_sudo maxscale -d -if [ $? -ne 0 ] ; then +if [ $? -ne 0 ] ; then exit 1 fi