~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/alter_table.cc

  • Committer: Brian Aker
  • Date: 2010-05-20 18:38:17 UTC
  • mto: This revision was merged to the branch mainline in revision 1554.
  • Revision ID: brian@gaz-20100520183817-9mik9c8xt3njfrmd
Fixes the assertion bug on handling of auto increment (sort of worthless,
since we only use this behavior).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1513
1513
    prev_insert_id= to->cursor->next_insert_id;
1514
1514
    error= to->cursor->insertRecord(to->record[0]);
1515
1515
    to->auto_increment_field_not_null= false;
 
1516
 
1516
1517
    if (error)
1517
1518
    { 
1518
1519
      if (!ignore ||
1525
1526
      delete_count++;
1526
1527
    }
1527
1528
    else
 
1529
    {
1528
1530
      found_count++;
 
1531
    }
1529
1532
  }
 
1533
 
1530
1534
  info.end_read_record();
1531
1535
  from->free_io_cache();
1532
1536
  delete [] copy;                               // This is never 0
1555
1559
  to->cursor->ha_release_auto_increment();
1556
1560
  if (to->cursor->ha_external_lock(session,F_UNLCK))
1557
1561
    error=1;
 
1562
 
1558
1563
  return(error > 0 ? -1 : 0);
1559
1564
}
1560
1565