mariadb/mysql-test/suite/innodb_gis/t
Sergei Golubchik bead24b7f3 mariadb-test: wait on disconnect
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
2025-07-16 09:14:33 +07:00
..
0.test mariadb-test: wait on disconnect 2025-07-16 09:14:33 +07:00
1.test Fix typos in mysql-test/ 2025-04-29 13:53:16 +10:00
alter_spatial_index.test Fix typos in mysql-test/ 2025-04-29 13:53:16 +10:00
bug16236208.test MDEV-13467: Feature request: Support for ST_Distance_Sphere() 2021-03-27 10:42:39 +01:00
bug16266012.test MDEV-14057 InnoDB GIS tests fail. 2020-03-18 13:55:21 +04:00
bug17057168.test Fix typos in mysql-test/ 2025-04-29 13:53:16 +10:00
check_rtree.test MDEV-32104 remove deprecated features 2023-09-30 14:43:12 +02:00
create_spatial_index.test reject invalid spatial key declarations in the parser 2024-11-05 14:00:47 -08:00
geometry.test Fix typos in mysql-test/ 2025-04-29 13:53:16 +10:00
gis.test reject invalid spatial key declarations in the parser 2024-11-05 14:00:47 -08:00
gis_split_inf.test MDEV-14057 InnoDB GIS tests fail. 2020-03-18 13:55:21 +04:00
gis_split_nan.test Fix typos in mysql-test/ 2025-04-29 13:53:16 +10:00
innodb_gis_rtree.test Create 'main' test directory and move 't' and 'r' there 2018-03-29 13:59:44 +03:00
kill_server.test Adjust tests after commit b5615eff0d 2019-04-02 11:03:28 +03:00
multi_pk.test MSAN: Disable some slow tests 2022-06-30 13:00:58 +03:00
point_basic.test cleanup: generalize ER_SPATIAL_CANT_HAVE_NULL 2024-11-05 14:00:48 -08:00
point_big.test MDEV-4750 follow-up: Reduce disabling innodb_stats_persistent 2021-08-31 13:55:02 +03:00
precise.test Merge 10.2 into 10.3 2021-03-31 08:01:03 +03:00
repeatable_spatial.test mariadb-test: wait on disconnect 2025-07-16 09:14:33 +07:00
rollback.test Merge 10.11 into 11.4 2025-03-28 13:55:21 +02:00
rt_precise.test Fix typos in mysql-test/ 2025-04-29 13:53:16 +10:00
rtree.test MDEV-35116 InnoDB fails to set error index for HA_ERR_NULL_IN_SPATIAL 2024-10-14 14:28:24 +05:30
rtree_add_index.test MDEV-32050 fixup: Stabilize tests 2023-11-21 12:42:00 +02:00
rtree_compress.test Merge 11.2 into 11.3 2023-11-28 11:19:50 +02:00
rtree_compress2.test Merge branch '10.3' into 10.4 2019-09-06 11:53:10 +02:00
rtree_concurrent_srch.test MDEV-21921 Make transaction_isolation and transaction_read_only into system variables 2023-04-12 11:04:29 +10:00
rtree_create_inplace.opt MDEV-13626 Merge InnoDB test cases from MySQL 5.7 2023-11-08 12:17:14 +02:00
rtree_create_inplace.test Merge branch '11.2' into 11.3 2023-12-21 02:14:59 +01:00
rtree_debug.test MDEV-21360 global debug_dbug pre-test value restoration issues 2020-01-15 18:06:24 +01:00
rtree_drop_index.test MariaDB adjustments to innodb_gis tests. 2017-10-25 06:47:08 +03:00
rtree_estimate.test MDEV-16188 Post-merge corrections and adjustments 2019-02-04 22:44:33 -08:00
rtree_multi_pk.test Added test cases for preceding test 2023-02-03 00:00:35 +03:00
rtree_optimize.test MDEV-30895 Assertion btr_cur->rtr_info->thr... in rtr_ins_enlarge_mbr() 2023-04-28 10:18:30 +03:00
rtree_purge.test MDEV-36848: identify tests with various MSAN suitability 2025-05-28 16:33:49 +10:00
rtree_recovery.test Re-remove the file kill_and_restart_mysqld.inc 2017-12-14 08:40:09 +02:00
rtree_rollback1.test Enable tests for --embedded 2020-01-20 08:41:13 +02:00
rtree_rollback2.test Enable tests for --embedded 2020-01-20 08:41:13 +02:00
rtree_search.test MDEV-14209 innodb_gis.rtree_debug produces huge server error logs 2018-01-29 23:02:12 +02:00
rtree_split.test Fix typos in mysql-test/ 2025-04-29 13:53:16 +10:00
rtree_temporary.test MDEV-29507 InnoDB: Failing assertion: table->n_rec_locks == 0 2022-09-12 09:27:46 +03:00
rtree_undo.test mariadb-test: wait on disconnect 2025-07-16 09:14:33 +07:00
types.test MDEV-4750 follow-up: Reduce disabling innodb_stats_persistent 2021-08-31 13:55:02 +03:00
update_root.test Speed up of innodb_gis.update_root test 10x by adding BEGIN/COMMIT 2021-06-19 03:46:00 +03:00