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
commit09d4c1da0febf90504ba883c3fd721dac5ed4f34 (patch)
tree8b775a077015f9204e2fcc4d506b502bc21eba09 /include/thr_lock.h
parentc0db307e28933bc976873b7ad5ff08d5e21d5a35 (diff)
downloadmariadb-git-09d4c1da0febf90504ba883c3fd721dac5ed4f34.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.
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 */
/*