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

36 Commits

Author SHA1 Message Date
Marko Mäkelä
dab59732d9 Fix GCC 14 -Wcalloc-transposed-args 2024-04-11 14:50:07 +03:00
Georg Richter
9c02505474 Fixed for MDEV-26761:
If mariadb_stmt_execute_direct fails, we need to set the number
of parameters (obtained by response packet of mysql_stmt_prepare)
back to the number of prebinded parameters to avoid memory
overrun.

This fix also includes several adress-sanitizer bugs in unit tests
of Connector/C.
2021-10-05 14:50:32 +02:00
Sergei Golubchik
4ac8030b33 fix memory leaks to keep LeakSanitizer happy 2019-03-05 20:21:32 +01:00
Georg Richter
eda04fe615 Fixed warning 2018-07-04 07:25:24 +02:00
Georg Richter
6658605159 Skip test for MDEV-16593 (not fixed yet) 2018-07-03 12:45:55 +02:00
Georg Richter
a0d4b422bd Fix for CONC-345: heap-use-after free in client_mpvio_read_packet
We need to check if pkt_len is > 0 before the buffer content will be checked.
2018-07-03 11:17:46 +02:00
Georg Richter
83eef02ec8 Test fixes:
for api functions which require string with length parameter (e.g.
  mysql_real_connect() or mysql_stmt_prepare() we now use the macro
  SL(string) which substitutes string and string length.
2018-02-16 13:05:35 +01:00
Georg Richter
929614903e Travis and Appveyor integration:
- added travis support
  - fixed appveyor settings
  - fixed some warnings (gcc 4.8)
  - removed sleep commands
  - disabled failing tests when running against MySQL server,
    mostly related to stored procedures and binary protocol
  - reverted fix for MDEV_10361

Still open: TLS/SSL appveyor tests, since .msi installation on appveyor doesn't provide certificates.
2018-02-16 12:14:01 +01:00
Georg Richter
da9ed3cdd2 Added test for MDEV-15133 2018-02-16 11:45:07 +01:00
Vladislav Vaintroub
935c33b690 Fix Windows size_t warnings. 2018-01-12 18:19:19 +00: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
ff4bfdf1ca Added conversion tests for bulk 2017-06-14 14:04:00 +02:00
Georg Richter
e50571e3ab Disallow bulk execution if parameter count is 0 2017-05-15 14:11:59 +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
Sergei Golubchik
424c542e7f compiler warning 2017-03-25 22:44:05 +01:00
Georg Richter
63e0897d43 Fix for MDEV-12247:
If a statement with open (read only) cursor is executed there is no buffered
result set (result set rows will be fetched directly from server), so we need to skip reading unbuffered result sets if a cursor is open.
2017-03-21 17:26:19 +01:00
Georg Richter
a1315d2a2d Fixed compiler warnings in bulk1.c and features-10_2.c 2017-03-06 15:04:47 +01:00
Georg Richter
4ab155cf39 Unit test fixes for server integration
- SSL tests require CERT_PATH. Subdirectory certs was removed. If Connector/C is build outside of the server tree, certification path has to be specified manually (-DCERT_PATH=/path/to/certs).
- All tables and users will removed, if the test passed (otherwise mtr will complain).
2017-03-04 17:37:39 +01:00
Georg Richter
64536703c7 Fix for CONC-218:
To prevent unexpected behavior when reusing a statement with mariadb_stmt_execute_direct
a call to mysql_stmt_attr_set with option STMT_ATTR_PREBIND_PARAMS will reset the statement before.
2016-11-29 13:30:17 +01:00
Georg Richter
8695a17cbc Added support for STMT_INDICATE_IGNORE indicator - please note that the counter part for indicator type ignore is not pushed in server repo yet. 2016-11-26 13:23:57 +01:00
Georg Richter
aabaac04aa Plugin fixes
- include ma_errmsg.h if plugin is built dynamically
- trace_example fixes
2016-11-24 08:56:27 +01:00
Georg Richter
3e624e50df removed definition of SQLSTATE_UNKNOWN (10.2 integration) 2016-11-17 16:04:33 +01:00
Georg Richter
a11382a8f5 Row wise binding fixes for prepared statements (bulk)
- Fixed offset calculation for length and indicator
- Ignore null values if indicator is STMT_INDICATOR_DEFAULT
2016-11-17 10:47:15 +01:00
Georg Richter
a499722377 removed ma_errmsg from mysql.h 2016-11-16 17:27:59 +01:00
Georg Richter
3378c0d8b7 Fixed array_binding for MYSQL_TYPE_NULL 2016-11-13 18:37:22 +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
64862325a5 Removed com_multi for mariadb_stmt_execute_direct
added support for pre 10.2-servers in mariadb_stmt_execute_direct
2016-11-10 05:49:11 +01:00
Georg Richter
468cda3cfb Fixed compilation errors introduced by 629ec646303.. 2016-10-18 10:53:31 +02:00
Georg Richter
c20974b039 - removed global context for tls, so code can be used also with no yassl branch in 10.2
- added new gnutls cipher mapping
- fixed ssl test case: skip hostname verification if both server and client run on localhost
- added server certificates
2016-10-17 16:02:51 +02:00
Vladislav Vaintroub
7cb8479605 Fix Win64 warnings. Correctly define my_socket in ma_global.h 2016-10-12 21:05:31 +00:00
Vladislav Vaintroub
4ed1ca0c68 Simplify rand_str()function 2016-09-10 13:21:02 +00:00
Vladislav Vaintroub
895b2eb91d Fix warnings 2016-09-09 20:22:38 +00:00
Georg Richter
9f88e25fd6 Compiler warning fixes 2016-09-03 12:46:50 +02:00
Georg Richter
fbf6fd1598 Valgrind fixes:
- fixed 2 unitialized memory errors
- fixed leak in client test
2016-08-21 20:35:13 +02:00
Georg Richter
cb413ad1f5 Added bulk test 2016-07-08 14:03:48 +02:00