summaryrefslogtreecommitdiff
path: root/include/thr_lock.h
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2009-04-14 14:05:32 +0200
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2009-04-14 14:05:32 +0200
commitb27261a6f710850636ccac4616e2cbd15bc55442 (patch)
tree8b775a077015f9204e2fcc4d506b502bc21eba09 /include/thr_lock.h
parentf739349994f1e49f62c93e971f553c4a774d5842 (diff)
downloadmariadb-git-b27261a6f710850636ccac4616e2cbd15bc55442.tar.gz
Bug#44164: TL_WRITE has no description in lock_descriptions[]
The problem was that new lock types were being added without a corresponding description. Since the lock types (enum values) are used as indices to the description array, the descriptions could be shifted depending on the lock type. The solution is to ensure that every lock type has a correspondent description. include/thr_lock.h: Add warning. sql/sql_test.cc: Update lock descriptions.
Diffstat (limited to 'include/thr_lock.h')
-rw-r--r--include/thr_lock.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/thr_lock.h b/include/thr_lock.h
index e409df30972..fb70c57c0e7 100644
--- a/include/thr_lock.h
+++ b/include/thr_lock.h
@@ -27,6 +27,10 @@ extern "C" {
struct st_thr_lock;
extern ulong locks_immediate,locks_waited ;
+/*
+ Important: if a new lock type is added, a matching lock description
+ must be added to sql_test.cc's lock_descriptions array.
+*/
enum thr_lock_type { TL_IGNORE=-1,
TL_UNLOCK, /* UNLOCK ANY LOCK */
/*