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
c084645c
Commit
c084645c
authored
Mar 25, 2009
by
Satya B
Browse files
Options
Browse Files
Download
Plain Diff
merge 5.0-bugteam to 5.1-bugteam
parents
1be22714
8b95961f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
0 deletions
+57
-0
mysql-test/r/myisampack.result
mysql-test/r/myisampack.result
+11
-0
mysql-test/t/myisampack.test
mysql-test/t/myisampack.test
+20
-0
storage/myisam/mi_packrec.c
storage/myisam/mi_packrec.c
+26
-0
No files found.
mysql-test/r/myisampack.result
View file @
c084645c
...
...
@@ -54,3 +54,14 @@ test.t1 repair error Table 'test.t1' is read only
Warnings:
Error 1036 Table 't1' is read only
drop table t1;
#
# BUG#41541 - Valgrind warnings on packed MyISAM table
#
CREATE TABLE t1(f1 VARCHAR(200), f2 TEXT);
INSERT INTO t1 VALUES ('foo', 'foo1'), ('bar', 'bar1');
FLUSH TABLE t1;
# Compress the table using MYISAMPACK tool
SELECT COUNT(*) FROM t1;
COUNT(*)
1024
DROP TABLE t1;
mysql-test/t/myisampack.test
View file @
c084645c
...
...
@@ -61,3 +61,23 @@ let $MYSQLD_DATADIR= `select @@datadir`;
optimize
table
t1
;
repair
table
t1
;
drop
table
t1
;
--
echo
#
--
echo
# BUG#41541 - Valgrind warnings on packed MyISAM table
--
echo
#
CREATE
TABLE
t1
(
f1
VARCHAR
(
200
),
f2
TEXT
);
INSERT
INTO
t1
VALUES
(
'foo'
,
'foo1'
),
(
'bar'
,
'bar1'
);
let
$i
=
9
;
--
disable_query_log
while
(
$i
)
{
INSERT
INTO
t1
SELECT
*
FROM
t1
;
dec
$i
;
}
--
enable_query_log
FLUSH
TABLE
t1
;
--
echo
# Compress the table using MYISAMPACK tool
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
--
exec
$MYISAMPACK
$MYSQLD_DATADIR
/
test
/
t1
SELECT
COUNT
(
*
)
FROM
t1
;
DROP
TABLE
t1
;
storage/myisam/mi_packrec.c
View file @
c084645c
...
...
@@ -1431,6 +1431,32 @@ static void fill_buffer(MI_BIT_BUFF *bit_buff)
bit_buff
->
current_byte
=
0
;
return
;
}
else
{
uint
len
=
0
;
uint
i
=
0
;
/*
Check if the remaining buffer/record to read is less than the word size.
If so read byte by byte
Note: if this branch becomes a bottleneck it can be removed, assuming
that the second memory segment allocates 7 extra bytes (see
_mi_read_pack_info()).
*/
len
=
bit_buff
->
end
-
bit_buff
->
pos
;
if
(
len
<
(
BITS_SAVED
/
8
))
{
bit_buff
->
current_byte
=
0
;
for
(
i
=
0
;
i
<
len
;
i
++
)
{
bit_buff
->
current_byte
+=
(((
uint
)
((
uchar
)
bit_buff
->
pos
[
len
-
i
-
1
]))
<<
(
8
*
i
));
}
bit_buff
->
pos
=
bit_buff
->
end
;
return
;
}
}
#if BITS_SAVED == 64
bit_buff
->
current_byte
=
((((
uint
)
((
uchar
)
bit_buff
->
pos
[
7
])))
+
(((
uint
)
((
uchar
)
bit_buff
->
pos
[
6
]))
<<
8
)
+
...
...
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