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
10622760
Commit
10622760
authored
Oct 27, 2005
by
ingo@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/mydev/mysql-5.0
into mysql.com:/home/mydev/mysql-5.0-bug12166
parents
abea6db4
5f51294a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
10 deletions
+20
-10
myisam/mi_check.c
myisam/mi_check.c
+12
-7
sql/ha_myisam.cc
sql/ha_myisam.cc
+8
-3
No files found.
myisam/mi_check.c
View file @
10622760
...
@@ -1294,25 +1294,30 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info,
...
@@ -1294,25 +1294,30 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info,
param
->
calc_checksum
=
1
;
param
->
calc_checksum
=
1
;
info
->
update
=
(
short
)
(
HA_STATE_CHANGED
|
HA_STATE_ROW_CHANGED
);
info
->
update
=
(
short
)
(
HA_STATE_CHANGED
|
HA_STATE_ROW_CHANGED
);
/*
Clear all keys. Note that all key blocks allocated until now remain
"dead" parts of the key file. (Bug #4692)
*/
for
(
i
=
0
;
i
<
info
->
s
->
base
.
keys
;
i
++
)
for
(
i
=
0
;
i
<
info
->
s
->
base
.
keys
;
i
++
)
share
->
state
.
key_root
[
i
]
=
HA_OFFSET_ERROR
;
share
->
state
.
key_root
[
i
]
=
HA_OFFSET_ERROR
;
/* Drop the delete chain. */
for
(
i
=
0
;
i
<
share
->
state
.
header
.
max_block_size
;
i
++
)
for
(
i
=
0
;
i
<
share
->
state
.
header
.
max_block_size
;
i
++
)
share
->
state
.
key_del
[
i
]
=
HA_OFFSET_ERROR
;
share
->
state
.
key_del
[
i
]
=
HA_OFFSET_ERROR
;
/*
/*
I think mi_repair and mi_repair_by_sort should do the same
If requested, activate (enable) all keys in key_map. In this case,
(according, e.g. to ha_myisam::repair), but as mi_repair doesn't
all indexes will be (re-)built.
touch key_map it cannot be used to T_CREATE_MISSING_KEYS.
That is what the next line is for
*/
*/
if
(
param
->
testflag
&
T_CREATE_MISSING_KEYS
)
if
(
param
->
testflag
&
T_CREATE_MISSING_KEYS
)
mi_copy_keys_active
(
share
->
state
.
key_map
,
share
->
base
.
keys
,
mi_set_all_keys_active
(
share
->
state
.
key_map
,
share
->
base
.
keys
);
param
->
keys_in_use
);
info
->
state
->
key_file_length
=
share
->
base
.
keystart
;
info
->
state
->
key_file_length
=
share
->
base
.
keystart
;
lock_memory
(
param
);
/* Everything is alloced */
lock_memory
(
param
);
/* Everything is alloced */
/* Re-create all keys, which are set in key_map. */
while
(
!
(
error
=
sort_get_next_record
(
&
sort_param
)))
while
(
!
(
error
=
sort_get_next_record
(
&
sort_param
)))
{
{
if
(
writekeys
(
param
,
info
,(
byte
*
)
sort_param
.
record
,
sort_param
.
filepos
))
if
(
writekeys
(
param
,
info
,(
byte
*
)
sort_param
.
record
,
sort_param
.
filepos
))
...
...
sql/ha_myisam.cc
View file @
10622760
...
@@ -985,11 +985,16 @@ int ha_myisam::enable_indexes(uint mode)
...
@@ -985,11 +985,16 @@ int ha_myisam::enable_indexes(uint mode)
{
{
sql_print_warning
(
"Warning: Enabling keys got errno %d, retrying"
,
sql_print_warning
(
"Warning: Enabling keys got errno %d, retrying"
,
my_errno
);
my_errno
);
thd
->
clear_error
();
/* Repairing by sort failed. Now try standard repair method. */
param
.
testflag
&=
~
(
T_REP_BY_SORT
|
T_QUICK
);
param
.
testflag
&=
~
(
T_REP_BY_SORT
|
T_QUICK
);
error
=
(
repair
(
thd
,
param
,
0
)
!=
HA_ADMIN_OK
);
error
=
(
repair
(
thd
,
param
,
0
)
!=
HA_ADMIN_OK
);
if
(
!
error
&&
thd
->
net
.
report_error
)
/*
error
=
HA_ERR_CRASHED
;
If the standard repair succeeded, clear all error messages which
might have been set by the first repair. They can still be seen
with SHOW WARNINGS then.
*/
if
(
!
error
)
thd
->
clear_error
();
}
}
info
(
HA_STATUS_CONST
);
info
(
HA_STATUS_CONST
);
thd
->
proc_info
=
save_proc_info
;
thd
->
proc_info
=
save_proc_info
;
...
...
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