summaryrefslogtreecommitdiff
path: root/tests/async_queries.c
Commit message (Collapse)AuthorAgeFilesLines
* Added 'const' to arguments in get_one_option and find_typeset()Monty2021-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | One should not change the program arguments! This change also reduces warnings from the icc compiler. Almost all changes are just syntax changes (adding const to 'get_one_option function' declarations). Other changes: - Added a few cast of 'argument' from 'const char*' to 'char *'. This was mainly in calls to 'external' functions we don't have control of. - Ensure that all reset of 'password command line argument' are similar. (In almost all cases it was just adding a comment and a cast) - In mysqlbinlog.cc and mysqld.cc there was a few cases that changed the command line argument. These places where changed to instead allocate the option in a MEM_ROOT to avoid changing the argument. Some of this code was changed to ensure that different programs did parsing the same way. Added a test case for the changes in mysqlbinlog.cc - Changed a few variables that took their value from command line options from 'char *' to 'const char *'.
* perfschema memory related instrumentation changesSergei Golubchik2020-03-101-3/+3
|
* MDEV-12684 Show what config file a sysvar got a value fromSergei Golubchik2019-10-141-3/+3
| | | | | change get_one_option() prototype to pass the filename and not to pass the redundant optid.
* Merge branch '5.5' into 10.0Sergei Golubchik2016-09-271-1/+1
|\
| * Fix free() after my_malloc() (should be my_free()).Kristian Nielsen2016-09-241-1/+1
| | | | | | | | Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
* | Fix spelling: occurred, execute, which etcOtto Kekäläinen2016-03-041-1/+1
|/
* MDEV-5120 Test suite test maria-no-logging failsSergei Golubchik2014-10-021-5/+5
| | | | | | | | stat structure (from <sys/stat.h>) is conditionally defined to have different layout and size depending on the defined macros. The correct macro is defined in my_config.h, which means it MUST be included first (or, at least before <features.h> - so, practically, before including any system headers).
* Merge MWL#192: Non-blocking client library, into MariaDB 5.5.unknown2012-02-211-3/+4
|
* MWL#192: non-blocking client API, after-review fixes.unknown2012-01-061-15/+14
| | | | | | | | | | | 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/+435
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.