~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_open.cc

  • Committer: Stewart Smith
  • Date: 2010-11-03 03:30:27 UTC
  • mto: (1902.1.1 build) (1910.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1903.
  • Revision ID: stewart@flamingspork.com-20101103033027-lskb6gxwwforfz71
fix docs warning: underline/overline too short for replace.rst

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>
25
22
 
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>
 
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"
32
29
 
33
30
 
34
31
using namespace std;
79
76
  have an open count of 0.
80
77
******************************************************************************/
81
78
 
82
 
MI_INFO *mi_open(const drizzled::identifier::Table &identifier, int mode, uint32_t open_flags)
 
79
MI_INFO *mi_open(const drizzled::TableIdentifier &identifier, int mode, uint32_t open_flags)
83
80
{
84
81
  int lock_error,kfile,open_mode,save_errno,have_rtree=0;
85
82
  uint32_t i,j,len,errpos,head_length,base_pos,offset,info_length,keys,
89
86
  unsigned char *disk_cache= NULL;
90
87
  unsigned char *disk_pos, *end_pos;
91
88
  MI_INFO info,*m_info,*old_info;
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();
 
89
  MYISAM_SHARE share_buff,*share;
 
90
  ulong rec_per_key_part[HA_MAX_POSSIBLE_KEY*MI_MAX_KEY_SEG];
97
91
  internal::my_off_t key_root[HA_MAX_POSSIBLE_KEY],key_del[MI_MAX_KEY_BLOCK_SIZE];
98
92
  uint64_t max_key_file_length, max_data_file_length;
99
93