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
627d046d
Commit
627d046d
authored
Jan 31, 2013
by
Olivier Bertrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DBF type N is now BIGINT when length is > 10.
Fix ha_connect::external_lock to use F_RDLCK, F_WRLCK, F_UNLCK.
parent
e8c24a73
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
17 deletions
+9
-17
storage/connect/filamdbf.cpp
storage/connect/filamdbf.cpp
+6
-4
storage/connect/ha_connect.cc
storage/connect/ha_connect.cc
+3
-13
No files found.
storage/connect/filamdbf.cpp
View file @
627d046d
...
...
@@ -194,7 +194,7 @@ PQRYRES DBFColumns(PGLOBAL g, char *fn, BOOL info)
static
unsigned
int
length
[]
=
{
11
,
6
,
8
,
10
,
10
,
6
};
char
buf
[
2
],
filename
[
_MAX_PATH
];
int
ncol
=
sizeof
(
dbtype
)
/
sizeof
(
int
);
int
rc
,
type
,
field
,
fields
;
int
rc
,
type
,
len
,
field
,
fields
;
BOOL
bad
;
DBFHEADER
mainhead
;
DESCRIPTOR
thisfield
;
...
...
@@ -260,11 +260,12 @@ PQRYRES DBFColumns(PGLOBAL g, char *fn, BOOL info)
if
(
fread
(
&
thisfield
,
HEADLEN
,
1
,
infile
)
!=
1
)
{
sprintf
(
g
->
Message
,
MSG
(
ERR_READING_REC
),
field
+
1
,
fn
);
goto
err
;
}
// endif fread
}
else
len
=
thisfield
.
Length
;
if
(
trace
)
htrc
(
"%-11s %c %6ld %3d %2d %3d %3d
\n
"
,
thisfield
.
Name
,
thisfield
.
Type
,
thisfield
.
Offset
,
thisfield
.
Length
,
thisfield
.
Name
,
thisfield
.
Type
,
thisfield
.
Offset
,
len
,
thisfield
.
Decimals
,
thisfield
.
Setfield
,
thisfield
.
Mdxfield
);
/************************************************************************/
...
...
@@ -276,7 +277,8 @@ PQRYRES DBFColumns(PGLOBAL g, char *fn, BOOL info)
type
=
TYPE_STRING
;
break
;
case
'N'
:
type
=
(
thisfield
.
Decimals
)
?
TYPE_FLOAT
:
TYPE_INT
;
type
=
(
thisfield
.
Decimals
)
?
TYPE_FLOAT
:
(
len
>
10
)
?
TYPE_BIGINT
:
TYPE_INT
;
break
;
case
'F'
:
type
=
TYPE_FLOAT
;
...
...
storage/connect/ha_connect.cc
View file @
627d046d
...
...
@@ -2785,16 +2785,6 @@ int ha_connect::delete_all_rows()
DBUG_RETURN
(
rc
);
}
// end of delete_all_rows
#if defined(WIN32)
#define HA_LOCK_READ 1
#define HA_LOCK_WRITE 2
#define HA_LOCK_UNLOCK 3
#else // !WIN32
#define HA_LOCK_READ 0
#define HA_LOCK_WRITE 1
#define HA_LOCK_UNLOCK 2
#endif // !WIN32
/**
@brief
This create a lock on the table. If you are implementing a storage engine
...
...
@@ -2833,13 +2823,13 @@ int ha_connect::external_lock(THD *thd, int lock_type)
// Action will depend on lock_type
switch
(
lock_type
)
{
case
HA_LOCK_WRITE
:
case
F_WRLCK
:
newmode
=
MODE_WRITE
;
break
;
case
HA_LOCK_READ
:
case
F_RDLCK
:
newmode
=
MODE_READ
;
break
;
case
HA_LOCK_UNLO
CK
:
case
F_UNL
CK
:
default:
newmode
=
MODE_ANY
;
}
// endswitch mode
...
...
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