~matttbe/ubuntu/quantal/mysql-5.5/lp1013171

« back to all changes in this revision

Viewing changes to sql/sql_lex.cc

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-11 23:34:14 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120611233414-mu6ybxiajgcxqztj
Tags: 5.5.25-0ubuntu1
* New upstream release (LP: #1011371, LP: #986892)
* d/rules: change get-orig-source to pull from a working mirror.
* d/control: Build with default compiler instead of gcc 4.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
  ER_BINLOG_UNSAFE_CREATE_IGNORE_SELECT,
67
67
  ER_BINLOG_UNSAFE_CREATE_REPLACE_SELECT,
68
68
  ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC,
69
 
  ER_BINLOG_UNSAFE_UPDATE_IGNORE
 
69
  ER_BINLOG_UNSAFE_UPDATE_IGNORE,
 
70
  ER_BINLOG_UNSAFE_INSERT_TWO_KEYS,
 
71
  ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST
70
72
};
71
73
 
72
74
 
389
391
  lex->select_lex.sql_cache= SELECT_LEX::SQL_CACHE_UNSPECIFIED;
390
392
  lex->select_lex.init_order();
391
393
  lex->select_lex.group_list.empty();
 
394
  if (lex->select_lex.group_list_ptrs)
 
395
    lex->select_lex.group_list_ptrs->clear();
392
396
  lex->describe= 0;
393
397
  lex->subqueries= FALSE;
394
398
  lex->context_analysis_only= 0;
1773
1777
{
1774
1778
  st_select_lex_node::init_select();
1775
1779
  group_list.empty();
 
1780
  if (group_list_ptrs)
 
1781
    group_list_ptrs->clear();
1776
1782
  type= db= 0;
1777
1783
  having= 0;
1778
1784
  table_join_options= 0;
3100
3106
    The passed WHERE and HAVING are to be saved for the future executions.
3101
3107
    This function saves it, and returns a copy which can be thrashed during
3102
3108
    this execution of the statement. By saving/thrashing here we mean only
 
3109
    We also save the chain of ORDER::next in group_list, in case
 
3110
    the list is modified by remove_const().
3103
3111
    AND/OR trees.
3104
3112
    The function also calls fix_prepare_info_in_table_list that saves all
3105
3113
    ON expressions.    
3111
3119
  if (!thd->stmt_arena->is_conventional() && first_execution)
3112
3120
  {
3113
3121
    first_execution= 0;
 
3122
    if (group_list.first)
 
3123
    {
 
3124
      if (!group_list_ptrs)
 
3125
      {
 
3126
        void *mem= thd->stmt_arena->alloc(sizeof(Group_list_ptrs));
 
3127
        group_list_ptrs= new (mem) Group_list_ptrs(thd->stmt_arena->mem_root);
 
3128
      }
 
3129
      group_list_ptrs->reserve(group_list.elements);
 
3130
      for (ORDER *order= group_list.first; order; order= order->next)
 
3131
      {
 
3132
        group_list_ptrs->push_back(order);
 
3133
      }
 
3134
    }
3114
3135
    if (*conds)
3115
3136
    {
3116
3137
      prep_where= *conds;
3362
3383
     BINLOG_DIRECT_OFF & TRX_CACHE_NOT_EMPTY);
3363
3384
}
3364
3385
#endif
 
3386
 
 
3387
#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
 
3388
template class Mem_root_array<ORDER*, true>;
 
3389
#endif