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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
1a690844
Commit
1a690844
authored
Jun 07, 2002
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed query cache align data bug.
parent
1937feae
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
Docs/manual.texi
Docs/manual.texi
+2
-0
sql/sql_cache.cc
sql/sql_cache.cc
+7
-4
No files found.
Docs/manual.texi
View file @
1a690844
...
@@ -49343,6 +49343,8 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
...
@@ -49343,6 +49343,8 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
@itemize @bullet
@itemize @bullet
@item
@item
Fixed query cache align data bug.
@item
Fixed mutex bug in replication when reading from master fails.
Fixed mutex bug in replication when reading from master fails.
@item
@item
Added missing mutex in @code{TRUNCATE TABLE}; This fixes some core
Added missing mutex in @code{TRUNCATE TABLE}; This fixes some core
sql/sql_cache.cc
View file @
1a690844
...
@@ -2679,14 +2679,17 @@ my_bool Query_cache::move_by_type(byte **border,
...
@@ -2679,14 +2679,17 @@ my_bool Query_cache::move_by_type(byte **border,
*
border
+=
len
;
*
border
+=
len
;
*
before
=
new_block
;
*
before
=
new_block
;
/* If result writing complete && we have free space in block */
/* If result writing complete && we have free space in block */
ulong
free_space
=
new_block
->
length
-
new_block
->
used
;
ulong
free_space
=
new_block
->
length
-
new_block
->
used
;
free_space
-=
free_space
%
ALIGN_SIZE
(
1
);
if
(
query
->
result
()
->
type
==
Query_cache_block
::
RESULT
&&
if
(
query
->
result
()
->
type
==
Query_cache_block
::
RESULT
&&
new_block
->
length
>
new_block
->
used
&&
new_block
->
length
>
new_block
->
used
&&
*
gap
+
free_space
>
min_allocation_unit
&&
*
gap
+
free_space
>
min_allocation_unit
&&
new_block
->
length
-
free_space
>
min_allocation_unit
)
new_block
->
length
-
free_space
>
min_allocation_unit
)
{
{
*
border
-=
free_space
;
*
border
-=
free_space
;
*
gap
+=
free_space
;
*
gap
+=
free_space
;
DBUG_PRINT
(
"qcache"
,
(
"rest of result free space added to gap (%lu)"
,
*
gap
));
new_block
->
length
-=
free_space
;
new_block
->
length
-=
free_space
;
}
}
BLOCK_UNLOCK_WR
(
query_block
);
BLOCK_UNLOCK_WR
(
query_block
);
...
@@ -2747,7 +2750,7 @@ my_bool Query_cache::join_results(ulong join_limit)
...
@@ -2747,7 +2750,7 @@ my_bool Query_cache::join_results(ulong join_limit)
header
->
length
()
>
join_limit
)
header
->
length
()
>
join_limit
)
{
{
Query_cache_block
*
new_result_block
=
Query_cache_block
*
new_result_block
=
get_free_block
(
header
->
length
(
)
+
get_free_block
(
ALIGN_SIZE
(
header
->
length
()
)
+
ALIGN_SIZE
(
sizeof
(
Query_cache_block
))
+
ALIGN_SIZE
(
sizeof
(
Query_cache_block
))
+
ALIGN_SIZE
(
sizeof
(
Query_cache_result
)),
1
,
0
);
ALIGN_SIZE
(
sizeof
(
Query_cache_result
)),
1
,
0
);
if
(
new_result_block
!=
0
)
if
(
new_result_block
!=
0
)
...
...
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