summaryrefslogtreecommitdiff
path: root/include/my_context.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.1' into 10.2Sergei Golubchik2016-03-231-1/+1
|\
| * Fix spelling: occurred, execute, which etcOtto Kekäläinen2016-03-041-1/+1
| |
| * Merge MDEV-9112 into 10.0Kristian Nielsen2016-02-011-1/+1
| |\ | | | | | | | | | | | | Conflicts: configure.cmake
* | \ Merge branch '10.1' into 10.2Monty2016-02-061-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: VERSION cmake/plugin.cmake config.h.cmake configure.cmake plugin/server_audit/server_audit.c sql/sql_yacc.yy
| * \ \ Merge MDEV-9112 into 10.1Kristian Nielsen2016-02-011-1/+1
| |\ \ \ | | |/ / | |/| / | | |/ | | | | | | Conflicts: config.h.cmake configure.cmake
| | * MDEV-9112: Non-blocking client API missing on non-x86 platformsGeorg Richter2016-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | The check for UCONTEXT in cmake was somehow become broken, disabling the fallback to ucontext. This caused the non-blocking client API to not be available for non-x86 platforms, on which no hand-crafted assembler implementation of my_context is available.
* | | cmake: remove unused checks, options, and symbolsSergei Golubchik2015-11-231-3/+3
|/ /
* | 10.0-base mergeSergei Golubchik2013-07-181-2/+11
|\ \ | |/
| * MDEV-4720 : fix my_context.h for use with x32 ABI.Vladislav Vaintroub2013-06-271-1/+1
| | | | | | | | Do not use x64 assembler implementation in x32.
| * MDEV-4601 : Allow MariaDB to be build without non-blocking client.Vladislav Vaintroub2013-06-151-1/+10
| | | | | | | | | | 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 with 5.5Sergei Golubchik2012-11-031-1/+1
|\ \ | |/
* | fix async client code for i386 (assembly)Sergei Golubchik2012-10-301-1/+1
| | | | | | | | and when safemalloc is enabled (use ucontext, otherwise backtrace function gets confused and crashes)
* | MDEV-3802: Millisecond timeout support in non-blocking client library + fix ↵unknown2012-10-121-2/+2
|/ | | | | | | | | | | | | | | | | | | incorrect blocking. After the merge of VIO stuff from MySQL 5.6, there were some bugs left in the non-blocking client library: - vio_io_wait() was introduced without any support for non-blocking operation, so async queries could turn into sync. - Timeouts were changed to milliseconds, but this was not reflected in the non-blocking API, also semantics was changed so signed -1 was used for "no timeout" rather than unsigned 0. Fix by implementing and using my_io_wait_async() in the non-blocking case. And by introducing a new mysql_get_timeout_value_ms() API function that provides the timeout with millisecond granularity. The old mysql_get_timeout_value() is kept and fixed to work correctly, converting the timeout to whole seconds.
* MWL#192 after-merge fixes.unknown2012-02-231-3/+3
| | | | | | | | 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).
* MWL#192: non-blocking client API, after-review fixes.unknown2012-01-061-11/+12
| | | | | | | | | | | 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/+222
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.