1465 Commits

Author SHA1 Message Date
counterpoint
d054cb1595 Correct logic errors in bitmask_set and extend initial/increment size to reduce likelihood of any risk of realloc failure. 2015-12-01 15:16:12 +00:00
Johan Wikman
74bb291961 Reindent server/core/monitor.c 2015-12-01 09:40:07 +02:00
Johan Wikman
b2dd24ada3 Reindent server/core/utils.c 2015-12-01 09:32:31 +02:00
Johan Wikman
fbecf128dd Reindent server/core/users.c 2015-12-01 09:29:52 +02:00
Johan Wikman
8bbc3e8086 Reindent server/core/thread.c 2015-12-01 09:29:03 +02:00
Johan Wikman
a95be21266 Reindent of server/core/spinlock.c 2015-12-01 09:28:19 +02:00
Johan Wikman
15df33a93f Reindent server/core/session.c 2015-12-01 09:26:26 +02:00
Johan Wikman
8601068dc2 Reindent server/core/service.c 2015-11-30 21:25:10 +02:00
Johan Wikman
ed06d4f14c Reindent server/core/server.c 2015-11-30 19:47:29 +02:00
Johan Wikman
0aa38cad4c Reindented server/core/resultset.c 2015-11-30 18:58:43 +02:00
Johan Wikman
6c401b9085 Reindent server/core/poll.c 2015-11-30 18:57:19 +02:00
Johan Wikman
c0615408aa Reindented server/core/modutil.c 2015-11-30 18:53:42 +02:00
Johan Wikman
17eb80072f Reindent server/core/secrets.c 2015-11-30 18:48:14 +02:00
Johan Wikman
233f50f3e6 Reindent server/core/random_jkiss.c 2015-11-30 16:04:18 +02:00
Johan Wikman
72dd159f98 Reindented server/core/memlog.c 2015-11-30 15:18:51 +02:00
Johan Wikman
60fb05ea40 Reindented server/core/load_utils.c 2015-11-30 15:17:36 +02:00
Johan Wikman
3189a47fc5 Reindented server/core/housekeeper.c 2015-11-30 15:16:44 +02:00
Johan Wikman
486f724dc1 Reindented server/core/hint.c 2015-11-30 14:10:15 +02:00
Johan Wikman
255a5b53c1 Reindented server/core/hashtable.c 2015-11-30 13:54:46 +02:00
Johan Wikman
26d1cf0c1f Reindented server/core/gw_utils.c 2015-11-30 13:53:52 +02:00
Johan Wikman
d2aebe2bf0 Reindented server/core/gwdirs.c 2015-11-30 13:42:44 +02:00
Johan Wikman
9482ccb8c6 Reindented server/core/gwbitmask.c 2015-11-30 13:41:32 +02:00
Johan Wikman
ecb5ae528c Reindented server/core/gateway.c 2015-11-30 13:40:56 +02:00
Johan Wikman
20c4a0aa67 Reindented server/core/filter.c 2015-11-30 13:40:11 +02:00
Johan Wikman
bd94d8967a Reindented server/core/externcmd.[c|h]
Reindented server/core/externcmd.[c|h] and added copyright
message.
2015-11-30 12:42:49 +02:00
Johan Wikman
2afe60dd0e Reindent server/core/dcb.c 2015-11-30 12:42:13 +02:00
Johan Wikman
17760bb3e6 Reindent server/core/buffer.c 2015-11-30 12:38:53 +02:00
Markus Makela
73e2d9950c Changed tabs to spaces in dbusers.c
Some tabs were missed when formatting dbuser.c
2015-11-30 12:31:47 +02:00
Markus Makela
275580d6a8 Formatted dbusers.c according to the style guide
Fixed indentation, missing/misaligned brackets and made sure line length is
kept as close to 80 characters as possible.
2015-11-30 11:50:37 +02:00
Johan Wikman
f6e8662933 Reindent server/core/adminusers.c 2015-11-30 10:56:38 +02:00
Johan Wikman
6f737d9484 Reindent server/core/atomic.c 2015-11-30 10:56:38 +02:00
Johan Wikman
5fa3ef8236 Allow logging to shared memory to be enabled in config file.
Earlier, by default, the error and message logfiles were written to
the filesystem and trace and debug logfiles to shared memory. Now,
with just one log-file the default must be the file-system. However,
if info and debug messages are logged, then the filesystem will
become a bottle-neck.

A reasonable approach is then as follows (in the config file)

syslog=true
maxlog=false
log_to_shm=true

