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

594 Commits

Author SHA1 Message Date
Georg Richter
209b23a38c Test fixes:
- Fixed failing test when running against MySQL server
- Disabled test when running against MySQL server.
2023-08-30 07:44:32 +02:00
Georg Richter
5f88f50cf0 Build fix:
Move the setting "treat warning as errors" befind feature detection,
otherwise several try_compile/try_run commands will fail.
2023-08-16 15:02:02 +02:00
Georg Richter
1acb81e11c Build fixes:
- Fixed build error, which was previously introduced by commit
c8ca89112e

- Treat warnings as errors
2023-08-16 14:09:34 +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
cd59c70ce7 Merge branch '3.1' into 3.3 2023-08-10 11:20:29 +02:00
Georg Richter
5000bc790a Test fix:
Always specify the socketname when calling my_test_connect().
2023-08-10 11:18:22 +02:00
Georg Richter
bec589e679 Merge branch '3.1' into 3.3 2023-04-26 08:10:40 +02:00
Georg Richter
f5a4c73df4 Fix memory leak in unittest 2023-04-26 08:10:08 +02:00
Georg Richter
dd8962a4b5 Merge branch '3.1' into 3.3 2023-04-25 15:08:28 +02:00
Georg Richter
b0ec2101bf Test fixes when testing against MySQL 2023-04-24 14:58:01 +02:00
Georg Richter
6c29921bbe travis fix:
remove server builds > 10.5, since 10.6 and above use
Connector/C 3.3 branch.
2023-04-22 06:56:53 +02:00
Georg Richter
2000b06183 Replace SET_CLIENT_STMT_ERROR by stmt_set_error(). 2023-04-11 18:31:19 +02:00
Georg Richter
dbb4d8d93b Fixed segfault:
Use rpl->host and port instead of mysql->options.
2023-02-22 11:32:21 +01:00
Georg Richter
ece593f571 Merge branch '3.3-rpl' into 3.3 2023-02-21 17:11:56 +01:00
Georg Richter
29a8156193 Skip test_bug49694 when testing with Xpand.
local_infile variable is not supported by XPand (XPT-600).
2023-02-18 08:49:25 +01:00
Georg Richter
2105a2bc7f Skip tests when testing with Xpand. 2023-02-18 08:39:10 +01:00
Georg Richter
80f18e417f SKIP debug test if testing with Xpand. 2023-02-18 08:33:49 +01:00
Georg Richter
780c330f38 Since we can't determine if load data local is
suppoerted by Xpand, we skip it for now.
2023-02-17 11:23:22 +01:00
Georg Richter
87bd5bfc34 Removed decryption stuff from rpl api 2023-02-12 14:26:02 +01:00
Georg Richter
e4417e725e Merge branch '3.1' into 3.3 2023-02-09 08:57:48 +01:00
Georg Richter
669726a1d9 Fix for CONC-633:
If prepare step failed in mariadb_stmt_execute_direct now both
mysql_stmt_error and mysql_error return the error message from
prepare step instead of error message of execute.
2023-02-08 12:21:22 +01:00
Georg Richter
75439c0f39 CONC-632
When resetting the connection with mysql reset_connection(), the
server_status must be checked and any other resultsets that mayi
exist must be removed.
2023-02-08 11:46:39 +01:00
Georg Richter
12bd1d5511 Merge branch '3.1' into 3.3 2023-01-16 12:12:46 +01:00
Georg Richter
895235815c Fix for CONC-627:
Don't substitute parameters in server error messages in
prepeated statement error handler function.
2023-01-16 11:13:00 +01:00
Georg Richter
003b5cd168 Follow up for CONC-622 test:
Host 0.0.0.0 is mapped to locahost, so we need another invalid
host address (1.0.0.0) instead and reduce the number of loops.
2023-01-15 17:41:29 +01:00
Georg Richter
5f6133653d Fix for CONC-623:
If callback function returns a non zero return code, execute
will now abort with error CR_ERR_STMT_PARAM_CALLBACK.
2023-01-15 15:12:38 +01:00
Georg Richter
abea2dfa6b Merge branch '3.1' into 3.3 2023-01-15 14:27:41 +01:00
Georg Richter
bf82b2d8cb Fix for CONC-624:
- ER() macro now checks if the error code is known, if not it will return
  "Unknown or undefined error code" (instead of crashing)
- SET_CLIENT_STMT_ERROR now maps to stmt_set_error and accepts variadic
  arguments
2023-01-15 14:11:54 +01:00
Georg Richter
da9bb98c0c CONC-622: Fix double free() if asnyc connect failed
If mysql_real_connect_start/cont failed, we need to
set async->pvio to zero after calling ma_pvio_close
to avoid double free() in mysql_close.
2022-12-27 14:36:44 +01:00
Georg Richter
28df8a73b6 Merge branch '3.3-status' into 3.3 2022-08-02 10:20:19 +02:00
Georg Richter
a8832afa2a status and session_tracik callback function:
This feature allows client applications to register a callback function,
which is called as soon as the server status changes or session_track
information was sent by the server.

