Commit Graph

1983 Commits

Author SHA1 Message Date
3bafcae343 MXS-759: Attempt to create PID directory
When MaxScale is started, it will attempt to create the PID directory. If
the directory does not exist and MaxScale is able to create it, MaxScale
will successfully start whereas it previously failed to do so.

If MaxScale lacks the permissions to create the directory, an error
message is printed to the user explaining the reason why MaxScale fails to
start.
2017-03-02 13:50:31 +02:00
18ee9114db [Je|T]malloc libraries must be first
If alternative malloc implementations are to be used, their
library must appear first on the link line.
2017-02-28 20:28:25 +02:00
fd92d76f0a Avoid accessing tls data
The thread id is copied to a local variable to avoid having
__tls_get_addr from unnecessarily being called over and over
again. Together that used to amount to some 1% of the execution
time.
2017-02-28 20:28:25 +02:00
65457f1724 Remove support for session specific log priorities
No need to maintain information in thread local storage,
which just added complexity and also incurred a slight
performance penalty.
2017-02-27 14:41:01 +02:00
bf4d00d6e3 Add temporary fixes to hashtable
These fixes prevent loops turning into eternal loops when
optimizations have been turned on.

The right remedy is to remove the internal locks from hashtable
and use external locks instead.
2017-02-27 13:36:51 +02:00
61f2d96a58 Merge branch '2.0' into 2.1 2017-02-20 11:17:49 +02:00
f54c0a5b81 Initialize RNG in maxkeys/maxpasswd
The initialization needs to be done in each of the executables before the
random number generator is used.
2017-02-20 11:07:44 +02:00
49cc2b52e3 Merge branch '2.1.0' into 2.1 2017-02-15 08:44:55 +02:00
5648f708af Update license to BSL 1.1 2017-02-14 21:42:28 +02:00
2a49cd6451 getCapabilities now get the instance as argument
Allows the capabilities to be different depending on how the
filter/router has been configured.
2017-02-14 13:55:22 +02:00
f7cc548093 Format mysql_binlog.c
The lines were too long.
2017-02-13 16:23:26 +02:00
7a35ec71da Fix DECIMAL conversion
The DECIMAL type was not correctly converted to positive integers. The
0x80 bit was set only for negative numbers when it needed to be XOR-ed for
all values.
2017-02-13 16:23:26 +02:00
f9732d7041 Fix DECIMAL handling in Avrorouter
The DECIMAL value type is now properly handled in Avrorouter. It is
processed into an Avro double value when before it was ignored and
replaced with a zero integer.

Backported to the 2.0 branch.
2017-02-13 16:23:26 +02:00
acd66b4eb3 Fix compiler warnings
Added missing checks for return values of various function calls. Fixed
binlogrouter strerror_r usage and wrong buffer sizes.
2017-02-13 11:44:38 +02:00
cf63e4cb9e Remove false debug assertion
If MaxScale is started without the appropriate permissions to the paths
pointed by default values, the debug assertion fails even though the
parameter is valid but not usable.
2017-02-10 18:49:22 +02:00
d2c3be8728 Fix compiler flag usage
The compiler flags overwrote the default values that CMake generates
instead of appending to them.
2017-02-10 17:19:46 +02:00
04b2475553 Fix random_jkiss initialization
The initialization function used another function which expected
initialization to be done.
2017-02-10 14:17:54 +02:00
334e71b079 Initialize random number generator in main
The random number generator can be initialized when MaxScale's other
systems are being initialized. This removes the need to initialized it
when the function is used for the first time.
2017-02-10 13:02:39 +02:00
fb21b99983 Fix DATE and DATETIME months
The month values for DATE and DATETIME were off by one.
2017-02-09 16:50:14 +02:00
d76be99cc5 Improve error message
A parameter may be wrong because the parameter name is wrong or
the value of the parameter is wrong. That needs to be reflected in
the error message.
2017-02-09 15:02:34 +02:00
ce5cd69eb3 Remove unused locks and variables
Removed unused spinlocks from DCBs, sessions and the MySQL protocol
structs. They were used in a context where only one thread has access to
the structure.

