~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/join.cc

  • Committer: lbieber at stabletransit
  • Date: 2010-10-18 20:26:50 UTC
  • mfrom: (1859.1.4 build)
  • Revision ID: lbieber@drizzle-build-n02.wc1.dfw1.stabletransit.com-20101018202650-hcvsp7yuaf1xy04s
Merge Monty - Adds support for a const std::string sys_var type.
Merge Monty - Make it possible to use sys_var directly from plugins.
Merge Padraig - Replaced a few unit8_t types that were being used as bitmaps with std::bitset

Show diffs side-by-side

added added

removed removed

Lines of Context:
1106
1106
      If this join belongs to an uncacheable subquery save
1107
1107
      the original join
1108
1108
    */
1109
 
    if (select_lex->uncacheable && !is_top_level_join() &&
 
1109
    if (select_lex->uncacheable.any() && 
 
1110
        ! is_top_level_join() &&
1110
1111
        init_save_join_tab())
1111
 
      return(-1);
 
1112
    {
 
1113
      return -1;
 
1114
    }
1112
1115
  }
1113
1116
 
1114
1117
  error= 0;
1115
 
  return(0);
 
1118
  return 0;
1116
1119
 
1117
1120
setup_subq_exit:
1118
1121
  /* Even with zero matching rows, subqueries in the HAVING clause
1195
1198
 
1196
1199
bool Join::save_join_tab()
1197
1200
{
1198
 
  if (!join_tab_save && select_lex->master_unit()->uncacheable)
 
1201
  if (! join_tab_save && select_lex->master_unit()->uncacheable.any())
1199
1202
  {
1200
1203
    if (!(join_tab_save= (JoinTable*)session->memdup((unsigned char*) join_tab,
1201
1204
            sizeof(JoinTable) * tables)))
1835
1838
    Optimization: if not EXPLAIN and we are done with the Join,
1836
1839
    free all tables.
1837
1840
  */
1838
 
  bool full= (!select_lex->uncacheable && !session->lex->describe);
 
1841
  bool full= (select_lex->uncacheable.none() && ! session->lex->describe);
1839
1842
  bool can_unlock= full;
1840
1843
 
1841
1844
  cleanup(full);