← Back to team overview

maria-developers team mailing list archive

[Branch ~maria-captains/maria/5.1-converting] Rev 2861: fix questionable UNIV_EXPECT's in the xtradb that confused old gcc.

 

------------------------------------------------------------
revno: 2861
committer: Sergei Golubchik <sergii@xxxxxxxxx>
branch nick: 5.1
timestamp: Wed 2010-06-09 13:53:51 +0200
message:
  fix questionable UNIV_EXPECT's in the xtradb that confused old gcc.
modified:
  storage/xtradb/include/rem0rec.ic


--
lp:~maria-captains/maria/5.1-converting
https://code.launchpad.net/~maria-captains/maria/5.1-converting

Your team Maria developers is subscribed to branch lp:~maria-captains/maria/5.1-converting.
To unsubscribe from this branch go to https://code.launchpad.net/~maria-captains/maria/5.1-converting/+edit-subscription
=== modified file 'storage/xtradb/include/rem0rec.ic'
--- storage/xtradb/include/rem0rec.ic	2010-01-06 12:00:14 +0000
+++ storage/xtradb/include/rem0rec.ic	2010-06-09 11:53:51 +0000
@@ -268,7 +268,7 @@
 		return(NULL);
 	}
 
-	if (UNIV_EXPECT(comp, REC_OFFS_COMPACT)) {
+	if (UNIV_LIKELY(comp != 0)) {
 #if UNIV_PAGE_SIZE <= 32768
 		/* Note that for 64 KiB pages, field_value can 'wrap around'
 		and the debug assertion is not valid */
@@ -336,7 +336,7 @@
 
 	field_value = mach_read_from_2(rec - REC_NEXT);
 
-	if (UNIV_EXPECT(comp, REC_OFFS_COMPACT)) {
+	if (UNIV_LIKELY(comp != 0)) {
 #if UNIV_PAGE_SIZE <= 32768
 		/* Note that for 64 KiB pages, field_value can 'wrap around'
 		and the debug assertion is not valid */
@@ -647,7 +647,7 @@
 & (REC_INFO_BITS_MASK >> REC_INFO_BITS_SHIFT)
 # error "REC_NEW_STATUS_MASK and REC_INFO_BITS_MASK overlap"
 #endif
-	if (UNIV_EXPECT(comp, REC_OFFS_COMPACT)) {
+	if (UNIV_LIKELY(comp != 0)) {
 		bits = rec_get_info_bits(rec, TRUE) | rec_get_status(rec);
 	} else {
 		bits = rec_get_info_bits(rec, FALSE);
@@ -683,7 +683,7 @@
 	const rec_t*	rec,	/*!< in: physical record */
 	ulint		comp)	/*!< in: nonzero=compact page format */
 {
-	if (UNIV_EXPECT(comp, REC_OFFS_COMPACT)) {
+	if (UNIV_LIKELY(comp != 0)) {
 		return(UNIV_UNLIKELY(
 			       rec_get_bit_field_1(rec, REC_NEW_INFO_BITS,
 						   REC_INFO_DELETED_FLAG,