This is done for symmetry with mariadb-dump, which does not use threads
but allows parallelism via --parallel
Traditional --use-threads can still be used, it is synonymous
with --parallel
Parallelism is achieved by using mysql_send_query on multiple connections
without waiting for results, and using IO multiplexing (poll/IOCP) to
wait for completions.
Refresh libmariadb to pick up CONC-676 (fixes for IOCP use with named pipe)
- make connect_to_db() return MYSQL*, we'll reuse the function for
connection pool.
- Remove variable 'mysql_connection', duplicated by variable 'mysql'
- do not attempt to start slave if connection did not succeed,#
and fix mysqldump.result
Testing exit code from popen(), comparing it with 1, and deciding that
perl.exe is not there, is a) wrong conclusion, and b) uninteresting,
because MTR always runs with perl, and with MTR_PERL set.
Background:
Recent change in 7af50e4df4 introduced
exit code 1 from perl snippet, that broke Windows CI. Do not want
to debug this ever again.
This patch introduces the following behaviour for Linux while
maintaining old behaviour for Windows:
Ctrl + C (sigint) clears the current buffer and redraws the prompt.
Ctrl-C no longer exits the client if no query is running.
Ctrl-C kills the current running query if there is one. If there is an
error communicating with the server while trying to issue a KILL QUERY,
the client exits. This is in line with the past behaviour of Ctrl-C.
On Linux Ctrl-D can be used to close the client.
On Windows Ctrl-C and Ctrl-BREAK still exits the client if no query is running.
Windows can also exit the client via \q<enter> or exit<enter>.
== Implementation details ==
The Linux implementation has two corner cases, based on which library is
used: libreadline or libedit, both are handled in code to achieve the
same user experience.
Additional code is taken from MySQL, ensuring there is identical
behaviour on Windows, to MySQL's mysql client implementation for other
CTRL- related signals.
* The CTRL_CLOSE, CTRL_LOGOFF, CTRL_SHUTDOWN will issue the equivalent
of CTRL-C and "end" the program. This ensures that the query is killed
when the client is closed by closing the terminal, logging off the
user or shutting down the system. The latter two signals are not sent
for interactive applications, but it handles the case when a user has
defined a service to use mysql client to issue a command. See
https://learn.microsoft.com/en-us/windows/console/handlerroutine
This patch is built on top of the initial work done by Anel Husakovic
<anel@mariadb.org>.
Closes#2815
What is shown in this case is the result from the following query:
select * from information_schema.processlist where id != connection_id()
This allows easy monitoring of for example MAX_MEMORY_USED
sets of the first and second execution. The results of the first
and second execution are compared only if result logging is enabled
Comparing two result sets is done as comparing two strings.
Added a new method 'read_stmt_results' to get a result set
after execution of prepare statement.
- Prevent opening of any user tables in case `upgrade-system-table`
option is used.
- Still there may be uninstalled data types in `mysql` system table so
allow it to perform.
- Closes PR #2790
- Reviewer: <daniel@mariadb.org>, <vicentiu@mariadb.org>