1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00
Files
mariadb/sql
Sergey Glukhov d0ac4e2c5a Bug#56814 Explain + subselect + fulltext crashes server
create_sort_index() function overwrites original JOIN_TAB::type field.
At re-execution of subquery overwritten JOIN_TAB::type(JT_ALL) is
used instead of JT_FT. It misleads test_if_skip_sort_order() and
the function tries to find suitable key for the order that should
not be allowed for FULLTEXT(JT_FT) table.
The fix is to restore JOIN_TAB strucures for subselect on re-execution
for EXPLAIN.
Additional fix:
Update TABLE::maybe_null field which
affects list_contains_unique_index() behaviour as it
could have the value(maybe_null==TRUE) based on the
assumption that this join is outer
(see setup_table_map() func).


mysql-test/r/explain.result:
  test case
mysql-test/t/explain.test:
  test case
sql/item_subselect.cc:
  Make subquery uncacheable in case of EXPLAIN. It allows to keep
  original JOIN_TAB::type(see JOIN::save_join_tab) and restore it
  on re-execution.
sql/sql_select.cc:
  -restore JOIN_TAB strucures for subselect on re-execution for EXPLAIN
  -Update TABLE::maybe_null field as it could have
   the value(maybe_null==TRUE) based on the assumption
   that this join is outer(see setup_table_map() func).
   This change is not related to the crash problem but
   affects EXPLAIN results in the test case.
2010-10-18 16:12:27 +04:00
..
2010-03-17 19:15:41 +01:00
2010-10-15 20:13:35 +05:00
2010-10-01 13:39:49 +02:00
2010-07-09 15:00:33 +02:00
2010-09-09 16:48:06 +04:00
2010-06-08 10:28:30 +04:00
2010-03-29 18:42:49 +05:00
2009-08-28 18:21:54 +02:00
2009-09-29 17:38:40 +02:00
2008-11-22 01:10:38 +01:00
2008-11-22 01:10:38 +01:00
2009-06-01 16:00:38 +04:00
2010-07-23 18:15:56 +07:00
2009-11-03 20:45:52 +03:00
2010-01-28 19:51:40 -02:00
2010-01-28 19:51:40 -02:00
2010-03-17 19:15:41 +01:00
2008-07-03 23:41:22 +04:00
2009-04-29 07:59:10 +05:00
2009-12-18 16:44:24 -02:00
2008-01-23 13:26:41 -07:00
2010-06-11 16:52:06 +04:00
2009-06-17 16:56:44 +02:00
2010-08-20 12:09:17 +03:00
2010-01-24 15:03:23 +08:00
2010-07-26 11:56:30 +02:00
2010-08-24 14:44:15 +04:00
2010-01-24 15:03:23 +08:00
2009-01-14 18:50:51 +04:00
2010-01-25 10:55:05 +08:00
2010-06-11 16:52:06 +04:00
2009-11-03 20:45:52 +03:00
2009-06-17 16:56:44 +02:00