~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/alter_table.cc

  • Committer: Mark Atwood
  • Date: 2011-08-11 03:05:03 UTC
  • mfrom: (2385.1.12 refactor4)
  • Revision ID: me@mark.atwood.name-20110811030503-rp9xjihc5x3y0x4q
mergeĀ lp:~olafvdspek/drizzle/refactor4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1598
1598
        from->sort.io_cache= new internal::io_cache_st;
1599
1599
 
1600
1600
        tables.table= from;
1601
 
        tables.setTableName(from->getMutableShare()->getTableName(), from->getMutableShare()->getTableNameSize());
 
1601
        tables.setTableName(from->getMutableShare()->getTableName());
1602
1602
        tables.alias= tables.getTableName();
1603
 
        tables.setSchemaName(from->getMutableShare()->getSchemaName(), from->getMutableShare()->getSchemaNameSize());
 
1603
        tables.setSchemaName(from->getMutableShare()->getSchemaName());
1604
1604
        error= 1;
1605
1605
 
1606
1606
        session->lex().select_lex.setup_ref_array(session, order_num);
1694
1694
 
1695
1695
    info.end_read_record();
1696
1696
    from->free_io_cache();
1697
 
    delete [] copy;                             // This is never 0
 
1697
    delete[] copy;
1698
1698
 
1699
1699
    if (to->cursor->ha_end_bulk_insert() && error <= 0)
1700
1700
    {
1723
1723
 
1724
1724
  if (to->cursor->ha_external_lock(session, F_UNLCK))
1725
1725
  {
1726
 
    error=1;
 
1726
    error= 1;
1727
1727
  }
1728
1728
 
1729
 
  return(error > 0 ? -1 : 0);
 
1729
  return error > 0 ? -1 : 0;
1730
1730
}
1731
1731
 
1732
1732
static Table *open_alter_table(Session *session, Table *table, identifier::Table &identifier)
1735
1735
  if (table->getShare()->getType())
1736
1736
  {
1737
1737
    TableList tbl;
1738
 
    tbl.setSchemaName(identifier.getSchemaName().c_str(), identifier.getSchemaName().size());
 
1738
    tbl.setSchemaName(identifier.getSchemaName().c_str());
1739
1739
    tbl.alias= identifier.getTableName().c_str();
1740
 
    tbl.setTableName(identifier.getTableName().c_str(), identifier.getTableName().size());
 
1740
    tbl.setTableName(identifier.getTableName().c_str());
1741
1741
 
1742
1742
    /* Table is in session->temporary_tables */
1743
1743
    return session->openTable(&tbl, NULL, DRIZZLE_LOCK_IGNORE_FLUSH);