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
546773fb
Commit
546773fb
authored
May 07, 2018
by
Olivier Bertrand
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ob-10.1' into 10.1
parents
3bd6e68a
762111ea
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
33 additions
and
45 deletions
+33
-45
storage/connect/domdoc.cpp
storage/connect/domdoc.cpp
+2
-2
storage/connect/filamtxt.cpp
storage/connect/filamtxt.cpp
+1
-1
storage/connect/ha_connect.cc
storage/connect/ha_connect.cc
+11
-21
storage/connect/json.h
storage/connect/json.h
+3
-0
storage/connect/jsonudf.cpp
storage/connect/jsonudf.cpp
+2
-2
storage/connect/mycat.cc
storage/connect/mycat.cc
+4
-11
storage/connect/tabext.cpp
storage/connect/tabext.cpp
+1
-1
storage/connect/tabjson.cpp
storage/connect/tabjson.cpp
+7
-7
storage/connect/tabjson.h
storage/connect/tabjson.h
+1
-0
storage/connect/user_connect.cc
storage/connect/user_connect.cc
+1
-0
No files found.
storage/connect/domdoc.cpp
View file @
546773fb
...
@@ -84,7 +84,7 @@ DOMDOC::DOMDOC(char *nsl, char *nsdf, char *enc, PFBLOCK fp)
...
@@ -84,7 +84,7 @@ DOMDOC::DOMDOC(char *nsl, char *nsdf, char *enc, PFBLOCK fp)
:
XMLDOCUMENT
(
nsl
,
nsdf
,
enc
)
:
XMLDOCUMENT
(
nsl
,
nsdf
,
enc
)
{
{
assert
(
!
fp
||
fp
->
Type
==
TYPE_FB_XML
);
assert
(
!
fp
||
fp
->
Type
==
TYPE_FB_XML
);
Docp
=
(
fp
)
?
((
PXBLOCK
)
fp
)
->
Docp
:
NULL
;
Docp
=
(
fp
)
?
((
PXBLOCK
)
fp
)
->
Docp
:
(
MSXML2
::
IXMLDOMDocumentPtr
)
NULL
;
Nlist
=
NULL
;
Nlist
=
NULL
;
Hr
=
0
;
Hr
=
0
;
}
// end of DOMDOC constructor
}
// end of DOMDOC constructor
...
...
storage/connect/filamtxt.cpp
View file @
546773fb
...
@@ -427,7 +427,7 @@ int TXTFAM::DeleteSortedRows(PGLOBAL g)
...
@@ -427,7 +427,7 @@ int TXTFAM::DeleteSortedRows(PGLOBAL g)
for
(
i
=
0
;
i
<
Posar
->
GetNval
();
i
++
)
{
for
(
i
=
0
;
i
<
Posar
->
GetNval
();
i
++
)
{
if
((
irc
=
InitDelete
(
g
,
Posar
->
GetIntValue
(
ix
[
i
]),
if
((
irc
=
InitDelete
(
g
,
Posar
->
GetIntValue
(
ix
[
i
]),
Sosar
->
GetIntValue
(
ix
[
i
]))
==
RC_FX
)
)
Sosar
->
GetIntValue
(
ix
[
i
]))
)
==
RC_FX
)
goto
err
;
goto
err
;
// Now delete the sorted rows
// Now delete the sorted rows
...
...
storage/connect/ha_connect.cc
View file @
546773fb
...
@@ -107,13 +107,9 @@
...
@@ -107,13 +107,9 @@
#define MYSQL_SERVER 1
#define MYSQL_SERVER 1
#define DONT_DEFINE_VOID
#define DONT_DEFINE_VOID
#include "sql_class.h"
#include <my_global.h>
#include "create_options.h"
#include "mysql_com.h"
#include "field.h"
#include "sql_parse.h"
#include "sql_parse.h"
#include "sql_base.h"
#include "sql_base.h"
#include <sys/stat.h>
#include "sql_partition.h"
#include "sql_partition.h"
#undef OFFSET
#undef OFFSET
...
@@ -432,7 +428,7 @@ handlerton *connect_hton= NULL;
...
@@ -432,7 +428,7 @@ handlerton *connect_hton= NULL;
uint
GetTraceValue
(
void
)
uint
GetTraceValue
(
void
)
{
return
(
uint
)(
connect_hton
?
THDVAR
(
current_thd
,
xtrace
)
:
0
);}
{
return
(
uint
)(
connect_hton
?
THDVAR
(
current_thd
,
xtrace
)
:
0
);}
bool
ExactInfo
(
void
)
{
return
THDVAR
(
current_thd
,
exact_info
);}
bool
ExactInfo
(
void
)
{
return
THDVAR
(
current_thd
,
exact_info
);}
bool
CondPushEnabled
(
void
)
{
return
THDVAR
(
current_thd
,
cond_push
);}
static
bool
CondPushEnabled
(
void
)
{
return
THDVAR
(
current_thd
,
cond_push
);}
USETEMP
UseTemp
(
void
)
{
return
(
USETEMP
)
THDVAR
(
current_thd
,
use_tempfile
);}
USETEMP
UseTemp
(
void
)
{
return
(
USETEMP
)
THDVAR
(
current_thd
,
use_tempfile
);}
int
GetConvSize
(
void
)
{
return
THDVAR
(
current_thd
,
conv_size
);}
int
GetConvSize
(
void
)
{
return
THDVAR
(
current_thd
,
conv_size
);}
TYPCONV
GetTypeConv
(
void
)
{
return
(
TYPCONV
)
THDVAR
(
current_thd
,
type_conv
);}
TYPCONV
GetTypeConv
(
void
)
{
return
(
TYPCONV
)
THDVAR
(
current_thd
,
type_conv
);}
...
@@ -1781,11 +1777,13 @@ bool ha_connect::CheckVirtualIndex(TABLE_SHARE *s)
...
@@ -1781,11 +1777,13 @@ bool ha_connect::CheckVirtualIndex(TABLE_SHARE *s)
bool
ha_connect
::
IsPartitioned
(
void
)
bool
ha_connect
::
IsPartitioned
(
void
)
{
{
#ifdef WITH_PARTITION_STORAGE_ENGINE
if
(
tshp
)
if
(
tshp
)
return
tshp
->
partition_info_str_len
>
0
;
return
tshp
->
partition_info_str_len
>
0
;
else
if
(
table
&&
table
->
part_info
)
else
if
(
table
&&
table
->
part_info
)
return
true
;
return
true
;
else
else
#endif
return
false
;
return
false
;
}
// end of IsPartitioned
}
// end of IsPartitioned
...
@@ -2811,7 +2809,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond)
...
@@ -2811,7 +2809,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond)
htrc
(
"Cond type=%d
\n
"
,
cond
->
type
());
htrc
(
"Cond type=%d
\n
"
,
cond
->
type
());
if
(
cond
->
type
()
==
COND
::
COND_ITEM
)
{
if
(
cond
->
type
()
==
COND
::
COND_ITEM
)
{
char
*
pb0
,
*
pb1
,
*
pb2
,
*
ph0
,
*
ph1
,
*
ph2
;
char
*
pb0
,
*
pb1
,
*
pb2
,
*
ph0
=
0
,
*
ph1
=
0
,
*
ph2
=
0
;
bool
bb
=
false
,
bh
=
false
;
bool
bb
=
false
,
bh
=
false
;
Item_cond
*
cond_item
=
(
Item_cond
*
)
cond
;
Item_cond
*
cond_item
=
(
Item_cond
*
)
cond
;
...
@@ -5568,7 +5566,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
...
@@ -5568,7 +5566,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
}
// endif p
}
// endif p
}
else
if
(
ttp
!=
TAB_ODBC
||
!
(
fnc
&
(
FNC_TABLE
|
FNC_COL
)))
}
else
if
(
ttp
!=
TAB_ODBC
||
!
(
fnc
&
(
FNC_TABLE
|
FNC_COL
)))
tab
=
table_s
->
table_name
.
str
;
// Default value
tab
=
(
char
*
)
table_s
->
table_name
.
str
;
// Default value
}
// endif tab
}
// endif tab
...
@@ -6200,7 +6198,9 @@ int ha_connect::create(const char *name, TABLE *table_arg,
...
@@ -6200,7 +6198,9 @@ int ha_connect::create(const char *name, TABLE *table_arg,
LEX_STRING
cnc
=
table_arg
->
s
->
connect_string
;
LEX_STRING
cnc
=
table_arg
->
s
->
connect_string
;
#if defined(WITH_PARTITION_STORAGE_ENGINE)
#if defined(WITH_PARTITION_STORAGE_ENGINE)
partition_info
*
part_info
=
table_arg
->
part_info
;
partition_info
*
part_info
=
table_arg
->
part_info
;
#endif // WITH_PARTITION_STORAGE_ENGINE
#else // !WITH_PARTITION_STORAGE_ENGINE
#define part_info 0
#endif // !WITH_PARTITION_STORAGE_ENGINE
xp
=
GetUser
(
thd
,
xp
);
xp
=
GetUser
(
thd
,
xp
);
PGLOBAL
g
=
xp
->
g
;
PGLOBAL
g
=
xp
->
g
;
...
@@ -6301,9 +6301,7 @@ int ha_connect::create(const char *name, TABLE *table_arg,
...
@@ -6301,9 +6301,7 @@ int ha_connect::create(const char *name, TABLE *table_arg,
// fall through
// fall through
case
TAB_MYSQL
:
case
TAB_MYSQL
:
#if defined(WITH_PARTITION_STORAGE_ENGINE)
if
(
!
part_info
)
if
(
!
part_info
)
#endif // WITH_PARTITION_STORAGE_ENGINE
{
const
char
*
src
=
options
->
srcdef
;
{
const
char
*
src
=
options
->
srcdef
;
PCSZ
host
,
db
,
tab
=
options
->
tabname
;
PCSZ
host
,
db
,
tab
=
options
->
tabname
;
int
port
;
int
port
;
...
@@ -6567,7 +6565,6 @@ int ha_connect::create(const char *name, TABLE *table_arg,
...
@@ -6567,7 +6565,6 @@ int ha_connect::create(const char *name, TABLE *table_arg,
}
else
}
else
lwt
[
i
]
=
tolower
(
options
->
type
[
i
]);
lwt
[
i
]
=
tolower
(
options
->
type
[
i
]);
#if defined(WITH_PARTITION_STORAGE_ENGINE)
if
(
part_info
)
{
if
(
part_info
)
{
char
*
p
;
char
*
p
;
...
@@ -6577,7 +6574,6 @@ int ha_connect::create(const char *name, TABLE *table_arg,
...
@@ -6577,7 +6574,6 @@ int ha_connect::create(const char *name, TABLE *table_arg,
strcat
(
strcat
(
strcpy
(
buf
,
p
),
"."
),
lwt
);
strcat
(
strcat
(
strcpy
(
buf
,
p
),
"."
),
lwt
);
*
p
=
0
;
*
p
=
0
;
}
else
{
}
else
{
#endif // WITH_PARTITION_STORAGE_ENGINE
strcat
(
strcat
(
strcpy
(
buf
,
GetTableName
()),
"."
),
lwt
);
strcat
(
strcat
(
strcpy
(
buf
,
GetTableName
()),
"."
),
lwt
);
sprintf
(
g
->
Message
,
"No file name. Table will use %s"
,
buf
);
sprintf
(
g
->
Message
,
"No file name. Table will use %s"
,
buf
);
...
@@ -6585,9 +6581,7 @@ int ha_connect::create(const char *name, TABLE *table_arg,
...
@@ -6585,9 +6581,7 @@ int ha_connect::create(const char *name, TABLE *table_arg,
push_warning
(
thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
0
,
g
->
Message
);
push_warning
(
thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
0
,
g
->
Message
);
strcat
(
strcat
(
strcpy
(
dbpath
,
"./"
),
table
->
s
->
db
.
str
),
"/"
);
strcat
(
strcat
(
strcpy
(
dbpath
,
"./"
),
table
->
s
->
db
.
str
),
"/"
);
#if defined(WITH_PARTITION_STORAGE_ENGINE)
}
// endif part_info
}
// endif part_info
#endif // WITH_PARTITION_STORAGE_ENGINE
PlugSetPath
(
fn
,
buf
,
dbpath
);
PlugSetPath
(
fn
,
buf
,
dbpath
);
...
@@ -6652,11 +6646,9 @@ int ha_connect::create(const char *name, TABLE *table_arg,
...
@@ -6652,11 +6646,9 @@ int ha_connect::create(const char *name, TABLE *table_arg,
push_warning
(
thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
0
,
push_warning
(
thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
0
,
"Unexpected command in create, please contact CONNECT team"
);
"Unexpected command in create, please contact CONNECT team"
);
#if defined(WITH_PARTITION_STORAGE_ENGINE)
if
(
part_info
&&
!
inward
)
if
(
part_info
&&
!
inward
)
strncpy
(
partname
,
decode
(
g
,
strrchr
(
name
,
'#'
)
+
1
),
sizeof
(
partname
)
-
1
);
strncpy
(
partname
,
decode
(
g
,
strrchr
(
name
,
'#'
)
+
1
),
sizeof
(
partname
)
-
1
);
// strcpy(partname, part_info->curr_part_elem->partition_name);
// strcpy(partname, part_info->curr_part_elem->partition_name);
#endif // WITH_PARTITION_STORAGE_ENGINE
if
(
g
->
Alchecked
==
0
&&
if
(
g
->
Alchecked
==
0
&&
(
!
IsFileType
(
type
)
||
FileExists
(
options
->
filename
,
false
)))
{
(
!
IsFileType
(
type
)
||
FileExists
(
options
->
filename
,
false
)))
{
...
@@ -6692,12 +6684,10 @@ int ha_connect::create(const char *name, TABLE *table_arg,
...
@@ -6692,12 +6684,10 @@ int ha_connect::create(const char *name, TABLE *table_arg,
my_message
(
ER_UNKNOWN_ERROR
,
g
->
Message
,
MYF
(
0
));
my_message
(
ER_UNKNOWN_ERROR
,
g
->
Message
,
MYF
(
0
));
rc
=
HA_ERR_INTERNAL_ERROR
;
rc
=
HA_ERR_INTERNAL_ERROR
;
}
else
if
(
cat
)
{
}
else
if
(
cat
)
{
#if defined(WITH_PARTITION_STORAGE_ENGINE)
if
(
part_info
)
if
(
part_info
)
strncpy
(
partname
,
strncpy
(
partname
,
decode
(
g
,
strrchr
(
name
,
(
inward
?
slash
:
'#'
))
+
1
),
decode
(
g
,
strrchr
(
name
,
(
inward
?
slash
:
'#'
))
+
1
),
sizeof
(
partname
)
-
1
);
sizeof
(
partname
)
-
1
);
#endif // WITH_PARTITION_STORAGE_ENGINE
if
((
rc
=
optimize
(
table
->
in_use
,
NULL
)))
{
if
((
rc
=
optimize
(
table
->
in_use
,
NULL
)))
{
htrc
(
"Create rc=%d %s
\n
"
,
rc
,
g
->
Message
);
htrc
(
"Create rc=%d %s
\n
"
,
rc
,
g
->
Message
);
...
...
storage/connect/json.h
View file @
546773fb
...
@@ -44,6 +44,9 @@ typedef struct {
...
@@ -44,6 +44,9 @@ typedef struct {
int
len
;
int
len
;
}
STRG
,
*
PSG
;
}
STRG
,
*
PSG
;
char
*
NextChr
(
PSZ
s
,
char
sep
);
char
*
GetJsonNull
(
void
);
PJSON
ParseJson
(
PGLOBAL
g
,
char
*
s
,
int
n
,
int
*
prty
=
NULL
,
bool
*
b
=
NULL
);
PJSON
ParseJson
(
PGLOBAL
g
,
char
*
s
,
int
n
,
int
*
prty
=
NULL
,
bool
*
b
=
NULL
);
PJAR
ParseArray
(
PGLOBAL
g
,
int
&
i
,
STRG
&
src
,
bool
*
pty
);
PJAR
ParseArray
(
PGLOBAL
g
,
int
&
i
,
STRG
&
src
,
bool
*
pty
);
PJOB
ParseObject
(
PGLOBAL
g
,
int
&
i
,
STRG
&
src
,
bool
*
pty
);
PJOB
ParseObject
(
PGLOBAL
g
,
int
&
i
,
STRG
&
src
,
bool
*
pty
);
...
...
storage/connect/jsonudf.cpp
View file @
546773fb
...
@@ -1620,7 +1620,7 @@ static my_bool CheckMemory(PGLOBAL g, UDF_INIT *initid, UDF_ARGS *args, uint n,
...
@@ -1620,7 +1620,7 @@ static my_bool CheckMemory(PGLOBAL g, UDF_INIT *initid, UDF_ARGS *args, uint n,
if
(
AllocSarea
(
g
,
ml
))
{
if
(
AllocSarea
(
g
,
ml
))
{
char
errmsg
[
MAX_STR
];
char
errmsg
[
MAX_STR
];
s
printf
(
errmsg
,
MSG
(
WORK_AREA
),
g
->
Message
);
s
nprintf
(
errmsg
,
sizeof
(
errmsg
)
-
1
,
MSG
(
WORK_AREA
),
g
->
Message
);
strcpy
(
g
->
Message
,
errmsg
);
strcpy
(
g
->
Message
,
errmsg
);
return
true
;
return
true
;
}
// endif SareaAlloc
}
// endif SareaAlloc
...
@@ -1673,7 +1673,7 @@ static PCSZ MakeKey(PGLOBAL g, UDF_ARGS *args, int i)
...
@@ -1673,7 +1673,7 @@ static PCSZ MakeKey(PGLOBAL g, UDF_ARGS *args, int i)
n
=
strlen
(
s
);
n
=
strlen
(
s
);
if
(
IsJson
(
args
,
i
))
if
(
IsJson
(
args
,
i
))
j
=
strchr
(
s
,
'_'
)
-
s
+
1
;
j
=
(
int
)(
strchr
(
s
,
'_'
)
-
s
+
1
)
;
if
(
j
&&
n
>
j
)
{
if
(
j
&&
n
>
j
)
{
s
+=
j
;
s
+=
j
;
...
...
storage/connect/mycat.cc
View file @
546773fb
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
/* ------------- */
/* ------------- */
/* Version 1.6 */
/* Version 1.6 */
/* */
/* */
/* Author: Olivier Bertrand 2012 - 201
7
*/
/* Author: Olivier Bertrand 2012 - 201
8
*/
/* */
/* */
/* WHAT THIS PROGRAM DOES: */
/* WHAT THIS PROGRAM DOES: */
/* ----------------------- */
/* ----------------------- */
...
@@ -28,20 +28,13 @@
...
@@ -28,20 +28,13 @@
/***********************************************************************/
/***********************************************************************/
/* Include relevant MariaDB header file. */
/* Include relevant MariaDB header file. */
/***********************************************************************/
/***********************************************************************/
#include <my_config.h>
#define DONT_DEFINE_VOID
#include <my_global.h>
#if defined(__WIN__)
#if defined(UNIX)
//#include <windows.h>
//#include <sqlext.h>
#elif defined(UNIX)
#include <sys/types.h>
#include <unistd.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
#endif
#endif
#define DONT_DEFINE_VOID
//#include <mysql/plugin.h>
#include "handler.h"
#include "handler.h"
#undef OFFSET
#undef OFFSET
...
...
storage/connect/tabext.cpp
View file @
546773fb
...
@@ -286,7 +286,7 @@ bool TDBEXT::MakeSrcdef(PGLOBAL g)
...
@@ -286,7 +286,7 @@ bool TDBEXT::MakeSrcdef(PGLOBAL g)
char
*
catp
=
strstr
(
Srcdef
,
"%s"
);
char
*
catp
=
strstr
(
Srcdef
,
"%s"
);
if
(
catp
)
{
if
(
catp
)
{
char
*
fil1
,
*
fil2
;
char
*
fil1
=
0
,
*
fil2
;
PCSZ
ph
=
((
EXTDEF
*
)
To_Def
)
->
Phpos
;
PCSZ
ph
=
((
EXTDEF
*
)
To_Def
)
->
Phpos
;
if
(
!
ph
)
if
(
!
ph
)
...
...
storage/connect/tabjson.cpp
View file @
546773fb
...
@@ -195,7 +195,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
...
@@ -195,7 +195,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
tdp
->
Fn
=
GetStringTableOption
(
g
,
topt
,
"Filename"
,
NULL
);
tdp
->
Fn
=
GetStringTableOption
(
g
,
topt
,
"Filename"
,
NULL
);
if
(
!
(
tdp
->
Database
=
SetPath
(
g
,
db
)))
if
(
!
(
tdp
->
Database
=
SetPath
(
g
,
db
)))
return
NULL
;
return
0
;
tdp
->
Objname
=
GetStringTableOption
(
g
,
topt
,
"Object"
,
NULL
);
tdp
->
Objname
=
GetStringTableOption
(
g
,
topt
,
"Object"
,
NULL
);
tdp
->
Base
=
GetIntegerTableOption
(
g
,
topt
,
"Base"
,
0
)
?
1
:
0
;
tdp
->
Base
=
GetIntegerTableOption
(
g
,
topt
,
"Base"
,
0
)
?
1
:
0
;
...
@@ -243,14 +243,14 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
...
@@ -243,14 +243,14 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
tjsp
=
new
(
g
)
TDBJSON
(
tdp
,
new
(
g
)
MAPFAM
(
tdp
));
tjsp
=
new
(
g
)
TDBJSON
(
tdp
,
new
(
g
)
MAPFAM
(
tdp
));
if
(
tjsp
->
MakeDocument
(
g
))
if
(
tjsp
->
MakeDocument
(
g
))
return
NULL
;
return
0
;
jsp
=
(
tjsp
->
GetDoc
())
?
tjsp
->
GetDoc
()
->
GetValue
(
0
)
:
NULL
;
jsp
=
(
tjsp
->
GetDoc
())
?
tjsp
->
GetDoc
()
->
GetValue
(
0
)
:
NULL
;
}
else
{
}
else
{
if
(
!
(
tdp
->
Lrecl
=
GetIntegerTableOption
(
g
,
topt
,
"Lrecl"
,
0
)))
if
(
!
(
tdp
->
Lrecl
=
GetIntegerTableOption
(
g
,
topt
,
"Lrecl"
,
0
)))
if
(
!
mgo
)
{
if
(
!
mgo
)
{
sprintf
(
g
->
Message
,
"LRECL must be specified for pretty=%d"
,
tdp
->
Pretty
);
sprintf
(
g
->
Message
,
"LRECL must be specified for pretty=%d"
,
tdp
->
Pretty
);
return
NULL
;
return
0
;
}
else
}
else
tdp
->
Lrecl
=
8192
;
// Should be enough
tdp
->
Lrecl
=
8192
;
// Should be enough
...
@@ -269,14 +269,14 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
...
@@ -269,14 +269,14 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
tjnp
=
new
(
g
)
TDBJSN
(
tdp
,
new
(
g
)
CMGFAM
(
tdp
));
tjnp
=
new
(
g
)
TDBJSN
(
tdp
,
new
(
g
)
CMGFAM
(
tdp
));
#else
#else
sprintf
(
g
->
Message
,
"Mongo %s Driver not available"
,
"C"
);
sprintf
(
g
->
Message
,
"Mongo %s Driver not available"
,
"C"
);
return
NULL
;
return
0
;
#endif
#endif
}
else
if
(
tdp
->
Driver
&&
toupper
(
*
tdp
->
Driver
)
==
'J'
)
{
}
else
if
(
tdp
->
Driver
&&
toupper
(
*
tdp
->
Driver
)
==
'J'
)
{
#if defined(JAVA_SUPPORT)
#if defined(JAVA_SUPPORT)
tjnp
=
new
(
g
)
TDBJSN
(
tdp
,
new
(
g
)
JMGFAM
(
tdp
));
tjnp
=
new
(
g
)
TDBJSN
(
tdp
,
new
(
g
)
JMGFAM
(
tdp
));
#else
#else
sprintf
(
g
->
Message
,
"Mongo %s Driver not available"
,
"Java"
);
sprintf
(
g
->
Message
,
"Mongo %s Driver not available"
,
"Java"
);
return
NULL
;
return
0
;
#endif
#endif
}
else
{
// Driver not specified
}
else
{
// Driver not specified
#if defined(CMGO_SUPPORT)
#if defined(CMGO_SUPPORT)
...
@@ -285,7 +285,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
...
@@ -285,7 +285,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
tjnp
=
new
(
g
)
TDBJSN
(
tdp
,
new
(
g
)
JMGFAM
(
tdp
));
tjnp
=
new
(
g
)
TDBJSN
(
tdp
,
new
(
g
)
JMGFAM
(
tdp
));
#else
#else
sprintf
(
g
->
Message
,
MSG
(
NO_FEAT_SUPPORT
),
"MONGO"
);
sprintf
(
g
->
Message
,
MSG
(
NO_FEAT_SUPPORT
),
"MONGO"
);
return
NULL
;
return
0
;
#endif
#endif
}
// endif Driver
}
// endif Driver
...
@@ -304,7 +304,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
...
@@ -304,7 +304,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
tjnp
->
SetG
(
G
);
tjnp
->
SetG
(
G
);
if
(
tjnp
->
OpenDB
(
g
))
if
(
tjnp
->
OpenDB
(
g
))
return
NULL
;
return
0
;
switch
(
tjnp
->
ReadDB
(
g
))
{
switch
(
tjnp
->
ReadDB
(
g
))
{
case
RC_EF
:
case
RC_EF
:
...
...
storage/connect/tabjson.h
View file @
546773fb
...
@@ -16,6 +16,7 @@ typedef class JSONDEF *PJDEF;
...
@@ -16,6 +16,7 @@ typedef class JSONDEF *PJDEF;
typedef
class
TDBJSON
*
PJTDB
;
typedef
class
TDBJSON
*
PJTDB
;
typedef
class
JSONCOL
*
PJCOL
;
typedef
class
JSONCOL
*
PJCOL
;
class
TDBJSN
;
class
TDBJSN
;
PQRYRES
JSONColumns
(
PGLOBAL
g
,
PCSZ
db
,
PCSZ
dsn
,
PTOS
topt
,
bool
info
);
/***********************************************************************/
/***********************************************************************/
/* The JSON tree node. Can be an Object or an Array. */
/* The JSON tree node. Can be an Object or an Array. */
...
...
storage/connect/user_connect.cc
View file @
546773fb
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
#define DONT_DEFINE_VOID
#define DONT_DEFINE_VOID
#define MYSQL_SERVER
#define MYSQL_SERVER
#include <my_global.h>
#include "sql_class.h"
#include "sql_class.h"
#undef OFFSET
#undef OFFSET
...
...
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