With this set, the maxlog file will be created to shared memory, but
nothing will be written to it, since it is disabled. However, if there
is a need to investigate something, then a dba can from maxadmin turn
on maxlog logging and also enable info and debug messages. That is, it
will be possible to enable debugging output without restarting maxscale.

Incidentally, the way the config file and command line arguments are
handled should be rewritten. Currently, it is a mess.
2015-11-29 21:03:05 +02:00
Johan Wikman
384029c109 MaxScale log called consistently for maxlog
There were some variance regarding the way the MaxScale log (i.e.
the file log) was called; "maxlog" in configuration file and
"maxscalelog" at the command line and maxadmin interface. Now it
is uniformly referred to as "maxlog" in the configuration file, at
the command line, from maxadmin and in the code.
2015-11-27 16:10:37 +02:00
Markus Makela
230978f6db Added missing logging to externcmd.c
Not all failures caused an error to be logged.
2015-11-27 12:32:27 +02:00
Johan Wikman
916ee5ff2a Rename some log concepts
The mxs prefix is now uniformly used with all log components.
2015-11-26 17:34:53 +02:00
Markus Makela
b67232a4fa Fixed out-of-bounds reads of packet length
modutil_get_complete_packets was assuming that at least 3 bytes of each packet
is available. This results in an out-of-bounds read if less than 3 bytes of data
for a partial result set is available.
2015-11-26 13:33:49 +02:00
Markus Makela
038877b8db Fixed minor format errors and resource leaks
Some format strings used integer values for unsigned integers.
Memory and file descriptors leaked in some error conditions.
2015-11-25 12:43:49 +02:00
counterpoint
dcf0d4ef4b Merge remote-tracking branch 'origin/MXS-472a' into develop 2015-11-25 10:42:52 +00:00
counterpoint
34f045ca75 Merge remote-tracking branch 'origin/develop' into MXS-472a 2015-11-24 10:19:18 +00:00
counterpoint
1af89298b9 Changes to Galera monitoring logic and tidying up following code review. 2015-11-24 10:08:07 +00:00
Johan Wikman
a8535f42af Remove all traces of logfile_t
The earlier log file based approach for enabling and disabling
messages has now been completely replaced with the syslog priority
based approach.

Similarly as with log files before it is now possible to enable
and disable a log priority for a particular session, even though
it apparently has not been used much.

The local test-programs of the logging has got minimal attention
only to make them compile. They should get an overhaul as they did
not work before either.
2015-11-23 19:10:53 +02:00
Johan Wikman
910ddb99fd Reset sessionid upon exit.
Since the sessionid is now unconditionally set, it also needs to
be unconditionally reset.
2015-11-23 18:44:38 +02:00
Markus Makela
c6982b863a Added missing initialization of values
A call to localtime_r was done with an uninitialized time_t value.
2015-11-23 18:33:59 +02:00
Johan Wikman
62b0e5fab0 Session info always copied to tls
Maxadmin earlier gave the impression that you could change whether
messages for different log files could be specifically enabled for
a session. In practice that was true only for trace messages as the
session id and the bitmask telling what logfiles are enabled, were
copied to thread local storage only as far as trace messages were
concered.

The code for setting that information in place is quit short and
efficient, so there is really no reason not to do that always.
This also means that it always will be possible to get your hands
on the session object if there is a need for that.
2015-11-23 18:14:46 +02:00
counterpoint
68a7f4b472 Merge remote-tracking branch 'origin/develop' into MXS-472a 2015-11-23 10:05:55 +00:00
Markus Makela
23b2ce004b Added support for MariaDB 10.1 embedded library
The code used in the query classifier was not compatible with 10.1 version
of MariaDB and needed to be fine tuned in order for it to work with all
supported versions of MariaDB.
2015-11-23 11:41:05 +02:00
Markus Makela
37f8374a10 Fixed multiline configuration processing
The regular expression used when cleaning multiline configuration parameters
didn't match trailing backslash characters in pathnames. This caused them to be
added to the next line causing a possible error.
2015-11-21 15:21:23 +02:00
Markus Makela
47e2e4d3e0 Configuration parameters were uninitialized
The creation of a CONFIG_PARAM didn't initialize the qdf_param_type value which
was later used when adding parameters to the monitors.
2015-11-21 03:44:06 +02:00
counterpoint
edb84ab119 Fix logic errors in determine monitor event type, improve comments. 2015-11-20 12:13:43 +00:00
counterpoint
ece53a8ac5 Fix Galera monitor problem with leaving wrong status for significant periods; change warning message from logging as warning instead of notice. 2015-11-20 10:15:13 +00:00