~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/base.h

  • Committer: Lee Bieber
  • Date: 2010-11-03 16:59:57 UTC
  • mfrom: (1900.1.3 build)
  • Revision ID: kalebral@gmail.com-20101103165957-3s69xbr349fd9hz5
Merge Gustaf - Replaced macros with functions/templates
Merge Patrick - fix bug 669698: Need sphinx documentation for test-run.pl
Merge Toru - fix blitzdb VARCHAR issue

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 * @TODO Convert HA_XXX defines into enums and/or bitmaps
26
26
 */
27
27
 
 
28
#include "definitions.h"
 
29
 
28
30
#ifndef DRIZZLED_BASE_H
29
31
#define DRIZZLED_BASE_H
30
32
 
494
496
 
495
497
/* For number of records */
496
498
typedef uint64_t        ha_rows;
497
 
#define rows2double(A)  uint64_t2double(A)
 
499
inline static double rows2double(ha_rows rows)
 
500
{  
 
501
  return uint64_t2double(rows);
 
502
}
498
503
 
499
504
#define HA_POS_ERROR    (~ (::drizzled::ha_rows) 0)
500
505
#define HA_OFFSET_ERROR (~ (::drizzled::internal::my_off_t) 0)
505
510
#define MAX_FILE_SIZE   INT64_MAX
506
511
#endif
507
512
 
508
 
#define HA_VARCHAR_PACKLENGTH(field_length) ((field_length) < 256 ? 1 :2)
 
513
inline static uint32_t ha_varchar_packlength(uint32_t field_length)
 
514
{
 
515
  return (field_length < 256 ? 1 :2);
 
516
}
509
517
 
510
518
 
511
519
} /* namespace drizzled */