Commit Graph

57 Commits

Author SHA1 Message Date
a0fcf67993 Merge branch '2.3' into develop 2019-06-12 11:29:03 +03:00
5b14e28fc8 Fix maxavrocheck build failure on Ubuntu Trusty
The return value of realpath should be checked even if it is pointless.
2019-06-11 14:15:06 +03:00
4716f5b48f Fix buffer end pointer comparison in maxavro
The buffer pointer can point to the end pointer if it is the last value in
the buffer.
2019-06-11 09:44:27 +03:00
ce3d7acf2d Fix maxavrocheck path processing
A null path could be given if realpath failed to resolve the name. This
hides the actual reason of the failure making it harder to resolve it.
2019-06-11 09:44:27 +03:00
32769ddfb0 Fix maxavro build failure 2019-05-29 10:57:38 +03:00
65c795164c Merge branch '2.3' into develop 2019-05-28 14:40:45 +03:00
bef8881cab Merge branch '2.2' into 2.3 2019-05-28 14:17:43 +03:00
3721d6abf2 MXS-2507: Check stored integer size
If the avro block is smaller than the size of the stored data, the file
was created with a block size that was too small. Even the reference Avro
implementation can't read the file in this case.
2019-05-27 15:07:35 +03:00
de95fcc9d6 Format rest of the sources 2019-05-10 10:31:12 +03:00
6a23015b64 Convert avro headers to .hh
Required for converting maxscale/buffer.h.
2019-01-15 16:38:10 +02:00
c0c9a9858d MXS-2197 Rename maxscale/log.h to maxscale/log.hh
In files either include maxscale/log.hh or remove include entirelly
as maxscale/ccdefs.hh includes it.
2018-12-10 12:58:17 +02:00
80805292ef MXS-2208 Compile avro as C++
An unantecipated sidestep in the path of introducing a small
HTTP library to maxbase.
2018-12-10 12:50:07 +02:00
ba8ec0a2a3 Fix debug assertion in maxavrocheck
A debug assertion would be triggered when a message was logged without
initializing the log subsystem.
2018-11-19 20:02:12 +02:00
383b0b1989 Merge branch '2.2' into 2.3 2018-11-06 21:12:20 +02:00
562c7be8fe MXS-2106: Fix NULL value handling
The NULL values were not stored as NULL Avro values due to the fact that
the file format has no native NULL-ness for the basic types. To solve
this, all values must be stored as a union that contains the actual type
as well as the null type.

Unions were not implemented in the maxavro library but implementing means
simply recursing one level down.
2018-11-05 13:37:29 +02:00
bb8245d2c1 Merge branch '2.2' into develop 2018-09-30 21:26:47 +03:00
104a6d1bfb Explicitly link against ASAN libraries
Some systems (Ubuntu Trusty) require explicit linking against ASAN
libraries.
2018-09-28 11:05:51 +03:00
71ffef5708 Partially revert 4ba011266843857bbd3201e5b925a47e88e1808f
Add back leading operator enforcement.
2018-09-20 15:57:30 +03:00
4f6990f90d Fix build failures
Changes to the ChangeMasterOptions made it non-trivial so it cannot be
safely memset anymore. The maxavrocheck was missing the linkage to the
maxscale-common library.
2018-09-10 11:05:43 +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
9a6f1b2044 Merge branch '2.2' into develop 2018-08-28 16:06:23 +03:00
4480995089 MXS-1996: Remove misleading errors
The errors are expected if the file is empty.
2018-08-22 14:23:25 +03:00
ab9a9f92cb MXS-2020 Remove maxscale/debug.h
- Removed from all files.
- maxbase/assert.h included where necessary.
2018-08-22 11:35:35 +03:00
3f53eddbde MXS-2020 Replace ss[_info]_dassert with mxb_assert[_message] 2018-08-22 11:34:59 +03:00
24ab3c099c Move top of the file "#pragma once" to after the following comment (swap them). If the comment is a BPL update it to the latest one 2018-08-21 13:13:15 +03:00
cf0aeed516 MXS-2014 Rename log_manager.h to log.h
There's nothing resembling a manager anymore.
2018-08-17 10:59:37 +03:00
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
1f6cc6db8a MXS-1840 Compile all routers as C++
Minimal changes, only what is needed in order to make it compile.
2018-05-07 14:06:22 +03:00
e181241f45 Print maxavrocheck errors to stderr
The errors should be printed to stderr to distinct them from actual
messages.
2017-07-03 17:08:39 +03:00
902013e4f8 Fix off-by-one false positive in maxavro
The float and double types were calculated to exceed the internal buffer
sizes even though the buffer was of the correct size.
2017-06-30 11:07:18 +03:00
6cd6ded3d8 Merge branch '2.1-oracle-compat' into develop-new-merge-oracle 2017-06-29 09:39:55 +02:00
8e3d4d9dd2 MXS-1298: Fix typo in avro error message
Changed 'numer' to 'number'.
2017-06-28 11:52:50 +03:00
f546a17e77 Update change date of 2.2 2017-06-01 10:24:20 +03:00
b0bec7b9b8 Always read Avro headers from file
The headers were read from memory as if they were in compressed
format. This mistake was caused by the fact that the function names were
changed.
2017-04-20 14:22:55 +03:00
7bd05d4581 Merge branch '2.1' into develop 2017-03-22 15:20:21 +02:00
3396741c21 Improve UTF-8 handling in avrorouter
The json_stringn function should be used instead of the json_string to
allow null characters as well as non-null terminated strings to be
embedded in the JSON values.

