ib_cursor_open_index_using_name() for index name that doesn't exist causes segfault

Bug #579934 reported by Stewart Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HailDB
Fix Released
Medium
Stewart Smith
2.x
Fix Released
Undecided
Stewart Smith

Bug Description

 *ib_crsr = NULL;

 if (index_id > 0) {
  err = ib_create_cursor(
   ib_crsr, table, index_id, cursor->prebuilt->trx);
 }

 if (ib_crsr != NULL) {
  const ib_cursor_t* cursor;

  cursor = *(ib_cursor_t**) ib_crsr;

********** if (cursor->prebuilt->index == NULL) {
   err = ib_cursor_close(*ib_crsr);
   ut_a(err == DB_SUCCESS);
   *ib_crsr = NULL;
  }
 }

of course, dereferencing NULL doesn't work so well.

Tags: api

Related branches

Stewart Smith (stewart)
Changed in haildb:
importance: Undecided → Medium
status: New → Confirmed
Stewart Smith (stewart)
tags: added: api
Changed in haildb:
assignee: nobody → Stewart Smith (stewart-flamingspork)
Stewart Smith (stewart)
Changed in haildb:
status: Confirmed → Fix Released
Stewart Smith (stewart)
Changed in haildb:
milestone: none → release
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.