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
034e028d
Commit
034e028d
authored
Dec 07, 2000
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix, max_heap_table_size variable was not used.
Docs/manual.texi: Bug fix with HEAP type tables.
parent
128ebc17
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
Docs/manual.texi
Docs/manual.texi
+5
-0
sql/ha_heap.cc
sql/ha_heap.cc
+9
-3
No files found.
Docs/manual.texi
View file @
034e028d
...
...
@@ -38935,6 +38935,11 @@ though, so Version 3.23 is not released as a stable version yet.
@appendixsubsec Changes in release 3.23.29
@itemize @bullet
@item
Fixed a bug with @code{HEAP} type tables; the variable
@code{max_heap_table_size} wasn't used. Now either @code{MAX_ROWS} or
@code[max_heap_table_size} can be used to limit the size of a @code{HEAP}
type table.
@item
Applied patches for OS2 by @code{Yuri Dario}.
@item
@code{FLUSH TABLES table_name} didn't always flush table properly to
sql/ha_heap.cc
View file @
034e028d
...
...
@@ -33,7 +33,8 @@ const char **ha_heap::bas_ext() const
int
ha_heap
::
open
(
const
char
*
name
,
int
mode
,
uint
test_if_locked
)
{
uint
key
,
part
,
parts
;
uint
key
,
part
,
parts
,
mem_per_row
=
0
;
ulong
max_rows
;
HP_KEYDEF
*
keydef
;
HP_KEYSEG
*
seg
;
...
...
@@ -47,7 +48,8 @@ int ha_heap::open(const char *name, int mode, uint test_if_locked)
for
(
key
=
0
;
key
<
table
->
keys
;
key
++
)
{
KEY
*
pos
=
table
->
key_info
+
key
;
mem_per_row
+=
(
pos
->
key_length
+
(
sizeof
(
char
*
)
*
2
));
keydef
[
key
].
keysegs
=
(
uint
)
pos
->
key_parts
;
keydef
[
key
].
flag
=
(
pos
->
flags
&
HA_NOSAME
);
keydef
[
key
].
seg
=
seg
;
...
...
@@ -66,9 +68,13 @@ int ha_heap::open(const char *name, int mode, uint test_if_locked)
seg
++
;
}
}
mem_per_row
+=
MY_ALIGN
(
table
->
reclength
+
1
,
sizeof
(
char
*
));
max_rows
=
(
ulong
)
(
max_heap_table_size
/
mem_per_row
);
file
=
heap_open
(
table
->
path
,
mode
,
table
->
keys
,
keydef
,
table
->
reclength
,
table
->
max_rows
,
table
->
reclength
,
((
table
->
max_rows
<
max_rows
&&
table
->
max_rows
)
?
table
->
max_rows
:
max_rows
),
table
->
min_rows
);
my_free
((
gptr
)
keydef
,
MYF
(
0
));
info
(
HA_STATUS_NO_LOCK
|
HA_STATUS_CONST
|
HA_STATUS_VARIABLE
);
...
...
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