summaryrefslogtreecommitdiff
path: root/include/myisampack.h
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2004-06-02 19:11:57 +0500
committerunknown <hf@deer.(none)>2004-06-02 19:11:57 +0500
commit21dea7fc0b4412586765e45a6b900e380cef9a58 (patch)
tree064e7056ff39c52056305fbdbe15e034a750c7e9 /include/myisampack.h
parentc690204c701f35bda2d19f14b0e8423c80cff1bb (diff)
downloadmariadb-git-21dea7fc0b4412586765e45a6b900e380cef9a58.tar.gz
wl 1562 (To improve RTree indexes)
some changes to make code nicer include/myisampack.h: mi_sint1korr and similar things added to do conversion in an uniform way myisam/rt_index.c: 'if' simplified myisam/rt_mbr.c: some fixes to make code nicer and smaller myisam/rt_test.c: some modifications to extend test mysql-test/r/gis-rtree.result: result became slightly different because of changes made
Diffstat (limited to 'include/myisampack.h')
-rw-r--r--include/myisampack.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/myisampack.h b/include/myisampack.h
index 95793e2aaeb..06c94fea75f 100644
--- a/include/myisampack.h
+++ b/include/myisampack.h
@@ -21,6 +21,10 @@
better compression
*/
+/* these two are for uniformity */
+#define mi_sint1korr(A) (int8)(*A)
+#define mi_uint1korr(A) (uint8)(*A)
+
#define mi_sint2korr(A) (int16) (((int16) ((uchar) (A)[1])) +\
((int16) ((int16) (A)[0]) << 8))
#define mi_sint3korr(A) ((int32) ((((uchar) (A)[0]) & 128) ? \
@@ -75,6 +79,9 @@
(((uint32) ((uchar) (A)[0])) << 24))) <<\
32))
+/* This one is for uniformity */
+#define mi_int1store(T,A) *((uchar*)(T))= (uchar) (A)
+
#define mi_int2store(T,A) { uint def_temp= (uint) (A) ;\
*((uchar*) ((T)+1))= (uchar)(def_temp); \
*((uchar*) ((T)+0))= (uchar)(def_temp >> 8); }