150 Commits

Author SHA1 Message Date
Markus Makela
17f87e29af Fixes to some Coverity issues. 2014-11-05 11:57:42 +02:00
Markus Makela
e7feba6964 Fixed canonical query tests 2014-11-03 13:00:46 +02:00
VilhoRaatikka
ca816743e8 Returned #include <my_config.h> and updated server name. 2014-11-03 11:33:41 +02:00
VilhoRaatikka
b15ac9c019 Revert to 54d389e329a860add1f609508c676761521a8ad0 due to erroneous fix. 2014-11-03 08:57:02 +02:00
VilhoRaatikka
fb02e44e7e Fix to #605, http://bugs.mariadb.com/show_bug.cgi?id=605
Main assumed multi-byte characters in memory allocation but not outside of it so I removed that code and made it consistently assume single-byte characters.
Terminating character was added always to the last byte of string buffer regardless of the length of the string. Removed it and replaced malloc with calloc.
Moved variable introductions from the middle of the function to the beginning of it.
2014-11-02 22:33:12 +02:00
VilhoRaatikka
aaa727bcc2 Fix to bug #605, http://bugs.mariadb.com/show_bug.cgi?id=605
String buffer allocation didn't allocate space for terminating char. It also assumed that character size may vary but the rest of the code didn't support multi-byte characters so I changed it consistently assume single-byte characters.
2014-11-02 22:11:28 +02:00
Markus Makela
be08f22ae1 Changed old references to SkySQL to MariaDB Corporation and Gateway to MaxScale. 2014-10-10 16:38:54 +03:00
Markus Makela
ebb3b52fdb Included the my_config.h header before any system headers if mysql headers were used. 2014-10-10 12:30:21 +03:00
Markus Makela
9a6b884ff9 Merge branch 'query_classifier_test' into develop 2014-10-09 15:36:40 +03:00
Markus Makela
4bea21f464 Merge branch 'develop' into query_classifier_test 2014-10-09 15:34:10 +03:00
Markus Makela
3cd8e29c4c Changed the way some CMake functions are used to support older versions of CMake. 2014-10-07 14:09:22 +03:00
Markus Makela
3d7c23cf0b added more test cases 2014-10-06 14:03:13 +03:00
Markus Makela
b22ab90d66 Changed the way query classifier test is run.
Now the test is a single executable, which should make it easier to use with CMake.
2014-10-04 10:19:00 +03:00
Markus Makela
3b0e3d04dc Merge branch 'develop' into query_classifier_test
Conflicts:
	README
	macros.cmake
2014-10-03 11:38:47 +03:00
Markus Makela
f4e591e382 Changed 'SkySQL Gateway' to 'MariaDB Corporation MaxScale' 2014-09-30 13:15:03 +03:00
Markus Makela
25850c056f Added tests to cmake 2014-09-25 10:14:42 +03:00
Markus Makela
1cf3fa367c test executable now works 2014-09-24 12:25:53 +03:00
Markus Makela
b0514e9d9f Merge branch 'cmake_build' into query_classifier_test 2014-09-22 14:42:12 +03:00
Markus Makela
07d1265acf test implementation 2014-09-22 14:38:55 +03:00
Markus Makela
fc848665e5 Added variables for RabbitMQ headers and libraries, added more error checks.
modified:   CMakeLists.txt
	modified:   README
	modified:   macros.cmake
	modified:   query_classifier/test/canonical_tests/CMakeLists.txt
	modified:   rabbitmq_consumer/CMakeLists.txt
	modified:   server/modules/filter/CMakeLists.txt
