Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
6449eec1
Commit
6449eec1
authored
Oct 21, 2002
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small addition to COM_DEBUG
sql/sql_test.cc: small addition to COM_DEBUG
parent
f1592f89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
sql/sql_test.cc
sql/sql_test.cc
+20
-3
No files found.
sql/sql_test.cc
View file @
6449eec1
...
@@ -51,22 +51,39 @@ print_where(COND *cond,const char *info)
...
@@ -51,22 +51,39 @@ print_where(COND *cond,const char *info)
extern
HASH
open_cache
;
extern
HASH
open_cache
;
extern
TABLE
*
unused_tables
;
extern
TABLE
*
unused_tables
;
static
const
char
*
lock_descriptions
[]
=
{
"No lock"
,
"Low priority read lock"
,
"Shared Read lock"
,
"High priority read lock"
,
"Read lock without concurrent inserts"
,
"Write lock that allows other writers"
,
"Write lock, but allow reading"
,
"Concurrent insert lock"
,
"Lock Used by delayed insert"
,
"Low priority write lock"
,
"High priority write lock"
,
"Highest priority write lock"
};
void
print_cached_tables
(
void
)
void
print_cached_tables
(
void
)
{
{
uint
idx
,
count
,
unused
;
uint
idx
,
count
,
unused
;
TABLE
*
start_link
,
*
lnk
;
TABLE
*
start_link
,
*
lnk
;
VOID
(
pthread_mutex_lock
(
&
LOCK_open
));
VOID
(
pthread_mutex_lock
(
&
LOCK_open
));
puts
(
"DB Table Version Thread L.thread Open"
);
puts
(
"DB Table Version Thread L.thread Open
Lock
"
);
for
(
idx
=
unused
=
0
;
idx
<
open_cache
.
records
;
idx
++
)
for
(
idx
=
unused
=
0
;
idx
<
open_cache
.
records
;
idx
++
)
{
{
TABLE
*
entry
=
(
TABLE
*
)
hash_element
(
&
open_cache
,
idx
);
TABLE
*
entry
=
(
TABLE
*
)
hash_element
(
&
open_cache
,
idx
);
printf
(
"%-14.14s %-32s%6ld%8ld%10ld%6d
\n
"
,
printf
(
"%-14.14s %-32s%6ld%8ld%10ld%6d
%s
\n
"
,
entry
->
table_cache_key
,
entry
->
real_name
,
entry
->
version
,
entry
->
table_cache_key
,
entry
->
real_name
,
entry
->
version
,
entry
->
in_use
?
entry
->
in_use
->
thread_id
:
0L
,
entry
->
in_use
?
entry
->
in_use
->
thread_id
:
0L
,
entry
->
in_use
?
entry
->
in_use
->
dbug_thread_id
:
0L
,
entry
->
in_use
?
entry
->
in_use
->
dbug_thread_id
:
0L
,
entry
->
db_stat
?
1
:
0
);
entry
->
db_stat
?
1
:
0
,
entry
->
in_use
?
lock_descriptions
[(
int
)
entry
->
reginfo
.
lock_type
]
:
"Not in use"
);
if
(
!
entry
->
in_use
)
if
(
!
entry
->
in_use
)
unused
++
;
unused
++
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment