summaryrefslogtreecommitdiff
path: root/sql/field.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2001-02-07 17:42:20 +0200
committerunknown <monty@donna.mysql.com>2001-02-07 17:42:20 +0200
commitf816d6f16d5c4df073cf0bed40de07286f6c6cd5 (patch)
tree513c37217d346353220e5bf7b3bcccd9e135c596 /sql/field.cc
parente5f835b101afafa7ded3f2660416c3d8bfa995f6 (diff)
downloadmariadb-git-f816d6f16d5c4df073cf0bed40de07286f6c6cd5.tar.gz
Use new bitmap interface
Patches for Armstrong Removed warnings when using REPAIR TABLE .. EXTENDED Docs/manual.texi: Changelog configure.in: Added missing -lsocket library on SCO include/global.h: Patch for Armstrong include/my_bitmap.h: Changed bitmap interface to avoid problem with missing LOCK_bitmap symbol include/myisampack.h: Portability fix for Armstrong mysql-test/t/select.test: Changed to work with 'mysql test < select.tst' mysys/my_bitmap.c: Changed bitmap interface to avoid problem with missing LOCK_bitmap symbol mysys/my_init.c: Removed LOCK_bitmap sql/field.cc: Patch for Armstrong sql/filesort.cc: Patch for Armstrong sql/ha_myisam.cc: Removed warnings when using REPAIR TABLE .. EXTENDED sql/mysql_priv.h: Use new bitmap interface sql/mysqld.cc: Use new bitmap interface sql/sql_select.cc: Use new bitmap interface
Diffstat (limited to 'sql/field.cc')
-rw-r--r--sql/field.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/field.cc b/sql/field.cc
index 55a98dde0ea..383b3f7776d 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -2106,8 +2106,14 @@ int Field_double::cmp(const char *a_ptr, const char *b_ptr)
else
#endif
{
+/* could this ALWAYS be 2 calls to doubleget() ?? */
+#if (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
+ doubleget(a, a_ptr);
+ doubleget(b, b_ptr);
+#else
memcpy_fixed(&a,a_ptr,sizeof(double));
memcpy_fixed(&b,b_ptr,sizeof(double));
+#endif
}
return (a < b) ? -1 : (a > b) ? 1 : 0;
}
@@ -2127,7 +2133,12 @@ void Field_double::sort_string(char *to,uint length __attribute__((unused)))
}
else
#endif
+/* could this ALWAYS be 2 calls to doubleget() ?? */
+#if (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
+ doubleget(nr,ptr);
+#else
memcpy_fixed(&nr,ptr,sizeof(nr));
+#endif
change_double_for_sort(nr, (byte*) to);
}