~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table/singular.cc

  • Committer: Lee Bieber
  • Date: 2011-01-15 03:08:27 UTC
  • mfrom: (1994.5.38 doc)
  • mto: This revision was merged to the branch mainline in revision 2087.
  • Revision ID: kalebral@gmail.com-20110115030827-0h9s99kiknrmt9ti
Merge Stewart - some documentation clean up

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include <config.h>
 
21
#include "config.h"
22
22
 
23
23
#include <sys/types.h>
24
24
#include <sys/stat.h>
25
25
#include <fcntl.h>
26
26
 
27
 
#include <drizzled/session.h>
28
 
#include <plugin/myisam/myisam.h>
29
 
#include <drizzled/plugin/transactional_storage_engine.h>
 
27
#include "drizzled/session.h"
 
28
#include "plugin/myisam/myisam.h"
 
29
#include "drizzled/plugin/transactional_storage_engine.h"
30
30
 
31
 
#include <drizzled/table.h>
 
31
#include "drizzled/table.h"
32
32
 
33
33
namespace drizzled
34
34
{
59
59
  in_use= session;           /* field_arg->reset() may access in_use */
60
60
 
61
61
  /* Create all fields and calculate the total length of record */
62
 
  List<CreateField>::iterator it(field_list.begin());
 
62
  List_iterator_fast<CreateField> it(field_list);
63
63
  message::Table::Field null_field;
64
64
  while ((cdef= it++))
65
65
  {
98
98
  null_pack_length= (null_count + 7)/8;
99
99
  getMutableShare()->setRecordLength(record_length + null_pack_length);
100
100
  getMutableShare()->rec_buff_length= ALIGN_SIZE(getMutableShare()->getRecordLength() + 1);
101
 
  record[0]= (unsigned char*)session->getMemRoot()->allocate(getMutableShare()->rec_buff_length);
 
101
  record[0]= (unsigned char*)session->alloc(getMutableShare()->rec_buff_length);
102
102
  if (not getInsertRecord())
103
103
  {
104
104
    throw "Memory allocation failure";
142
142
{
143
143
  int error;
144
144
  
145
 
  identifier::Table identifier(getShare()->getSchemaName(), getShare()->getTableName(), getShare()->getPath());
 
145
  TableIdentifier identifier(getShare()->getSchemaName(), getShare()->getTableName(), getShare()->getPath());
146
146
  if ((error=cursor->ha_open(identifier,
147
147
                             O_RDWR,
148
148
                             HA_OPEN_TMP_TABLE | HA_OPEN_INTERNAL_TABLE)))
325
325
      cursor->closeMarkForDelete(getShare()->getTableName());
326
326
    }
327
327
 
328
 
    identifier::Table identifier(getShare()->getSchemaName(), getShare()->getTableName(), getShare()->getTableName());
 
328
    TableIdentifier identifier(getShare()->getSchemaName(), getShare()->getTableName(), getShare()->getTableName());
329
329
    drizzled::error_t ignored;
330
330
    plugin::StorageEngine::dropTable(*in_use,
331
331
                                     *getShare()->getEngine(),