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
0d7db464
Commit
0d7db464
authored
Jul 25, 2024
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pos-fixes for rename
parent
1108f81e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
8 deletions
+7
-8
mysql-test/main/vector.result
mysql-test/main/vector.result
+2
-2
mysql-test/main/vector.test
mysql-test/main/vector.test
+2
-2
sql/sql_table.cc
sql/sql_table.cc
+1
-0
storage/myisam/mi_rename.c
storage/myisam/mi_rename.c
+2
-4
No files found.
mysql-test/main/vector.result
View file @
0d7db464
...
...
@@ -344,8 +344,8 @@ t1#i#01.MYI
t1.MYD
t1.MYI
t1.frm
rename table test1.t
2 to test1.t1
;
ERROR
42S02: Table 'test1.t2' doesn't exist
rename table test1.t
1 to test1.t2
;
ERROR
HY000: Error on rename of './test1/t1#i#01.MYD' to './test1/t2#i#01.MYD' (Errcode: 2 "No such file or directory")
db.opt
t1#i#01.MYI
t1.MYD
...
...
mysql-test/main/vector.test
View file @
0d7db464
...
...
@@ -132,8 +132,8 @@ rename table test.t2 to test1.t1;
list_files
$datadir
/
test1
;
remove_file
$datadir
/
test1
/
t1
#i#01.MYD;
--
error
ER_NO_SUCH_TABLE
rename
table
test1
.
t
2
to
test1
.
t1
;
--
error
7
rename
table
test1
.
t
1
to
test1
.
t2
;
list_files
$datadir
/
test1
;
drop
database
test1
;
list_files
$datadir
/
test
;
sql/sql_table.cc
View file @
0d7db464
...
...
@@ -5388,6 +5388,7 @@ mysql_rename_table(handlerton *base, const LEX_CSTRING *old_db,
}
file
->
ha_rename_table
(
to_base
,
from_base
);
rename_file_ext
(
to
,
from
,
reg_ext
);
break
;
}
}
}
...
...
storage/myisam/mi_rename.c
View file @
0d7db464
...
...
@@ -36,10 +36,8 @@ int mi_rename(const char *old_name, const char *new_name)
save_errno
=
my_errno
;
fn_format
(
from
,
old_name
,
""
,
MI_NAME_DEXT
,
MY_UNPACK_FILENAME
|
MY_APPEND_EXT
);
fn_format
(
to
,
new_name
,
""
,
MI_NAME_DEXT
,
MY_UNPACK_FILENAME
|
MY_APPEND_EXT
);
if
(
mysql_file_rename_with_symlink
(
mi_key_file_dfile
,
from
,
to
,
MYF
(
MY_WME
)))
if
(
save_errno
)
if
(
mysql_file_rename_with_symlink
(
mi_key_file_dfile
,
from
,
to
,
MYF
(
MY_WME
)))
if
(
!
save_errno
)
save_errno
=
my_errno
;
DBUG_RETURN
(
save_errno
);
}
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