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
5de370c5
Commit
5de370c5
authored
Apr 28, 2005
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
parents
d84ed646
9e2e0dee
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
35 deletions
+11
-35
mysql-test/r/archive.result
mysql-test/r/archive.result
+2
-0
sql/examples/ha_archive.cc
sql/examples/ha_archive.cc
+0
-29
sql/examples/ha_archive.h
sql/examples/ha_archive.h
+0
-1
sql/handler.cc
sql/handler.cc
+9
-5
No files found.
mysql-test/r/archive.result
View file @
5de370c5
...
...
@@ -192,6 +192,8 @@ select count(*) from t3;
count(*)
1199
rename table t3 to t4;
Warnings:
Error 7 Error on rename of './test/t3.ARN' to './test/t4.ARN' (Errcode: 2)
select * from t4 where fld3='bonfire';
auto fld1 companynr fld3 fld4 fld5 fld6
1191 068504 00 bonfire corresponds positively
...
...
sql/examples/ha_archive.cc
View file @
5de370c5
...
...
@@ -447,35 +447,6 @@ const char **ha_archive::bas_ext() const
}
/*
Rename all files that this handler defines in bas_ext list
NOTE Don't care if the .arn file is missing
*/
int
ha_archive
::
rename_table
(
const
char
*
from
,
const
char
*
to
)
{
DBUG_ENTER
(
"ha_archive::rename_table"
);
DBUG_PRINT
(
"enter"
,
(
"from: %s, to: %s"
,
from
,
to
));
for
(
const
char
**
ext
=
bas_ext
();
*
ext
;
ext
++
)
{
// Check if the .arn file exists before rename
if
(
!
my_strcasecmp
(
system_charset_info
,
*
ext
,
ARN
))
{
char
name
[
FN_REFLEN
];
(
void
)
strxnmov
(
name
,
FN_REFLEN
,
from
,
ARN
,
NullS
);
if
(
access
(
name
,
F_OK
))
{
DBUG_PRINT
(
"info"
,
(
"%s does not exist on disk, skipping it"
,
name
));
continue
;
}
}
if
(
rename_file_ext
(
from
,
to
,
*
ext
))
DBUG_RETURN
(
my_errno
);
}
DBUG_RETURN
(
0
);
}
/*
When opening a file we:
Create/get our shared structure.
...
...
sql/examples/ha_archive.h
View file @
5de370c5
...
...
@@ -104,7 +104,6 @@ public:
int
end_bulk_insert
();
THR_LOCK_DATA
**
store_lock
(
THD
*
thd
,
THR_LOCK_DATA
**
to
,
enum
thr_lock_type
lock_type
);
int
rename_table
(
const
char
*
from
,
const
char
*
to
);
};
handlerton
*
archive_db_init
(
void
);
...
...
sql/handler.cc
View file @
5de370c5
...
...
@@ -1772,13 +1772,17 @@ int handler::delete_table(const char *name)
int
handler
::
rename_table
(
const
char
*
from
,
const
char
*
to
)
{
DBUG_ENTER
(
"handler::rename_table"
)
;
for
(
const
char
**
ext
=
bas_ext
();
*
ext
;
ext
++
)
int
error
=
0
;
for
(
const
char
**
ext
=
bas_ext
();
*
ext
;
ext
++
)
{
if
(
rename_file_ext
(
from
,
to
,
*
ext
))
DBUG_RETURN
(
my_errno
);
if
(
rename_file_ext
(
from
,
to
,
*
ext
))
{
if
((
error
=
my_errno
)
!=
ENOENT
)
break
;
error
=
0
;
}
}
DBUG_RETURN
(
0
)
;
return
error
;
}
/*
...
...
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