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
56ea00af
Commit
56ea00af
authored
Feb 12, 2005
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug #8477 (Embedded query_cache test crashes)
parent
40fe0b39
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
libmysqld/emb_qcache.cc
libmysqld/emb_qcache.cc
+11
-7
No files found.
libmysqld/emb_qcache.cc
View file @
56ea00af
...
...
@@ -71,9 +71,11 @@ void Querycache_stream::store_int(uint i)
cur_data
+=
4
;
return
;
}
memcpy
(
cur_data
,
&
i
,
rest_len
);
char
buf
[
4
];
int4store
(
buf
,
i
);
memcpy
(
cur_data
,
buf
,
rest_len
);
use_next_block
();
memcpy
(
cur_data
,
((
byte
*
)
&
i
)
+
rest_len
,
4
-
rest_len
);
memcpy
(
cur_data
,
buf
+
rest_len
,
4
-
rest_len
);
cur_data
+=
4
-
rest_len
;
}
...
...
@@ -186,10 +188,12 @@ uint Querycache_stream::load_int()
cur_data
+=
4
;
return
result
;
}
memcpy
(
&
result
,
cur_data
,
rest_len
);
char
buf
[
4
];
memcpy
(
buf
,
cur_data
,
rest_len
);
use_next_block
();
memcpy
(
((
byte
*
)
&
result
)
+
rest_len
,
cur_data
,
4
-
rest_len
);
memcpy
(
buf
+
rest_len
,
cur_data
,
4
-
rest_len
);
cur_data
+=
4
-
rest_len
;
result
=
uint4korr
(
buf
);
return
result
;
}
...
...
@@ -270,10 +274,10 @@ int Querycache_stream::load_column(MEM_ROOT *alloc, char** column)
return
0
;
}
len
--
;
if
(
!
(
*
column
=
(
char
*
)
alloc_root
(
alloc
,
len
+
4
+
1
)))
if
(
!
(
*
column
=
(
char
*
)
alloc_root
(
alloc
,
len
+
sizeof
(
uint
)
+
1
)))
return
1
;
int4store
(
*
column
,
len
)
;
(
*
column
)
+=
4
;
*
((
uint
*
)
*
column
)
=
len
;
(
*
column
)
+=
sizeof
(
uint
)
;
load_str_only
(
*
column
,
len
);
return
1
;
}
...
...
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