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
a076427f
Commit
a076427f
authored
Feb 02, 2012
by
Ashish Agarwal
Browse files
Options
Browse Files
Download
Plain Diff
BUG#11756869: Merge from mysql-5.1 to mysql-5.5
parents
07c0e405
4e096d2a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
9 deletions
+35
-9
mysql-test/r/myisam.result
mysql-test/r/myisam.result
+13
-0
mysql-test/t/myisam.test
mysql-test/t/myisam.test
+14
-0
storage/myisam/mi_check.c
storage/myisam/mi_check.c
+8
-9
No files found.
mysql-test/r/myisam.result
View file @
a076427f
...
...
@@ -2438,6 +2438,19 @@ Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
SET GLOBAL myisam_use_mmap=default;
#
# BUG 11756869 - 48848: MYISAMCHK DOING SORT RECOVER IN CERTAIN
#
CASES RESETS DATA POINTER TO SMAL
#
CREATE TABLE t1(a INT, KEY(a));
ALTER TABLE t1 DISABLE KEYS;
SET @before:= (SELECT MAX_DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test');
FLUSH TABLES;
SET @after:= (SELECT MAX_DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test');
SELECT @before=@after;
@before=@after
1
DROP TABLE t1;
End of 5.1 tests
#
# Bug#51327 MyISAM table is automatically repaired on ALTER
...
...
mysql-test/t/myisam.test
View file @
a076427f
...
...
@@ -1665,6 +1665,20 @@ CHECK TABLE t1;
DROP
TABLE
t1
;
SET
GLOBAL
myisam_use_mmap
=
default
;
--
echo
#
--
echo
# BUG 11756869 - 48848: MYISAMCHK DOING SORT RECOVER IN CERTAIN
--
echo
# CASES RESETS DATA POINTER TO SMAL
--
echo
#
CREATE
TABLE
t1
(
a
INT
,
KEY
(
a
));
ALTER
TABLE
t1
DISABLE
KEYS
;
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
SET
@
before
:=
(
SELECT
MAX_DATA_LENGTH
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_NAME
=
't1'
AND
TABLE_SCHEMA
=
'test'
);
FLUSH
TABLES
;
--
replace_result
$MYSQLD_DATADIR
MYSQLD_DATADIR
--
exec
$MYISAMCHK
-
sn
$MYSQLD_DATADIR
/
test
/
t1
SET
@
after
:=
(
SELECT
MAX_DATA_LENGTH
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_NAME
=
't1'
AND
TABLE_SCHEMA
=
'test'
);
SELECT
@
before
=@
after
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
...
...
storage/myisam/mi_check.c
View file @
a076427f
...
...
@@ -4303,14 +4303,6 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
u_ptr
->
seg
=
keyseg
;
keyseg
+=
u_ptr
->
keysegs
+
1
;
}
if
(
share
.
options
&
HA_OPTION_COMPRESS_RECORD
)
share
.
base
.
records
=
max_records
=
info
.
state
->
records
;
else
if
(
share
.
base
.
min_pack_length
)
max_records
=
(
ha_rows
)
(
mysql_file_seek
(
info
.
dfile
,
0L
,
MY_SEEK_END
,
MYF
(
0
))
/
(
ulong
)
share
.
base
.
min_pack_length
);
else
max_records
=
0
;
unpack
=
(
share
.
options
&
HA_OPTION_COMPRESS_RECORD
)
&&
(
param
->
testflag
&
T_UNPACK
);
share
.
options
&=
~
HA_OPTION_TEMP_COMPRESS_RECORD
;
...
...
@@ -4320,10 +4312,17 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
set_if_bigger
(
file_length
,
param
->
max_data_file_length
);
set_if_bigger
(
file_length
,
tmp_length
);
set_if_bigger
(
file_length
,(
ulonglong
)
share
.
base
.
max_data_file_length
);
if
(
share
.
options
&
HA_OPTION_COMPRESS_RECORD
)
share
.
base
.
records
=
max_records
=
info
.
state
->
records
;
else
if
(
!
(
share
.
options
&
HA_OPTION_PACK_RECORD
))
max_records
=
(
ha_rows
)
(
file_length
/
share
.
base
.
pack_reclength
);
else
max_records
=
0
;
(
void
)
mi_close
(
*
org_info
);
bzero
((
char
*
)
&
create_info
,
sizeof
(
create_info
));
create_info
.
max_rows
=
max
(
max_records
,
share
.
base
.
records
)
;
create_info
.
max_rows
=
max_records
;
create_info
.
reloc_rows
=
share
.
base
.
reloc
;
create_info
.
old_options
=
(
share
.
options
|
(
unpack
?
HA_OPTION_TEMP_COMPRESS_RECORD
:
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