108 Commits

Author SHA1 Message Date
Markus Makela
32575e3fc0 Merge branch 'develop' into shm_log_fix
Conflicts:
	log_manager/log_manager.cc
2014-10-15 21:26:03 +03:00
VilhoRaatikka
726ab87f4b Fix to #575, http://bugs.mariadb.com/show_bug.cgi?id=575
log_manager.cc:
	Log manager handles cases where there are mismatch in user privileges.
	Mark log files enabled in the global lm_enabled_logfiles_bitmask after initialization so that it reflects reality in error cases. In general, take into account the possibility that any phase in initialization may fail and read return values.
	Replaced file_exists_and_is_writable to check_file_and_path which has a slightly different logic and which detects if file open fails for a few different reasons.
	Improved logging (in stderr) in general in error cases.

gateway.c: Also check home directory accessibility in case when it is provided as a command-line argument. Added function check_dir_access to provide that function. Read return value of skysql_logmanager_init and exit (nicely) if it failed.

skygw_utils.cc: initialize mlist with version number 2, which indicates that object is initialized (different than zero) and that there are no active updates on the object (version%2==0).
2014-10-14 13:22:16 +03:00
Markus Makela
5c968c9ac8 Merge branch 'develop' into shm_log_fix 2014-10-10 07:02:22 +03:00
VilhoRaatikka
29e53e150a Fix to bug # 565, http://bugs.mariadb.com/show_bug.cgi?id=565
Client flags are now copied to each backend and used in their connections.

