~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/ref.cc

  • Committer: Olaf van der Spek
  • Date: 2011-07-04 19:11:47 UTC
  • mto: This revision was merged to the branch mainline in revision 2367.
  • Revision ID: olafvdspek@gmail.com-20110704191147-s99ojek811zi1fzj
RemoveĀ unusedĀ Name_resolution_context::error_reporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
 
119
119
  if (!ref || ref == not_found_item)
120
120
  {
121
 
    if (!(ref= resolve_ref_in_select_and_group(session, this,
122
 
                                               context->select_lex)))
123
 
      goto error;             /* Some error occurred (e.g. ambiguous names). */
 
121
    if (!(ref= resolve_ref_in_select_and_group(session, this, context->select_lex)))
 
122
      return true;             /* Some error occurred (e.g. ambiguous names). */
124
123
 
125
124
    if (ref == not_found_item) /* This reference was not resolved. */
126
125
    {
132
131
      if (!outer_context)
133
132
      {
134
133
        /* The current reference cannot be resolved in this query. */
135
 
        my_error(ER_BAD_FIELD_ERROR,MYF(0),
136
 
                 full_name(), session->where());
137
 
        goto error;
 
134
        my_error(ER_BAD_FIELD_ERROR,MYF(0), full_name(), session->where());
 
135
        return true;
138
136
      }
139
137
 
140
138
      /*
159
157
        if (outer_context->resolve_in_select_list)
160
158
        {
161
159
          if (!(ref= resolve_ref_in_select_and_group(session, this, select)))
162
 
            goto error; /* Some error occurred (e.g. ambiguous names). */
 
160
            return true; /* Some error occurred (e.g. ambiguous names). */
163
161
          if (ref != not_found_item)
164
162
          {
165
163
            assert(*ref && (*ref)->fixed);
205
203
                                           reference,
206
204
                                           IGNORE_EXCEPT_NON_UNIQUE, true);
207
205
          if (! from_field)
208
 
            goto error;
 
206
            return true;
209
207
          if (from_field == view_ref_found)
210
208
          {
211
209
            Item::Type refer_type= (*reference)->type();
284
282
      if (ref == 0)
285
283
      {
286
284
        /* The item was not a table field and not a reference */
287
 
        my_error(ER_BAD_FIELD_ERROR, MYF(0),
288
 
                 full_name(), session->where());
289
 
        goto error;
 
285
        my_error(ER_BAD_FIELD_ERROR, MYF(0), full_name(), session->where());
 
286
        return true;
290
287
      }
291
288
      /* Should be checked in resolve_ref_in_select_and_group(). */
292
289
      assert(*ref && (*ref)->fixed);
319
316
          current_sel->having_fix_field)) ||
320
317
       !(*ref)->fixed))
321
318
  {
322
 
    my_error(ER_ILLEGAL_REFERENCE, MYF(0),
323
 
             name, ((*ref)->with_sum_func?
324
 
                    "reference to group function":
325
 
                    "forward reference in item list"));
326
 
    goto error;
 
319
    my_error(ER_ILLEGAL_REFERENCE, MYF(0), name, ((*ref)->with_sum_func ? "reference to group function" : "forward reference in item list"));
 
320
    return true;
327
321
  }
328
322
 
329
323
  set_properties();
330
324
 
331
325
  if ((*ref)->check_cols(1))
332
 
    goto error;
 
326
    return true;
333
327
  return false;
334
 
 
335
 
error:
336
 
  context->process_error(session);
337
 
  return true;
338
328
}
339
329
 
340
330