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
33f1ac66
Commit
33f1ac66
authored
Oct 10, 2014
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.0-connect -> 10.0
parents
e2b895ec
5821b8eb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
7 deletions
+13
-7
storage/connect/ha_connect.cc
storage/connect/ha_connect.cc
+3
-1
storage/connect/tabdos.cpp
storage/connect/tabdos.cpp
+1
-1
storage/connect/tabdos.h
storage/connect/tabdos.h
+1
-1
storage/connect/tabfmt.cpp
storage/connect/tabfmt.cpp
+8
-4
No files found.
storage/connect/ha_connect.cc
View file @
33f1ac66
...
@@ -1184,6 +1184,8 @@ void *ha_connect::GetColumnOption(PGLOBAL g, void *field, PCOLINFO pcf)
...
@@ -1184,6 +1184,8 @@ void *ha_connect::GetColumnOption(PGLOBAL g, void *field, PCOLINFO pcf)
pcf
->
Length
=
(
len
)
?
len
:
11
;
pcf
->
Length
=
(
len
)
?
len
:
11
;
}
// endelse
}
// endelse
// For Value setting
pcf
->
Precision
=
MY_MAX
(
pcf
->
Precision
,
pcf
->
Length
);
break
;
break
;
default:
default:
break
;
break
;
...
@@ -2429,7 +2431,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, AMT tty, Item *cond)
...
@@ -2429,7 +2431,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, AMT tty, Item *cond)
if
(
!
x
)
{
if
(
!
x
)
{
// Append the value to the filter
// Append the value to the filter
if
(
args
[
i
]
->
field_type
()
==
MYSQL_TYPE_VARCHAR
)
if
(
args
[
i
]
->
field_type
()
==
MYSQL_TYPE_VARCHAR
)
strcat
(
str
cat
(
strcat
(
body
,
"'"
),
res
->
ptr
()),
"'"
);
strcat
(
str
ncat
(
strcat
(
body
,
"'"
),
res
->
ptr
(),
res
->
length
()),
"'"
);
else
else
strncat
(
body
,
res
->
ptr
(),
res
->
length
());
strncat
(
body
,
res
->
ptr
(),
res
->
length
());
...
...
storage/connect/tabdos.cpp
View file @
33f1ac66
...
@@ -146,7 +146,7 @@ bool DOSDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
...
@@ -146,7 +146,7 @@ bool DOSDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
Eof
=
(
GetIntCatInfo
(
"EOF"
,
0
)
!=
0
);
Eof
=
(
GetIntCatInfo
(
"EOF"
,
0
)
!=
0
);
}
else
if
(
Recfm
==
RECFM_DBF
)
{
}
else
if
(
Recfm
==
RECFM_DBF
)
{
Maxerr
=
GetIntCatInfo
(
"Maxerr"
,
0
);
Maxerr
=
GetIntCatInfo
(
"Maxerr"
,
0
);
Accept
=
(
GetIntCatInfo
(
"Accept"
,
0
)
!=
0
);
Accept
=
GetBoolCatInfo
(
"Accept"
,
false
);
ReadMode
=
GetIntCatInfo
(
"Readmode"
,
0
);
ReadMode
=
GetIntCatInfo
(
"Readmode"
,
0
);
}
else
// (Recfm == RECFM_VAR)
}
else
// (Recfm == RECFM_VAR)
AvgLen
=
GetIntCatInfo
(
"Avglen"
,
0
);
AvgLen
=
GetIntCatInfo
(
"Avglen"
,
0
);
...
...
storage/connect/tabdos.h
View file @
33f1ac66
...
@@ -77,7 +77,7 @@ class DllExport DOSDEF : public TABDEF { /* Logical table description */
...
@@ -77,7 +77,7 @@ class DllExport DOSDEF : public TABDEF { /* Logical table description */
bool
Mapped
;
/* 0: disk file, 1: memory mapped file */
bool
Mapped
;
/* 0: disk file, 1: memory mapped file */
bool
Padded
;
/* true for padded table file */
bool
Padded
;
/* true for padded table file */
bool
Huge
;
/* true for files larger than 2GB */
bool
Huge
;
/* true for files larger than 2GB */
bool
Accept
;
/* true if wrong lines are accepted
(DBF)
*/
bool
Accept
;
/* true if wrong lines are accepted
*/
bool
Eof
;
/* true if an EOF (0xA) character exists */
bool
Eof
;
/* true if an EOF (0xA) character exists */
int
*
To_Pos
;
/* To array of block starting positions */
int
*
To_Pos
;
/* To array of block starting positions */
int
Optimized
;
/* 0: No, 1:Yes, 2:Redo optimization */
int
Optimized
;
/* 0: No, 1:Yes, 2:Redo optimization */
...
...
storage/connect/tabfmt.cpp
View file @
33f1ac66
...
@@ -390,8 +390,8 @@ PQRYRES CSVColumns(PGLOBAL g, char *dp, const char *fn, char sep,
...
@@ -390,8 +390,8 @@ PQRYRES CSVColumns(PGLOBAL g, char *dp, const char *fn, char sep,
/***********************************************************************/
/***********************************************************************/
CSVDEF
::
CSVDEF
(
void
)
CSVDEF
::
CSVDEF
(
void
)
{
{
Fmtd
=
Accept
=
Header
=
false
;
Fmtd
=
Header
=
false
;
Maxerr
=
0
;
//
Maxerr = 0;
Quoted
=
-
1
;
Quoted
=
-
1
;
Sep
=
','
;
Sep
=
','
;
Qot
=
'\0'
;
Qot
=
'\0'
;
...
@@ -428,9 +428,13 @@ bool CSVDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
...
@@ -428,9 +428,13 @@ bool CSVDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
Qot
=
'"'
;
Qot
=
'"'
;
Fmtd
=
(
!
Sep
||
(
am
&&
(
*
am
==
'F'
||
*
am
==
'f'
)));
Fmtd
=
(
!
Sep
||
(
am
&&
(
*
am
==
'F'
||
*
am
==
'f'
)));
Header
=
(
GetIntCatInfo
(
"Header"
,
0
)
!=
0
);
Header
=
GetBoolCatInfo
(
"Header"
,
false
);
Maxerr
=
GetIntCatInfo
(
"Maxerr"
,
0
);
Maxerr
=
GetIntCatInfo
(
"Maxerr"
,
0
);
Accept
=
(
GetIntCatInfo
(
"Accept"
,
0
)
!=
0
);
Accept
=
GetBoolCatInfo
(
"Accept"
,
false
);
if
(
Accept
&&
Maxerr
==
0
)
Maxerr
=
INT_MAX32
;
// Accept all bad lines
return
false
;
return
false
;
}
// end of DefineAM
}
// end of DefineAM
...
...
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