Commit Graph

1668 Commits

Author SHA1 Message Date
dbc321df9b Fix coverity report of externcmd.c
Buffer overwrite.
2015-12-08 09:32:10 +02:00
6870d77acb Fix set_user prototype. 2015-12-07 14:14:42 +02:00
f62ff4c551 Fixed spelling mistake in usage output.
Path was spelled as apth.
2015-12-04 17:47:14 +02:00
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
74bb291961 Reindent server/core/monitor.c 2015-12-01 09:40:07 +02:00
b2dd24ada3 Reindent server/core/utils.c 2015-12-01 09:32:31 +02:00
fbecf128dd Reindent server/core/users.c 2015-12-01 09:29:52 +02:00
8bbc3e8086 Reindent server/core/thread.c 2015-12-01 09:29:03 +02:00
a95be21266 Reindent of server/core/spinlock.c 2015-12-01 09:28:19 +02:00
15df33a93f Reindent server/core/session.c 2015-12-01 09:26:26 +02:00
8601068dc2 Reindent server/core/service.c 2015-11-30 21:25:10 +02:00
ed06d4f14c Reindent server/core/server.c 2015-11-30 19:47:29 +02:00
0aa38cad4c Reindented server/core/resultset.c 2015-11-30 18:58:43 +02:00
6c401b9085 Reindent server/core/poll.c 2015-11-30 18:57:19 +02:00
c0615408aa Reindented server/core/modutil.c 2015-11-30 18:53:42 +02:00
17eb80072f Reindent server/core/secrets.c 2015-11-30 18:48:14 +02:00
233f50f3e6 Reindent server/core/random_jkiss.c 2015-11-30 16:04:18 +02:00
72dd159f98 Reindented server/core/memlog.c 2015-11-30 15:18:51 +02:00
60fb05ea40 Reindented server/core/load_utils.c 2015-11-30 15:17:36 +02:00
3189a47fc5 Reindented server/core/housekeeper.c 2015-11-30 15:16:44 +02:00
486f724dc1 Reindented server/core/hint.c 2015-11-30 14:10:15 +02:00
255a5b53c1 Reindented server/core/hashtable.c 2015-11-30 13:54:46 +02:00
26d1cf0c1f Reindented server/core/gw_utils.c 2015-11-30 13:53:52 +02:00
d2aebe2bf0 Reindented server/core/gwdirs.c 2015-11-30 13:42:44 +02:00
9482ccb8c6 Reindented server/core/gwbitmask.c 2015-11-30 13:41:32 +02:00
ecb5ae528c Reindented server/core/gateway.c 2015-11-30 13:40:56 +02:00
20c4a0aa67 Reindented server/core/filter.c 2015-11-30 13:40:11 +02:00
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
2afe60dd0e Reindent server/core/dcb.c 2015-11-30 12:42:13 +02:00
17760bb3e6 Reindent server/core/buffer.c 2015-11-30 12:38:53 +02:00
73e2d9950c Changed tabs to spaces in dbusers.c
Some tabs were missed when formatting dbuser.c
2015-11-30 12:31:47 +02:00
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
f6e8662933 Reindent server/core/adminusers.c 2015-11-30 10:56:38 +02:00
6f737d9484 Reindent server/core/atomic.c 2015-11-30 10:56:38 +02:00
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
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
230978f6db Added missing logging to externcmd.c
Not all failures caused an error to be logged.
2015-11-27 12:32:27 +02:00
916ee5ff2a Rename some log concepts
The mxs prefix is now uniformly used with all log components.
2015-11-26 17:34:53 +02:00
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
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
dcf0d4ef4b Merge remote-tracking branch 'origin/MXS-472a' into develop 2015-11-25 10:42:52 +00:00
34f045ca75 Merge remote-tracking branch 'origin/develop' into MXS-472a 2015-11-24 10:19:18 +00:00
1af89298b9 Changes to Galera monitoring logic and tidying up following code review. 2015-11-24 10:08:07 +00:00
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
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
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
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
68a7f4b472 Merge remote-tracking branch 'origin/develop' into MXS-472a 2015-11-23 10:05:55 +00:00
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
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