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

144 Commits

Author SHA1 Message Date
Georg Richter
679b5b5cb7 Fix for CONC-317:
Parsing of configuration file fails if key/value pairs contain white spaces.
2018-04-12 07:00:43 +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
Vladislav Vaintroub
935c33b690 Fix Windows size_t warnings. 2018-01-12 18:19:19 +00:00
Georg Richter
e42dd6c0e0 Fix for MDEV-14165:
- The metadata length value for a column with a zerofill flag was calculated with a fixed length instead of using the reported length.
- fixed a possible stackoverflow, if the display width for a column with zerofill flag is greater then 22. (libmysql ps implementation truncates the result after 21 digits and reports truncation error).
2017-10-28 16:46:49 +02:00
Vladislav Vaintroub
931450c3f8 Fix some conversion warnings.
Exclude definitions from my_config.h that conflict with server's config.h
(most of ma_config.h is not used by connector anyway)

Avoid overriding server's SIGN_TARGET() macro, if used as subproject.
Make WITH_UNIT_TESTS exclude unit tests, like it is for the server.
2017-09-30 22:38:53 +00:00
Georg Richter
ea8a31e63a Fixed compiler warnings 2017-07-04 13:56:38 +02: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
87e861c360 client side implemetation for MDEV-10340:
int STDCALL mysql_reset_connection(MYSQL *mysql)
2016-12-29 19:10:35 +01:00
Georg Richter
c89d5d38e0 Fix for CONC-217: mariadb_stmt_execute_direct: Clear error message from mysql_stmt_execute if mysql_stmt_prepare failed 2016-11-26 13:47:43 +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
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
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
9207626bb4 10.2-integration
readded api functions
- mysql_debug (dummy)
- mysql_get_parameters
added low level api functions
- mysql_net_field_length
- mysql_net_read
2016-08-18 12:24:32 +02:00
Georg Richter
405bb926e9 Fix for CONC-198: can't use two statements per connection
If we have multiple open cursors we need to check the server_status per statement (not per connection)
2016-08-18 08:04:46 +02:00
Georg Richter
7b14603438 Fix for CONC-196: merged manually from connector_c_2.3 branch 2016-08-03 12:30:54 +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
b90b17804d Another fix for CONC-177: ps-protocol with integer values and zerofill
weren't correctly converted to strings
2016-05-30 20:46:29 +02:00
Georg Richter
9d51d5e3d6 Fix for CONC-179:
- Fixed offset for warning_count in ps protocol
- Added new api function mysql_stmt_warning_count
- For backwards compatibility we also update the value for
  mysql_warning_count function
2016-05-15 12:04:10 +02:00
Georg Richter
ca68323c7b Fix for CONC-177: Fixed length calculation for zerofill conversion from
float/double to string
2016-05-14 17:58:13 +02:00
Georg Richter
01f18549dd Fix for CONC-167: fix crash when fetching MYSQL_TYPE_BIT data.
MYSQL_TYPE_BIT has no fixed packlength, so we need to check
net_field_length instead
2016-04-12 12:37:21 +02:00
Georg Richter
b6d3af1bfc Fix for CONC-168: string conversion of timestamps is broken
When converting datetime with microseconds to string (binary protocol) number of decimal
places was ignored. Thanks to Patrick Huesmann for providing a fix.
2016-03-24 07:17:22 +01:00
Georg Richter
2f6791115f changed plugin library types from SHARED to MODULE
Fixed float/double/decimal converion for prepared statements:
  since _gcvt (Windows) and gcvt (*nix) deliver different results
  we use now dtoa.c from server package, which is licensed under
  LGPL.
2016-03-11 07:08:34 +01:00
Georg Richter
89fce625b5 Build fixes for 10.2 integration 2016-03-01 13:54:33 +01:00
Georg Richter
448b68023c Fix for CONC155: return trailing zero when fetching from binary columns
into string
2016-02-09 08:43:16 +01:00
Georg Richter
736913d961 Fix for CONC-154:
set stmt->state to MYSQL_STMT_FETCH_DONE if
  - result set is empty (nothing to fetch)
  - when madb_stmt_reset was called
2016-01-25 13:38:49 +01:00
Georg Richter
d68c7dae95 Fixed warning on Windows 64-bit build 2015-12-19 17:07:10 +01:00
Georg Richter
bec245a913 Initial aurora implementation 2015-12-10 12:52:51 +01:00
Georg Richter
f30bb95c6a Fix for asynchronous (reconnect)
Fixed memory leak after reconnect/change user
2015-11-19 16:55:25 +01:00
Georg Richter
72f7c4abf5 Windows 64-bit fixes:
changed type of length parameter in mysql_stmt_prepare,
mysql_real_query, mysql_stmt_send_long_data (incl. async _start
functions) from unsigned long to size_t.
Fixed warnings
2015-11-05 11:52:50 +01:00
Georg Richter
7500f37150 - Renamed cio to pvio (pluggable virtual IO)
- minor fixes in windows schannel
2015-10-27 10:24:48 +01:00
Georg Richter
0bc7dc5e3c Added build option WITH_REMOTEIO (default=off) 2015-09-19 13:02:30 +02:00
Georg Richter
b950d2cf48 CONC-141: set stmt->state to MYSQL_STMT_FETCH_DONE if no more resultsets
are available
2015-09-17 08:14:13 +02:00
holzboote@googlemail.com
3912195e17 Fix for CONC-67: mysql_stmt_fetch returns error instead of MYSQL_NO_DATA when using cursors 2014-01-25 18:16:36 +01:00
holzboote@googlemail.com
c9c78d0c31 Fix for CONC-60: crash when STMT_ATTR_UPDATE_MAX_LENGTH attribute was set and new date formats are used.
Special thanks to Lionel Elie Mamane and Daniel Bart for their tremendous help.
2013-11-20 20:37:30 +01:00
Georg Richter
d5a772de56 Windows build fixes
- use /MT flag instead of /MD
 - add debug libraries to package
2013-10-04 19:09:08 +02:00
Georg Richter
f2e78fe089 Fixed crash when calling mysql_close_options twice (pointer weren't adjusted to NULL)
Fixed wrong behaviour when using stored procedures inside prepared statements
Fixed identiation in my_stmt.h
2013-05-29 11:59:01 +02:00
Georg Richter
30caf3c64b - Fixed memory overrun in mysql_stmt_execute due to wrong length calculation.
- Fixed bug in mysql_stmt_next_result
- Fixed mysql_stmt_reset: multi result sets weren't flushed properly
- Fixed several test cases
2013-05-20 18:00:08 +02:00
Georg Richter
7afc51d9aa more test fixes 2013-03-13 21:43:39 +01:00
Georg Richter
84aea9721c Added support for embedded (sqlite) 2013-01-30 08:37:24 +01:00
Georg Richter
7816459d22 Fix for bug conc-5:
field->catalog is undefined if result set was obtained from mysql_stmt_result_metadata()
2012-12-26 20:57:26 +01:00
Georg Richter
2968f5dc19 - Fix for mysql_stmt_next_result:
obtain number of fields from mysql structure
  added test case (ps_new.c)
- Added additional parameter cipher for mysql_ssl_set
- some cosmetics for test cases
2012-11-29 17:27:56 +01:00