Registration is handled via mysql_optionsv() API function:

mysql_optionsv(mysql, MARIADB_OPT_STATUS_CALLBACK, function, data)

The callback function must be defined as follws:

void status_callback(void *data, enum enum_mariadb_status_info type, ..)

  Parameters:
    - data  Pointer passed with registration of callback function
            (usually a connection handle)
    - type  Information type  STATUS_TYPE or SESSION_TRACK_TYPE

  Variadic Parameters:

  if (type == STATUS_TYPE):
    - server status (unsigned int)

  if (type == SESSION_TRACK_TYPE)
    - enum enum_session_state_type track_type - session track type

    if (track_type == SESSION_TRACK_SYSTEM_VARIABLES)
      - MARIADB_CONST_STRING *key
      - MARIADB_CONST_STRING *value

    else
      - MARIADB_CONST_STRING *value

An example can be found in connection.c (test_status_callback)
2022-08-02 10:10:50 +02:00
Georg Richter
dcb14e3c5d erge branch '3.1' into 3.3 2022-08-01 12:26:27 +02:00
Alexander Barkov
df6feae0df Libmariadb changes for MDEV-27009 Add UCA-14.0.0 collations 2022-07-27 12:56:56 +04:00
Marko Mäkelä
b9811b7c6d Fix clang -Wunused-but-set-variable 2022-07-26 08:16:53 +03:00
Georg Richter
2dd03f04d1 typo fixes (was PR 203) 2022-07-25 08:44:26 +02:00
Georg Richter
6dbd953420 Merge branch '3.1' into 3.3 2022-07-24 10:52:52 +02:00
Georg Richter
cdb6e90c35 Fix for CONC-608: Replace server error codes
Since Connector/C is not able to retrieve
error strings for server error codes, the following
error codes were replaced:

- ER_NET_PACKET_TOO_LARFE by CR_NET_PACKET_TOO_LARGE
- ER_OUT_OF_RESOURCES by CR_OUT_OF_MEMORY
- ER_NET_WRITE_ERROR by CR_ERR_NET_WRITE (new constant)
- ER_NET_UNCOMPRESS_ERROR by CR_ERR_NET_UNCOMPRESS (new constant)
2022-07-21 09:11:29 +02:00
Georg Richter
e8e356e355 Merge branch '3.1' into 3.3 2022-07-18 11:48:33 +02:00
Georg Richter
9a572bc548 Fix for CONC-604 and CONC-605:
This patch fixes a crash when reconnectiong via TLS.
2022-07-18 11:41:46 +02:00
Georg Richter
5f1f517cfa Various typo fixes
Includes fixes from PR-201.
2022-07-03 13:45:37 +02:00
Georg Richter
35826cd51c Test fix for test_bug4236 2022-06-29 13:27:28 +02:00
Georg Richter
fcce4a8c76 CONC-592: Register replica with host and port
Added new option MARIADB_OPT_RPL_REGISTER_REPLICA which expects
two parameters, host and port. When this option was set, rpl_open
will send a COM_REGISTER_SLAVE command with server_id, host and
port to the connected server. This information can be retrieved
by "SHOW SLAVE STATUS" command.

Example:

rc= mysql_optionsv(mysql, MARIADB_OPT_RPL_REGISTER_REPLICA,
                   "myhost", 123);
2022-05-23 14:05:06 +02:00
Georg Richter
fb1b3ad2a3 Merge branch '3.3' of https://github.com/mariadb-corporation/mariadb-connector-c into 3.3 2022-05-19 16:40:21 +02:00
Georg Richter
4fc7903cf3 test fix:
skip conc336 when testing against XPAND
2022-05-05 19:33:01 +02:00
Georg Richter
3ec6ba753d Skip test conc_336 if we test against XPAND
Due to timeout problems when testing against XPAND,
conc_336 will be disabled if tested with XPAND.
2022-05-04 14:59:14 +02:00
Georg Richter
0d20e47fe5 unittests: print server tls information 2022-04-28 13:10:44 +02:00
Georg Richter
f60a31b5a8 Debug information for tests:
Print tls releated server variables
2022-04-21 11:59:14 +02:00
rusher
ed083576af [misc] correct declaration-after-statement issue 2022-04-14 09:47:21 +02:00
diego Dupin
fb85d99d13 Adding xpand to test suite 2022-03-23 11:46:40 +01:00
Georg Richter
2b6a8c44c5 Merge branch '3.2' into 3.3 2022-03-01 11:30:59 +01:00