Commit Graph

21 Commits

Author SHA1 Message Date
3f7719c74d Typo fixes (from PR #200) 2022-06-27 13:23:35 +02:00
510c7e5dfe New options MARIADB_CONNECTION_BYTES_READ/SENT
Added new options MARIADB_CONNECTION_BYTES_READ and
MARIADB_CONNECTION_BYTES_SENT which can be passed to
mariadb_get_infov() api funcion to obtain the bytes sent
or read to/from database server.
2022-01-02 14:14:39 +01:00
779925868d Don't define uchar if my_global.h was previously included (server build) 2020-10-11 05:01:56 +02:00
8222338462 Fix for CONC-492:
To build a client plugin outside of Connector/C source tree, we
need to define uchar, since we don't provide ma_global.h in packages.
2020-09-05 16:23:38 +02:00
b19f6a475b CONC-329: change pvio_*_blocking to return int to accomidate SOCKET_ERROR(-1)
POWER and other architectures that define char(as my_bool) to be unsigned (as the C
standard leaves this undefined). This resulted in error branches being
unreachabe as indicated by the below compile warnings.

plugins/pvio/pvio_socket.c:763:42: warning: comparison of constant -1 with expression of type 'my_bool' (aka 'char') is always
      false [-Wtautological-constant-out-of-range-compare]
    if (pvio_socket_blocking(pvio, 1, 0) == SOCKET_ERROR)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
plugins/pvio/pvio_socket.c:875:46: warning: comparison of constant -1 with expression of type 'my_bool' (aka 'char') is always
      false [-Wtautological-constant-out-of-range-compare]
        if (pvio_socket_blocking(pvio, 0, 0) == SOCKET_ERROR)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
plugins/pvio/pvio_socket.c:907:42: warning: comparison of constant -1 with expression of type 'my_bool' (aka 'char') is always
      false [-Wtautological-constant-out-of-range-compare]
    if (pvio_socket_blocking(pvio, 1, 0) == SOCKET_ERROR)

ma_hext2int: signed char - prevent compiler errors when char is unsigned.

libmariadb/ma_tls.c:169:31: warning: comparison of constant -1 with expression of type 'char' is always false
      [-Wtautological-constant-out-of-range-compare]
    if ((d1 = ma_hex2int(*p)) == - 1 ||
        ~~~~~~~~~~~~~~~~~~~~~ ^  ~~~
libmariadb/ma_tls.c:170:35: warning: comparison of constant -1 with expression of type 'char' is always false
      [-Wtautological-constant-out-of-range-compare]
        (d2 = ma_hex2int(*(p+1))) == -1 ||
        ~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~

To fix this all the pvio_*_blocking functions have been changed to use
int as a return value.

Other my_bool/char differences fixed:

mariadb_dyncol_val_str: fix prototype to use char - like implemented function.

unittest: bind.is_null is my_bool* so we use a my_bool.
2018-07-19 08:12:33 +10:00
629ec64630 Fix PVIO to return number of bytes read/written as "signed" integer
since there is a lot of checks for return code being < 0 or -1.
2016-10-13 17:42:03 +00:00
9f88e25fd6 Compiler warning fixes 2016-09-03 12:46:50 +02:00
2a7cc977fb Shared memory fixes 2016-08-24 19:26:30 +02:00
437b9cd1e4 CONC-184 : provide a function to cancel a current connection
(without invalidating MYSQL struct, without sending KILL)
This apparently is useful for replication handling in the server
2016-05-21 12:35:06 +00:00
bea035a72b - Unittests: link static library instead of dynamic
- TLS/SSL: renamed HAVE_SSL to HAVE_TLS to avoid trouble in
  10.2-integration
- Fixed wrong timeout in non-blocking mode
- Fixed valgrind error in prepared statement
2016-03-28 10:29:55 +02:00
4b1e94bccc Since we use TLS and not SSL functions and structures were renamed
from SSL to TLS
2016-03-16 18:20:08 +01:00
4ca933bb81 Global cleanup:
removed global locks
  removed dead code and files
  removed dbug
2016-02-08 18:43:02 +01:00
25e610c965 Removed deprecated API functions:
- mysql_close
- mysql_create_db
- mysql_drop_db
- mysql_get_parameters
Fixed build error when SSL is disabled
max_allowed_packet and net_buffer size needs to be retrieved via
mysql_get_option now (instead of mariadb_get_info)
2016-01-27 18:21:08 +01:00
f9232bacff Fixed redefinition for ssl structure 2016-01-18 06:36:38 +01:00
ebe3cc9935 - Added new function mariadb_get_connection_type which returns -1 on
error, or MARIADB_CONNECTION_{UNIX_SOCKET,TCP,NAMEDPIPE,SHAREDMEM}
- Disabled asynchronous API for named pipes and shared memory connecit++ions
- Added package suffix ("alpha")
- removed myodbc_remove_escape api function
- Fixed return value (length) for named pipe read/write operations
2015-11-23 10:58:28 +01:00
f30bb95c6a Fix for asynchronous (reconnect)
Fixed memory leak after reconnect/change user
2015-11-19 16:55:25 +01:00
0af129fe80 Moved async read/write to pvio:
plugins now contain their own asynchronous read/write functions.
Todo:
  - asynchronous SSL
  - asynchronous read/write for non socket plugins
2015-11-16 07:37:31 +01:00
2f4061eadc CONC-147: Allow client to bind to a specific address
- minor fixes
- added testcase
2015-11-04 09:22:29 +01:00
301d0de34c Windows fixes:
fixed type mismatch warnings in client_plugin.c
 fixed prototypes and const/non const warnings in windows pvio
 removed debug from msi package
 added plugin dependencies for msi package
2015-11-01 08:34:12 +01:00
b21a01514d removed duplicate typedef for MARIADB_PVIO 2015-10-29 10:19:00 +01:00
7500f37150 - Renamed cio to pvio (pluggable virtual IO)
- minor fixes in windows schannel
2015-10-27 10:24:48 +01:00