My Project
Functions
discover.cc File Reference

Functions for discover of frm file from handler. More...

#include "sql_priv.h"
#include "unireg.h"
#include "discover.h"
#include <my_dir.h>

Functions

int readfrm (const char *name, uchar **frmdata, size_t *len)
int writefrm (const char *name, const uchar *frmdata, size_t len)

Detailed Description

Functions for discover of frm file from handler.


Function Documentation

int readfrm ( const char *  name,
uchar **  frmdata,
size_t *  len 
)

Read the contents of a .frm file.

frmdata and len are set to 0 on error.

Parameters:
namepath to table-file "db/name"
frmdatafrm data
lenlength of the read frmdata
Return values:
0ok
1Could not open file
2Could not stat file
3Could not allocate data for read. Could not read file
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines