18 Commits

Author SHA1 Message Date
Markus Mäkelä
4150dee952 Extend KILL parsing test
Added test cases for `KILL [ HARD | SOFT ] [CONNECTION | QUERY ]`.
2017-10-03 14:47:16 +03:00
Markus Mäkelä
49b179bf69 Add HARD/SOFT to executed KILL commands
The HARD and SOFT keywords are parsed and added to the executed KILL
commands.
2017-10-03 14:47:16 +03:00
Markus Mäkelä
4dd6842447 Send KILL commands to backends
KILL commands are now sent to the backends in an asynchronous manner. As
the LocalClient class is used to connect to the servers, this will cause
an extra connection to be created on top of the original connections
created by the session.

If the user does not have the permissions to execute the KILL, the error
message is currently lost. This could be solved by adding a "result
handler" into the LocalClient class which is called with the result.
2017-10-03 14:47:16 +03:00
Markus Mäkelä
b446f442b6 Process data sent before authentication is complete
If the client sends data before authentication is complete, it must not be
discarded and it needs to be processed like as if it was sent in a
separate network packet.
2017-09-29 21:11:08 +03:00
Markus Mäkelä
895d950da0 Format all source files with Astyle
Formatted all source files Astyle.
2017-09-28 07:04:21 +03:00
Markus Mäkelä
8fd8c30cd0 Add support for KILL [HARD|SOFT]
The keywords HARD and SOFT are now ignored.
2017-09-27 20:35:34 +03:00
Markus Mäkelä
45e0e8bb59 Introduce internal protocol command enum
The enums exposed by the connector are not intended to be used by the
users of the library. The fact that the protocol, and other, modules used
it was in violation of how the library is intended to be used.

Adding an internal mapping into MaxScale also removes some of the
dependencies that the core has on the connector.
2017-09-14 15:30:43 +03:00
Markus Mäkelä
3676dcebb1 MXS-1398: Clean up mysql.h header
Cleaned up the MaxScale version of the mysql.h header by removing all
unused includes. This revealed a large amount of dependencies on these
removed includes in other files which needed to be fixed.

Also sorted all includes in changed files by type and alphabetical
order. Removed explicit revision history from modified files.
2017-09-14 15:30:43 +03:00
Johan Wikman
02b9e0a01d Merge branch '2.1.7' into develop-2.1-merge 2017-09-12 11:08:02 +03:00
Johan Wikman
84300c6d97 Do not manipulate read queue directly
Protocol modules should not manupulate the read queue directly,
but always access it via the functions created for that purpose.
2017-09-06 11:21:47 +03:00
Johan Wikman
9c25e6d995 MXS-1376 All zombie related code removed
As dcbs are now closed when dcb_close() is called and there is
no zombie queue, the zombie state can also be removed.
2017-08-25 14:48:16 +03:00
Markus Mäkelä
6c5ae24dff Fix out-of-bounds reads with LOAD DATA LOCAL INFILE
When a LOAD DATA LOCAL INFILE is done, the last packet is an empty packet
which does not contain the command byte. Some parts of the MySQL protocol
modules expected that a command is always present. The proper way to
handle this is to use the mxs_mysql_get_command function which does bounds
checking.
2017-08-18 10:27:28 +03:00
Esa Korhonen
7ba0533cc8 Authenticator API extract-entrypoint returns bool
Extraction either succeeds or fails, it does not need to return
defined integer values.
2017-08-09 17:28:58 +03:00
Markus Mäkelä
25fd5a8a93 Fix crash on session allocation failure
The the return value was used before it was checked.
2017-06-30 11:07:18 +03:00
Johan Wikman
6cd6ded3d8 Merge branch '2.1-oracle-compat' into develop-new-merge-oracle 2017-06-29 09:39:55 +02:00
Johan Wikman
bea551092d MXS-1278: Change modes when 'set sql_mode=' is encountered.
The initial setting of sql_mode affects how MaxScale initially
behaves with respect to autocommit.

When 'set sql_mode=[default|oracle];" is encountered, the query
classifier and autocommit modes are adjusted accordingly.
2017-06-28 21:36:08 +02:00
Johan Wikman
057ba4156d MXS-1278: Turn on ORCALE mode dynamically
If statement input is required for a session, we check the input
for "SET SQL_MODE..." statements and adjust the query classifier
accordingly.
2017-06-28 21:36:08 +02:00
Johan Wikman
cd1e3f26cf MXS-1275: Compile mysql_client as C++
A custom parser for detecting "set sql_mode=ORACLE" is needed
and writing that is C++ is more convenient than writing it in
C. Consequently, so as to be able to use that parser, mysql_client
must be compiled as C++.
2017-06-28 21:33:04 +02:00