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
d1a745b0
Commit
d1a745b0
authored
May 07, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add special error message for .frm files with an un-understood version, like
those from 5.0 with new datatypes. (Bug #10435)
parent
17b6789c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
sql/table.cc
sql/table.cc
+13
-2
No files found.
sql/table.cc
View file @
d1a745b0
...
...
@@ -59,6 +59,7 @@ static byte* get_field_name(Field **buff,uint *length,
3 Wrong data in .frm file
4 Error (see frm_error)
5 Error (see frm_error: charset unavailable)
6 Unknown .frm version
*/
int
openfrm
(
const
char
*
name
,
const
char
*
alias
,
uint
db_stat
,
uint
prgflag
,
...
...
@@ -118,9 +119,13 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
*
fn_ext
(
outparam
->
path
)
=
'\0'
;
// Remove extension
if
(
my_read
(
file
,(
byte
*
)
head
,
64
,
MYF
(
MY_NABP
)))
goto
err_not_open
;
if
(
head
[
0
]
!=
(
uchar
)
254
||
head
[
1
]
!=
1
||
(
head
[
2
]
!=
FRM_VER
&&
head
[
2
]
!=
FRM_VER
+
1
&&
head
[
2
]
!=
FRM_VER
+
3
))
if
(
head
[
0
]
!=
(
uchar
)
254
||
head
[
1
]
!=
1
)
goto
err_not_open
;
/* purecov: inspected */
if
(
head
[
2
]
!=
FRM_VER
&&
head
[
2
]
!=
FRM_VER
+
1
&&
head
[
2
]
!=
FRM_VER
+
3
)
{
error
=
6
;
goto
err_not_open
;
/* purecov: inspected */
}
new_field_pack_flag
=
head
[
27
];
new_frm_ver
=
(
head
[
2
]
-
FRM_VER
);
field_pack_length
=
new_frm_ver
<
2
?
11
:
17
;
...
...
@@ -1033,6 +1038,12 @@ static void frm_error(int error, TABLE *form, const char *name,
MYF
(
0
),
csname
,
form
->
real_name
);
break
;
}
case
6
:
my_printf_error
(
ER_NOT_FORM_FILE
,
"Table '%-.64s' was created with a different version "
"of MySQL and cannot be read"
,
MYF
(
0
),
name
);
break
;
default:
/* Better wrong error than none */
case
4
:
my_error
(
ER_NOT_FORM_FILE
,
errortype
,
...
...
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