Comment 3 for bug 1013343

Revision history for this message
Sergey Petrunia (sergefp) wrote :

The difference comes from Item_allany_subselect::is_maxmin_applicable(). There, we have:

=== without FROM ===
(gdb) print abort_on_null
  $33 = false
(gdb) print upper_item
  $34 = (Item_func_not_all *) 0xa121600
(gdb) p upper_item->is_top_level_item()
  $35 = true
(gdb) p join->select_lex->master_unit()->uncacheable
  $36 = 0 '\000'
(gdb) p func->eqne_op()
  $37 = false

=== with FROM ===
(gdb) print abort_on_null
  $73 = false
(gdb) print upper_item
  $74 = (Item_func_not_all *) 0xa247100
(gdb) p upper_item->is_top_level_item()
  $75 = true
(gdb) p join->select_lex->master_unit()->uncacheable
  $76 = 8 '\b'
(gdb) p func->eqne_op()
  $77 = false