~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/str/load_file.cc

  • Committer: Monty Taylor
  • Date: 2011-01-26 19:15:55 UTC
  • mto: This revision was merged to the branch mainline in revision 2126.
  • Revision ID: mordred@inaugust.com-20110126191555-nq5nnzyscvngsip2
Turns on -fvisibility=hidden by default. Symbols intended to be used by
plugins need to be marked with DRIZZLED_API.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include <config.h>
 
20
#include "config.h"
21
21
#include <drizzled/function/str/strfunc.h>
22
22
#include <drizzled/function/str/load_file.h>
23
23
#include <drizzled/error.h>
24
24
#include <drizzled/data_home.h>
25
25
#include <drizzled/session.h>
26
 
#include <drizzled/internal/my_sys.h>
27
 
#include <drizzled/sys_var.h>
28
 
#include <drizzled/system_variables.h>
 
26
#include "drizzled/internal/my_sys.h"
29
27
 
30
28
#include <boost/filesystem.hpp>
31
29
 
102
100
    goto err;
103
101
  }
104
102
 
105
 
  tmp_value.alloc((size_t)stat_info.st_size);
 
103
  if (tmp_value.alloc((size_t)stat_info.st_size))
 
104
    goto err;
106
105
  if ((file = internal::my_open(target_path.file_string().c_str(), O_RDONLY, MYF(0))) < 0)
107
106
    goto err;
108
107
  if (internal::my_read(file, (unsigned char*) tmp_value.ptr(), (size_t)stat_info.st_size, MYF(MY_NABP)))