~mordred/drizzle/fix-bell-bugs

« back to all changes in this revision

Viewing changes to drizzled/field.cc

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
#include "drizzled/time_functions.h"
46
46
#include "drizzled/internal/m_string.h"
47
47
 
 
48
using namespace drizzled;
 
49
 
48
50
/*****************************************************************************
49
51
  Instansiate templates and static variables
50
52
*****************************************************************************/
365
367
 
366
368
void *Field::operator new(size_t size)
367
369
{
368
 
  return sql_alloc(size);
 
370
  return memory::sql_alloc(size);
369
371
}
370
372
 
371
 
void *Field::operator new(size_t size, MEM_ROOT *mem_root)
 
373
void *Field::operator new(size_t size, memory::Root *mem_root)
372
374
{
373
375
  return alloc_root(mem_root, static_cast<uint32_t>(size));
374
376
}
838
840
  return test(table->index_flags(idx) & HA_READ_RANGE);
839
841
}
840
842
 
841
 
Field *Field::new_field(MEM_ROOT *root, Table *new_table, bool)
 
843
Field *Field::new_field(memory::Root *root, Table *new_table, bool)
842
844
{
843
845
  Field *tmp;
844
846
  if (!(tmp= (Field*) memdup_root(root,(char*) this,size_of())))
856
858
  return tmp;
857
859
}
858
860
 
859
 
Field *Field::new_key_field(MEM_ROOT *root, Table *new_table,
 
861
Field *Field::new_key_field(memory::Root *root, Table *new_table,
860
862
                            unsigned char *new_ptr,
861
863
                            unsigned char *new_null_ptr,
862
864
                            uint32_t new_null_bit)
871
873
  return tmp;
872
874
}
873
875
 
874
 
Field *Field::clone(MEM_ROOT *root, Table *new_table)
 
876
Field *Field::clone(memory::Root *root, Table *new_table)
875
877
{
876
878
  Field *tmp;
877
879
  if ((tmp= (Field*) memdup_root(root,(char*) this,size_of())))
951
953
}
952
954
 
953
955
Field *make_field(TableShare *share,
954
 
                  MEM_ROOT *root,
 
956
                  memory::Root *root,
955
957
                  unsigned char *ptr,
956
958
                  uint32_t field_length,
957
959
                  bool is_nullable,