~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to drizzled/sql_union.cc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
    unit->offset_limit_cnt--;
60
60
    return 0;
61
61
  }
62
 
  fill_record(session, table->field, values, true);
 
62
  fill_record(session, table->getFields(), values, true);
63
63
  if (session->is_error())
64
64
    return 1;
65
65
 
66
 
  if ((error= table->cursor->ha_write_row(table->record[0])))
 
66
  if ((error= table->cursor->insertRecord(table->getInsertRecord())))
67
67
  {
68
68
    /* create_myisam_from_heap will generate error if needed */
69
 
    if (table->cursor->is_fatal_error(error, HA_CHECK_DUP) &&
70
 
        create_myisam_from_heap(session, table, tmp_table_param.start_recinfo,
71
 
                                &tmp_table_param.recinfo, error, 1))
72
 
      return 1;
 
69
    if (table->cursor->is_fatal_error(error, HA_CHECK_DUP))
 
70
    {
 
71
      my_error(ER_USE_SQL_BIG_RESULT, MYF(0));
 
72
      return true;
 
73
    }
73
74
  }
74
75
  return 0;
75
76
}
126
127
  if (! (table= create_tmp_table(session_arg, &tmp_table_param, *column_types,
127
128
                                 (order_st*) NULL, is_union_distinct, 1,
128
129
                                 options, HA_POS_ERROR, (char*) table_alias)))
 
130
  {
129
131
    return true;
 
132
  }
 
133
 
130
134
  table->cursor->extra(HA_EXTRA_WRITE_CACHE);
131
135
  table->cursor->extra(HA_EXTRA_IGNORE_DUP_KEY);
 
136
 
132
137
  return false;
133
138
}
134
139
 
248
253
  {
249
254
    bool can_skip_order_by;
250
255
    sl->options|=  SELECT_NO_UNLOCK;
251
 
    JOIN *join= new JOIN(session_arg, sl->item_list,
 
256
    Join *join= new Join(session_arg, sl->item_list,
252
257
                         sl->options | session_arg->options | additional_options,
253
258
                         tmp_result);
254
259
    /*
508
513
    {
509
514
      set_limit(global_parameters);
510
515
      init_prepare_fake_select_lex(session);
511
 
      JOIN *join= fake_select_lex->join;
 
516
      Join *join= fake_select_lex->join;
512
517
      if (!join)
513
518
      {
514
519
        /*
519
524
          don't let it allocate the join. Perhaps this is because we need
520
525
          some special parameter values passed to join constructor?
521
526
        */
522
 
        if (!(fake_select_lex->join= new JOIN(session, item_list,
 
527
        if (!(fake_select_lex->join= new Join(session, item_list,
523
528
                                              fake_select_lex->options, result)))
524
529
        {
525
530
          fake_select_lex->table_list.empty();
603
608
  {
604
609
    delete union_result;
605
610
    union_result=0; // Safety
606
 
    if (table)
607
 
      table->free_tmp_table(session);
608
611
    table= 0; // Safety
609
612
  }
610
613
 
613
616
 
614
617
  if (fake_select_lex)
615
618
  {
616
 
    JOIN *join;
 
619
    Join *join;
617
620
    if ((join= fake_select_lex->join))
618
621
    {
619
622
      join->tables_list= 0;