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
4c7fa215
Commit
4c7fa215
authored
Feb 07, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow 4.0 to read new 4.1 .frm files
Makefile.am: Remove blank lines configure.in: Keep version gamma
parent
dacf7f8f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
14 deletions
+22
-14
Makefile.am
Makefile.am
+0
-1
configure.in
configure.in
+2
-2
sql/table.cc
sql/table.cc
+20
-11
No files found.
Makefile.am
View file @
4c7fa215
...
@@ -83,4 +83,3 @@ tags:
...
@@ -83,4 +83,3 @@ tags:
test
:
test
:
cd
mysql-test
;
./mysql-test-run
cd
mysql-test
;
./mysql-test-run
configure.in
View file @
4c7fa215
...
@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script.
...
@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT
(
sql/mysqld.cc
)
AC_INIT
(
sql/mysqld.cc
)
AC_CANONICAL_SYSTEM
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
# The Docs Makefile.am parses this line!
AM_INIT_AUTOMAKE
(
mysql, 4.0.11
)
AM_INIT_AUTOMAKE
(
mysql, 4.0.11
-gamma
)
AM_CONFIG_HEADER
(
config.h
)
AM_CONFIG_HEADER
(
config.h
)
PROTOCOL_VERSION
=
10
PROTOCOL_VERSION
=
10
...
@@ -702,7 +702,7 @@ AC_ARG_WITH(mysqld-user,
...
@@ -702,7 +702,7 @@ AC_ARG_WITH(mysqld-user,
AC_SUBST
(
MYSQLD_USER
)
AC_SUBST
(
MYSQLD_USER
)
# If we should allow LOAD DATA LOCAL
# If we should allow LOAD DATA LOCAL
AC_MSG_CHECKING
(
i
f
we should should
enable
LOAD DATA LOCAL by default
)
AC_MSG_CHECKING
(
I
f we should should
enable
LOAD DATA LOCAL by default
)
AC_ARG_ENABLE
(
local-infile,
AC_ARG_ENABLE
(
local-infile,
[
--enable-local-infile
Enable LOAD DATA LOCAL INFILE
(
default: disabled
)]
,
[
--enable-local-infile
Enable LOAD DATA LOCAL INFILE
(
default: disabled
)]
,
[
ENABLED_LOCAL_INFILE
=
$enableval
]
,
[
ENABLED_LOCAL_INFILE
=
$enableval
]
,
...
...
sql/table.cc
View file @
4c7fa215
...
@@ -95,11 +95,11 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
...
@@ -95,11 +95,11 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
if
(
my_read
(
file
,(
byte
*
)
head
,
64
,
MYF
(
MY_NABP
)))
goto
err_not_open
;
if
(
my_read
(
file
,(
byte
*
)
head
,
64
,
MYF
(
MY_NABP
)))
goto
err_not_open
;
if
(
head
[
0
]
!=
(
uchar
)
254
||
head
[
1
]
!=
1
||
if
(
head
[
0
]
!=
(
uchar
)
254
||
head
[
1
]
!=
1
||
(
head
[
2
]
!=
FRM_VER
&&
head
[
2
]
>
FRM_VER
+
2
))
(
head
[
2
]
!=
FRM_VER
&&
head
[
2
]
!=
FRM_VER
+
1
&&
head
[
2
]
!=
FRM_VER
+
3
))
goto
err_not_open
;
/* purecov: inspected */
goto
err_not_open
;
/* purecov: inspected */
new_field_pack_flag
=
head
[
27
];
new_field_pack_flag
=
head
[
27
];
new_frm_ver
=
(
head
[
2
]
-
FRM_VER
);
new_frm_ver
=
(
head
[
2
]
-
FRM_VER
);
field_pack_length
=
new_frm_ver
<
2
?
11
:
1
5
;
field_pack_length
=
new_frm_ver
<
2
?
11
:
1
7
;
error
=
3
;
error
=
3
;
if
(
!
(
pos
=
get_form_pos
(
file
,
head
,(
TYPELIB
*
)
0
)))
if
(
!
(
pos
=
get_form_pos
(
file
,
head
,(
TYPELIB
*
)
0
)))
...
@@ -154,7 +154,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
...
@@ -154,7 +154,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
for
(
i
=
0
;
i
<
keys
;
i
++
,
keyinfo
++
)
for
(
i
=
0
;
i
<
keys
;
i
++
,
keyinfo
++
)
{
{
if
(
new_frm_ver
==
2
)
if
(
new_frm_ver
==
3
)
{
{
keyinfo
->
flags
=
(
uint
)
uint2korr
(
strpos
)
^
HA_NOSAME
;
keyinfo
->
flags
=
(
uint
)
uint2korr
(
strpos
)
^
HA_NOSAME
;
keyinfo
->
key_length
=
(
uint
)
uint2korr
(
strpos
+
2
);
keyinfo
->
key_length
=
(
uint
)
uint2korr
(
strpos
+
2
);
...
@@ -343,28 +343,37 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
...
@@ -343,28 +343,37 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
for
(
i
=
0
;
i
<
outparam
->
fields
;
i
++
,
strpos
+=
field_pack_length
,
field_ptr
++
)
for
(
i
=
0
;
i
<
outparam
->
fields
;
i
++
,
strpos
+=
field_pack_length
,
field_ptr
++
)
{
{
uint
pack_flag
=
uint2korr
(
strpos
+
6
);
uint
pack_flag
,
interval_nr
,
unireg_type
,
recpos
,
field_length
;
uint
interval_nr
=
(
uint
)
strpos
[
10
];
enum_field_types
field_type
;
enum_field_types
field_type
;
if
(
new_frm_ver
==
2
)
if
(
new_frm_ver
==
3
)
{
{
/* new frm file in 4.1 */
/* new frm file in 4.1 */
field_type
=
(
enum_field_types
)
(
uint
)
strpos
[
11
];
field_length
=
uint2korr
(
strpos
+
3
);
recpos
=
uint3korr
(
strpos
+
5
);
pack_flag
=
uint2korr
(
strpos
+
8
);
unireg_type
=
(
uint
)
strpos
[
10
];
interval_nr
=
(
uint
)
strpos
[
12
];
field_type
=
(
enum_field_types
)
(
uint
)
strpos
[
13
];
}
}
else
else
{
{
/* old frm file */
/* old frm file */
field_length
=
(
uint
)
strpos
[
3
];
recpos
=
uint2korr
(
strpos
+
4
),
pack_flag
=
uint2korr
(
strpos
+
6
);
unireg_type
=
(
uint
)
strpos
[
8
];
interval_nr
=
(
uint
)
strpos
[
10
];
field_type
=
(
enum_field_types
)
f_packtype
(
pack_flag
);
field_type
=
(
enum_field_types
)
f_packtype
(
pack_flag
);
}
}
*
field_ptr
=
reg_field
=
*
field_ptr
=
reg_field
=
make_field
(
record
+
uint2korr
(
strpos
+
4
)
,
make_field
(
record
+
recpos
,
(
uint32
)
strpos
[
3
],
// field_length
(
uint32
)
field_length
,
null_pos
,
null_bit
,
null_pos
,
null_bit
,
pack_flag
,
pack_flag
,
field_type
,
field_type
,
(
Field
::
utype
)
MTYP_TYPENR
(
(
uint
)
strpos
[
8
]
),
(
Field
::
utype
)
MTYP_TYPENR
(
unireg_type
),
(
interval_nr
?
(
interval_nr
?
outparam
->
intervals
+
interval_nr
-
1
:
outparam
->
intervals
+
interval_nr
-
1
:
(
TYPELIB
*
)
0
),
(
TYPELIB
*
)
0
),
...
@@ -1215,7 +1224,7 @@ db_type get_table_type(const char *name)
...
@@ -1215,7 +1224,7 @@ db_type get_table_type(const char *name)
error
=
my_read
(
file
,(
byte
*
)
head
,
4
,
MYF
(
MY_NABP
));
error
=
my_read
(
file
,(
byte
*
)
head
,
4
,
MYF
(
MY_NABP
));
my_close
(
file
,
MYF
(
0
));
my_close
(
file
,
MYF
(
0
));
if
(
error
||
head
[
0
]
!=
(
uchar
)
254
||
head
[
1
]
!=
1
||
if
(
error
||
head
[
0
]
!=
(
uchar
)
254
||
head
[
1
]
!=
1
||
(
head
[
2
]
!=
FRM_VER
&&
head
[
2
]
!=
FRM_VER
+
1
))
(
head
[
2
]
!=
FRM_VER
&&
head
[
2
]
!=
FRM_VER
+
1
&&
head
[
2
]
!=
FRM_VER
+
3
))
DBUG_RETURN
(
DB_TYPE_UNKNOWN
);
DBUG_RETURN
(
DB_TYPE_UNKNOWN
);
DBUG_RETURN
(
ha_checktype
((
enum
db_type
)
(
uint
)
*
(
head
+
3
)));
DBUG_RETURN
(
ha_checktype
((
enum
db_type
)
(
uint
)
*
(
head
+
3
)));
}
}
...
...
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