~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_open.cc

  • Committer: Brian Aker
  • Date: 2011-02-22 06:12:02 UTC
  • mfrom: (2190.1.6 drizzle-build)
  • Revision ID: brian@tangent.org-20110222061202-k03czxykqy4x9hjs
List update, header fixes, multiple symbols, and David deletes some code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#include <string.h>
21
21
#include <algorithm>
 
22
#include <memory>
 
23
#include <boost/scoped_ptr.hpp>
 
24
#include <boost/scoped_array.hpp>
22
25
 
23
 
#include "drizzled/charset_info.h"
24
 
#include "drizzled/internal/m_string.h"
25
 
#include "drizzled/util/test.h"
26
 
#include "drizzled/global_charset_info.h"
27
 
#include "drizzled/charset.h"
28
 
#include "drizzled/memory/multi_malloc.h"
 
26
#include <drizzled/charset_info.h>
 
27
#include <drizzled/internal/m_string.h>
 
28
#include <drizzled/util/test.h>
 
29
#include <drizzled/global_charset_info.h>
 
30
#include <drizzled/charset.h>
 
31
#include <drizzled/memory/multi_malloc.h>
29
32
 
30
33
 
31
34
using namespace std;
76
79
  have an open count of 0.
77
80
******************************************************************************/
78
81
 
79
 
MI_INFO *mi_open(const drizzled::TableIdentifier &identifier, int mode, uint32_t open_flags)
 
82
MI_INFO *mi_open(const drizzled::identifier::Table &identifier, int mode, uint32_t open_flags)
80
83
{
81
84
  int lock_error,kfile,open_mode,save_errno,have_rtree=0;
82
85
  uint32_t i,j,len,errpos,head_length,base_pos,offset,info_length,keys,
86
89
  unsigned char *disk_cache= NULL;
87
90
  unsigned char *disk_pos, *end_pos;
88
91
  MI_INFO info,*m_info,*old_info;
89
 
  MYISAM_SHARE share_buff,*share;
90
 
  ulong rec_per_key_part[HA_MAX_POSSIBLE_KEY*MI_MAX_KEY_SEG];
 
92
  boost::scoped_ptr<MYISAM_SHARE> share_buff_ap(new MYISAM_SHARE);
 
93
  MYISAM_SHARE &share_buff= *share_buff_ap.get();
 
94
  MYISAM_SHARE *share;
 
95
  boost::scoped_array<ulong> rec_per_key_part_ap(new ulong[HA_MAX_POSSIBLE_KEY*MI_MAX_KEY_SEG]);
 
96
  ulong *rec_per_key_part= rec_per_key_part_ap.get();
91
97
  internal::my_off_t key_root[HA_MAX_POSSIBLE_KEY],key_del[MI_MAX_KEY_BLOCK_SIZE];
92
98
  uint64_t max_key_file_length, max_data_file_length;
93
99