mirror of
https://github.com/MariaDB/server.git
synced 2025-09-01 15:21:35 +02:00
![]() Remove one of the major sources of race condiitons in mariadb-test. Normally, mariadb_close() sends COM_QUIT to the server and immediately disconnects. In mariadb-test it means the test can switch to another connection and sends queries to the server before the server even started parsing the COM_QUIT packet and these queries can see the connection as fully active, as it didn't reach dispatch_command yet. This is a major source of instability in tests and many - but not all, still less than a half - tests employ workarounds. The correct one is a pair count_sessions.inc/wait_until_count_sessions.inc. Also very popular was wait_until_disconnected.inc, which was completely useless, because it verifies that the connection is closed, and after disconnect it always is, it didn't verify whether the server processed COM_QUIT. Sadly the placebo was as widely used as the real thing. Let's fix this by making mariadb-test `disconnect` command _to wait_ for the server to confirm. This makes almost all workarounds redundant. In some cases count_sessions.inc/wait_until_count_sessions.inc is still needed, though, as only `disconnect` command is changed: * after external tools, like `exec $MYSQL` * after failed `connect` command * replication, after `STOP SLAVE` * Federated/CONNECT/SPIDER/etc after `DROP TABLE` and also in some XA tests, because an XA transaction is dissociated from the THD very late, after the server has closed the client connection. Collateral cleanups: fix comments, remove some redundant statements: * DROP IF EXISTS if nothing is known to exist * DROP table/view before DROP DATABASE * REVOKE privileges before DROP USER etc |
||
---|---|---|
.. | ||
anonymous_derived.test | ||
binlog_ptr_mysqlbinlog-master.opt | ||
binlog_ptr_mysqlbinlog.test | ||
binlog_stm_ps.test | ||
binlog_stm_sp.test | ||
binlog_stm_sp_package.test | ||
column_compression.test | ||
custom_aggregate_functions.test | ||
empty_string_literal.test | ||
events.test | ||
exception.test | ||
func_add_months.test | ||
func_case.test | ||
func_concat.test | ||
func_decode.test | ||
func_length.test | ||
func_misc.test | ||
func_pad.test | ||
func_qualified.test | ||
func_regexp_replace.test | ||
func_replace.test | ||
func_substr.test | ||
func_time.test | ||
func_to_char.test | ||
func_trim.test | ||
gis-debug.test | ||
gis.test | ||
information_schema_parameters.test | ||
keywords.test | ||
lower_case_table_names.opt | ||
lower_case_table_names.test | ||
minus.test | ||
misc.test | ||
mysqldump_restore.test | ||
mysqldump_restore_func_qualified.test | ||
parser.test | ||
plugin.test | ||
ps.test | ||
rpl_mariadb_date.test | ||
rpl_sp_package.test | ||
rpl_sp_package_variables.test | ||
sequence.test | ||
sp-anchor-row-type-table.test | ||
sp-anchor-type.test | ||
sp-anonymous.test | ||
sp-cache-invalidate.inc | ||
sp-code.test | ||
sp-cursor-decl.test | ||
sp-cursor-pkg-01.inc | ||
sp-cursor-pkg-02.inc | ||
sp-cursor-pkg-03.inc | ||
sp-cursor-rowtype.test | ||
sp-cursor.test | ||
sp-default-param.test | ||
sp-expr.test | ||
sp-goto-debug.test | ||
sp-goto.test | ||
sp-inout.test | ||
sp-memory-leak.test | ||
sp-package-code.test | ||
sp-package-concurrent-dml-db.test | ||
sp-package-concurrent-dml-package.test | ||
sp-package-concurrent-dml-trigger.test | ||
sp-package-concurrent-dml-view.test | ||
sp-package-concurrent-dml.inc | ||
sp-package-i_s.test | ||
sp-package-innodb.test | ||
sp-package-mdl.test | ||
sp-package-mysqldump.test | ||
sp-package-security.test | ||
sp-package.test | ||
sp-param.inc | ||
sp-param.test | ||
sp-record.test | ||
sp-row-vs-var.inc | ||
sp-row.test | ||
sp-security.test | ||
sp-sys_refcursor-alias.test | ||
sp-sys_refcursor-func_hybrid.test | ||
sp-sys_refcursor.test | ||
sp.test | ||
statement-expr.test | ||
table_value_constr.test | ||
trigger.test | ||
truncate.test | ||
type_blob.test | ||
type_clob.test | ||
type_date.test | ||
type_number.test | ||
type_raw.test | ||
type_varchar.test | ||
type_varchar2.test | ||
update.test | ||
update_innodb.test | ||
variables.test | ||
vcol.test | ||
vcol_innodb.test | ||
versioning.test | ||
win.test |