summaryrefslogtreecommitdiff
path: root/tests/nonblock-wrappers.h
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-25602 get rid of __WIN__ in favor of standard _WIN32Vladislav Vaintroub2021-06-061-2/+2
| | | | | | | | | | This fixed the MySQL bug# 20338 about misuse of double underscore prefix __WIN__, which was old MySQL's idea of identifying Windows Replace it by _WIN32 standard symbol for targeting Windows OS (both 32 and 64 bit) Not that connect storage engine is not fixed in this patch (must be fixed in "upstream" branch)
* After-review changesSergei Golubchik2016-09-121-38/+0
| | | | | | * remove redundant code * fix tests * move declarations and defines where they belong
* MDEV-9293 - Use MariaDB's Connector/C in serverVladislav Vaintroub2016-08-251-1/+2
|
* Revert "MDEV-9293 Connector/C integration"Vladislav Vaintroub2016-08-191-2/+1
| | | | This reverts commit 7b89b9f5108c80f4f270da922d7e6c182a663719.
* MDEV-9293 Connector/C integrationVladislav Vaintroub2016-08-191-1/+2
|
* Fix spelling: occurred, execute, which etcOtto Kekäläinen2016-03-041-1/+1
|
* MWL#192: non-blocking client API, after-review fixes.unknown2012-01-061-11/+13
| | | | | | | | | | | 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).
* MWL#192: Non-blocking client API for libmysqlclient.unknown2011-09-201-0/+514
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.