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
6680b049
Commit
6680b049
authored
Oct 30, 2019
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'connect/10.2' into 10.2
parents
baaf02a4
a00b7131
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
319 additions
and
334 deletions
+319
-334
storage/connect/CMakeLists.txt
storage/connect/CMakeLists.txt
+6
-5
storage/connect/connect.cc
storage/connect/connect.cc
+4
-1
storage/connect/jdbconn.cpp
storage/connect/jdbconn.cpp
+8
-3
storage/connect/rest.h
storage/connect/rest.h
+0
-33
storage/connect/tabodbc.cpp
storage/connect/tabodbc.cpp
+4
-2
storage/connect/valblk.cpp
storage/connect/valblk.cpp
+3
-1
storage/connect/value.cpp
storage/connect/value.cpp
+294
-289
No files found.
storage/connect/CMakeLists.txt
View file @
6680b049
...
...
@@ -73,10 +73,6 @@ ELSE(NOT UNIX)
tabwmi.cpp tabwmi.h tabmac.cpp tabmac.h macutil.cpp macutil.h
)
# Add exception handling to the CONNECT project)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/EHsc"
)
SET
(
CMAKE_CXX_FLAGS_RELEASE
"
${
CMAKE_CXX_FLAGS_RELEASE
}
/MD"
)
SET
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
/MDd"
)
SET
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"
${
CMAKE_CXX_FLAGS_RELWITHDEBINFO
}
/MD"
)
SET
(
CMAKE_CXX_FLAGS_MINSIZEREL
"
${
CMAKE_CXX_FLAGS_MINSIZEREL
}
/MD"
)
SET
(
IPHLPAPI_LIBRARY iphlpapi.lib
)
IF
(
MSVC
AND
(
CMAKE_CXX_COMPILER_ID MATCHES Clang
))
# Connect does not work with clang-cl
...
...
@@ -328,7 +324,12 @@ IF(CONNECT_WITH_REST)
# INCLUDE_DIRECTORIES(${CPPRESTSDK_INCLUDE_DIR})
# If needed edit next line to set the path to libcpprest.so
SET
(
REST_LIBRARY -lcpprest
)
# MESSAGE (STATUS ${REST_LIBRARY})
MESSAGE
(
STATUS
${
REST_LIBRARY
}
)
ELSE
(
NOT UNIX
)
# Next line sets debug compile mode matching cpprest_2_10d.dll
# when it was binary installed (can be change later in Visual Studio)
# Comment it out if not needed depending on your cpprestsdk installation.
SET
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
/MDd"
)
ENDIF
(
UNIX
)
IF
(
REST_LIBRARY
)
SET
(
CONNECT_SOURCES
${
CONNECT_SOURCES
}
tabrest.cpp restget.cpp tabrest.h
)
...
...
storage/connect/connect.cc
View file @
6680b049
...
...
@@ -16,7 +16,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
/***********************************************************************/
/* Author Olivier BERTRAND bertrandop@gmail.com 2004-201
7
*/
/* Author Olivier BERTRAND bertrandop@gmail.com 2004-201
9
*/
/* */
/* WHAT THIS PROGRAM DOES: */
/* ----------------------- */
...
...
@@ -389,6 +389,9 @@ RCODE EvalColumns(PGLOBAL g, PTDB tdbp, bool reset, bool mrr)
try
{
for
(
colp
=
tdbp
->
GetColumns
();
rc
==
RC_OK
&&
colp
;
colp
=
colp
->
GetNext
())
{
xtrc
(
2
,
"Going to read column %s of table %s
\n
"
,
colp
->
GetName
(),
tdbp
->
GetName
());
if
(
reset
)
colp
->
Reset
();
...
...
storage/connect/jdbconn.cpp
View file @
6680b049
...
...
@@ -1196,9 +1196,14 @@ int JDBConn::GetResultSize(PCSZ sql, PCOL colp)
if
((
rc
=
ExecuteQuery
(
sql
))
!=
RC_OK
)
return
-
1
;
if
((
rc
=
Fetch
())
>
0
)
SetColumnValue
(
1
,
NULL
,
colp
->
GetValue
());
else
if
((
rc
=
Fetch
())
>
0
)
{
try
{
SetColumnValue
(
1
,
NULL
,
colp
->
GetValue
());
}
catch
(...)
{
return
-
4
;
}
// end catch
}
else
return
-
2
;
if
((
rc
=
Fetch
())
!=
0
)
...
...
storage/connect/rest.h
deleted
100644 → 0
View file @
baaf02a4
/***********************************************************************/
/* Definitions needed by the included files. */
/***********************************************************************/
#if !defined(MY_GLOBAL_H)
#define MY_GLOBAL_H
typedef
unsigned
int
uint
;
typedef
unsigned
int
uint32
;
typedef
unsigned
short
ushort
;
typedef
unsigned
long
ulong
;
typedef
unsigned
long
DWORD
;
typedef
char
*
LPSTR
;
typedef
const
char
*
LPCSTR
;
typedef
int
BOOL
;
#if defined(_WINDOWS)
typedef
void
*
HANDLE
;
#else
typedef
int
HANDLE
;
#endif
typedef
char
*
PSZ
;
typedef
const
char
*
PCSZ
;
typedef
unsigned
char
BYTE
;
typedef
unsigned
char
uchar
;
typedef
long
long
longlong
;
typedef
unsigned
long
long
ulonglong
;
typedef
char
my_bool
;
struct
charset_info_st
{};
typedef
const
charset_info_st
CHARSET_INFO
;
#define FALSE 0
#define TRUE 1
#define Item char
#define MY_MAX(a,b) ((a>b)?(a):(b))
#define MY_MIN(a,b) ((a<b)?(a):(b))
#endif // MY_GLOBAL_H
\ No newline at end of file
storage/connect/tabodbc.cpp
View file @
6680b049
...
...
@@ -605,8 +605,10 @@ bool TDBODBC::OpenDB(PGLOBAL g)
Cnp
->
InitValue
(
g
);
if
((
n
=
Ocp
->
GetResultSize
(
Query
->
GetStr
(),
Cnp
))
<
0
)
{
strcpy
(
g
->
Message
,
"Cannot get result size"
);
return
true
;
char
*
msg
=
PlugDup
(
g
,
g
->
Message
);
sprintf
(
g
->
Message
,
"Get result size: %s (rc=%d)"
,
msg
,
n
);
return
true
;
}
else
if
(
n
)
{
Ocp
->
m_Rows
=
n
;
...
...
storage/connect/valblk.cpp
View file @
6680b049
...
...
@@ -206,6 +206,7 @@ void VALBLK::ChkIndx(int n)
{
if
(
n
<
0
||
n
>=
Nval
)
{
PGLOBAL
&
g
=
Global
;
xtrc
(
1
,
"ChkIndx: n=%d Nval=%d
\n
"
,
n
,
Nval
);
strcpy
(
g
->
Message
,
MSG
(
BAD_VALBLK_INDX
));
throw
Type
;
}
// endif n
...
...
@@ -216,7 +217,8 @@ void VALBLK::ChkTyp(PVAL v)
{
if
(
Check
&&
(
Type
!=
v
->
GetType
()
||
Unsigned
!=
v
->
IsUnsigned
()))
{
PGLOBAL
&
g
=
Global
;
strcpy
(
g
->
Message
,
MSG
(
VALTYPE_NOMATCH
));
xtrc
(
1
,
"ChkTyp: Type=%d valType=%d
\n
"
,
Type
,
v
->
GetType
());
strcpy
(
g
->
Message
,
MSG
(
VALTYPE_NOMATCH
));
throw
Type
;
}
// endif Type
...
...
storage/connect/value.cpp
View file @
6680b049
This diff is collapsed.
Click to expand it.
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