|
33 | 33 |
|
34 | 34 | static const char *lock_descriptions[] =
|
35 | 35 | {
|
36 |
| - "No lock", |
37 |
| - "Low priority read lock", |
38 |
| - "Shared Read lock", |
39 |
| - "High priority read lock", |
40 |
| - "Read lock without concurrent inserts", |
41 |
| - "Write lock that allows other writers", |
42 |
| - "Write lock, but allow reading", |
43 |
| - "Concurrent insert lock", |
44 |
| - "Lock Used by delayed insert", |
45 |
| - "Low priority write lock", |
46 |
| - "High priority write lock", |
47 |
| - "Highest priority write lock" |
| 36 | + /* TL_UNLOCK */ "No lock", |
| 37 | + /* TL_READ_DEFAULT */ NULL, |
| 38 | + /* TL_READ */ "Low priority read lock", |
| 39 | + /* TL_READ_WITH_SHARED_LOCKS */ "Shared read lock", |
| 40 | + /* TL_READ_HIGH_PRIORITY */ "High priority read lock", |
| 41 | + /* TL_READ_NO_INSERT */ "Read lock without concurrent inserts", |
| 42 | + /* TL_WRITE_ALLOW_WRITE */ "Write lock that allows other writers", |
| 43 | + /* TL_WRITE_ALLOW_READ */ "Write lock, but allow reading", |
| 44 | + /* TL_WRITE_CONCURRENT_INSERT */ "Concurrent insert lock", |
| 45 | + /* TL_WRITE_DELAYED */ "Lock used by delayed insert", |
| 46 | + /* TL_WRITE_DEFAULT */ NULL, |
| 47 | + /* TL_WRITE_LOW_PRIORITY */ "Low priority write lock", |
| 48 | + /* TL_WRITE */ "High priority write lock", |
| 49 | + /* TL_WRITE_ONLY */ "Highest priority write lock" |
48 | 50 | };
|
49 | 51 |
|
50 | 52 |
|
@@ -75,6 +77,8 @@ void print_cached_tables(void)
|
75 | 77 | uint idx,count,unused;
|
76 | 78 | TABLE *start_link,*lnk;
|
77 | 79 |
|
| 80 | + compile_time_assert(TL_WRITE_ONLY+1 == array_elements(lock_descriptions)); |
| 81 | + |
78 | 82 | /* purecov: begin tested */
|
79 | 83 | VOID(pthread_mutex_lock(&LOCK_open));
|
80 | 84 | puts("DB Table Version Thread Open Lock");
|
|
0 commit comments