summaryrefslogtreecommitdiff
path: root/storage/maria/lockman.c
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/narttu.mysql.fi>2007-01-26 13:32:02 +0200
committerunknown <monty@mysql.com/narttu.mysql.fi>2007-01-26 13:32:02 +0200
commit7412f0fa0cd498f06fe04966a6f6161e8b32d0a2 (patch)
tree6a07f5b0af3e1abb1dd5619884629b7afec30723 /storage/maria/lockman.c
parentca42b36cc99fa0fb1d12a3150316bf3164909a07 (diff)
downloadmariadb-git-7412f0fa0cd498f06fe04966a6f6161e8b32d0a2.tar.gz
After merge fixes
Removed compiler warnings Fixed clashing function name in maria Disable maria tests from MySQL level for now BitKeeper/deleted/.del-ha_maria.cc: Rename: libmysqld/ha_maria.cc -> BitKeeper/deleted/.del-ha_maria.cc BitKeeper/etc/ignore: added libmysqld/ha_maria.cc --- added storage/maria/unittest/maria_control unittest/maria_control --- added *.Tpo --- added unittest/page_cache_test_file_1 --- added unittest/pagecache_debug.log --- added unittest/mysys/mf_pagecache_consist_1k-t-big unittest/mysys/mf_pagecache_consist_1kHC-t-big unittest/mysys/mf_pagecache_consist_1kRD-t-big unittest/mysys/mf_pagecache_consist_1kWR-t-big unittest/mysys/mf_pagecache_consist_64k-t-big unittest/mysys/mf_pagecache_consist_64kHC-t-big unittest/mysys/mf_pagecache_consist_64kRD-t-big unittest/mysys/mf_pagecache_consist_64kWR-t-big --- added unittest/mysys/mf_pagecache_single_64k-t-big Makefile.am: Don't run 'test-unit' by default (takes too long time) client/mysqldump.c: Fixed compiler warning include/lf.h: Remove compiler warnings about not used require_pins constant include/pagecache.h: LSN should be of type ulonglong (This fixes some compiler warnings) mysql-test/r/events_logs_tests.result: Make test predictable mysql-test/r/view.result: Make test results predictable mysql-test/t/disabled.def: Disable maria tests for a while mysql-test/t/events_logs_tests.test: Make test predictable mysql-test/t/view.test: Make test results predictable mysys/lf_alloc-pin.c: #warning ->QQ mysys/lf_hash.c: #warning ->QQ Removed compiler warnings mysys/mf_pagecache.c: Removed compiler warnings mysys/my_rename.c: Removed compiler warnings plugin/daemon_example/daemon_example.c: Remove compiler warning sql/ha_ndbcluster.cc: Remove compiler warning sql/udf_example.c: Remove compiler warning storage/maria/lockman.c: Changed #warnings to QQ comment Removed compiler warnings storage/maria/ma_blockrec.c: Removed compiler warnings storage/maria/ma_check.c: After merge fixes storage/maria/ma_key.c: After merge fixes storage/maria/ma_packrec.c: After merge fixes storage/maria/ma_rkey.c: After merge fixes storage/maria/ma_sort.c: After merge fixes storage/maria/ma_sp_defs.h: Rename clashing function name storage/maria/ma_sp_key.c: Rename clashing function name storage/maria/ma_test_all.res: New test results storage/maria/ma_unique.c: Fixed compiler warning storage/maria/tablockman.c: #warning -> QQ storage/maria/tablockman.h: #warning -> QQ storage/maria/trnman.c: #warning -> QQ storage/maria/unittest/lockman2-t.c: Removed compiler warnings storage/maria/unittest/ma_control_file-t.c: Removed warning for 'maria_control' file not found storage/maria/unittest/trnman-t.c: Removed compiler warnings storage/ndb/src/mgmapi/mgmapi.cpp: Remove compiler warnings unittest/mysys/mf_pagecache_consist.c: Removed compiler warnings unittest/mysys/my_atomic-t.c: Removed compiler warnings
Diffstat (limited to 'storage/maria/lockman.c')
-rw-r--r--storage/maria/lockman.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/storage/maria/lockman.c b/storage/maria/lockman.c
index 7672fadb068..fdacda84875 100644
--- a/storage/maria/lockman.c
+++ b/storage/maria/lockman.c
@@ -1,6 +1,7 @@
-#warning TODO - allocate everything from dynarrays !!! (benchmark)
-#warning TODO instant duration locks
-#warning automatically place S instead of LS if possible
+/* QQ: TODO - allocate everything from dynarrays !!! (benchmark) */
+/* QQ: TODO instant duration locks */
+/* QQ: #warning automatically place S instead of LS if possible */
+
/* Copyright (C) 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
@@ -218,7 +219,7 @@ typedef struct lockman_lock {
struct lockman_lock *lonext;
intptr volatile link;
uint32 hashnr;
-#warning TODO - remove hashnr from LOCK
+ /* QQ: TODO - remove hashnr from LOCK */
uint16 loid;
uchar lock; /* sizeof(uchar) <= sizeof(enum) */
uchar flags;
@@ -428,9 +429,11 @@ static int lockinsert(LOCK * volatile *head, LOCK *node, LF_PINS *pins,
}
if (res & LOCK_UPGRADE)
cursor.upgrade_from->flags|= IGNORE_ME;
-#warning is this OK ? if a reader has already read upgrade_from, \
- it may find it conflicting with node :(
-#warning another bug - see the last test from test_lockman_simple()
+ /*
+ QQ: is this OK ? if a reader has already read upgrade_from,
+ it may find it conflicting with node :(
+ - see the last test from test_lockman_simple()
+ */
}
} while (res == REPEAT_ONCE_MORE);
@@ -673,7 +676,7 @@ enum lockman_getlock_result lockman_getlock(LOCKMAN *lm, LOCK_OWNER *lo,
belong to _some_ LOCK_OWNER. It means, we can never free() a LOCK_OWNER,
if there're other active LOCK_OWNERs.
*/
-#warning race condition here
+ /* QQ: race condition here */
pthread_mutex_lock(wait_for_lo->mutex);
if (DELETED(blocker->link))
{
@@ -749,7 +752,7 @@ int lockman_release_locks(LOCKMAN *lm, LOCK_OWNER *lo)
}
#ifdef MY_LF_EXTRA_DEBUG
-static char *lock2str[]=
+static const char *lock2str[]=
{ "N", "S", "X", "IS", "IX", "SIX", "LS", "LX", "SLX", "LSIX" };
/*
NOTE
@@ -764,8 +767,9 @@ void print_lockhash(LOCKMAN *lm)
intptr next= el->link;
if (el->hashnr & 1)
{
- printf("0x%08x { resource %llu, loid %u, lock %s",
- el->hashnr, el->resource, el->loid, lock2str[el->lock]);
+ printf("0x%08lx { resource %lu, loid %u, lock %s",
+ (long) el->hashnr, (ulong) el->resource, el->loid,
+ lock2str[el->lock]);
if (el->flags & IGNORE_ME) printf(" IGNORE_ME");
if (el->flags & UPGRADED) printf(" UPGRADED");
if (el->flags & ACTIVE) printf(" ACTIVE");
@@ -781,4 +785,3 @@ void print_lockhash(LOCKMAN *lm)
}
}
#endif
-