2014-09-22 13:14:53 +03:00
Markus Makela
8b1afbfe26 fixed tests not working with the normal 'make testall' 2014-09-16 20:02:28 +03:00
Markus Makela
0f5cfdbd1a Added dependency checks, Debian packaging and fixes to various parts of the CMake build files. 2014-09-16 15:02:43 +03:00
Markus Makela
41226692ac Merge branch 'release-1.0beta-refresh' into cmake_build 2014-09-16 12:11:17 +03:00
Mark Riddoch
c8fc5b712b Merge branch 'hholzgra-hartmut-gitignore' into release-1.0beta-refresh 2014-09-15 13:22:46 +01:00
Markus Makela
0f07c9f08c Added hint tests
Fixed readwritesplit tests looking for test input in the wrong directory
Updated the canonical query test expected output
2014-09-15 09:27:47 +03:00
Markus Makela
32b72ce474 more configuration options, README update and tests 2014-09-12 16:48:21 +03:00
Markus Makela
d8c34aabad added log manager and query classifier tests 2014-09-12 06:06:11 +03:00
Markus Makela
aafc891c9a Fixed canonical query test and mqfilter.c bugs 2014-09-05 10:58:54 +03:00
Markus Makela
2c470d7bf4 Fixed canonizer.c passing NULL to various functions. 2014-09-04 18:19:15 +03:00
VilhoRaatikka
36bf676a83 Fixed canonical test's makefile.
Added option for compiling MaxScale with RabbitMQ filter
2014-09-04 16:43:52 +03:00
Markus Makela
dfe2806e37 server/core/makefile: added -lmysqld to LDFLAGS so that the tests compile
query_classifier/test/canonical_tests/Makefile: Added hint.o to link flags
2014-09-04 15:44:00 +03:00
VilhoRaatikka
cf5821d4ef Added expected results for missing queries. 2014-08-26 11:14:51 +03:00
VilhoRaatikka
69104d7dee skygw_utils.cc:replace_literal: Fixed regular expression which, for example, accepted "200" with needle "2"
query_classifier.cc: fixed invalid argument list in logging command.
input.sql: added a few previously failed cases for canonical query test
2014-08-26 11:08:05 +03:00
Markus Makela
4ab7112db7 more test cases for canonical queries and makefile typo fixes 2014-08-25 15:24:23 +03:00
Markus Makela
662b4b00ee the errmsg.sys file is now copied during test building 2014-08-22 20:50:54 +03:00
Markus Makela
73707cc9da canonical query tests for query classifier 2014-08-22 20:44:26 +03:00
Hartmut Holzgraefe
d355e07e2d gitignore cleanup
* ignore typical backup files created by common editors
* move general ignore rules like "*.o" or "depend.mk" to top level gitignore
* ignore executables and test directories in target dir gitignore
  as these are local and there's no general catch-all pattern for them
2014-08-18 09:39:29 +00:00
VilhoRaatikka
b40a1a9ed8 Merge branch 'develop' of https://github.com/skysql/MaxScale into develop 2014-07-04 11:30:14 +03:00
VilhoRaatikka
307bb6ad98 Disabled query classifier tests from testset until tests are fixed. Current version doesn't even compile. 2014-07-04 11:29:26 +03:00
Mark Riddoch
5251244ddd Fix missing argument to skygw_query_classifier_get_type in test code 2014-07-04 08:44:42 +01:00
VilhoRaatikka
7b40c1ee70 Changed how MaxScale unit test works.
All tests are run by executing 'make testall' in root directory. As a result all directories which contain tests will be entered and tests executed.
After tests, each directory have a test log including the last run's logs only.
Created a global test log, which is specified in test.inc. Test logs from subdirectories are concatenated to this file.
2014-04-10 19:08:28 +03:00
VilhoRaatikka
91afdffa9a Added -lrt 2014-02-07 12:23:50 +02:00
VilhoRaatikka
e8ce2268e0 Test system for MaxScale.
Every test/makefile have the following targets:
 cleantests 	- clean local and subdirectories' tests
 buildtests	- build all local and subdirectories' tests
 runtests	- run all local tests
 testall	- clean, build and run local and subdirectories' tests

Tests for directory random_dir are always in its subdirectory, in this case in random_dir/test . If random_dir has subdirectories with tests, random_dir/child_dir, for example, tests of child_dir can be started from random_dir/test/makefile where make -C child_dir/test <test target> is called.

See MAXSCALE_HOME/test/README for further information.
2014-02-07 11:06:37 +02:00
vraatikka
f32cfe8546 query_classifier.cc
resolve_query_type, traverse through the list of items of thd->free_list, identify functions and reason query type according to the function type. This phase can only increase the restrictiviness level of the query.

query_classifier.h
        Added new query type QUERY_TYPE_LOCAL_READ, for functions that can be executed in Maxscale. This type is the least restrict
ive query type. It is not used currently.

testmain.c
	Added a few test cases and fixed expected return values for query type tests.

readwritesplit.c
	polish

skygw_debug.h
	Added string macro for Item types.
2013-10-25 11:55:45 +03:00
vraatikka
ddab34fe72 mysql_libraray_init failed due to invalid datadir setting. Fixed this by setting the working directory/data as data directory. 2013-10-23 14:16:50 +03:00
vraatikka
4db366290d Removed 'datadir' value from libmysqld's start-up parameters to make it start. 2013-10-15 22:18:59 +03:00
vraatikka
52644db8ce testmain.c
Removed embedded server startup parameter '--skip-innodb' and replaced TRUE, and FALSE with true and false, respectively.
gateway.c
	Removed embedded server startup parameter '--skip-innodb' because libmysqld inside MariaDB 5.5.33 + doesn't start with that paramter.
2013-10-15 18:18:09 +03:00
vraatikka
ff8b432943 Added run-time path to dynamically loadable libraries; '-Wl,rpath,$(DEST)/lib' to makefile. When compiling, use
make DEST=<path to library directory>
2013-07-26 19:20:06 +03:00
vraatikka
a7229a6c24 Separated libmysqld from list of libs which is used in every link command line. 2013-06-18 21:28:06 +03:00
vraatikka
4854b56aba try to add query_classifier under skygteway 2013-06-17 18:19:46 +03:00