1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00
Files
mariadb/sql
unknown 0abc107cd2 Bug#16581: deadlock: server and client both read from connection in
'conc_sys' test

Concurrent execution of SELECT involing at least two INFORMATION_SCHEMA
tables, DROP DATABASE statement and DROP TABLE statement could have
resulted in stalled connection for this SELECT statement.

The problem was that for the first query of a join there was a race
between select from I_S.TABLES and DROP DATABASE, and the error (no
such database) was prepared to be send to the client, but the join
processing was continued.  On second query to I_S.COLUMNS there was a
race with DROP TABLE, but this error (no such table) was downgraded to
warning, and thd->net.report_error was reset.  And so neither result
nor error was sent to the client.

The solution is to stop join processing once it is clear we are going
to report a error, and also to downgrade to warnings file system errors
like 'no such database' (unless we are in the 'SHOW' command), because
I_S is designed not to use locks and the query to I_S should not abort
if something is dropped in the middle.

No test case is provided since this bug is a result of a race, and is
timing dependant.  But we test that plain SHOW TABLES and SHOW COLUMNS
give a error if there is no such database or a table respectively.


mysql-test/r/show_check.result:
  Add result for the test that SHOW TABLES and SHOW COLUMNS give a error
  if there is no such database or a table respectively.
mysql-test/t/show_check.test:
  Add test case that SHOW TABLES and SHOW COLUMNS give a error
  if there is no such database or a table respectively.
sql/mysql_priv.h:
  Remove prototype of mysql_find_files(), which is made static under
  find_files() name.
sql/sql_show.cc:
  Rename mysql_find_files() to find_files() and make it static.
  Return FIND_FILES_OK for success, FIND_FILES_OOM for out of memory,
  and FIND_FILES_DIR for directory reading error.
  Downgrade error to warning in get_all_tables() if it is a
  FIND_FILES_DIR error, and we are not in the 'SHOW' command.
  Once 'result' is set to 1 in get_schema_tables_result(), there's no
  need in continuing iterations, as we are about to return a error.
2006-07-28 15:06:23 +04:00
..
2005-09-30 14:03:55 +02:00
2006-06-17 02:57:50 +04:00
2005-11-03 22:42:25 +02:00
2006-06-28 12:18:21 -07:00
2006-03-30 17:14:55 +04:00
2006-06-20 13:43:13 -04:00
2006-04-13 17:22:56 +09:30
2006-05-30 17:10:53 -07:00
2005-08-12 13:54:42 +03:00
2006-04-20 00:42:12 -07:00
2006-06-17 02:11:12 +04:00
2006-04-04 17:54:58 -07:00
2006-07-08 04:07:43 +04:00
2006-06-27 00:47:52 +04:00
2006-06-27 00:47:52 +04:00
2006-07-04 02:07:41 +04:00
2005-08-12 17:57:19 +03:00
2006-04-13 17:22:56 +09:30
2005-12-14 01:21:56 +02:00
2006-05-03 21:35:27 -07:00
2006-04-21 08:19:38 -07:00
2006-06-27 00:47:52 +04:00
2006-06-14 23:54:08 +04:00
2005-07-31 12:49:55 +03:00
2006-06-27 00:47:52 +04:00