~maria-captains/maria/5.3

Viewing all changes in revision 3799.

  • Committer: Sergey Petrunya
  • Date: 2014-12-18 17:06:49 UTC
  • Revision ID: psergey@askmonty.org-20141218170649-6rl8486wqywlph7e
MDEV-6830: Server crashes in best_access_path after a sequence of SELECTs ...

generate_derived_keys_for_table() did not work correctly in the case where
- it had a potential index on derived table
- however, TABLE::check_tmp_key() would disallow creation of this index 
  after looking at its future key parts (because of the key parts exceeding 
  max. index length)
- the code would leave a KEYUSE structure that refers to a non-existant index.
  Depending on further optimizer calculations, this could cause a crash. 

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: