~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_info.cc

  • Committer: Daniel Nichter
  • Date: 2011-10-23 16:01:37 UTC
  • mto: This revision was merged to the branch mainline in revision 2448.
  • Revision ID: daniel@percona.com-20111023160137-7ac3blgz8z4tf8za
Add Administration Getting Started and Logging.  Capitalize SQL clause keywords.

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