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
d13302ff
Commit
d13302ff
authored
Dec 16, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: small simplification
parent
2ec018b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
25 deletions
+7
-25
sql/temporary_tables.cc
sql/temporary_tables.cc
+7
-25
No files found.
sql/temporary_tables.cc
View file @
d13302ff
...
...
@@ -1032,39 +1032,21 @@ TABLE *THD::find_temporary_table(const char *key, uint key_length,
/* A matching TMP_TABLE_SHARE is found. */
All_share_tables_list
::
Iterator
tables_it
(
share
->
all_tmp_tables
);
while
((
table
=
tables_it
++
))
bool
found
=
false
;
while
(
!
found
&&
(
table
=
tables_it
++
))
{
switch
(
state
)
{
case
TMP_TABLE_IN_USE
:
if
(
table
->
query_id
>
0
)
{
result
=
table
;
goto
done
;
}
break
;
case
TMP_TABLE_NOT_IN_USE
:
if
(
table
->
query_id
==
0
)
{
result
=
table
;
goto
done
;
}
break
;
case
TMP_TABLE_ANY
:
{
result
=
table
;
goto
done
;
}
break
;
default:
/* Invalid */
DBUG_ASSERT
(
0
);
goto
done
;
case
TMP_TABLE_IN_USE
:
found
=
table
->
query_id
>
0
;
break
;
case
TMP_TABLE_NOT_IN_USE
:
found
=
table
->
query_id
==
0
;
break
;
case
TMP_TABLE_ANY
:
found
=
true
;
break
;
}
}
result
=
table
;
break
;
}
}
done:
if
(
locked
)
{
DBUG_ASSERT
(
m_tmp_tables_locked
);
...
...
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