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
bd011aba
Commit
bd011aba
authored
Feb 08, 2002
by
serg@serg.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql-4.0
into serg.mysql.com:/usr/home/serg/Abk/mysql-4.0
parents
d3cfc86a
7b554dd0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
sql/sql_table.cc
sql/sql_table.cc
+17
-15
No files found.
sql/sql_table.cc
View file @
bd011aba
...
...
@@ -911,6 +911,11 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table)
"Failed generating table from .frm file"
));
}
}
// now we should be able to open the partially restored table
// to finish the restore in the handler later on
if
(
!
(
table
->
table
=
reopen_name_locked_table
(
thd
,
table
)))
unlock_table_name
(
thd
,
table
);
DBUG_RETURN
(
0
);
}
...
...
@@ -919,8 +924,9 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
HA_CHECK_OPT
*
check_opt
,
const
char
*
operator_name
,
thr_lock_type
lock_type
,
bool
open_for_modify
,
bool
restore
,
bool
open_for_modify
,
uint
extra_open_options
,
int
(
*
prepare_func
)(
THD
*
,
TABLE_LIST
*
),
int
(
handler
::*
operator_func
)
(
THD
*
,
HA_CHECK_OPT
*
))
{
...
...
@@ -952,18 +958,13 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
table
->
table
=
open_ltable
(
thd
,
table
,
lock_type
);
thd
->
open_options
&=
~
extra_open_options
;
packet
->
length
(
0
);
if
(
restore
)
if
(
prepare_func
)
{
switch
(
prepare_for_restore
(
thd
,
table
))
{
switch
(
(
*
prepare_func
)
(
thd
,
table
))
{
case
1
:
continue
;
// error, message written to net
case
-
1
:
goto
err
;
// error, message could be written to net
default:
;
// should be 0 otherwise
default:
;
// should be 0 otherwise
}
// now we should be able to open the partially restored table
// to finish the restore in the handler later on
if
(
!
(
table
->
table
=
reopen_name_locked_table
(
thd
,
table
)))
unlock_table_name
(
thd
,
table
);
}
if
(
!
table
->
table
)
...
...
@@ -1096,7 +1097,8 @@ int mysql_restore_table(THD* thd, TABLE_LIST* table_list)
{
DBUG_ENTER
(
"mysql_restore_table"
);
DBUG_RETURN
(
mysql_admin_table
(
thd
,
table_list
,
0
,
"restore"
,
TL_WRITE
,
1
,
1
,
0
,
"restore"
,
TL_WRITE
,
1
,
0
,
&
prepare_for_restore
,
&
handler
::
restore
));
}
...
...
@@ -1104,7 +1106,7 @@ int mysql_repair_table(THD* thd, TABLE_LIST* tables, HA_CHECK_OPT* check_opt)
{
DBUG_ENTER
(
"mysql_repair_table"
);
DBUG_RETURN
(
mysql_admin_table
(
thd
,
tables
,
check_opt
,
"repair"
,
TL_WRITE
,
1
,
0
,
HA_OPEN_FOR_REPAIR
,
"repair"
,
TL_WRITE
,
1
,
HA_OPEN_FOR_REPAIR
,
0
,
&
handler
::
repair
));
}
...
...
@@ -1143,7 +1145,7 @@ int mysql_check_table(THD* thd, TABLE_LIST* tables,HA_CHECK_OPT* check_opt)
DBUG_ENTER
(
"mysql_check_table"
);
DBUG_RETURN
(
mysql_admin_table
(
thd
,
tables
,
check_opt
,
"check"
,
lock_type
,
0
,
0
,
HA_OPEN_FOR_REPAIR
,
0
,
HA_OPEN_FOR_REPAIR
,
0
,
&
handler
::
check
));
}
...
...
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