Commit 17898a0a authored by vdimov's avatar vdimov

branches/innodb+: Merge c6413 from branches/innodb+_persistent_stats:

  ------------------------------------------------------------------------
  r6413 | vasil | 2010-01-11 15:18:35 +0200 (Mon, 11 Jan 2010) | 4 lines
  Changed paths:
     M /branches/innodb+_persistent_stats/include/pars0pars.h
     M /branches/innodb+_persistent_stats/pars/pars0pars.c
  
  branches/innodb+: Add a func to store uint64
  
  Add a new function pars_info_add_uint64_literal() that adds a literal of
  type ib_uint64_t.
  ------------------------------------------------------------------------
parent 5971eab1
......@@ -519,6 +519,23 @@ pars_info_add_int4_literal(
/****************************************************************//**
Equivalent to:
char buf[8];
mach_write_ull(buf, val);
pars_info_add_literal(info, name, buf, 8, DATA_INT, 0);
except that the buffer is dynamically allocated from the info struct's
heap. */
UNIV_INTERN
void
pars_info_add_uint64_literal(
/*=========================*/
pars_info_t* info, /*!< in: info struct */
const char* name, /*!< in: name */
ib_uint64_t val); /*!< in: value */
/****************************************************************//**
Equivalent to:
char buf[8];
mach_write_to_8(buf, val);
pars_info_add_literal(info, name, buf, 8, DATA_BINARY, 0);
......
......@@ -2030,6 +2030,29 @@ pars_info_add_int4_literal(
/****************************************************************//**
Equivalent to:
char buf[8];
mach_write_ull(buf, val);
pars_info_add_literal(info, name, buf, 8, DATA_INT, 0);
except that the buffer is dynamically allocated from the info struct's
heap. */
UNIV_INTERN
void
pars_info_add_uint64_literal(
/*=========================*/
pars_info_t* info, /*!< in: info struct */
const char* name, /*!< in: name */
ib_uint64_t val) /*!< in: value */
{
byte* buf = mem_heap_alloc(info->heap, 8);
mach_write_ull(buf, val);
pars_info_add_literal(info, name, buf, 8, DATA_INT, 0);
}
/****************************************************************//**
Equivalent to:
char buf[8];
mach_write_to_8(buf, val);
pars_info_add_literal(info, name, buf, 8, DATA_FIXBINARY, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment