summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_statistics.h')
-rw-r--r--sql/sql_statistics.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_statistics.h b/sql/sql_statistics.h
index 331e3559203..c399951b828 100644
--- a/sql/sql_statistics.h
+++ b/sql/sql_statistics.h
@@ -147,7 +147,7 @@ private:
case SINGLE_PREC_HB:
return (uint) (((uint8 *) values)[i]);
case DOUBLE_PREC_HB:
- return (uint) (((uint16 *) values)[i]);
+ return (uint) uint2korr(values + i * 2);
}
return 0;
}
@@ -214,7 +214,7 @@ public:
((uint8 *) values)[i]= (uint8) (val * prec_factor());
return;
case DOUBLE_PREC_HB:
- ((uint16 *) values)[i]= (uint16) (val * prec_factor());
+ int2store(values + i * 2, val * prec_factor());
return;
}
}
@@ -226,7 +226,7 @@ public:
((uint8 *) values)[i]= ((uint8 *) values)[i-1];
return;
case DOUBLE_PREC_HB:
- ((uint16 *) values)[i]= ((uint16 *) values)[i-1];
+ int2store(values + i * 2, uint2korr(values + i * 2 - 2));
return;
}
}