~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/iocache.cc

  • Committer: Mark Atwood
  • Date: 2011-08-17 19:14:47 UTC
  • mfrom: (2385.3.17 rf)
  • Revision ID: me@mark.atwood.name-20110817191447-h86yzddvycd0xmof
mergeĀ lp:~olafvdspek/drizzle/refactor6

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <drizzled/internal/iocache.h>
24
24
#include <drizzled/error.h>
25
25
 
26
 
namespace drizzled
27
 
{
28
 
namespace internal
29
 
{
 
26
namespace drizzled {
 
27
namespace internal {
30
28
 
31
29
/*
32
30
** Open tempfile cached by io_cache_st
39
37
bool io_cache_st::open_cached_file(const char *dir_arg, const char *prefix_arg,
40
38
                      size_t cache_size_arg, myf cache_myflags)
41
39
{
42
 
  dir=   dir_arg ? strdup(dir_arg) : (char*) 0;
43
 
  prefix= (prefix_arg ? strdup(prefix_arg) : (char*) 0);
 
40
  dir= dir_arg ? strdup(dir_arg) : NULL;
 
41
  prefix= prefix_arg ? strdup(prefix_arg) : NULL;
44
42
 
45
43
  if ((dir == NULL) || (prefix == NULL))
46
44
    return true;
75
73
 
76
74
void io_cache_st::close_cached_file()
77
75
{
78
 
  if (my_b_inited(this))
 
76
  if (inited())
79
77
  {
80
78
    int _file= file;
81
79
    file= -1;                           /* Don't flush data */