Commit Graph

20 Commits

Author SHA1 Message Date
d8b9bcfdd9 Add invalid JSON to error message
If the schema parsing fails due to an error, add the actual JSON to the
error string. This helps solve any problems that might occur due to
malformed JSON on the sending end.
2019-02-06 12:11:13 +02:00
1bba689c80 Make the error message a const char* const
This prevents linker errors if the source files are used directly.
2018-11-22 14:51:03 +02:00
383b0b1989 Merge branch '2.2' into 2.3 2018-11-06 21:12:20 +02:00
451e75eb6a MXS-2106: Add null value support to cdc_connector
The cdc_connector had no explicit null value detection which is required
now that the null value handling is fixed.
2018-11-05 13:37:29 +02:00
71ffef5708 Partially revert 4ba011266843857bbd3201e5b925a47e88e1808f
Add back leading operator enforcement.
2018-09-20 15:57:30 +03:00
c447e5cf15 Uncrustify maxscale
See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
2018-09-09 22:26:19 +03:00
68b4f20436 Split schema and row processing
The recursive calls into `read` caused unnecessary slowness in the
connection phase. The actual first row should only be read when the data
is requested. This can possibly solve the false timeout errors caused by
slow sending of the first row of data.
2018-08-27 13:41:20 +03:00
69f53f886d Append received data to CDC::TIMEOUT errors
The extra output of received data should be added only to timeout errors,
not to all errors.
2018-08-27 12:31:02 +03:00
01e1c616ba Fix CDC error detection
The error detection assumed the buffer was null-terminated which was never
guaranteed.
2018-08-27 12:11:42 +03:00
02a65f311a Fix memory leak in cdc-connector
The Closer default value was wrong.
2018-08-27 12:00:28 +03:00
9663c52f50 MXS-2015: Remove buffer iterator
The iterator to the buffer isn't really needed as the beginning of the
buffer can be used instead. This should make the code more robust. Changed
the internal buffer from a vector to a deque as the latter is more
appropriate for insertion on one end and consumption on the other.
2018-08-22 14:23:25 +03:00
fb9ffdc753 MXS-2015: Improve CDC connector error messages
The error messages now display the data received so far. This will help
resolve at which point the streaming process was when an error occurs.
2018-08-20 08:06:59 +03:00
1c733bf450 MXS-2015: Always check for error responses
As a JSON object can never start with the ERR prefix, it is safe to check
it for all requests. Also fixed the missing newline in the avrorouter
error message.
2018-08-20 08:06:59 +03:00
cbfee5698f Fix CDC::connect
The function used the m_fd member variable before it was updated to point
to the actual file descriptor of the connection. This caused the test to
fail.

Also fixed the nointr_write function to correctly process multiple
consecutive writes.
2018-01-30 11:08:41 +02:00
b7af191f40 Improve CDC connector error messages
A more precise error message is now returned if authentication times out.
2018-01-30 11:08:41 +02:00
522cbab23d Make the CDC connector C++0x compliant
As CentOS 6 is supported, the CDC connector ought to build on non-C++11
systems.
2018-01-24 11:01:22 +02:00
ed81757c04 Ensure that right close is called 2018-01-24 09:31:22 +02:00
3ade3f68a7 MXS-1538: Prevent double connecting
Connector::connect now checks whether a connection is already made before
attempting to create another one.
2018-01-22 15:29:21 +02:00
f204650bbb MXS-1538: Remove unnecessary copying of schema information
The schema related information was copied for each row. A shared pointer
to the data can be used to remove the repeated copying of the values.
2018-01-22 15:29:21 +02:00
070df73d99 MXS-1538: Integrate CDC-Connector into MaxScale
Added the files from the repository to MaxScale. Created a new CMake
function for installing development libraries.
2018-01-22 15:29:21 +02:00