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
32284eba
Commit
32284eba
authored
Dec 28, 2013
by
Olivier Bertrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fix variables used uninitialized
modified: storage/connect/filamdbf.cpp storage/connect/tabutil.cpp
parent
c055e5e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
storage/connect/filamdbf.cpp
storage/connect/filamdbf.cpp
+11
-7
storage/connect/tabutil.cpp
storage/connect/tabutil.cpp
+2
-1
No files found.
storage/connect/filamdbf.cpp
View file @
32284eba
...
@@ -178,18 +178,18 @@ static int dbfhead(PGLOBAL g, FILE *file, PSZ fn, DBFHEADER *buf)
...
@@ -178,18 +178,18 @@ static int dbfhead(PGLOBAL g, FILE *file, PSZ fn, DBFHEADER *buf)
/****************************************************************************/
/****************************************************************************/
PQRYRES
DBFColumns
(
PGLOBAL
g
,
const
char
*
fn
,
BOOL
info
)
PQRYRES
DBFColumns
(
PGLOBAL
g
,
const
char
*
fn
,
BOOL
info
)
{
{
static
int
buftyp
[]
=
{
TYPE_STRING
,
TYPE_SHORT
,
TYPE_STRING
,
int
buftyp
[]
=
{
TYPE_STRING
,
TYPE_SHORT
,
TYPE_STRING
,
TYPE_INT
,
TYPE_INT
,
TYPE_SHORT
};
TYPE_INT
,
TYPE_INT
,
TYPE_SHORT
};
static
XFLD
fldtyp
[]
=
{
FLD_NAME
,
FLD_TYPE
,
FLD_TYPENAME
,
XFLD
fldtyp
[]
=
{
FLD_NAME
,
FLD_TYPE
,
FLD_TYPENAME
,
FLD_PREC
,
FLD_LENGTH
,
FLD_SCALE
};
FLD_PREC
,
FLD_LENGTH
,
FLD_SCALE
};
static
unsigned
int
length
[]
=
{
11
,
6
,
8
,
10
,
10
,
6
};
unsigned
int
length
[]
=
{
11
,
6
,
8
,
10
,
10
,
6
};
char
buf
[
2
],
filename
[
_MAX_PATH
];
char
buf
[
2
],
filename
[
_MAX_PATH
];
int
ncol
=
sizeof
(
buftyp
)
/
sizeof
(
int
);
int
ncol
=
sizeof
(
buftyp
)
/
sizeof
(
int
);
int
rc
,
type
,
len
,
field
,
fields
;
int
rc
,
type
,
len
,
field
,
fields
;
BOOL
bad
;
BOOL
bad
;
DBFHEADER
mainhead
;
DBFHEADER
mainhead
;
DESCRIPTOR
thisfield
;
DESCRIPTOR
thisfield
;
FILE
*
infile
;
FILE
*
infile
=
NULL
;
PQRYRES
qrp
;
PQRYRES
qrp
;
PCOLRES
crp
;
PCOLRES
crp
;
...
@@ -228,8 +228,12 @@ PQRYRES DBFColumns(PGLOBAL g, const char *fn, BOOL info)
...
@@ -228,8 +228,12 @@ PQRYRES DBFColumns(PGLOBAL g, const char *fn, BOOL info)
qrp
=
PlgAllocResult
(
g
,
ncol
,
fields
,
IDS_COLUMNS
+
3
,
qrp
=
PlgAllocResult
(
g
,
ncol
,
fields
,
IDS_COLUMNS
+
3
,
buftyp
,
fldtyp
,
length
,
true
,
false
);
buftyp
,
fldtyp
,
length
,
true
,
false
);
if
(
info
||
!
qrp
)
if
(
info
||
!
qrp
)
{
if
(
infile
)
fclose
(
infile
);
return
qrp
;
return
qrp
;
}
// endif info
if
(
trace
)
{
if
(
trace
)
{
htrc
(
"Structure of %s
\n
"
,
filename
);
htrc
(
"Structure of %s
\n
"
,
filename
);
...
...
storage/connect/tabutil.cpp
View file @
32284eba
...
@@ -218,7 +218,8 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db,
...
@@ -218,7 +218,8 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db,
if
(
type
==
TYPE_DECIM
)
if
(
type
==
TYPE_DECIM
)
prec
=
((
Field_new_decimal
*
)
fp
)
->
precision
;
prec
=
((
Field_new_decimal
*
)
fp
)
->
precision
;
else
else
prec
=
(
prec
==
NOT_FIXED_DEC
)
?
0
:
fp
->
field_length
;
prec
=
fp
->
field_length
;
// prec = (prec(???) == NOT_FIXED_DEC) ? 0 : fp->field_length;
len
=
fp
->
char_length
();
len
=
fp
->
char_length
();
fmt
=
NULL
;
fmt
=
NULL
;
...
...
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