1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00
Commit Graph

24 Commits

Author SHA1 Message Date
Georg Richter
75d381ffb2 Build fix: moved Item_result back to mariadb_com.h
Since Item_result is not used by Connector/C's binlog api
only, but also by server code, Item_result enumeration was
moved back to mariadb_com.h
2025-01-07 16:58:39 +01:00
Georg Richter
78e56a7fd3 Fixed replication build
With fix for CONC-710 (Remove UDF declarations) in 3.1 branch,
we also removed the variable types, which are also used by
the binary log api.
The enumeration for variable types were now added back in
mariadb_rpl.h
2024-11-27 16:03:45 +01:00
Georg Richter
b323b5462d Windows installation fix:
MSI package didn't install include/mariadb.
2023-09-27 10:19:23 +02:00
Georg Richter
0e7082f159 Fix include file path for ma_io.h 2023-09-27 09:57:55 +02:00
Georg Richter
c8ca89112e Fix for CONC-659:
When checking for a semi sync indication header, we need also check if
the undocumented session variable @rpl_semi_sync_slave was set.
Otherwise the timestamp of the event could contain values which match
the 2 bytes of the semi sync header.

Since the variable rpl_semi_sync_slave and it's behavior is not documented,
a new option MARIADB_RPL_SEMI_SYNC was added.
2023-08-11 10:14:26 +02:00
Georg Richter
56b515648b Fix for CONC-650:
Added support for XID in GTID_EVENT (but also updated
documentation on https://mariadb.com/kb/en/gtid_event/).
2023-06-19 12:17:27 +02:00
Georg Richter
4de47e64a5 rpl/binlog api fixes:
- Store artifical checksum in event->checksum instead of raw.
- Fixed build when builing with external zlib library.
2023-03-07 09:58:51 +01:00
Georg Richter
ad53004184 Windows build fix
Since mariadb_rpl.h is a distributed include file which will be
included by other applications, we need to undefine DEFAULT_CHARSET
in case the application was built without NOGDI.
2023-02-27 17:27:01 +01:00
Georg Richter
ea74aa294f fix for replication/binlog api:
If flag BINLOG_DUMP_NON_BLOCK was set, we need to check the replica_id.
If it was not specified, a default value of 1 will be used.
2023-02-27 10:13:57 +01:00
Georg Richter
9890d34612 Remove ma_global.h (which is not included in package)
from mariadb_rpl include file.
2023-02-22 09:14:43 +01:00
Georg Richter
ece593f571 Merge branch '3.3-rpl' into 3.3 2023-02-21 17:11:56 +01:00
Georg Richter
87bd5bfc34 Removed decryption stuff from rpl api 2023-02-12 14:26:02 +01:00
Georg Richter
4dca917b7e Added support for all (?) events
- All (MariaDB and MySQL) events are now supported
- Added new api functions:
  - mariadb_rpl_error: returns error message
  - mariadb_rpl_errno: returns error number
  - mariadb_rpl_extract_rows: extract values of
    ROW_EVENTS
- Added decryption support
- Added uncompression
  -
2022-09-26 09:20:07 +02:00
Georg Richter
9c2e470825 PL fixes 2022-08-30 17:39:36 +02:00
Georg Richter
5f1f517cfa Various typo fixes
Includes fixes from PR-201.
2022-07-03 13:45:37 +02:00
Georg Richter
abddf0b0af Fixed ROTATE_EVENT
If timestamp is zero and flag LOG_EVEBNT_ARTIFICIAL_F was set the
event is a fake ROTATE_EVENT (https://mariadb.com/kb/en/fake-rotate_event/)
and needs different handling:
- a checksum might follow if @@binlog_checksum was set (CRC32)
- length calculation is different
2022-06-22 16:25:37 +02:00
Georg Richter
bc7bbd4752 Merge branch '3.2' into 3.3 2021-12-31 17:20:46 +01:00
Sutou Kouhei
3d0cc1afd3 Add support for ROWS_EVENT V2
ROWS_EVENT V2 has the extra-data field after the flags field in
header.

See also: https://dev.mysql.com/doc/internals/en/rows-event.html
2021-11-20 06:15:10 +09:00
Georg Richter
9c64567c75 Move new members of rpl_event structure to the end. 2021-10-11 17:55:43 +02:00
Georg Richter
004f9d4217 CONC-470: Support for semi synchronous replication
Beside already supported asynchronous replication
the replication/binlog API now supports semi
synchronous replication:

If an event contains a semi synchronous indicator (0xEF)
behind status byte and acknowledgement flag is set,
mariadb_rpl_fetch() automatically sends an acknowledge
message to the connected primary server.
2021-10-09 08:26:15 +02:00
Vladislav Vaintroub
5390a7780f Fix clang-cl 32bit warning.
STDCALL is not compatible with vararg functions.
2020-04-24 13:31:28 +02:00
Markus Mäkelä
be021582ff Add binlog checksum support
Binlog checksums are now detected and treated correctly. By subtracting
the checksum size from the event length, end-of-event strings are
calculated correctly. These are used at least in the ROTATE_EVENT which
were also fixed to use the event length stored in the event itself.
2019-01-24 13:32:40 +02:00
Markus Mäkelä
cb013c2c3d Fix table map event processing
The table name is also null-terminated so the length plus one byte needs
to be skipped.

If the table map event is not used immediately after the event is read,
the column types would point to possibly freed memory. To avoid this,
memory should be allocated for it.
2019-01-18 09:19:09 +02:00
Georg Richter
1888c141f7 Manual merge from CONC-325 branch: Initial implementation for binlog/replication API 2018-12-02 18:28:38 +01:00