~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/ref.cc

doStartTableScan() result not checked.

Add __attribute__((warn_unused_result)) to Cursor::startTableScan()
and by extension init_read_records

then go and fix the places where we weren't checking for errors.

This patch helped by Monty Widenius' patch to MariaDB. Greatly increased
confidence that we either handle the errors correctly or are at least
on par with bugs :)

Show diffs side-by-side

added added

removed removed

Lines of Context:
247
247
                       cached_table->select_lex != outer_context->select_lex);
248
248
            }
249
249
            prev_subselect_item->used_tables_cache|= from_field->getTable()->map;
250
 
            prev_subselect_item->const_item_cache= false;
 
250
            prev_subselect_item->const_item_cache= 0;
251
251
            break;
252
252
          }
253
253
        }
255
255
 
256
256
        /* Reference is not found => depend on outer (or just error). */
257
257
        prev_subselect_item->used_tables_cache|= OUTER_REF_TABLE_BIT;
258
 
        prev_subselect_item->const_item_cache= false;
 
258
        prev_subselect_item->const_item_cache= 0;
259
259
 
260
260
        outer_context= outer_context->outer_context;
261
261
      } while (outer_context);