~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_lex.cc

  • Committer: Brian Aker
  • Date: 2011-02-12 10:06:03 UTC
  • mfrom: (2154.2.16 drizzle-build)
  • Revision ID: brian@tangent.org-20110212100603-i5ww0s02p8l4a8q7
Merge in solaris tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
{
51
51
  Order *order;
52
52
 
53
 
  if (!(order = (Order *) session->alloc(sizeof(Order))))
 
53
  if (!(order = (Order *) session->getMemRoot()->allocate(sizeof(Order))))
54
54
    return true;
55
55
 
56
56
  order->item_ptr= item;
95
95
  ignore_space(1),
96
96
  in_comment(NO_COMMENT)
97
97
{
98
 
  m_cpp_buf= (char*) session->alloc(length + 1);
 
98
  m_cpp_buf= (char*) session->getMemRoot()->allocate(length + 1);
99
99
  m_cpp_ptr= m_cpp_buf;
100
100
}
101
101
 
122
122
    (m_buf_length / default_charset_info->mbminlen) *
123
123
    my_charset_utf8_bin.mbmaxlen;
124
124
 
125
 
  m_body_utf8= (char *) session->alloc(body_utf8_length + 1);
 
125
  m_body_utf8= (char *) session->getMemRoot()->allocate(body_utf8_length + 1);
126
126
  m_body_utf8_ptr= m_body_utf8;
127
127
  *m_body_utf8_ptr= 0;
128
128
 
358
358
  char *to;
359
359
  lip->yyUnget();                       // ptr points now after last token char
360
360
  tmp.length= lip->yytoklen=length;
361
 
  tmp.str=(char*) lip->m_session->alloc(tmp.length+1);
 
361
  tmp.str=(char*) lip->m_session->getMemRoot()->allocate(tmp.length+1);
362
362
  from= lip->get_tok_start() + skip;
363
363
  to= tmp.str;
364
364
  end= to+length;
434
434
      end-= post_skip;
435
435
      assert(end >= str);
436
436
 
437
 
      if (!(start= (char*) lip->m_session->alloc((uint32_t) (end-str)+1)))
 
437
      if (!(start= (char*) lip->m_session->getMemRoot()->allocate((uint32_t) (end-str)+1)))
438
438
        return (char*) "";              // memory::SqlAlloc has set error flag
439
439
 
440
440
      lip->m_cpp_text_start= lip->get_cpp_tok_start() + pre_skip;
1713
1713
    return false;
1714
1714
 
1715
1715
  return (ref_pointer_array=
1716
 
          (Item **)session->alloc(sizeof(Item*) * (n_child_sum_items +
 
1716
          (Item **)session->getMemRoot()->allocate(sizeof(Item*) * (n_child_sum_items +
1717
1717
                                                 item_list.elements +
1718
1718
                                                 select_n_having_items +
1719
1719
                                                 select_n_where_fields +