1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-05 15:55:58 +03:00
Commit Graph

32 Commits

Author SHA1 Message Date
Georg Richter
56178db1c5 Fix for CONC-726:
The callback function declaration for parameter callbacks should
be bool instead of bool * (typo).
2024-09-14 16:16:04 +02:00
Georg Richter
dd8962a4b5 Merge branch '3.1' into 3.3 2023-04-25 15:08:28 +02:00
Georg Richter
2000b06183 Replace SET_CLIENT_STMT_ERROR by stmt_set_error(). 2023-04-11 18:31:19 +02: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
73478fd7f4 Method clean up:
- removed unused methods from MYSQL_STMT handle,
  (left over from PHP's mysqlnd)
- Added execute_generate_request method: This will allow
  Connector/Python to prefill the execute buffer without
  numerous GIL acquire/release calls.
2021-07-25 13:06:01 +02:00
Oleksandr Byelkin
895dcb61e3 C preprocessor defines fix 2020-06-04 16:49:21 +02:00
Marko Mäkelä
de57d6ada5 Fix GCC 8 -Wstringop-truncation
If strncpy() truncates the string due to insufficient destination
buffer, it will not NUL-terminate the destination string.
9faaea38bc ensured that the
destination string will always be NUL-terminated, by writing a NUL to
the end of the buffer.

But, it failed to silence a -Wstringop-truncation warning.
This fix (which should be non-functional) actually does that.
2019-09-04 11:16:15 +03:00
Georg Richter
9faaea38bc Fix gcc warnings 2019-09-04 09:36:20 +02:00
Georg Richter
212a9f6519 Fixed prototype for ps callback functions
Connectori/Python callback fixes
2018-12-05 13:40:58 +01:00
Georg Richter
655d902203 CONC-347: Add function mysql_stmt_fetch_field 2018-12-03 13:44:08 +01:00
Georg Richter
e9b3aef20f CONC-348: Add callback support for prepared statements
Client application can now register callback functions for either sending or retrieving data:
- typedef void (*ps_result_callback)(MYSQL_STMT *stmt, unsigned int column, unsigned char **row);
- typedef my_bool *(*ps_param_callback)(MYSQL_STMT *stmt, MYSQL_BIND *bind, unsigned int row_nr);

These functions will be registerd via mysql_stmt_attr_set call by specifying options STMT_ATTR_CB_PARAM
or STMT_ATTR_CB_RESULT.
2018-12-03 13:04:16 +01:00
Georg Richter
639413cb21 Implementation of CONC-349:
Added new parameter STMT_ATTR_STATE to retrieve statement status via api
function mysql_stmt_attr_get
2018-10-23 13:11:23 +02:00
Georg Richter
b0f2e4e72f Coverity fixes and travis integration 2018-07-06 09:28:24 +02:00
Lawrin Novitsky
31f7fb00fc Implementation and testcase for CONC-275 - skipping particular paramset in bulk operation - with help of special indicator value STMT_INDICATOR_IGNORE_ROW set in any column of the row.
The revision also adds some (mainly VS specific) file/dirs definitions to .gitignore to make 'gid status' usable on Windows, and the typo in bulk1 testsuite
2017-10-10 12:23:19 +02:00
Georg Richter
ea8a31e63a Fixed compiler warnings 2017-07-04 13:56:38 +02:00
Georg Richter
6f113bb118 Merge remote-tracking branch 'origin/master' into 10.2-server 2017-06-14 14:55:05 +02:00
Georg Richter
e5ce85b0b6 Fix for MDEV-13040: mariadb_stmt.h contains C++ comments 2017-06-08 16:39:04 +02:00
Oleksandr Byelkin
d0f9234620 MDEV-12471: BULK Command
After test fixes.
bulk_null() is disabled. Before the client library took care about MYSQL_TYPE_NULL, now it do not do it so server return an error. and I have no idea what should be chenged test or client library.
2017-05-01 15:05:49 +02:00
Georg Richter
08450df078 initial implementation for MDEV-12471 2017-04-24 15:45:58 +02:00
Georg Richter
9a865bc88c Fix for CONC-243:
ABI breakage: Revert parameter length from size_t to unsigned long.
  (affects mysql_stmt_prepare, mysql_real_query, mysql_send_query)
2017-03-14 16:11:04 +01:00
Georg Richter
b10c4f9e7b Fix for CONC-231: Incorrect FSF address 2017-02-05 11:35:11 +01:00
Georg Richter
7a1e3a699d - Fixed crash in prepared statement: Indicator variable should be checked only if we are in bulk operation mode (=stmt->array_size > 0 and bulk is supported by server
- Added new api function mysql_get_server_status, so client applications no longer need to access members of the mysql structure
2016-12-10 14:09:53 +01:00
Georg Richter
03a7ec1b8b Support mariadb_stmt_execute_direct also for versions < 10.2
Bundled COM_CLOSE and COM_PREPARE packets
2016-11-12 17:51:01 +01:00
Georg Richter
9f88e25fd6 Compiler warning fixes 2016-09-03 12:46:50 +02:00
Georg Richter
8f388ad291 Changed MYSQL_BIND structure (so it will have the same size as in 2.3 and libmysql 2016-08-15 20:52:15 +02:00
Georg Richter
ecf26f7e6f Added support for indicator variables
Fixed windows compilation bug
2016-07-08 12:51:26 +02:00
Georg Richter
8e44202e74 Initial implementation for bulk operations/array binding in prepared statements 2016-07-01 10:10:11 +02:00
Georg Richter
26d31929d4 several fixes for mariadb_stmt_execute_direct:
- allow param binding via mysql_stmt_attr_set:
  mysql_stmt_attr_set(stmt, STMT_ATTR_PREBIND_PARAMS, &param_count);
- If a prepared statement will be reexecuted, we send COM_STMT_CLOSE
  together with COM_STMT_PREPARE and COM_STMT_EXECUTE
2016-06-18 14:07:28 +02:00
Georg Richter
89fce625b5 Build fixes for 10.2 integration 2016-03-01 13:54:33 +01:00
Georg Richter
d303cf76a7 More 10.2-integ fixes:
- renamed my_net functions (ma_net)
- fixed wrong types in ma_schannel.c
- fixed wrong parameter in client_plugin when building load string
2016-02-17 10:00:53 +01:00
Georg Richter
4ca933bb81 Global cleanup:
removed global locks
  removed dead code and files
  removed dbug
2016-02-08 18:43:02 +01:00