Commit graph

107 commits

Author SHA1 Message Date
Otto Kekalainen
50c8ef01fc Fix trivial spelling errors
- agressively -> aggressively
- exising -> existing
- occured -> occurred
- releated -> related
- seperated -> separated
- sucess -> success
- use use -> use

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
2023-03-24 12:54:05 +11:00
Marko Mäkelä
e538cb095f Merge 10.5 into 10.6 2021-03-27 18:03:03 +02:00
Marko Mäkelä
7ae37ff74f Merge 10.3 into 10.4 2021-03-27 17:12:28 +02:00
Vladislav Vaintroub
da26e2e673 Cleanup - reduce duplicate code, in SSL IO error handling. 2021-03-25 11:16:54 +01:00
Vladislav Vaintroub
cdb86faf82 MDEV-23740 postfix - potentially uninitialized variable passed to vio_socket_io_wait.
Thanks to Daniel Black for reporting.
2021-03-24 16:53:39 +01:00
Marko Mäkelä
00528a0445 Merge 10.5 into 10.6 2021-03-19 13:35:18 +02:00
Marko Mäkelä
44d70c01f0 Merge 10.3 into 10.4 2021-03-19 11:42:44 +02:00
Vladislav Vaintroub
987cfa227d MDEV-23740 - X509_R_CERT_ALREADY_IN_HASH_TABLE when establishing SSL connection
connection.

Ignore harmless X509_R_CERT_ALREADY_IN_HASH_TABLE, similar to how Curl or
other projects treat it.
2021-03-15 19:37:40 +01:00
Vladislav Vaintroub
32a29afea7 MDEV-23238 - remove async client from server code.
It is already in libmariadb, and server (also that client in server)
does not need it.

It does not work in embedded either since it relies on non-blocking sockets
2020-09-01 21:30:52 +02:00
Vladislav Vaintroub
d251b76884 Fix warning when compiling with OpenSSL. 2019-09-09 13:52:30 +02:00
Vladislav Vaintroub
5e4b657dd4 MDEV-18531 : Use WolfSSL instead of YaSSL as "bundled" SSL/encryption library
- Add new submodule for WolfSSL
- Build and use wolfssl and wolfcrypt instead of yassl/taocrypt
- Use HAVE_WOLFSSL instead of HAVE_YASSL
- Increase MY_AES_CTX_SIZE, to avoid compile time asserts in my_crypt.cc
(sizeof(EVP_CIPHER_CTX) is larger on WolfSSL)
2019-05-22 13:48:25 +02:00
Marko Mäkelä
be85d3e61b Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
Marko Mäkelä
26a14ee130 Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
Vicențiu Ciorbaru
cb248f8806 Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
Vicențiu Ciorbaru
5543b75550 Update FSF Address
* Update wrong zip-code
2019-05-11 21:29:06 +03:00
Marko Mäkelä
862af4d255 Merge 10.2 into 10.3 2018-11-07 13:11:04 +02:00
Vladislav Vaintroub
04789ec801 MDEV-14781 - threadpool slowdown with slow ssl handshake.
Fix is not to use blocking socket IO during SSL handshake.
With non-blocking socket IO, threadpool is able to utilize the wait
notification callbacks, that vio_io_wait() is calling whenever
socket would block.
2018-11-07 02:10:52 +01:00
Vladislav Vaintroub
4c0d391c92 Windows : fix broken build with OpenSSL 2018-09-08 20:36:31 +01:00
Vladislav Vaintroub
9891ee5a2a Fix and reenable Windows compiler warning C4800 (size_t conversion). 2018-01-26 10:37:46 +00:00
Vladislav Vaintroub
eba44874ca MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.
- Fix win64 pointer truncation warnings
(usually coming from misusing 0x%lx and long cast in DBUG)

- Also fix printf-format warnings

Make the above mentioned warnings fatal.

- fix pthread_join on Windows to set return value.
2017-09-28 17:20:46 +00:00
Sergei Golubchik
ba076763ec remove ssl debugging report_errors() function that was sometimes destroying the state 2014-12-01 22:24:58 +01:00
Sergei Golubchik
82f56328ea after merge fixes:
* adjust viossl.c to take account the new code
  (SSL_get_error is used now, cannot simply remap it)
* remove unnecessary version check
* update the test to 10.0
2014-11-21 00:02:24 +01:00
Sergei Golubchik
dbbe365132 5.5 merge 2014-11-20 16:27:16 +01:00
Sergei Golubchik
d851d5e70c MDEV-6975 Implement TLS protocol
followup:
* explicitly disable SSLv2 and SSLv3, keep other protocols enabled
* fix a compiler warning
* rename the test and combinations to avoid confusion

