~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_info.c

  • Committer: Monty Taylor
  • Date: 2008-10-30 19:42:06 UTC
  • mto: (520.4.38 devel)
  • mto: This revision was merged to the branch mainline in revision 572.
  • Revision ID: monty@inaugust.com-20081030194206-fzus6yqlw1ekru65
Removed handler from common_includes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
/* Return useful base information for an open table */
17
17
 
18
 
#include "myisam_priv.h"
 
18
#include "myisamdef.h"
 
19
#ifdef  __WIN__
19
20
#include <sys/stat.h>
20
 
#include "drizzled/error.h"
21
 
 
22
 
using namespace drizzled;
 
21
#endif
23
22
 
24
23
        /* Get position to last record */
25
24
 
26
 
internal::my_off_t mi_position(MI_INFO *info)
 
25
my_off_t mi_position(MI_INFO *info)
27
26
{
28
27
  return info->lastpos;
29
28
}
42
41
    return(0);                          /* Compatible with ISAM */
43
42
  if (!(flag & HA_STATUS_NO_LOCK))
44
43
  {
 
44
    pthread_mutex_lock(&share->intern_lock);
45
45
    _mi_readinfo(info,F_RDLCK,0);
46
46
    fast_mi_writeinfo(info);
 
47
    pthread_mutex_unlock(&share->intern_lock);
47
48
  }
48
49
  if (flag & HA_STATUS_VARIABLE)
49
50
  {
72
73
    x->filenr    = info->dfile;
73
74
    x->options   = share->options;
74
75
    x->create_time=share->state.create_time;
75
 
    x->reflength= mi_get_pointer_length(share->base.max_data_file_length, data_pointer_size);
 
76
    x->reflength= mi_get_pointer_length(share->base.max_data_file_length,
 
77
                                        myisam_data_pointer_size);
76
78
    x->record_offset= ((share->options &
77
79
                        (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ?
78
80
                       0L : share->base.pack_reclength);
117
119
 
118
120
void mi_report_error(int errcode, const char *file_name)
119
121
{
120
 
  mi_report_error(errcode, file_name);
121
 
}
122
 
 
123
 
void mi_report_error(drizzled::error_t errcode, const char *file_name)
124
 
{
125
122
  size_t        lgt;
126
123
 
127
124
  if ((lgt= strlen(file_name)) > 64)
128
125
    file_name+= lgt - 64;
129
126
  my_error(errcode, MYF(ME_NOREFRESH), file_name);
 
127
  return;
130
128
}
131
129