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
..
2009-11-16 21:49:51 +01:00
2010-09-15 15:48:15 +03:00
2010-05-24 21:54:08 +08:00
2010-03-04 09:03:07 +01:00
2011-04-14 12:11:57 +04:00
2009-05-15 12:15:56 +02:00
2011-01-20 19:08:12 +02:00
2011-01-04 14:36:37 +01:00
2009-10-28 09:52:34 +02:00
2010-02-25 23:13:11 +04:00
2009-02-15 12:58:34 +02:00
2010-05-28 00:07:40 +04:00
2010-09-12 18:40:01 +02:00
2010-02-02 14:17:21 +02:00
2010-06-10 11:11:52 +02:00
2010-06-10 11:11:52 +02:00
2010-08-17 11:14:46 +04:00
2009-09-18 16:01:18 +03:00
2010-03-28 21:10:00 +03:00
2009-11-30 10:54:26 +05:30
2009-05-21 13:06:43 +05:00
2011-02-28 19:39:30 +02:00
2009-10-28 09:52:34 +02:00
2009-05-15 12:15:56 +02:00
2009-06-05 18:35:22 +03:00
2010-08-17 11:14:46 +04:00
2010-08-17 11:14:46 +04:00
2010-08-17 11:14:46 +04:00
2011-02-28 19:39:30 +02:00
2009-05-11 20:54:00 -03:00
2009-10-28 09:52:34 +02:00
2009-10-28 09:52:34 +02:00
2009-12-22 13:52:23 +04:00
2011-05-02 20:58:45 +03:00
2010-05-24 21:54:08 +08:00
2009-12-27 15:54:41 +02:00
2011-05-12 16:31:54 +02:00
2011-01-25 12:14:28 +05:30
2011-01-20 19:08:12 +02:00
2009-03-19 12:20:28 +04:00
2011-03-30 14:33:53 +02:00
2011-02-17 12:43:53 +01:00
2011-02-17 12:43:53 +01:00
2011-02-17 12:43:53 +01:00
2009-10-28 09:52:34 +02:00
2010-08-07 17:42:30 +03:00
2009-09-30 08:35:31 +02:00
2010-03-28 21:10:00 +03:00
2010-11-18 11:53:08 +03:00
2010-03-22 16:27:59 +04:00
2011-01-17 15:11:33 +03:00
2011-03-03 18:39:26 +03:00
2009-11-30 14:42:24 +02:00
2010-03-28 21:10:00 +03:00
2011-05-02 20:58:45 +03:00
2010-11-11 13:25:23 +03:00
2010-11-25 00:57:34 +02:00
2010-11-12 13:12:15 +03:00
2009-12-27 15:54:41 +02:00
2009-12-27 15:54:41 +02:00
2009-09-29 17:38:40 +02:00
2010-01-15 17:27:55 +02:00
2010-08-31 02:16:38 +04:00
2011-02-20 18:51:43 +02:00
2009-03-03 21:34:18 +01:00
2011-02-20 18:51:43 +02:00
2009-09-06 00:42:17 +04:00
2010-09-03 19:20:30 +03:00
2010-06-29 10:28:17 +02:00
2011-05-03 19:10:10 +03:00
2009-05-15 12:15:56 +02:00
2009-08-27 15:17:09 +02:00
2010-05-19 11:18:59 +02:00
2009-09-08 00:50:10 +04:00
2010-08-07 17:42:30 +03:00
2009-05-15 12:15:56 +02:00
2010-10-18 16:12:27 +04:00
2009-05-15 12:15:56 +02:00
2010-05-24 21:54:08 +08:00
2009-03-03 21:34:18 +01:00
2009-10-20 11:00:07 -07:00
2009-05-15 12:15:56 +02:00
2010-03-10 15:39:02 +02:00
2009-12-27 15:54:41 +02:00
2009-12-22 17:52:15 +02:00
2010-11-25 00:57:34 +02:00
2009-09-08 00:50:10 +04:00
2010-04-03 00:30:22 +04:00
2009-05-27 14:20:57 +04:00
2009-04-17 18:52:57 +03:00
2011-03-03 15:04:04 +03:00
2009-04-27 15:05:01 +05:00
2010-12-14 23:52:53 +03:00
2011-04-12 14:01:33 +04:00
2010-02-23 14:06:41 +02:00
2011-04-12 13:51:36 +04:00
2010-06-08 10:22:40 +04:00
2011-01-17 12:30:22 +03:00
2011-04-20 11:39:20 +04:00
2010-11-25 00:57:34 +02:00
2009-06-16 16:36:15 +02:00
2011-01-13 08:57:15 +01:00
2011-05-02 20:58:45 +03:00
2010-04-28 14:52:24 +02:00
2011-02-15 14:03:05 +03:00
2009-10-29 22:06:10 -07:00
2010-10-18 21:03:53 +07:00
2009-10-27 12:09:19 +04:00
2011-05-02 20:58:45 +03:00
2011-05-02 20:58:45 +03:00
2010-06-11 09:38:29 +02:00
2011-04-22 11:20:55 +04:00
2009-05-06 15:00:14 +05:30
2009-10-28 09:52:34 +02:00
2010-12-07 14:48:04 -08:00
2009-08-24 22:10:48 +03:00
2010-11-16 14:16:19 +02:00
2010-09-12 14:37:27 +02:00
2009-11-16 21:49:51 +01:00
2010-08-27 17:12:44 +03:00
2009-07-06 18:20:17 -04:00
2011-02-20 18:51:43 +02:00
2010-04-12 14:56:24 +03:00
2010-04-12 14:56:24 +03:00
2010-04-12 14:56:24 +03:00
2010-01-15 16:58:25 +01:00
2010-01-15 16:58:25 +01:00
2009-06-09 15:19:13 +02:00
2009-06-09 15:19:13 +02:00
2010-01-15 16:58:25 +01:00
2010-01-15 16:58:25 +01:00
2010-01-15 16:58:25 +01:00
2010-01-15 16:58:25 +01:00
2010-06-10 11:11:52 +02:00
2010-01-15 16:58:25 +01:00
2010-05-28 00:07:40 +04:00
2010-04-12 14:56:24 +03:00
2009-12-27 15:54:41 +02:00
2010-01-15 16:58:25 +01:00
2010-01-15 16:58:25 +01:00
2010-01-15 16:58:25 +01:00
2009-06-09 15:19:13 +02:00
2010-04-12 14:56:24 +03:00
2010-04-12 14:56:24 +03:00
2010-04-12 14:56:24 +03:00
2010-04-12 14:56:24 +03:00
2010-04-12 14:56:24 +03:00
2010-01-18 13:56:10 +01:00
2010-08-04 10:39:53 +02:00
2011-02-16 21:43:12 +01:00
2009-04-28 20:12:18 +02:00
2010-10-19 15:58:35 +02:00
2010-09-09 21:16:01 -07:00
2011-01-03 15:33:39 +01:00
2011-06-24 10:08:09 +03:00
2010-11-05 15:26:38 +01:00
2011-02-28 19:39:30 +02:00
2009-11-16 21:49:51 +01:00
2009-06-07 13:05:19 +03:00
2011-05-02 20:58:45 +03:00
2009-10-19 13:44:44 +05:00
2009-08-28 18:49:16 -03:00
2009-08-28 18:49:16 -03:00
2011-01-10 23:22:40 +02:00
2011-03-29 10:09:05 +02:00
2011-06-06 16:39:06 +03:00
2009-10-19 20:14:48 +03:00
2010-05-12 13:19:12 +02:00
2009-06-15 20:27:27 -03:00
2010-09-06 02:15:34 +03:00
2009-08-27 15:17:09 +02:00
2010-11-07 23:42:54 +06:00
2009-10-27 14:09:36 +04:00
2009-09-09 14:38:50 +05:00
2009-09-09 14:38:50 +05:00
2009-09-09 14:38:50 +05:00
2011-04-04 16:04:15 +03:00
2009-08-28 16:13:27 +02:00
2010-10-19 12:27:09 +02:00
2010-10-19 12:27:09 +02:00
2009-02-17 18:22:48 +04:00
2009-02-18 16:09:46 +04:00
2010-06-25 15:59:44 +03:00
2010-11-02 17:22:57 +02:00
2009-10-03 21:12:24 +02:00
2010-11-23 23:39:59 +02:00
2010-03-12 10:33:16 +04:00
2011-01-03 15:33:39 +01:00
2011-02-20 18:51:43 +02:00
2009-04-06 12:31:17 +05:30
2011-03-15 16:06:59 +01:00
2009-10-28 09:52:34 +02:00
2009-09-17 16:33:23 +05:00
2011-03-28 16:53:46 +02:00
2009-10-28 09:52:34 +02:00
2011-09-20 12:49:25 +02:00
2011-09-20 12:49:25 +02:00
2010-07-30 09:17:10 -03:00
2010-09-06 02:15:34 +03:00
2009-06-25 02:44:14 +04:00
2009-06-17 20:10:48 +04:00
2011-05-02 20:58:45 +03:00
2011-01-16 02:04:08 +05:30
2010-01-19 11:36:52 +01:00
2011-01-12 19:32:45 +00:00
2010-01-27 18:41:05 +01:00
2010-01-27 18:41:05 +01:00
2010-01-27 18:41:05 +01:00
2010-01-27 18:41:05 +01:00
2009-09-30 08:35:31 +02:00
2011-01-13 13:28:36 +01:00
2010-11-05 15:26:38 +01:00
2011-03-25 15:16:13 +01:00
2011-01-29 18:51:12 +01:00
2010-06-10 11:11:52 +02:00
2009-05-22 10:38:17 -04:00
2009-03-02 11:03:13 +01:00
2011-08-10 13:08:19 +03:00
2010-06-03 10:31:26 +02:00
2010-06-03 10:31:26 +02:00
2009-04-08 18:55:26 +02:00
2011-04-08 12:22:44 +05:30
2010-08-25 22:22:33 +02:00
2011-05-02 20:58:45 +03:00
2011-09-20 12:49:25 +02:00
2010-02-07 00:12:04 +00:00
2011-09-20 12:49:25 +02:00
2011-05-02 20:58:45 +03:00
2009-11-30 01:08:56 +02:00
2009-11-06 09:44:01 +03:00
2010-11-23 07:24:44 +01:00
2011-05-02 20:58:45 +03:00
2009-10-28 09:52:34 +02:00
2010-05-07 00:41:37 +04:00
2009-06-19 11:27:19 +02:00
2009-04-17 16:00:53 -04:00
2009-04-17 16:00:53 -04:00
2009-10-28 09:52:34 +02:00
2010-11-24 18:51:31 +01:00
2009-12-13 23:29:50 +03:00
2009-09-03 08:38:06 +02:00
2010-02-01 16:07:00 +01:00
2009-08-12 12:03:05 +02:00
2011-06-13 12:46:11 +03:00
2010-06-14 18:58:52 +02:00
2009-09-25 11:26:49 +02:00
2010-11-15 23:27:37 +01:00
2010-08-17 11:14:46 +04:00
2010-12-08 14:34:08 +01:00
2010-08-17 11:14:46 +04:00
2010-11-25 00:57:34 +02:00
2009-04-17 16:00:53 -04:00
2010-07-08 14:36:55 +02:00
2010-08-20 21:17:51 +02:00
2009-07-27 16:50:43 +05:30
2009-10-08 15:36:43 +02:00
2009-10-09 16:12:01 +02:00
2010-08-26 17:14:18 +02:00
2010-08-11 14:13:59 +02:00
2009-07-27 16:50:43 +05:30
2011-05-02 20:58:45 +03:00
2011-06-21 17:40:51 +02:00
2010-06-10 11:11:52 +02:00
2009-10-08 10:39:15 +02:00
2010-06-16 19:01:22 +02:00
2010-06-17 15:53:05 +02:00
2011-02-20 18:51:43 +02:00
2010-10-24 20:47:01 +02:00
2010-08-17 11:14:46 +04:00
2011-01-03 15:33:39 +01:00
2009-06-05 18:35:22 +03:00
2009-05-05 17:03:23 -04:00
2009-04-01 10:58:55 +02:00
2010-06-09 16:07:34 +04:00
2010-10-27 10:41:45 +02:00
2009-09-04 17:02:17 -03:00
2009-08-27 15:17:09 +02:00
2010-10-01 14:08:38 +04:00
2009-02-23 09:03:31 +01:00
2009-09-08 00:50:10 +04:00
2010-01-11 14:15:28 +01:00
2009-12-27 15:54:41 +02:00
2009-12-27 15:54:41 +02:00
2010-03-24 17:37:41 +01:00
2011-01-03 15:33:39 +01:00
2011-02-01 13:20:16 +01:00
2009-03-06 15:56:17 +01:00
2010-05-21 22:47:32 +04:00
2010-09-09 16:46:13 +04:00
2010-06-26 19:36:00 +02:00
2009-10-28 09:52:34 +02:00
2010-05-26 18:33:40 +02:00
2010-05-26 18:33:40 +02:00
2011-01-14 02:05:10 -08:00
2009-03-26 20:17:27 -03:00
2010-08-07 17:42:30 +03:00
2011-03-30 14:33:53 +02:00
2010-03-31 16:12:37 +03:00
2010-04-28 14:52:24 +02:00
2010-01-15 10:51:39 +02:00
2010-08-17 11:14:46 +04:00
2009-10-28 09:52:34 +02:00
2010-11-11 10:52:51 +06:00
2011-05-02 20:58:45 +03:00
2009-10-19 16:55:04 +03:00
2009-07-03 10:19:32 +02:00
2009-11-27 18:10:28 +02:00
2009-12-02 15:17:08 +04:00
2010-04-08 14:10:05 +02:00
2009-06-12 18:11:19 -03:00
2010-07-28 12:59:19 -03:00
2011-03-11 16:16:34 +05:30
2011-03-11 16:16:34 +05:30
2009-06-05 18:35:22 +03:00
2009-03-03 21:34:18 +01:00
2009-06-05 18:35:22 +03:00
2009-10-19 20:14:48 +03:00
2010-03-21 21:58:19 +01:00
2009-08-27 15:17:09 +02:00
2009-06-10 11:58:36 +03:00
2009-03-05 08:20:01 -03:00
2009-11-16 21:49:51 +01:00
2011-02-20 18:51:43 +02:00
2009-03-13 00:27:35 +02:00
2011-05-02 20:58:45 +03:00
2010-04-01 18:49:02 +04:00
2009-10-29 20:50:33 +03:00
2011-01-11 12:42:16 +02:00
2010-05-12 19:56:05 +02:00
2010-08-06 23:29:37 +04:00
2010-11-23 23:39:59 +02:00
2009-02-19 18:24:25 -05:00
2010-05-26 21:55:40 +03:00
2009-06-11 19:49:51 +02:00
2010-02-16 13:13:49 +04:00
2010-10-31 19:04:38 +03:00
2010-03-16 10:20:07 +01:00
2011-01-19 15:09:32 +01:00
2009-11-20 12:10:47 +02:00
2010-05-31 13:25:11 +04:00
2011-04-18 10:44:41 +02:00
2011-01-12 10:37:15 +01:00
2010-11-02 17:22:57 +02:00
2010-06-10 11:11:52 +02:00
2011-03-09 19:45:48 +02:00
2010-08-17 11:14:46 +04:00
2010-07-19 11:03:52 +02:00
2011-05-11 14:09:48 +03:00
2009-03-03 21:34:18 +01:00
2010-12-06 23:38:31 +03:00
2009-04-28 20:12:18 +02:00
2010-02-11 14:26:58 +01:00
2009-10-03 22:56:54 +04:00
2010-09-22 23:33:18 +04:00
2011-02-27 01:25:56 +01:00
2009-04-06 13:42:33 +02:00
2011-03-28 13:25:03 +03:00
2011-05-02 20:58:45 +03:00
2010-03-09 07:36:26 -03:00
2011-01-12 16:08:30 +03:00
2011-07-21 11:20:55 +03:00
2010-10-19 13:54:28 +02:00
2010-11-03 22:40:53 +01:00
2010-08-17 11:14:46 +04:00
2009-12-06 19:26:12 +02:00
2009-09-22 08:22:07 -03:00
2010-03-10 19:31:22 +04:00
2011-03-01 15:30:18 +03:00