~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/blob.cc

  • Committer: Mats Kindahl
  • Date: 2008-08-25 11:54:47 UTC
  • mto: (489.1.2 codestyle)
  • mto: This revision was merged to the branch mainline in revision 372.
  • Revision ID: mats@mysql.com-20080825115447-tg73zkyjnldm7p4c
Hiding THD::proc_info field and providing a setter and getter.
Replacing use of swap_variables() in C++ code with std::swap().
Moving swap_variables() into C files where it is used.
Replacing some function-like macros with inline functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include <drizzled/server_includes.h>
26
26
#include <drizzled/field/blob.h>
27
27
 
28
 
#define BLOB_PACK_LENGTH_TO_MAX_LENGH(arg) \
29
 
((uint32_t) ((1LL << min(arg, (uint)4) * 8) - 1LL))
 
28
uint32_t
 
29
blob_pack_length_to_max_length(uint arg)
 
30
{
 
31
  return (1LL << min(arg, 4U) * 8) - 1LL;
 
32
}
 
33
 
30
34
 
31
35
/****************************************************************************
32
36
** blob type
38
42
                       enum utype unireg_check_arg, const char *field_name_arg,
39
43
                       TABLE_SHARE *share, uint blob_pack_length,
40
44
                       const CHARSET_INFO * const cs)
41
 
  :Field_longstr(ptr_arg, BLOB_PACK_LENGTH_TO_MAX_LENGH(blob_pack_length),
 
45
  :Field_longstr(ptr_arg, blob_pack_length_to_max_length(blob_pack_length),
42
46
                 null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_arg,
43
47
                 cs),
44
48
   packlength(blob_pack_length)