The CDC example Python programs now decode the data as UTF-8 instead of
ASCII.
2017-03-15 17:37:25 +02:00
e1a1959bc2 Replace strerror_r with mxs_strerror
The mxs_strerror function requires no local buffer, thus making it simpler
and cleaner to use.
2017-03-09 09:36:57 +02:00
c47ef968f7 Add initial support for deflate compression in maxavro
Maxavro now supports reading records with the zlib deflate
algorithm.

With this change, each data block is read into memory in one IO
operation. This allows the library to decompress the data block if
necessary.

The avrorouter does not yet use compression when writing the records.
2017-02-21 16:14:47 +02:00
aa412b4fe3 Fix merge conflict
2.0 used old define names.
2017-02-20 12:42:11 +02:00
61f2d96a58 Merge branch '2.0' into 2.1 2017-02-20 11:17:49 +02:00
5648f708af Update license to BSL 1.1 2017-02-14 21:42:28 +02:00
65caaab77b Fix maxavro block verification errors
An error was logged when the end of file was reached. The error should
only be logged when a partial sync marker is read and the end of file has
not been reached.
2017-02-13 16:23:26 +02:00
526e48e459 Fix floats being read as doubles
The avro floating point numbers were processed as 8 byte values when they
are 4 bytes values.
2017-02-09 15:00:19 +02:00
712b720ef7 Use correct define names
The old name for MXS_STRERROR_BUFLEN was used in avrorouter.
2017-02-01 09:55:32 +02:00
e64a641bcd Merge branch '2.0' into develop 2017-02-01 09:35:13 +02:00
81b9d51aab Fix crash on startup
The Avro file was initialized in the wrong order and uninitialized values
were used.
2017-01-27 12:55:07 +02:00
4adc9d705b Build Jansson if library not found
If the Jansson JSON library is not found on the system, it is built from
source.
2017-01-27 12:19:27 +02:00
8da655b7cb Improve maxavro failure handling and error messages
When the creation of the Avro schema would fail for a file that is being
opened, the errors wouldn't be handled properly. Also free all allocated
memory on failure.

All errors that set errno are now properly logged with the error number
and message.
2017-01-26 16:16:41 +02:00
84040be182 Add missing error handling to Avro file handling
Some of the JSON errors weren't handled which could cause problems when a
malformed schema definition is read.

Also added more error messages for situations when opening of the files
fails.
2017-01-26 10:23:26 +02:00
3205092540 Format miscellaneous files
Formatted client, avro and rabbitmq consumer files with Astyle.
2017-01-17 14:48:43 +02:00