summaryrefslogtreecommitdiff
path: root/innobase/mach
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2004-02-20 17:43:02 +0200
committermonty@mashka.mysql.fi <>2004-02-20 17:43:02 +0200
commit494e43c1f56d2a65fc804af865ae82661fbb046f (patch)
treee13a23a1c9f28ed5eb2d903ba59a153cda3355ac /innobase/mach
parentf8b4732a5edccdf71eb65093c8bb6ec028176fec (diff)
parente1fee022fa10fc0cceafbd774441d70311e10434 (diff)
downloadmariadb-git-494e43c1f56d2a65fc804af865ae82661fbb046f.tar.gz
merge with 4.0 to get security fixes and latest bug fixes
Diffstat (limited to 'innobase/mach')
-rw-r--r--innobase/mach/ts/makefile12
-rw-r--r--innobase/mach/ts/tsmach.c158
2 files changed, 0 insertions, 170 deletions
diff --git a/innobase/mach/ts/makefile b/innobase/mach/ts/makefile
deleted file mode 100644
index e9531e6ebe0..00000000000
--- a/innobase/mach/ts/makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-
-include ..\..\makefile.i
-
-tsmach: ..\mach.lib tsmach.c
- $(CCOM) $(CFL) -I.. -I..\.. ..\mach.lib ..\..\ut.lib ..\..\os.lib tsmach.c $(LFL)
-
-
-
-
-
-
-
diff --git a/innobase/mach/ts/tsmach.c b/innobase/mach/ts/tsmach.c
deleted file mode 100644
index a4b67227d20..00000000000
--- a/innobase/mach/ts/tsmach.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/************************************************************************
-The test module for the machine-dependent utilities
-
-(c) 1995 Innobase Oy
-
-Created 11/28/1995 Heikki Tuuri
-*************************************************************************/
-
-#include "../mach0data.h"
-
-byte arr[4000000];
-
-
-/*********************************************************************
-Test for ulint write and read. */
-
-void
-test1(void)
-/*=======*/
-{
- ulint a, i, j;
- ulint tm, oldtm;
-
- printf("-------------------------------------------\n");
- printf("TEST 1. Speed test of ulint read and write \n");
-
- a = 0;
-
- oldtm = ut_clock();
-
- for (j = 0; j < 100; j++) {
- for (i = 0; i < 10000; i++) {
-
- a += mach_read_from_4(arr + i * 4);
- }
- }
-
- tm = ut_clock();
-
- printf("Wall clock time for read of %lu ulints %lu millisecs\n",
- j * i, tm - oldtm);
-
- oldtm = ut_clock();
-
- for (j = 0; j < 100; j++) {
- for (i = 0; i < 10000; i++) {
-
- a += mach_read(arr + i * 4);
- }
- }
-
- tm = ut_clock();
-
- printf("Wall clock time for read of %lu ulints %lu millisecs\n",
- j * i, tm - oldtm);
-
- oldtm = ut_clock();
-
- for (j = 0; j < 100; j++) {
- for (i = 0; i < 10000; i++) {
-
- a += mach_read_from_4(arr + i * 4 + 1);
- }
- }
-
- tm = ut_clock();
-
- printf("Wall clock time for read of %lu ulints %lu millisecs\n",
- j * i, tm - oldtm);
- oldtm = ut_clock();
-
- for (j = 0; j < 100; j++) {
- for (i = 0; i < 10000; i++) {
-
- a += mach_read(arr + i * 4 + 1);
- }
- }
-
- tm = ut_clock();
-
- printf("Wall clock time for read of %lu ulints %lu millisecs\n",
- j * i, tm - oldtm);
-
- oldtm = ut_clock();
-
- for (i = 0; i < 1000000; i++) {
-
- a += mach_read_from_4(arr + i * 4);
- }
-
- tm = ut_clock();
-
- printf("Wall clock time for read of %lu ulints %lu millisecs\n",
- i, tm - oldtm);
- oldtm = ut_clock();
-
- for (i = 0; i < 1000000; i++) {
-
- a += mach_read(arr + i * 4);
- }
-
- tm = ut_clock();
-
- printf("Wall clock time for read of %lu ulints %lu millisecs\n",
- i, tm - oldtm);
-
- oldtm = ut_clock();
-
- for (j = 0; j < 100; j++) {
- for (i = 0; i < 10000; i++) {
-
- a += mach_read_from_2(arr + i * 2);
- }
- }
-
- tm = ut_clock();
-
- printf("Wall clock time for read of %lu 16-bit ints %lu millisecs\n",
- j * i, tm - oldtm);
-}
-
-/*********************************************************************
-Test for ulint write and read. */
-
-void
-test2(void)
-/*=======*/
-{
- ulint a[2];
-
- printf("-------------------------------------------\n");
- printf("TEST 2. Correctness test of ulint read and write \n");
-
- mach_write_to_4((byte*)&a, 737237727);
-
- ut_a(737237727 == mach_read_from_4((byte*)&a));
-
- mach_write_to_2((byte*)&a, 7372);
-
- ut_a(7372 == mach_read_from_2((byte*)&a));
-
- mach_write_to_1((byte*)&a, 27);
-
- ut_a(27 == mach_read_from_1((byte*)&a));
-
- mach_write((byte*)&a, 737237727);
-
- ut_a(737237727 == mach_read((byte*)&a));
-}
-
-void
-main(void)
-{
- test1();
- test2();
-
- printf("TEST SUCCESSFULLY COMPLETED!\n");
-}