If a multi-message batch contains data errors, messages may be
duplicated as connection close is implicit commit (not rollback).
This patch introduces a specific rollback request in those cases.
closes https://github.com/rsyslog/rsyslog/issues/1829
Server-generated error messages are considered non-recoverable, while
client generated once point into connection problems (which simply can
be retried). This is part of the improvements towards better
message-induced errors. Previous commits did only handle SQL parsing
errors, now we aim to address all of the message-induced error. We assume
that all server-generated errors are such - mysql API unfortunately does
not provide a clear indication of what type if error this is and it is
out of question to check for hundereds of error codes.
closes https://github.com/rsyslog/rsyslog/issues/1830
ommysql should return RS_RET_DATAFAIL if it knows that
a message can definitely never by processed, e.g. because
of a syntax error inside the message. This helps improve
retry and suspension processing.
closes https://github.com/rsyslog/rsyslog/issues/1819
those starting at column 0 are temporary debug aids during development.
Some of them I intend to keep in for a version or two. Some of them
I tend to forget later. This is a cleanup of those. Most are removed,
some are promoted to be permanently there - now indicated by proper
indention.
Remove the use sizeof(char) or sizeof(uchar) in calculations for memory
allocation or string length. There are no known platforms for which
sizeof(char) or sizeof(uchar) is not 1, and c99 has defined sizeof(char)
to be 1 (section 6.5.3.4 of c99).
under RHEL 7, we have an issue when gnutls is linked. For some reason
(autoconf magic?) we link ommysql against gnutls. I have not found the
root cause, but setting LIBS= below makes the problem go away. A better
solution would be appreciated, but for the time being this seems to
solve the issue.
closes https://github.com/rsyslog/rsyslog/issues/408
This could lead to segfaults. Triggering condition: multiple action
instances using ommysql. Thanks to Tomas Heinrich for reporting this
problem and providing an initial patch (which my solution is based on,
I need to add more code to clean the mess up).
This concludes the removal of the new scoping interface, at least as
far as pre v6-plugins are affected. Full code cleanup will happen
in the v6.3 branch.
The capability has been added for module to specify that they do not
like being unloaded.
related bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=222
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
The output interface has been changed, but we do not yet utilize the
new interface. Also, it looks like a regression was introduced. But before
hunting it down, I'd like to make a commit (what also easys the regresion
hunt).
... by moving code to stream.c. Thanks to the new design, new cases are
not really needed, resulting in cleaner code.
I also did a cleanup of header file usage as a side-activity.
Remove AC_CHECK_HEADERS([mysql/mysql.h],...) as this was causing pain
for users where the mysql headers are not installed in the system include
directory. It was superfluous anyways, as we check for mysql_config and
set the include path to the correct directory.
Update ommysql.c to use #include <mysql.h>, as mysql_config will set the
include path to /path/to/include/mysql/ so <mysql/mysql.h> would not
work.
Remove errmsg.h include as it is not used.
pkg-config uses uppercase for its _CFLAGS and _LIBS variable names.
So we follow suit and convert all _cflags and _libs variables to
uppercase for more consistency.