Merge branch 'develop' of https://github.com/skysql/MaxScale into develop
This commit is contained in:
@ -82,4 +82,20 @@ install: $(MODULES)
|
||||
install -D $(MODULES) $(DEST)/MaxScale/modules
|
||||
(cd readwritesplit; make DEST=$(DEST) install)
|
||||
|
||||
cleantests:
|
||||
$(MAKE) -C readwritesplit/test cleantests
|
||||
$(MAKE) -C test cleantests
|
||||
|
||||
buildtests:
|
||||
$(MAKE) -C readwritesplit/test DEBUG=Y buildtests
|
||||
$(MAKE) -C test DEBUG=Y buildtests
|
||||
|
||||
runtests:
|
||||
$(MAKE) -C test runtests
|
||||
$(MAKE) -C readwritesplit runtests
|
||||
|
||||
testall:
|
||||
$(MAKE) -C test testall
|
||||
$(MAKE) -C readwritesplit testall
|
||||
|
||||
include depend.mk
|
||||
|
@ -20,9 +20,9 @@
|
||||
|
||||
include ../../../../build_gateway.inc
|
||||
|
||||
LOGPATH := $(ROOT_PATH)/log_manager
|
||||
UTILSPATH := $(ROOT_PATH)/utils
|
||||
QCLASSPATH := $(ROOT_PATH)/query_classifier
|
||||
LOGPATH := $(ROOT_PATH)/log_manager
|
||||
UTILSPATH := $(ROOT_PATH)/utils
|
||||
QCLASSPATH := $(ROOT_PATH)/query_classifier
|
||||
|
||||
CC=cc
|
||||
CFLAGS=-c -fPIC -I/usr/include -I../../include -I../../../include \
|
||||
@ -61,5 +61,18 @@ depend:
|
||||
|
||||
install: $(MODULES)
|
||||
install -D $(MODULES) $(DEST)/MaxScale/modules
|
||||
|
||||
cleantests:
|
||||
$(MAKE) -C test cleantest
|
||||
|
||||
testall:
|
||||
$(MAKE) -C test testall
|
||||
|
||||
buildtests:
|
||||
$(MAKE) -C test buildtests
|
||||
|
||||
runtests:
|
||||
$(MAKE) -C runtests
|
||||
|
||||
|
||||
include depend.mk
|
||||
|
@ -28,14 +28,9 @@ runtests:
|
||||
@echo "" >> $(TESTLOG)
|
||||
@echo "-------------------------------" >> $(TESTLOG)
|
||||
@echo $(shell date) >> $(TESTLOG)
|
||||
@echo "Test MaxScale R/W Split" >> $(TESTLOG)
|
||||
@echo "Test Read/Write split router" >> $(TESTLOG)
|
||||
@echo "-------------------------------" >> $(TESTLOG)
|
||||
./rwsplit.sh $(TESTLOG) $(THOST) $(TPORT_RW) $(TMASTER_ID) $(TUSER) $(TPWD)
|
||||
@echo "" >> $(TESTLOG)
|
||||
|
||||
|
||||
pesce:
|
||||
@echo "fine"
|
||||
|
||||
|
||||
|
@ -39,6 +39,16 @@ else
|
||||
echo "$TINPUT PASSED">>$TLOG ;
|
||||
fi
|
||||
|
||||
# test implicit transaction, that is, not started explicitly, autocommit=0
|
||||
TINPUT=test_transaction_routing4.sql
|
||||
TRETVAL=0
|
||||
a=`$RUNCMD < ./$TINPUT`
|
||||
if [ "$a" != "$TRETVAL" ]; then
|
||||
echo "$TINPUT FAILED, return value $a when $TRETVAL was expected">>$TLOG;
|
||||
else
|
||||
echo "$TINPUT PASSED">>$TLOG ;
|
||||
fi
|
||||
|
||||
# set a var via SELECT INTO @, get data from master, returning server-id: put master server-id value in TRETVAL
|
||||
TINPUT=select_for_var_set.sql
|
||||
TRETVAL=$TMASTER_ID
|
||||
|
@ -0,0 +1,9 @@
|
||||
USE test;
|
||||
SET autocommit = 0;
|
||||
CREATE TABLE IF NOT EXISTS myCity (a int, b char(20));
|
||||
INSERT INTO myCity VALUES (1, 'Milan');
|
||||
INSERT INTO myCity VALUES (2, 'London');
|
||||
COMMIT;
|
||||
DELETE FROM myCity; -- implicit transaction started
|
||||
SELECT COUNT(*) FROM myCity; -- read transaction's modifications from master
|
||||
COMMIT;
|
Reference in New Issue
Block a user