vio/viossl.c:
  fix a compiler warning
2014-11-19 18:54:02 +01:00
Sergei Golubchik
3495801e2e 5.5 merge 2014-11-19 17:23:39 +01:00
Sergei Golubchik
c8fa6f782c improve OpenSSL error reporting
e.g. from "error:00000001:lib(0):func(0):reason(1)"
to "error:140830B5:SSL routines:SSL3_CLIENT_HELLO:no ciphers available"
2014-11-18 17:56:49 +01:00
Sergei Golubchik
0dc23679c8 10.0-base merge 2014-02-26 15:28:07 +01:00
Sergei Golubchik
84651126c0 MySQL-5.5.36 merge
(without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
2014-02-17 11:00:51 +01:00
Murthy Narkedimilli
c92223e198 Updated/added copyright headers 2014-01-06 10:52:35 +05:30
Sergei Golubchik
72ba95873a 10.0-base merge
(without InnoDB - all InnoDB changes were ignored)
2013-06-06 21:32:29 +02:00
Sergei Golubchik
e0a08c567a Compilation warnings.
openssl compilation problem.
2013-05-07 18:26:22 +02:00
Sergei Golubchik
b381cf843c mysql-5.5.31 merge 2013-05-07 13:05:09 +02:00
Harin Vadodaria
cc85d62c68 Bug#16235681: TURN OFF DEFAULT COMPRESSION WHILE USING
OPENSSL

Description: Merge from 5.1.
2013-02-19 12:19:10 +05:30
Harin Vadodaria
c401365423 Bug#16235681: TURN OFF DEFAULT COMPRESSION WHILE USING
OPENSSL

Description: Specify preference to disable compression
             while using OpenSSL library. OpenSSL uses
             zlib compression by default which may
             lead to some problems.
2013-02-19 12:17:31 +05:30
Michael Widenius
f1159b18d9 More fixes 2012-08-17 16:46:34 +03:00
Michael Widenius
60589aeee0 Next part of merge. See TODO for details 2012-08-14 17:23:34 +03:00
unknown
f6b68a1070 Merge MWL#192: Non-blocking client library, into MariaDB 5.5. 2012-02-21 22:15:44 +01:00
unknown
17940b652d MWL#192: non-blocking client API, after-review fixes.
Main change is that non-blocking operation is now an option that must be
explicitly enabled with mysql_option(mysql, MYSQL_OPT_NONBLOCK, ...)
before any non-blocing operation can be used.

Also the CLIENT_REMEMBER_OPTIONS flag is now always enabled and thus
effectively ignored (it was not really useful anyway, and this simplifies
things when non-blocking mysql_real_connect() fails).
2012-01-06 12:43:18 +01:00
Sergei Golubchik
0e007344ea mysql-5.5.18 merge 2011-11-03 19:17:05 +01:00
unknown
a5b881594d MWL#192: Non-blocking client API for libmysqlclient.
All client functions that can block on I/O have alternate _start() and
_cont() versions that do not block but return control back to the
application, which can then issue I/O wait in its own fashion and later
call back into the library to continue the operation.

Works behind the scenes by spawning a co-routine/fiber to run the
blocking operation and suspend it while waiting for I/O. This
co-routine/fiber use is invisible to applications.

For i368/x86_64 on GCC, uses very fast assembler co-routine support. On
Windows uses native Win32 Fibers. Falls back to POSIX ucontext on other
platforms. Assembler routines for more platforms are relatively easy to
add by extending mysys/my_context.c, eg. similar to the Lua lcoco
library.

For testing, mysqltest and mysql_client_test are extended with the
option --non-blocking-api. This causes the programs to use the
non-blocking API for database access. mysql-test-run.pl has a similar
option --non-blocking-api that uses this, as well as additional
testcases.

An example program tests/async_queries.c is included that uses the new
non-blocking API with libevent to show how, in a single-threaded
program, to issue many queries in parallel against a database.


client/async_example.c:
  Fix const warning
  ******
  Fix bug with wrong timeout value for poll().
include/Makefile.am:
  Fix missing include for `make dist`
include/mysql.h:
  Add prototypes for all non-blocking API calls.
include/mysql.h.pp:
  Add prototypes for all non-blocking API calls.
mysys/my_context.c:
  Fix type warning for makecontext() function pointer argument.
sql-common/mysql_async.c:
  Fix crashes in the non-blocking API for functions that can take MYSQL argument
  that is NULL.
tests/Makefile.am:
  Add header file to `make dist`
tests/mysql_client_test.c:
  Replace blocking calls with wrappers around the non-blocking calls, used in
  mysql_client_test to test the new non-blocking API.
tests/nonblock-wrappers.h:
  Replace blocking calls with wrappers around the non-blocking calls, used in
  mysql_client_test to test the new non-blocking API.
2011-09-20 12:49:25 +02:00
Sergei Golubchik
b4a0b2c2f8 post-merge fixes.
most tests pass.
5.3 merge is next
2011-07-02 22:12:12 +02:00
Sergei Golubchik
9809f05199 5.5-merge 2011-07-02 22:08:51 +02:00
Tatjana Azundris Nuernberg
20791d83de build fixes for -Werror (11745920) 2011-05-27 11:02:10 +01:00
Tatjana Azundris Nuernberg
cf80c6cb64 Bug#11745920/Bug#21287: "SSL connection error" is not helpful! (ssl-verify-server-cert=true vs localhos)
SSL errors on client and now more specific to aid end-user
with debugging. Also restructures error handling for
compliance with SSL docs.

include/violite.h:
  new_VioSSLConnectorFd/sslaccept/sslconnect return more elaborate status
libmysql/errmsg.c:
  SSL errors now extended, more specific
mysql-test/r/openssl_1.result:
  SSL errors now extended, more specific
sql-common/client.c:
  Do more detailed error reporting for setup, connect, and
  server cert verifying phases.
sql/sql_acl.cc:
  sslaccept() signature has changed
vio/viossl.c:
  Save the error code and return it to callers of sslaccept
  and sslconnect.
vio/viosslfactories.c:
  new_VioSSLConnectorFd(): return error code to caller
2011-05-19 10:47:43 +01:00
Kent Boortz
02e07e3b51 Updated/added copyright headers 2011-06-30 17:46:53 +02:00
Sergei Golubchik
65ca700def merge.
checkpoint.
does not compile.
2010-11-25 18:17:28 +01:00
Mats Kindahl
b0836bd309 Merging with mysql-5.5-stage. 2010-08-16 14:50:27 +02:00
Davi Arnaut
07e7b4d6fe WL#5486: Remove code for unsupported platforms
Remove Netware specific code.
2010-07-15 08:13:30 -03:00
Mats Kindahl
aaf2bdde94 WL#5363: Thread Pool Service Interface
In order to allow thread schedulers to be dynamically loaded,
it is necessary to make the following changes to the server:

- Two new service interfaces

- Modifications to InnoDB to inform the thread scheduler of state changes.

- Changes to the VIO subsystem for checking if data is available on a socket.

- Elimination of remains of the old thread pool implementation.

The two new service interfaces introduces are:

my_thread_scheduler
  A service interface to register a thread
  scheduler.

thd_wait
  A service interface to inform thread scheduler
  that the thread is about to start waiting.

In addition, the patch adds code that:

- Add a call to thd_wait for table locks in mysys
  thd_lock.c by introducing a set function that
  can be used to set a callback to be used when
  waiting on a lock and resuming from waiting.

- Calling the mysys set function from the server
  to set the callbacks correctly.
2010-06-07 16:01:39 +02:00
unknown
3e32ba3ff1 Fix some compiler warnings seen in Buildbot.
Add some extra error output and code cleanup in an attempt to fix/debug
a rare random testsuite problem in check_warnings, where the exit code
from mysqltest is somehow corrupted inside mysql-test-run.pl.

include/my_global.h:
  Fix compiler warnings on some platforms.
mysql-test/lib/My/SafeProcess.pm:
  Move dereference of $? subprocess exit code closer to where it is generated,
  to make the code more robust and on the chance that this will fix the
  occasional problems in check_warnings we see in Buildbot.
mysql-test/mysql-test-run.pl:
  When check_warnings failed, also log the mysqld server for which it failed.
sql/sql_lex.cc:
  Fix compiler warning about possibly uninitialised value, by rewriting a for()
  loop that is always executed at least once into a do .. while() loop with an
  assert.
sql/table.cc:
  Fix compiler warning about uninitialised value.
storage/federatedx/ha_federatedx.cc:
  Fix uninitialised variable.
storage/maria/ma_delete.c:
  Fix compiler warning about uninitialised value.
storage/maria/ma_loghandler.c:
  Fix compiler warning about uninitialised value.
storage/myisam/ft_stopwords.c:
  Fix compiler warning.
storage/myisam/mi_write.c:
  Fix compiler warning about possibly uninitialised value, by rewriting a while()
  loop that is always executed at least once into a do .. while() loop with an
  assert.
storage/xtradb/btr/btr0cur.c:
  Fix compiler warning about possibly uninitialised value.
support-files/compiler_warnings.supp:
  Fix warning suppression to cover all cases in yassl.
vio/viossl.c:
  Fix compiler warning.
2010-03-10 11:32:14 +01:00