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
1b77a019
Commit
1b77a019
authored
Jan 24, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/home/psergey/mysql-5.1-ppruning-r5-push
parents
24b8a982
1dc1e2e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
1 deletion
+26
-1
sql/table.cc
sql/table.cc
+26
-1
No files found.
sql/table.cc
View file @
1b77a019
...
@@ -270,7 +270,32 @@ int open_table_def(THD *thd, TABLE_SHARE *share, uint db_flags)
...
@@ -270,7 +270,32 @@ int open_table_def(THD *thd, TABLE_SHARE *share, uint db_flags)
strxmov
(
path
,
share
->
normalized_path
.
str
,
reg_ext
,
NullS
);
strxmov
(
path
,
share
->
normalized_path
.
str
,
reg_ext
,
NullS
);
if
((
file
=
my_open
(
path
,
O_RDONLY
|
O_SHARE
,
MYF
(
0
)))
<
0
)
if
((
file
=
my_open
(
path
,
O_RDONLY
|
O_SHARE
,
MYF
(
0
)))
<
0
)
goto
err_not_open
;
{
/* Try unecoded 5.0 name */
uint
length
;
strxnmov
(
path
,
sizeof
(
path
)
-
1
,
mysql_data_home
,
"/"
,
share
->
db
.
str
,
"/"
,
share
->
table_name
.
str
,
reg_ext
,
NullS
);
length
=
unpack_filename
(
path
,
path
)
-
reg_ext_length
;
/*
The following is a safety test and should never fail
as the old file name should never be longer than the new one.
*/
DBUG_ASSERT
(
length
<=
share
->
normalized_path
.
length
);
/*
If the old and the new names have the same length,
then table name does not have tricky characters,
so no need to check the old file name.
*/
if
(
length
==
share
->
normalized_path
.
length
||
((
file
=
my_open
(
path
,
O_RDONLY
|
O_SHARE
,
MYF
(
0
)))
<
0
))
goto
err_not_open
;
/* Unencoded 5.0 table name found */
path
[
length
]
=
'\0'
;
// Remove .frm extension
strmov
(
share
->
normalized_path
.
str
,
path
);
share
->
normalized_path
.
length
=
length
;
}
error
=
4
;
error
=
4
;
if
(
my_read
(
file
,(
byte
*
)
head
,
64
,
MYF
(
MY_NABP
)))
if
(
my_read
(
file
,(
byte
*
)
head
,
64
,
MYF
(
MY_NABP
)))
...
...
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