summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/narttu.mysql.fi>2008-02-21 02:45:02 +0200
committerunknown <monty@mysql.com/narttu.mysql.fi>2008-02-21 02:45:02 +0200
commitdf843c4ce26e2c5d152098302b209252c712382e (patch)
tree01e5c523135209a8a44a7a99d51a1dc1b33a367e /mysys
parent8bb95a820ad92cd39e9ade0b70989bee7fe6d040 (diff)
downloadmariadb-git-df843c4ce26e2c5d152098302b209252c712382e.tar.gz
Fixed problems with ma_test2 and mi_test2 on high-byte-first system
Fixed bug in ma_test2 when last row in table is deleted Fixed that ma_test_recovery.pl works on Solaris (by using digest instead of md5sum) Fixed some compiler warnings generated by the Forte compiler dbug/dbug.c: Added cast to get rid of compiler warning mysys/lf_alloc-pin.c: Added cast to get rid of compiler warning mysys/my_bitmap.c: Removed impossible DBUG_ASSERT()'s to get rid of compiler warnings mysys/my_compress.c: Removed wrong cast to get rid of compiler warning storage/maria/lockman.c: Added cast to get rid of compiler warning storage/maria/ma_open.c: Added fix from MyISAM to allocate space in key buffer for nod pointer storage/maria/ma_recovery.c: Fixed initialization that caused compiler warning storage/maria/ma_rsame.c: More DBUG_PRINT storage/maria/ma_scan.c: Better comment storage/maria/ma_statrec.c: More DBUG_PRINT and comments Fixed indentation BitKeeper/etc/ignore: added storage/maria/unittest/tmp/* storage/maria/ma_test2.c: Fixed bug that caused maria_rsame() to fail if test removed last row Fixed wrong usage of longget(); Should be uint4korr() storage/maria/unittest/ma_test_recovery.pl: Use md5sum or digest to calculate md5. This allows this script to be run on Linux and Solaris storage/myisam/mi_test2.c: Fixed wrong usage of longget(); Should be uint4korr() strings/ctype.c: Added casts to get rid of compiler warnings sql-bench/myisam.cnf: New BitKeeper file ``sql-bench/myisam.cnf''
Diffstat (limited to 'mysys')
-rw-r--r--mysys/lf_alloc-pin.c8
-rw-r--r--mysys/my_bitmap.c4
-rw-r--r--mysys/my_compress.c2
3 files changed, 6 insertions, 8 deletions
diff --git a/mysys/lf_alloc-pin.c b/mysys/lf_alloc-pin.c
index ff9c5a42f81..3e91b70d0f8 100644
--- a/mysys/lf_alloc-pin.c
+++ b/mysys/lf_alloc-pin.c
@@ -169,7 +169,7 @@ LF_PINS *_lf_pinbox_get_pins(LF_PINBOX *pinbox, void *stack_end)
if (!(pins= top_ver % LF_PINBOX_MAX_PINS))
{
/* the stack of free elements is empty */
- pins= my_atomic_add32(&pinbox->pins_in_array, 1)+1;
+ pins= my_atomic_add32((int32 volatile*) &pinbox->pins_in_array, 1)+1;
if (unlikely(pins >= LF_PINBOX_MAX_PINS))
return 0;
/*
@@ -183,7 +183,8 @@ LF_PINS *_lf_pinbox_get_pins(LF_PINBOX *pinbox, void *stack_end)
}
el= (LF_PINS *)_lf_dynarray_value(&pinbox->pinarray, pins);
next= el->link;
- } while (!my_atomic_cas32(&pinbox->pinstack_top_ver, &top_ver,
+ } while (!my_atomic_cas32((int32 volatile*) &pinbox->pinstack_top_ver,
+ (int32*) &top_ver,
top_ver-pins+next+LF_PINBOX_MAX_PINS));
/*
set el->link to the index of el in the dynarray (el->link has two usages:
@@ -237,7 +238,8 @@ void _lf_pinbox_put_pins(LF_PINS *pins)
do
{
pins->link= top_ver % LF_PINBOX_MAX_PINS;
- } while (!my_atomic_cas32(&pinbox->pinstack_top_ver, &top_ver,
+ } while (!my_atomic_cas32((int32 volatile*) &pinbox->pinstack_top_ver,
+ (int32*) &top_ver,
top_ver-pins->link+nr+LF_PINBOX_MAX_PINS));
return;
}
diff --git a/mysys/my_bitmap.c b/mysys/my_bitmap.c
index e127b2584ae..137127a2fda 100644
--- a/mysys/my_bitmap.c
+++ b/mysys/my_bitmap.c
@@ -508,10 +508,8 @@ uint bitmap_get_first_set(const MY_BITMAP *map)
if (*byte_ptr & (1 << k))
return (i*32) + (j*8) + k;
}
- DBUG_ASSERT(0);
}
}
- DBUG_ASSERT(0);
}
}
return MY_BIT_NONE;
@@ -542,10 +540,8 @@ uint bitmap_get_first(const MY_BITMAP *map)
if (!(*byte_ptr & (1 << k)))
return (i*32) + (j*8) + k;
}
- DBUG_ASSERT(0);
}
}
- DBUG_ASSERT(0);
}
}
return MY_BIT_NONE;
diff --git a/mysys/my_compress.c b/mysys/my_compress.c
index 70d2960f48e..45c4ab983cc 100644
--- a/mysys/my_compress.c
+++ b/mysys/my_compress.c
@@ -183,7 +183,7 @@ int packfrm(uchar *data, size_t len,
DBUG_PRINT("info", ("org_len: %lu comp_len: %lu", (ulong) org_len,
(ulong) comp_len));
- DBUG_DUMP("compressed", (char*)data, org_len);
+ DBUG_DUMP("compressed", data, org_len);
error= 2;
blob_len= BLOB_HEADER + org_len;