#At file:///home/marko/innobase/dev/mysql2a/5.5-innodb/ based on revid:marko.makela@strippedipupmqrghgcq
3119 Marko Mäkelä 2010-06-24
mach_ull_parse_compressed(): Move to .ic file to silence a GCC warning
about trx_id being possibly uninitialized in trx_undo_parse_page_header().
The warning remains when UNIV_DEBUG or UNIV_MUST_NOT_INLINE is enabled.
modified:
storage/innobase/include/mach0data.h
storage/innobase/include/mach0data.ic
storage/innobase/mach/mach0data.c
=== modified file 'storage/innobase/include/mach0data.h'
--- a/storage/innobase/include/mach0data.h revid:marko.makela@strippednwqipupmqrghgcq
+++ b/storage/innobase/include/mach0data.h revid:marko.makela@strippedii6odd
@@ -283,7 +283,7 @@ mach_parse_compressed(
Reads a 64-bit integer in a compressed form
if the log record fully contains it.
@return pointer to end of the stored field, NULL if not complete */
-UNIV_INTERN
+UNIV_INLINE
byte*
mach_ull_parse_compressed(
/*======================*/
=== modified file 'storage/innobase/include/mach0data.ic'
--- a/storage/innobase/include/mach0data.ic revid:marko.makela@stripped
+++ b/storage/innobase/include/mach0data.ic revid:marko.makela@stripped
@@ -496,6 +496,46 @@ mach_ull_read_much_compressed(
return(n);
}
+
+/*********************************************************//**
+Reads a 64-bit integer in a compressed form
+if the log record fully contains it.
+@return pointer to end of the stored field, NULL if not complete */
+UNIV_INLINE
+byte*
+mach_ull_parse_compressed(
+/*======================*/
+ byte* ptr, /* in: pointer to buffer from where to read */
+ byte* end_ptr,/* in: pointer to end of the buffer */
+ ib_uint64_t* val) /* out: read value */
+{
+ ulint size;
+
+ ut_ad(ptr);
+ ut_ad(end_ptr);
+ ut_ad(val);
+
+ if (end_ptr < ptr + 5) {
+
+ return(NULL);
+ }
+
+ *val = mach_read_compressed(ptr);
+
+ size = mach_get_compressed_size((ulint) *val);
+
+ ptr += size;
+
+ if (end_ptr < ptr + 4) {
+
+ return(NULL);
+ }
+
+ *val <<= 32;
+ *val |= mach_read_from_4(ptr);
+
+ return(ptr + 4);
+}
#ifndef UNIV_HOTBACKUP
/*********************************************************//**
Reads a double. It is stored in a little-endian format.
=== modified file 'storage/innobase/mach/mach0data.c'
--- a/storage/innobase/mach/mach0data.c revid:marko.makela@stripped624060146-enwqipupmqrghgcq
+++ b/storage/innobase/mach/mach0data.c revid:marko.makela@strippedagpd3u6qii6odd
@@ -92,43 +92,3 @@ mach_parse_compressed(
return(ptr + 5);
}
}
-
-/*********************************************************//**
-Reads a 64-bit integer in a compressed form
-if the log record fully contains it.
-@return pointer to end of the stored field, NULL if not complete */
-UNIV_INTERN
-byte*
-mach_ull_parse_compressed(
-/*======================*/
- byte* ptr, /* in: pointer to buffer from where to read */
- byte* end_ptr,/* in: pointer to end of the buffer */
- ib_uint64_t* val) /* out: read value */
-{
- ulint size;
-
- ut_ad(ptr);
- ut_ad(end_ptr);
- ut_ad(val);
-
- if (end_ptr < ptr + 5) {
-
- return(NULL);
- }
-
- *val = mach_read_compressed(ptr);
-
- size = mach_get_compressed_size((ulint) *val);
-
- ptr += size;
-
- if (end_ptr < ptr + 4) {
-
- return(NULL);
- }
-
- *val <<= 32;
- *val |= mach_read_from_4(ptr);
-
- return(ptr + 4);
-}
Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20100624060842-bkagpd3u6qii6odd.bundle
| Thread |
|---|
| • bzr commit into mysql-trunk-innodb branch (marko.makela:3119) | marko.makela | 24 Jun |