summaryrefslogtreecommitdiff
path: root/mysys/my_context.c
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-23238 - remove async client from server code.Vladislav Vaintroub2020-09-011-761/+0
| | | | | | | 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
* Minor spelling fixes in code comments, docs and outputOtto Kekäläinen2018-01-121-1/+1
| | | | | This commit does not touch any variable names or any other actual code, and thus should not in any way affect how the code works.
* Merge branch '10.1' into 10.2Sergei Golubchik2017-03-301-1/+2
|\
| * Merge branch '5.5' into 10.0Vicențiu Ciorbaru2017-03-081-1/+2
| |\
| | * mysql_client_test_nonblock fails when compiled with clangVicențiu Ciorbaru2017-03-081-1/+2
| | | | | | | | | | | | | | | | | | | | | mysql_client uses some inline assembly code to switch thread stacks. This works, however tools that perform backtrace get confused to fix this we write a specific constant to signify bottom of stack. This constant is needed when compiling with CLang as well.
* | | Merge branch '10.1' into 10.2Sergei Golubchik2016-09-091-10/+7
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.0Sergei Golubchik2016-08-101-10/+7
| |\ \ | | |/
| | * MDEV-10357 my_context_continue() does not store current fiber on WindowsVladislav Vaintroub2016-08-031-10/+7
| | | | | | | | | | | | | | | Make sure current fiber is saved in my_context::app_fiber in both my_context_spawn() and my_context_continue()
| * | Merge branch 'mdev9991' into mdev9991-10.0Kristian Nielsen2016-06-081-2/+2
| |\ \ | | |/
* | | Merge branch '10.1' into 10.2Sergei Golubchik2016-06-301-2/+2
|\ \ \
| * \ \ Merge branch 'mdev9991' into mdev9991-10.1MDEV-8947Kristian Nielsen2016-06-081-2/+2
| |\ \ \ | | |/ / | |/| / | | |/
| | * Fix compiler check for stack unwind hintKristian Nielsen2016-06-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The check inserts a DWARF directive to tell stack unwinding that the bottom of the (co-routine) stack has been reached. Without this, stack traces may attempt to continue past the bottom of the stack. The GCC version check was incorrect, and failed to trigger for GCC version 5.[0123].
* | | cmake: remove unused checks, options, and symbolsSergei Golubchik2015-11-231-7/+7
|/ /
* | 5.5 mergeSergei Golubchik2015-01-211-5/+8
|\ \ | |/
| * Fixed a couple of compiler warnings.Sergey Vojtovich2014-12-191-5/+8
| |
* | 10.0-base mergeSergei Golubchik2013-07-181-0/+34
|\ \ | |/
| * MDEV-4601 : Allow MariaDB to be build without non-blocking client.Vladislav Vaintroub2013-06-151-0/+34
| | | | | | | | | | Non-blocking client currently can be build on Windows, GCC on i386 and x64, or any OS wth ucontext.h header. Prior to this patch, build failed if neither of these conditions is true. Fix to avoid compiler errors in these case - non-blocking API would not be useful on , but otherwise everything will work as before.
* | Merge MariaDB 10.0-base to MariaDB 10.0unknown2012-12-181-1/+1
|\ \ | |/
| * MDEV-3830 - fix compilation for Intel compiler, Vladislav Vaintroub2012-11-041-1/+1
| | | | | | | | avoid .cfi_escape , 32 bit code.
* | Merge 5.5 -> 10.0-sergSergey Petrunya2012-11-041-1/+1
|\ \ | |/
| * MDEV-3830 - fix build on Intel compilerVladislav Vaintroub2012-11-031-1/+1
| |
* | merge with 5.5Sergei Golubchik2012-11-031-5/+14
|\ \ | |/
| * Fix crashes on 32-bit async client lib when -fomit-frame-pointerunknown2012-10-311-5/+16
| | | | | | | | | | | | | | | | | | | | - Ensure asm parameters are in registers, so we do not de-reference from bogus stack pointer. - Make return address undefined in DWARF unwind info in my_context_spawn, so DWARF-based unwinders will know this is the end of the call stack (same as the amd64 fix for the similar issue).
* | fix async client code for i386 (assembly)Sergei Golubchik2012-10-301-3/+3
|/ | | | and when safemalloc is enabled (use ucontext, otherwise backtrace function gets confused and crashes)
* MWL#192 after-merge fixes.unknown2012-02-231-7/+7
| | | | | | | | Fix memory leak in one error case in mysqldump. Fix that HAVE_VALGRIND_VALGRIND_H is now HAVE_VALGRIND in 5.5. Fix that @have_ssl should not be set in embedded (introduced when removing #undef HAVE_OPENSSL from my_global.h).
* Merge MWL#192: Non-blocking client library, into MariaDB 5.5.unknown2012-02-211-2/+22
|
* fix typo.unknown2012-01-071-1/+1
|
* MWL#192: non-blocking client API, after-review fixes.unknown2012-01-061-87/+35
| | | | | | | | | | | 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/+749
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.