Removed unused member variables from DCBs.
2017-02-08 15:31:17 +02:00
517ecd9a12 Remove unnecessary spinlocks from random_jkiss
Removing the locks will increase the randomness of the random number
generation by introducing race conditions into the code.
2017-02-08 14:39:16 +02:00
a6698c6f07 Merge branch '2.1.0' into 2.1 2017-02-08 09:30:34 +02:00
67888f3596 Merge branch '2.0' into 2.1.0 2017-02-08 09:27:00 +02:00
906a42d9a8 Use dcb_foreach inside dcb.c
All DCB listing code should use dcb_foreach to list them.
2017-02-07 10:21:58 +02:00
e3bed424ea MXS-1123: Fix connection_timeout causing constant disconnections
In a configuration with multiple services, one with connection_timeout and
others without it, the connections to non-connection_timeout services
would get immediately closed due to integer overflow.
2017-02-06 23:03:57 +02:00
7c5e326dd5 Remove listing of persisted DCBs
As the DCBs are "owned" by threads and are handled without locks, no
cross-thread access to those DCBs should be done. Due to this, the show
persistent command for maxadmin has to be changed to show only the size of
the pool.
2017-02-06 10:29:10 +02:00
869e6ac950 Remove useless maxadmin commands
The commands did nothing.
2017-02-06 10:29:10 +02:00
e64a641bcd Merge branch '2.0' into develop 2017-02-01 09:35:13 +02:00
4e50f3e0cd Fix MXS_MODULE_PARAM_SIZE handling 2017-01-30 14:23:54 +02:00
1f9b18e3bc Split secrets.h to public and core + miscellaneous cleanup
Also, changed some function names to this_style from thisStyle. More of
this in later commits.
2017-01-27 15:33:52 +02:00
6cc205dafa Remove redefinition of QUEUE_CONFIG
Causes compile to fail on Centos 7.
2017-01-27 15:22:54 +02:00
6f24502e14 Fix extra space in list services output
The output is now consistent.
2017-01-27 12:19:27 +02:00
89f456840c Add monitor parameter to services
Services now accept a monitor as a source for servers. This removes the
need to redundantly list the same servers parameters in multiple places.
2017-01-27 12:19:27 +02:00
3b716bc707 Split queuemanager.h to public and core headers
Almost everything was moved to core.
2017-01-26 17:05:17 +02:00
74225daf46 Remove memlog and rdtsc
Neither of these were actively used, so they and any associated tests
were removed.
2017-01-26 13:16:51 +02:00
8d07604436 Split maxscale.h to public and private parts
This header defines some general functions and maxscale main() return
values. Most of it is still public, but there were some functions
which were moved to a core header.
2017-01-26 11:17:25 +02:00
aa8851fbe1 Remove listmanager
The file wasn't used, so any traces of listmanager.h or .c have been
erased.
2017-01-25 16:11:12 +02:00
7d51864402 Clean config.h some more
Moved some typedefs to router.h and server.h, changed a few
constants to these enums. Renamed some types in config.h to
remove "Gateway".

There are still some functions in the public header which are
only used in core, but they seem to fit the theme of public functions
so were not moved.
2017-01-25 16:05:51 +02:00
c77bb502e9 Store transaction type bit on transaction end
When the transaction ends, it's good to know what type of a transaction
just ended. Currently, this will be used by readwritesplit to detect when
a read-only transaction ends.
2017-01-24 20:36:39 +02:00
81be935fa9 Track transaction end as well as start
The COMMIT and ROLLBACK are now detected. This can be used to route the
trailing end of a transaction to a specific server.
2017-01-24 20:36:39 +02:00
fe1863bb49 Remove bitmask.h & .c, since the container is no longer used 2017-01-24 14:28:28 +02:00
b187afdcf4 Move config_runtime.h and externcmd.h to core
+ some cleanup
2017-01-24 13:05:21 +02:00
641896872e Rename GW_AUTHENTICATOR and GW_BITMASK + cleanup 2017-01-24 10:03:36 +02:00
9430da94b9 Further cleanup of monitor headers 2017-01-23 14:16:34 +02:00
7723641687 Ignore relay master and external slave state changes
When the relay master or external slave states change, they should be
ignored in the current implementation. When the relay master and slave of
external master events are added, the events can be enabled.
2017-01-23 13:38:56 +02:00
105f626e76 IEC prefixes are matched case-insetensively
If the case of the initial character does not matter, then the case
of the following 'i' should not matter either.
2017-01-23 10:11:26 +02:00
8cffa4ad58 Divide poll.h to core and public headers
Also some cleanup of other headers.
2017-01-20 17:15:27 +02:00
4ee7f4c91d Add some extra debug assertions
The debug assertions help catch false positives in server state change
logic.
2017-01-20 16:57:04 +02:00
6dc6d6280a Rename some .c-files, removing gw-prefix
May require reconfiguring the build. Some "gw":s are still
remaining, at least in test files.
2017-01-20 12:55:52 +02:00