diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2010-03-19 10:01:02 +0400 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2010-03-19 10:01:02 +0400 |
commit | caa1ccb0c324bca664112a5562f174f603e0a0b7 (patch) | |
tree | d4a6eeb8c33141b7d7636e1ba763013240c4ed03 /sql/item_row.h | |
parent | c92b9b7315c01e87b1099e7df182213a1d8ffa6f (diff) | |
download | mariadb-git-caa1ccb0c324bca664112a5562f174f603e0a0b7.tar.gz |
Bug#51494 crash with join, explain and 'sounds like' operator
The crash happens because of discrepancy between values of
conts_tables and join->const_table_map(make_join_statisctics).
Calculation of conts_tables used condition with
HA_STATS_RECORDS_IS_EXACT flag check. Calculation of
join->const_table_map does not use this flag check.
In case of MERGE table without union with index
the table does not become const table and
thus join_read_const_table() is not called
for the table. join->const_table_map supposes
this table is const and later in make_join_select
this table is used for making&calculation const
condition. As table record buffer is not populated
it leads to crash.
The fix is adding a check if an engine supports
HA_STATS_RECORDS_IS_EXACT flag before updating
join->const_table_map.
mysql-test/r/merge.result:
test result
mysql-test/t/merge.test:
test case
sql/sql_select.cc:
adding a check if an engine supports
HA_STATS_RECORDS_IS_EXACT flag before updating
join->const_table_map.
Diffstat (limited to 'sql/item_row.h')
0 files changed, 0 insertions, 0 deletions