Commit graph

28 commits

Author SHA1 Message Date
Otto Kekäläinen
c9c28bef3c Minor spelling fixes in code comments, docs and output
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.
2018-01-12 16:49:02 +02:00
Sergei Golubchik
da4d71d10d Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
Vicențiu Ciorbaru
fc0a6dd57f Merge branch '5.5' into 10.0 2017-03-08 12:21:13 +02:00
Vicențiu Ciorbaru
f65c9f825d mysql_client_test_nonblock fails when compiled with clang
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.
2017-03-08 11:56:09 +02:00
Sergei Golubchik
06b7fce9f2 Merge branch '10.1' into 10.2 2016-09-09 08:33:08 +02:00
Sergei Golubchik
309c08c17c Merge branch '5.5' into 10.0 2016-08-10 19:19:05 +02:00
Vladislav Vaintroub
141f88d1d5 MDEV-10357 my_context_continue() does not store current fiber on Windows
Make sure current fiber is saved in my_context::app_fiber
in both my_context_spawn() and my_context_continue()
2016-08-03 12:41:38 +00:00
Sergei Golubchik
932646b1ff Merge branch '10.1' into 10.2 2016-06-30 16:38:05 +02:00
Kristian Nielsen
94b47bc5a5 Merge branch 'mdev9991' into mdev9991-10.1 2016-06-08 15:16:39 +02:00
Kristian Nielsen
732e269405 Merge branch 'mdev9991' into mdev9991-10.0 2016-06-08 15:16:24 +02:00
Kristian Nielsen
196d96cc8f Fix compiler check for stack unwind hint
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].
2016-06-08 15:12:44 +02:00
Sergei Golubchik
65d69c84cf cmake: remove unused checks, options, and symbols 2015-11-23 16:02:56 +01:00
Sergei Golubchik
d9c01e4b4a 5.5 merge 2015-01-21 12:03:02 +01:00
Sergey Vojtovich
094640c036 Fixed a couple of compiler warnings. 2014-12-19 23:17:59 +04:00
Sergei Golubchik
5f6380adde 10.0-base merge 2013-07-18 16:46:57 +02:00
Vladislav Vaintroub
4b058643cd MDEV-4601 : Allow MariaDB to be build without non-blocking client.
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.
2013-06-15 14:22:03 +02:00
unknown
701419b02f Merge MariaDB 10.0-base to MariaDB 10.0 2012-12-18 15:01:58 +01:00
Vladislav Vaintroub
38e3fa961b MDEV-3830 - fix compilation for Intel compiler,
avoid .cfi_escape , 32 bit code.
2012-11-04 22:20:04 +01:00
Sergey Petrunya
5e68c5ce7d Merge 5.5 -> 10.0-serg 2012-11-04 19:32:32 +04:00
Sergei Golubchik
40e94a3734 merge with 5.5 2012-11-03 12:28:51 +01:00
Vladislav Vaintroub
25b5831a77 MDEV-3830 - fix build on Intel compiler 2012-11-03 00:31:50 +01:00
unknown
27bcea09e5 Fix crashes on 32-bit async client lib when -fomit-frame-pointer
- 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).
2012-10-31 12:47:25 +01:00
Sergei Golubchik
937ae82a1b fix async client code for i386 (assembly)
and when safemalloc is enabled (use ucontext, otherwise backtrace function gets confused and crashes)
2012-10-30 22:38:15 +01:00
unknown
b8aa31c03d MWL#192 after-merge fixes.
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).
2012-02-23 15:42:21 +01:00
unknown
f6b68a1070 Merge MWL#192: Non-blocking client library, into MariaDB 5.5. 2012-02-21 22:15:44 +01:00
unknown
6ef4f89deb fix typo. 2012-01-07 23:20:08 +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
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