diff options
author | Vasil Dimov <vasil.dimov@oracle.com> | 2010-04-12 18:20:41 +0300 |
---|---|---|
committer | Vasil Dimov <vasil.dimov@oracle.com> | 2010-04-12 18:20:41 +0300 |
commit | 5f9ba24f91989d68ff90d453dbfbc189464b89b9 (patch) | |
tree | 04211a3e5734b73e9f94cff511a4a74ff87075f0 /storage/innobase/pars | |
parent | 2283e1b510998ea904f118b0da50986ec4047de2 (diff) | |
parent | 3d4ef17d6a6c4989e86f1f5f9072696e37a9a755 (diff) | |
download | mariadb-git-5f9ba24f91989d68ff90d453dbfbc189464b89b9.tar.gz |
Import branches/innodb+ from SVN on top of storage/innobase.
Diffstat (limited to 'storage/innobase/pars')
-rw-r--r-- | storage/innobase/pars/pars0pars.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/storage/innobase/pars/pars0pars.c b/storage/innobase/pars/pars0pars.c index 9faf36d00a8..613e7962f0e 100644 --- a/storage/innobase/pars/pars0pars.c +++ b/storage/innobase/pars/pars0pars.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved. +Copyright (c) 1996, 2010, Innobase Oy. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -2031,6 +2031,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); |