--ignore-table option
mysqldump would correctly omit temporary tables for views, but would
incorrectly still emit all CREATE VIEW statements.
Backport a fix from 5.1, where we capture the names we want to emit
views for in one pass (the placeholder tables) and in the pass where
we actually emit the views, we don't emit a view if it wasn't in that
list.
Took the Xfree implementation (based on the same rewrite as the NDB one)
and added it instead of the current implementation.
Added a macro to make the calls to MD5 more streamlined.
client/mysqlmanager-pwgen.c:
Bug #42434: changed to call the macro
include/my_md5.h:
Bug #42434: use the Xfree implementation
mysys/md5.c:
Bug #42434: use the Xfree implementation
sql/item_strfunc.cc:
Bug #42434: changed to call the macro
sql/table.cc:
Bug #42434: changed to call the macro
tools/mysqlmanager.c:
Bug #42434: changed to call the macro
There was a problem when a DELIMITER COMMAND is not the first
command on the line. I this case an extra line feed was added
to the glob buffer and this was causing subsequent attempts
to enter this delimiter to fail.
Fixed by not adding a new line to the glob buffer if the
command being added is a DELIMITER
client/mysql.cc:
Bug #31060: Don't add a new line if DELIMTER is added to
the glob buffer
mysql-test/r/mysql.result:
Bug #31060: test case
mysql-test/t/mysql.test:
Bug #31060: test case
There was a problem when a DELIMITER COMMAND is not the first
command on the line. I this case an extra line feed was added
to the glob buffer and this was causing subsequent attempts
to enter this delimiter to fail.
Fixed by not adding a new line to the glob buffer if the
command being added is a DELIMITER
client/mysql.cc:
Bug #31060: Don't add a new line if DELIMTER is added to
the glob buffer
mysql-test/r/mysql.result:
Bug #31060: test case
mysql-test/t/mysql.test:
Bug #31060: test case
mysqldump included character_set_client magic
that is unknown before 4.1 even when asked for
an appropriate compatibility mode.
In compatibility (3.23, 4.0) mode, we do not
output charset statements (not even in a
"comment conditional"), nor do we do magic on
the server, even if the server is sufficient
new (4.1+). Table-names will be output converted
to the charset requested by mysqldump; if such
a conversion is not possible (Ivrit -> Latin),
mysqldump will fail.
Typo existed in help-text for command "charset" in mysql
client, making the parameter-name different for long and
short forms of the command for no good reason.
Fixed.
client/mysql.cc:
Make parameter-name in help-text the same for
long and short forms, for consistency.
- Remove bothersome warning messages. This change focuses on the warnings
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
testcase checks are made.
MTR spawns mysqltest to run check-testcase test before and after each testcase
it runs. It can also run check-warnings using mysqltest. Since it happened on PB
that these checks hanged, this patch provides additional feedback to help
investigating such failures:
- mysqltest is modified to give feedback about main steps in execution of a
testcase if run in verbose mode (including connection to the server),
- MTR is modified to run mysqltest in verbose mode when doing check-testcase or
check-warnings. The diagnostic output from mysqltest is preserved so that it is
saved upon test failure.
client/mysqltest.cc:
Add verbose messages informing about main steps in execution of a testcase.
mysql-test/mysql-test-run.pl:
- When doing check-testcase or check-warnings run mysqltest in verbose mode.
- Do not delete the mysqltest's error log if errors are detected during these
- Remove bothersome warning messages. This change focuses on the warnings
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
date_format functions
String::realloc() did not check whether the existing string data fits in
the newly allocated buffer for cases when reallocating a String object
with external buffer (i.e.alloced == FALSE). This could lead to memory
overruns in some cases.
client/sql_string.cc:
Fixed String::realloc() to check whether the existing string data fits
in the newly allocated buffer for cases when reallocating a String
object with external buffer.
mysql-test/r/func_str.result:
Added a test case for bug #41868.
mysql-test/t/func_str.test:
Added a test case for bug #41868.
sql/sql_class.cc:
After each call to Item::send() in select_send::send_data() reset
buffer to its original state to reduce unnecessary malloc() calls. See
comments for bug #41868 for detailed analysis.
sql/sql_string.cc:
Fixed String::realloc() to check whether the existing string data fits
in the newly allocated buffer for cases when reallocating a String
object with external buffer.
functions
String::realloc() did not check whether the existing string data fits in the newly
allocated buffer for cases when reallocating a String object with external buffer
(i.e.alloced == FALSE). This could lead to memory overruns in some cases.
mysql-test/r/func_str.result:
Added a test case for bug #41868.
mysql-test/t/func_str.test:
Added a test case for bug #41868.
sql/sql_class.cc:
After each call to Item::send() in select_send::send_data() reset buffer to its
original state to reduce unnecessary malloc() calls. See comments for bug #41868
for detailed analysis.
sql/sql_string.cc:
Fixed String::realloc() to check whether the existing string data fits in the newly allocated buffer for cases when reallocating a String object with external buffer.
mysqldump included character_set_client magic
that is unknown before 4.1 even when asked for
an appropriate compatibility mode.
In compatibility (3.23, 4.0) mode, we do not
output charset statements (not even in a
"comment conditional"), nor do we do magic on
the server, even if the server is sufficient
new (4.1+). Table-names will be output converted
to the charset requested by mysqldump; if such
a conversion is not possible (Ivrit -> Latin),
mysqldump will fail.
client/mysqldump.c:
in 3.23/4.0 compat mode, don't do charset magic,
period. not in output, but not on the server,
either!
mysql-test/r/mysqldump-max.result:
character_set_client magic lives in version-conditional
now (except in compat 3.23/4.0 mode, in which case we
don't output any at all!).
mysql-test/r/mysqldump.result:
character_set_client magic lives in version-conditional
now (except in compat 3.23/4.0 mode, in which case we
don't output any at all!).
mysql-test/r/openssl_1.result:
character_set_client magic lives in version-conditional
now (except in compat 3.23/4.0 mode, in which case we
don't output any at all!).
mysql-test/t/mysqldump.test:
character_set_client magic lives in version-conditional
now (except in compat 3.23/4.0 mode, in which case we
don't output any at all!).
Various parts of code used different 'precision' arguments for sprintf("%g") when converting
floating point numbers to a string. This led to differences in results in some cases
depending on whether the text-based or prepared statements protocol is used for a query.
Fixed by changing arguments to sprintf("%g") to always be 15 (DBL_DIG) so that results are
consistent regardless of the protocol.
This patch will be null-merged to 6.0 as the problem does not exists there (fixed by the
patch for WL#2934).
client/sql_string.cc:
Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does.
libmysql/libmysql.c:
Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does.
mysql-test/r/archive_gis.result:
Fixed test results to take additional precision into account.
mysql-test/r/func_group.result:
Fixed test results to take additional precision into account.
mysql-test/r/func_math.result:
Fixed test results to take additional precision into account.
mysql-test/r/func_str.result:
Fixed test results to take additional precision into account.
mysql-test/r/gis.result:
Fixed test results to take additional precision into account.
mysql-test/r/innodb_gis.result:
Fixed test results to take additional precision into account.
mysql-test/r/select.result:
Fixed test results to take additional precision into account.
mysql-test/r/sp.result:
Fixed test results to take additional precision into account.
mysql-test/r/type_float.result:
Fixed test results to take additional precision into account.
mysql-test/t/type_float.test:
Fixed test results to take additional precision into account.
sql/sql_string.cc:
Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does.
The fix for BUG#20103 "Escaping with backslash does not work as expected"
was implemented too greedy though in that it not only changes the behavior
of backslashes within strings but in general, so disabling command shortcuts
like \G or \C (which in turn leads to Bug #36391: "mysqlbinlog creates invalid charset
statements").
The fix allows the escaping with backslash to take place only inside a string,
thus enabling the execution of command shortcuts and presevering the fix for
BUG#20103.
conflicts:
Text conflict in client/mysqltest.cc
Text conflict in mysql-test/include/wait_until_connected_again.inc
Text conflict in mysql-test/lib/mtr_report.pm
Text conflict in mysql-test/mysql-test-run.pl
Text conflict in mysql-test/r/events_bugs.result
Text conflict in mysql-test/r/log_state.result
Text conflict in mysql-test/r/myisam_data_pointer_size_func.result
Text conflict in mysql-test/r/mysqlcheck.result
Text conflict in mysql-test/r/query_cache.result
Text conflict in mysql-test/r/status.result
Text conflict in mysql-test/suite/binlog/r/binlog_index.result
Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result
Text conflict in mysql-test/suite/rpl/r/rpl_packet.result
Text conflict in mysql-test/suite/rpl/t/rpl_packet.test
Text conflict in mysql-test/t/disabled.def
Text conflict in mysql-test/t/events_bugs.test
Text conflict in mysql-test/t/log_state.test
Text conflict in mysql-test/t/myisam_data_pointer_size_func.test
Text conflict in mysql-test/t/mysqlcheck.test
Text conflict in mysql-test/t/query_cache.test
Text conflict in mysql-test/t/rpl_init_slave_func.test
Text conflict in mysql-test/t/status.test
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.
Problem:
1. trigger code didn't assume a table name may have
a "#mysql50#" prefix, that may lead to a failing ASSERT().
2. "ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME" failed
for databases with "#mysql50#" prefix if any trigger.
3. mysqlcheck --fix-table-name didn't use UTF8 as a default
character set that resulted in (parsing) errors for tables with
non-latin symbols in their names and definitions of triggers.
Fix:
1. properly handle table/database names with "#mysql50#" prefix.
2. handle --default-character-set mysqlcheck option;
if mysqlcheck is launched with --fix-table-name or --fix-db-name
set default character set to UTF8 if no --default-character-set
option given.
Note: if given --fix-table-name or --fix-db-name option,
without --default-character-set mysqlcheck option
default character set is UTF8.
client/mysqlcheck.c:
Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.
- check and set default charset if --default-character-set option
given.
- set default charset to "utf8" if there's
--fix-table-name or --fix-db-name and no --default-character-set.
mysql-test/r/mysqlcheck.result:
Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.
- test result.
mysql-test/t/mysqlcheck.test:
Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.
- test case.
sql/mysql_priv.h:
Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.
- check_n_cut_mysql50_prefix() introduced.
sql/sql_table.cc:
Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.
- tablename_to_filename() code split into 2 parts
- check_n_cut_mysql50_prefix() introduced to cut #mysql50# prefixes,
used in the trigger code as well.
sql/sql_trigger.cc:
Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.
- Table_triggers_list::check_n_load() - checking triggers assume
a table/database name given may have "#mysql50#" prefix in some cases.
- Table_triggers_list::change_table_name_in_triggers() -
create .TRG file in new database directory and delete it in old one,
as they may differ in case of
"ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME"
- Table_triggers_list::change_table_name_in_trignames() - remove stale .TRN
files in #mysql50#dbname directory in case of database upgrade
- Table_triggers_list::change_table_name() - allow changing trigger's
database in case of its upgrading
sql/sql_trigger.h:
Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.
- new old_db_name parameter added in
Table_triggers_list::change_table_name_in_trignames() and
Table_triggers_list::change_table_name_in_triggers()
Added function to check for diff and return an error message if the utility is not present.
Previously, the way we did this didn't work on Windows, but did work on *Nix systems.
mysqltest command 'shutdown_server' is supposed to shutdown the server
and wait for it to be gone, and kill it when timeout. But because the
arguments passed to my_kill were in the wrong order, 'shutdown_server'
does not wait nor kill the server at all. So after 'shutdown_server',
the server is still running, and the server may still accepting
connections.
mysql-test/include/mtr_warnings.sql:
Suppress forcing close thread messages when server shuts down
mysql-test/include/restart_mysqld.inc:
wait_until_disconnected.inc is not required after fix shutdown_server command
Fix parsing of mysql client commands, especially in relation to
single-line comments when --comments was specified.
This is a little tricky, because we need to allow single-line
comments in the middle of statements, but we don't want to allow
client commands in the middle of statements. So in
comment-preservation mode, we go ahead and send single-line
comments to the server immediately when we encounter them on their
own.
This is still slightly flawed, in that it does not handle a
single-line comment with leading spaces, followed by a client-side
command when --comment has been enabled. But this isn't a new
problem, and it is quite an edge condition. Fixing it would require
a more extensive overall of how the mysql client parses commands.
modifying the original fix.
As it turned out --fix-db-names option of the mysqlcheck suppress
the --check_upgrade option, so we have to call the mysqlcheck twice
from the mysql_upgrade.
per-file comments:
client/mysql_upgrade.c
Bug#35934 mysql_upgrade calls mysqlcheck with insufficient parameters
The problem here is that embedded server starts handle_thread manager
thread on mysql_library_init() does not stop it on mysql_library_end().
At shutdown, my_thread_global_end() waits for thread count to become 0,
but since we did not stop the thread it will give up after 5 seconds.
Solution is to move shutdown for handle_manager thread from kill_server()
(mysqld specific) to clean_up() that is used by both embedded and mysqld.
This patch also contains some refactorings - to avoid duplicate code,
start_handle_manager() and stop_handle_manager() functions are introduced.
Unused variables are eliminated. handle_manager does not rely on global
variable abort_loop anymore to stop (abort_loop is not set for embedded).
Note: Specifically on Windows and when using DBUG version of libmysqld,
the complete solution requires removing obsolete code my_thread_init()
from my_thread_var(). This has a side effect that a DBUG statement
after my_thread_end() can cause thread counter to be incremented, and
embedded will hang for some seconds. Or worse, my_thread_init() will
crash if critical sections have been deleted by the global cleanup
routine that runs in a different thread.
This patch also fixes and revert prior changes for Bug#38293
"Libmysqld crash in mysql_library_init if language file missing".
Root cause of the crash observed in Bug#38293 was bug in my_thread_init()
described above
client/mysql.cc:
sql_protocol_typelib is not exported from libmysqld
(does not make sense either)
thus excluded from embedded client
dbug/dbug.c:
revert changes for Bug#38293
include/my_dbug.h:
revert changes for Bug#38293
libmysql/libmysql.c:
Removed DBUG_POP call, because when called after my_end(), will access
THR_key_mysys that is already deleted. The result of pthread_get_specific
is not predictable in this case and hence DBUG_POP can crash.
libmysqld/examples/CMakeLists.txt:
Revert changes for Bug#38293.
libmysqld/lib_sql.cc:
code to start handle manager is factored out into
start_handle_manager() function
libmysqld/libmysqld.def:
Revert changes for Bug #38293
Remove excessive exports from libmysqld, export what API documents.
mysys/my_thr_init.c:
Remove windows-DLL-specific workaround for something (old code, no documentation for
what specifically). The problem is that even after my_thread_end() is finished,
DBUG statement can initiate my_thread_init(). This does not happen anywhere else and
should not happen on Windows either.
sql/mysql_priv.h:
- new functions start_handle_manager() and stop_handle_manager()
- move manager_thread_in_use variable to sql_manager.cc and made
it static
- remove manager_status, as it is unused
sql/mysqld.cc:
Code to start/stop handle_manager thread is factored out into start_handle_manager()
mysql-test/t/partition.test
sql/ha_partition.cc
Bug#40954: Crash in MyISAM index code with concurrency test using partitioned tables
Problem was usage of read_range_first with an empty key.
Solution was to not to give a key if it was empty. (real author Mattias Jonsson)
storage/archive/archive_reader.c
client/mysqlslap.c
Aligned the copyright texts output from "--version" of tools, to
let internal tools be able to change them if needed.
storage/ndb/test/tools/connect.cpp
storage/ndb/test/run-test/atrt.hpp
Corrected a few GPL headers not restricted to GPL version 2
Makefile.am
Added missing --report-features to the 'test-bt-fast' target
support-files/mysql.spec.sh
Reversed the removal of the "%define license GPL" in as internal
tools depended on it
1. mysqltest.cc - added flush to log file after each executed command in a testcase.
2. mtr shows 20 last lines from test case log file if timeout reached.
3. Optimizing the code by Magnus review.
4. It is partially fix bug#40150
when InnoDB frm file corruption
Problem: mysqlcheck runs 'SHOW FULL TABLE' queries to get table lists.
The query may fail for some reasons (e.g. null .frm file) then
mysqlcheck doesn't process the database tables.
Fix: try to run 'SHOW TABLES' if 'SHOW FULL TABLES' failed.
client/mysqlcheck.c:
Fix for bug#37527: mysqlcheck fails to report entire database
when InnoDB frm file corruption
- run "SHOW TABLES" query if "SHOW /*!50002 FULL*/ TABLES" failed;
- print error info if both failed.
mysql-test/r/mysqlcheck.result:
Fix for bug#37527: mysqlcheck fails to report entire database
when InnoDB frm file corruption
- test result.
mysql-test/t/mysqlcheck.test:
Fix for bug#37527: mysqlcheck fails to report entire database
when InnoDB frm file corruption
- test case.
Problem: In the mysqltest language, it was not possible to set the current
connection from a variable, and it was not possible to read the current
connection.
Fix: Allow setting the connection from a variable, like:
connection $variable;
and introduce the mysqltest language variable $CURRENT_CONNECTION, which
holds the name of the current connection.
client/mysqltest.cc:
- Made select_connection use the common argument parser instead of its own
home-rolled version. That allows variable expansion, for instance.
- Made select_connection_name set the variable $CURRENT_CONNECTION, so that
test scripts can use that.
- Refactored a bit so that stuff that needs to be done when changing connection
is located to one place.
mysql-test/t/mysqltest.test:
Added test case for $CURRENT_CONNECTION and "connection $variable"
mysqldump creates stand-in tables before dumping the actual view.
Those tables were of the default type; if the view had more columns
than that (a pathological case, arguably), loading the dump would
fail. We now make the temporary stand-ins MyISAM tables to prevent
this.
client/mysqldump.c:
When creating a stand-in table, specify its type to
avoid defaulting to a type with a column-number limit
(like Inno). The type is always MyISAM as we know that
to be available.
mysql-test/r/mysqldump-max.result:
add test results for 31434
mysql-test/r/mysqldump.result:
mysqldump sets engine-type (MyISAM) for stand-in tables
for views now. Update test results.
mysql-test/t/mysqldump-max.test:
Show that mysqldump's stand-in tables for views explicitly
set engine-type to MyISAM to avoid falling back on an engine
that might support fewer columns than the final view requires
(here's lookin' at you, inno). Also show that this actually
has the desired effect by dumping and reloading a view that
has more columns than inno supports.
mysqldump creates stand-in tables before dumping the actual view.
Those tables were of the default type; if the view had more columns
than that (a pathological case, arguably), loading the dump would
fail. We now make the temporary stand-ins MyISAM tables to prevent
this.
client/mysqldump.c:
When creating a stand-in table, specify its type to
avoid defaulting to a type with a column-number limit
(like Inno). The type is always MyISAM as we know that
to be available.
mysql-test/r/mysqldump.result:
mysqldump sets engine-type (MyISAM) for stand-in tables
for views now. Update test results.
- Implementing --base64-format=decode-rows, to display
SQL-alike decoded row events without their BINLOG statements.
- Adding --base64-format=decode-rows into tests when
calling mysqlbinlog to avoid non-deterministic results
- Removing resetting of last_table_id in "RESET MASTER",
which appeared to be dangerous.
Implementing -v command line parameter to mysqlbinlog
to decode and print row events.
mysql-test/include/mysqlbinlog_row_engine.inc
mysql-test/r/mysqlbinlog_row.result
mysql-test/r/mysqlbinlog_row_big.result
mysql-test/r/mysqlbinlog_row_innodb.result
mysql-test/r/mysqlbinlog_row_myisam.result
mysql-test/r/mysqlbinlog_row_trans.result
mysql-test/t/mysqlbinlog_row.test
mysql-test/t/mysqlbinlog_row_big.test
mysql-test/t/mysqlbinlog_row_innodb.test
mysql-test/t/mysqlbinlog_row_myisam.test
mysql-test/t/mysqlbinlog_row_trans.test
Adding tests
client/Makefile.am
Adding new files to symlink
client/mysqlbinlog.cc
Adding -v option
sql/log_event.cc
Impelentations of the new methods
sql/log_event.h
Declaration of the new methods and member
sql/mysql_priv.h
Adding new function prototype
sql/rpl_tblmap.cc
Adding pre-processor conditions
sql/rpl_tblmap.h
Adding pre-processor conditions
sql/rpl_utility.h
Adding pre-processor conditions
sql/sql_base.cc
Adding reset_table_id_sequence() function.
sql/sql_repl.cc
Resetting table_id on "RESET MASTER"
.bzrignore
Ignoring new symlinked files
running on Windows
We used two OS-specific methods of looking up the executable
name, which don't work outside of those two kinds of OSes
(Linux+Solaris and Windows).
We assume that if the user ran this program with a certain
name, we can run the other sibling programs with a similar name.
(re-patch in bzr)
manually resolved conflicts:
Text conflict in client/mysqltest.c
Contents conflict in mysql-test/include/have_bug25714.inc
Text conflict in mysql-test/include/have_ndbapi_examples.inc
Text conflict in mysql-test/mysql-test-run.pl
Text conflict in mysql-test/suite/parts/inc/partition_check_drop.inc
Text conflict in mysql-test/suite/parts/inc/partition_layout.inc
Text conflict in mysql-test/suite/parts/inc/partition_layout_check1.inc
Text conflict in mysql-test/suite/parts/inc/partition_layout_check2.inc
Text conflict in mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter1_1_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter1_2_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter2_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter3_innodb.result
Text conflict in mysql-test/suite/parts/r/partition_alter3_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_basic_innodb.result
Text conflict in mysql-test/suite/parts/r/partition_basic_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_engine_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_syntax_myisam.result
Text conflict in mysql-test/suite/rpl_ndb/t/disabled.def
Text conflict in mysql-test/t/disabled.def
Post-merge fix: Alter linking order so that the thread linking
flags appear last in the list. This needs to be done this way
because some linkers will not search the thread archive again
if a undefined symbol (pthread_kill in this case) appears later.
client/Makefile.am:
Link mysys before thread libs.
- Revert the fix for bug 33812
- fixed a win32 warning
client/mysql.cc:
revert the fix for bug 33812
mysql-test/r/mysql.result:
revert the fix for bug 33812
mysql-test/t/mysql_delimiter.sql:
revert the fix for bug 33812
mysys/default.c:
fixed a win32 warning
mysqltest disconnect/connect-combo could be so
quick that connect would hit the server before
it had processed the disconnect. Since that
resulted in one more concurrent connection than
we meant to have, global or per-user
max-user-connections could be exceeded.
This could lead to "random" failures in tests
that set those limits.
client/mysqltest.c:
Retry max-connect-retries times if connect in
connect_n_handle_errors() unexpectedly fails
on connection-limit as this could be a race.
Break out code that checks for expected --errors
into its own function.
mysql-test/r/mysqltest.result:
show that we throw a warning if test expects a SQL-state from
a command (diff_files, ...) that clearly can't produce one.
mysql-test/t/disabled.def:
re-enable user_limits
mysql-test/t/mysqltest.test:
show that we throw a warning if test expects a SQL-state from
a command (diff_files, ...) that clearly can't produce one.