log_manager.cc: fixed string allocation where one byte was missing.
mysql_client.c: fixed string allocation where one byte was missing.
2014-10-08 22:27:28 +03:00
Markus Makela
194ebcb054 Fix to bug 567(http://bugs.mariadb.com/show_bug.cgi?id=567)
log_manager.cc: if the file exists, is a symbolic link and is not writable, the log manager does not fail but unlinks it and creates a new one.
2014-10-06 15:13:18 +03:00
Markus Makela
856448500e Merge branch 'develop' of https://github.com/mariadb-corporation/MaxScale into develop 2014-10-01 14:38:15 +03:00
Markus Makela
b0683d9b4d Updated the licensing year from 2013 to 2013-2014 2014-10-01 14:37:12 +03:00
VilhoRaatikka
a53e80e144 Added back removal of double newline character from log records. 2014-10-01 14:30:59 +03:00
Markus Makela
52c0d0c768 Merge remote-tracking branch 'origin/develop' into header_rename 2014-10-01 05:24:02 +03:00
Markus Makela
f4e591e382 Changed 'SkySQL Gateway' to 'MariaDB Corporation MaxScale' 2014-09-30 13:15:03 +03:00
Markus Makela
c344231f80 Renamed all occurences of SkySQL to MariaDB Corporation 2014-09-30 13:02:10 +03:00
VilhoRaatikka
3b9175d957 Clean up 2014-09-29 13:52:14 +03:00
VilhoRaatikka
686d28a1f0 Fix to bug #506, http://bugs.skysql.com/show_bug.cgi?id=506
If debug and/or trace log is stored to shared memory, the absolute path to file is now /dev/shm/<pid>/skygw_[trace1|debug1].log
2014-09-29 13:21:26 +03:00
Markus Makela
d27522a6f9 Merge branch 'release-1.0beta-refresh' into cmake_build 2014-09-22 11:12:14 +03:00
Markus Makela
3f0de666ac Changed the order of linking to resolve some debug build bugs and added the missing parent directory of the MYSQL_DIR into the included directories. 2014-09-20 19:44:30 +03:00
Mark Riddoch
a16f900d6d Merge branch 'hholzgra-hartmut-compile-warnings' into release-1.0beta-refresh
Conflicts:
	server/include/dcb.h

Resolved
2014-09-19 17:37:39 +01:00
Markus Makela
c2ba3abac2 fixed linker errors in log_manager 2014-09-18 12:55:36 +03:00
Markus Makela
7471911087 added missing debug compiler flags and tuned library linking flags 2014-09-18 11:05:40 +03:00
Markus Makela
cde74cfaa5 added missing -lstdc++ flags 2014-09-17 09:16:23 +03:00
Markus Makela
349fc9d6ab Added missing Pthread and libaio flags to log manager 2014-09-17 04:26:36 +03:00
Markus Makela
8b1afbfe26 fixed tests not working with the normal 'make testall' 2014-09-16 20:02:28 +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
1f56db310d Changed variable names to closer match their usage
Changed the default values to the same as in makefiles
Added configured versions of maxscale.conf and maxscale init.d script
2014-09-15 14:12:55 +03:00
VilhoRaatikka
68f8e32f58 Added physical log paths to message which is printed on the start screen. Refers to bug #506, http://bugs.skysql.com/show_bug.cgi?id=506 2014-09-15 13:38:47 +03:00
Markus Makela
48012cd571 Added more build options and README changes 2014-09-15 11:48:40 +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
b3ce971020 initial implementation of the CMake build system 2014-09-11 18:24:41 +03:00
Markus Makela
d35a73478e Added the actual output of log entry tests to the testing log. 2014-09-10 14:03:57 +03:00
Markus Makela
aceae1c32b Removed the debug tags from log entries in standard debug builds and added a special switch to the tests 2014-09-10 13:00:28 +03:00
Markus Makela
4028c50fea added state based block buffers to log manager 2014-09-10 12:09:00 +03:00
Markus Makela
aa83b6b21a Changed the way blockbuffers are used after they fill up.
The blockbuffers that get full are now moved to the end of the list of blocks. This prevents messages being written to the disk in the wrong order.
2014-09-09 10:48:25 +03:00
Markus Makela
2097b54c35 More debugging info 2014-09-08 14:49:52 +03:00
Markus Makela
d7439b67c5 Added log order scripts and more debug output 2014-09-08 10:40:23 +03:00
Markus Makela
4a9fb47699 fixed a division by zero error and enabled non-flush mode 2014-09-05 17:28:32 +03:00
Markus Makela
bfac227f4d tests for log manager write order 2014-09-05 17:24:26 +03:00
Hartmut Holzgraefe
25c5d1af25 fixed some warnings about const -> non-const conversions 2014-08-26 18:25:28 +02:00
VilhoRaatikka
c5fbb1f295 query_classifier.cc:parsing_info_done: calling mysql_thread_end caused segfauls when same thread tried next time call free_embedded_thd because thread's sysvar was set to NULL in mysql_thread_end.
Added a few lines to canonical query test's input script which are not handled correctly.
2014-08-25 22:17:21 +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
Vilho Raatikka
087c4720bb Merge pull request #23 from hholzgra/hartmut-DEL
Hartmut del
2014-08-18 09:20:03 +03:00
Hartmut Holzgraefe
fb87f68368 consistently use DEL instead of rm in Makefiles 2014-08-17 21:02:24 +00:00
VilhoRaatikka
d3a79ce7c4 Partial fix to #463, http://bugs.skysql.com/show_bug.cgi?id=463
log_manager.cc: fixed block buffer overflow. Queries are logged to trace log and long queries exceed the bufsize in length. Those were written beyond allocated memory areas.
mysql_client_server_protocol.h: added mysql_protocol_state_t to indicate whether MySQL protocol object is allocated, usable or freed. Freed means that memory allocations made by the protocol are freed. That is, command history etc.
mysql_backend.c: gw_backend_hangup and gw_error_backend_event used to call error handling function although session was already closing. Added check for session state.
mysql_client.c: route_by_statement lost some packets in case where query was sent in multiple packets.
mysql_common.c: gw_MySQL_get_next_packet failed in packet handling with route_by_statement. When multi-packet query was merged into one, packet type wasn't copied.
	protocol_archive_srv_command and mysql_protocol_done didn't have proper locking in place which lead to occasional crashes.
2014-08-14 13:05:05 +03:00
VilhoRaatikka
b5e9428ff7 log_manager.cc fixed memory leak, block buffer mutex names weren't freed.
query_classifier.cc use of uninitialized value in skygw_stmt_causes_implicit_commit
config.c crashed if module load failed, use of unitialized value
load_utils.c pretty-printed error
service.c use of uninitialized value in service_add_qualified_param
modules.h function prototype
readwritesplit.c memory leaks
2014-04-29 14:50:09 +03: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
7cc693b572 Added stricter compile flags for debug build. Temporary solution since they will be added to all builds next.
Fixed strin formatting bugs in log_manager.cc .
2014-03-27 17:51:23 +02:00
VilhoRaatikka
e57944ef44 Bug #399, http://bugs.skysql.com/show_bug.cgi?id=399
Corrected the length variable including length of timestampt string which doesn't include terminating null.
2014-02-11 14:55:16 +02:00
VilhoRaatikka
75af5ee03c Merge https://github.com/skysql/MaxScale 2014-02-07 11:11:47 +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
Mark Riddoch
3edea0afc4 Updated gitignore files 2014-02-05 14:49:05 +01:00