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
40868c47
Commit
40868c47
authored
Jan 28, 2021
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix warnings returned by gcc v10.0
parent
8b4d92aa
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
9 deletions
+12
-9
storage/connect/bson.cpp
storage/connect/bson.cpp
+2
-3
storage/connect/bson.h
storage/connect/bson.h
+1
-1
storage/connect/bsonudf.cpp
storage/connect/bsonudf.cpp
+5
-3
storage/connect/filamtxt.cpp
storage/connect/filamtxt.cpp
+1
-1
storage/connect/jsonudf.cpp
storage/connect/jsonudf.cpp
+3
-1
No files found.
storage/connect/bson.cpp
View file @
40868c47
...
@@ -1199,15 +1199,14 @@ void BJSON::SetArrayValue(PBVAL bap, PBVAL nvp, int n)
...
@@ -1199,15 +1199,14 @@ void BJSON::SetArrayValue(PBVAL bap, PBVAL nvp, int n)
{
{
CheckType
(
bap
,
TYPE_JAR
);
CheckType
(
bap
,
TYPE_JAR
);
int
i
=
0
;
int
i
=
0
;
PBVAL
bvp
=
NULL
,
pvp
=
NULL
;
PBVAL
bvp
=
NULL
;
if
(
bap
->
To_Val
)
if
(
bap
->
To_Val
)
for
(
bvp
=
GetArray
(
bap
);
bvp
;
i
++
,
bvp
=
GetNext
(
bvp
))
for
(
bvp
=
GetArray
(
bap
);
bvp
;
i
++
,
bvp
=
GetNext
(
bvp
))
if
(
i
==
n
)
{
if
(
i
==
n
)
{
SetValueVal
(
bvp
,
nvp
);
SetValueVal
(
bvp
,
nvp
);
return
;
return
;
}
else
}
pvp
=
bvp
;
if
(
!
bvp
)
if
(
!
bvp
)
AddArrayValue
(
bap
,
MOF
(
nvp
));
AddArrayValue
(
bap
,
MOF
(
nvp
));
...
...
storage/connect/bson.h
View file @
40868c47
...
@@ -105,7 +105,7 @@ class BJSON : public BLOCK {
...
@@ -105,7 +105,7 @@ class BJSON : public BLOCK {
PSZ
GetArrayText
(
PGLOBAL
g
,
PBVAL
bap
,
PSTRG
text
);
PSZ
GetArrayText
(
PGLOBAL
g
,
PBVAL
bap
,
PSTRG
text
);
void
MergeArray
(
PBVAL
bap1
,
PBVAL
bap2
);
void
MergeArray
(
PBVAL
bap1
,
PBVAL
bap2
);
bool
DeleteValue
(
PBVAL
bap
,
int
n
);
bool
DeleteValue
(
PBVAL
bap
,
int
n
);
void
AddArrayValue
(
PBVAL
bap
,
OFFSET
nvp
=
NULL
,
int
*
x
=
NULL
);
void
AddArrayValue
(
PBVAL
bap
,
OFFSET
nvp
=
0
,
int
*
x
=
NULL
);
inline
void
AddArrayValue
(
PBVAL
bap
,
PBVAL
nvp
=
NULL
,
int
*
x
=
NULL
)
inline
void
AddArrayValue
(
PBVAL
bap
,
PBVAL
nvp
=
NULL
,
int
*
x
=
NULL
)
{
AddArrayValue
(
bap
,
MOF
(
nvp
),
x
);}
{
AddArrayValue
(
bap
,
MOF
(
nvp
),
x
);}
void
SetArrayValue
(
PBVAL
bap
,
PBVAL
nvp
,
int
n
);
void
SetArrayValue
(
PBVAL
bap
,
PBVAL
nvp
,
int
n
);
...
...
storage/connect/bsonudf.cpp
View file @
40868c47
...
@@ -30,6 +30,8 @@
...
@@ -30,6 +30,8 @@
int
IsArgJson
(
UDF_ARGS
*
args
,
uint
i
);
int
IsArgJson
(
UDF_ARGS
*
args
,
uint
i
);
void
SetChanged
(
PBSON
bsp
);
void
SetChanged
(
PBSON
bsp
);
static
PBSON
BbinAlloc
(
PGLOBAL
g
,
ulong
len
,
PBVAL
jsp
);
/* --------------------------------- JSON UDF ---------------------------------- */
/* --------------------------------- JSON UDF ---------------------------------- */
/*********************************************************************************/
/*********************************************************************************/
...
@@ -50,7 +52,7 @@ inline void JsonFreeMem(PGLOBAL g) {
...
@@ -50,7 +52,7 @@ inline void JsonFreeMem(PGLOBAL g) {
/*********************************************************************************/
/*********************************************************************************/
/* Allocate and initialize a BSON structure. */
/* Allocate and initialize a BSON structure. */
/*********************************************************************************/
/*********************************************************************************/
PBSON
BbinAlloc
(
PGLOBAL
g
,
ulong
len
,
PBVAL
jsp
)
static
PBSON
BbinAlloc
(
PGLOBAL
g
,
ulong
len
,
PBVAL
jsp
)
{
{
PBSON
bsp
=
(
PBSON
)
PlgDBSubAlloc
(
g
,
NULL
,
sizeof
(
BSON
));
PBSON
bsp
=
(
PBSON
)
PlgDBSubAlloc
(
g
,
NULL
,
sizeof
(
BSON
));
...
@@ -415,7 +417,7 @@ PSZ BJNX::MakeKey(UDF_ARGS *args, int i)
...
@@ -415,7 +417,7 @@ PSZ BJNX::MakeKey(UDF_ARGS *args, int i)
}
// endif *s
}
// endif *s
if
(
n
<
1
)
if
(
n
<
1
)
return
NewStr
(
"Key"
);
return
NewStr
(
(
PSZ
)
"Key"
);
if
(
!
b
)
{
if
(
!
b
)
{
p
=
(
PSZ
)
BsonSubAlloc
(
n
+
1
);
p
=
(
PSZ
)
BsonSubAlloc
(
n
+
1
);
...
@@ -429,7 +431,7 @@ PSZ BJNX::MakeKey(UDF_ARGS *args, int i)
...
@@ -429,7 +431,7 @@ PSZ BJNX::MakeKey(UDF_ARGS *args, int i)
return
NewStr
((
PSZ
)
s
);
return
NewStr
((
PSZ
)
s
);
}
// endif count
}
// endif count
return
NewStr
(
"Key"
);
return
NewStr
(
(
PSZ
)
"Key"
);
}
// end of MakeKey
}
// end of MakeKey
/*********************************************************************************/
/*********************************************************************************/
...
...
storage/connect/filamtxt.cpp
View file @
40868c47
...
@@ -1734,7 +1734,7 @@ bool BINFAM::OpenTableFile(PGLOBAL g) {
...
@@ -1734,7 +1734,7 @@ bool BINFAM::OpenTableFile(PGLOBAL g) {
/*********************************************************************/
/*********************************************************************/
return AllocateBuffer(g);
return AllocateBuffer(g);
} // end of OpenTableFile
} // end of OpenTableFile
#endif 0
#endif
//
0
/***********************************************************************/
/***********************************************************************/
/* Allocate the line buffer. For mode Delete a bigger buffer has to */
/* Allocate the line buffer. For mode Delete a bigger buffer has to */
...
...
storage/connect/jsonudf.cpp
View file @
40868c47
...
@@ -34,6 +34,8 @@ static char *bin_handle_item(UDF_INIT *initid, UDF_ARGS *args, char *result,
...
@@ -34,6 +34,8 @@ static char *bin_handle_item(UDF_INIT *initid, UDF_ARGS *args, char *result,
static
PJSON
JsonNew
(
PGLOBAL
g
,
JTYP
type
);
static
PJSON
JsonNew
(
PGLOBAL
g
,
JTYP
type
);
static
PJVAL
JvalNew
(
PGLOBAL
g
,
JTYP
type
,
void
*
vp
=
NULL
);
static
PJVAL
JvalNew
(
PGLOBAL
g
,
JTYP
type
,
void
*
vp
=
NULL
);
static
PJSNX
JsnxNew
(
PGLOBAL
g
,
PJSON
jsp
,
int
type
,
int
len
=
64
);
static
PJSNX
JsnxNew
(
PGLOBAL
g
,
PJSON
jsp
,
int
type
,
int
len
=
64
);
uint
GetJsonGroupSize
(
void
);
static
void
SetChanged
(
PBSON
bsp
);
uint
JsonGrpSize
=
10
;
uint
JsonGrpSize
=
10
;
...
@@ -1155,7 +1157,7 @@ PBSON JbinAlloc(PGLOBAL g, UDF_ARGS *args, ulong len, PJSON jsp)
...
@@ -1155,7 +1157,7 @@ PBSON JbinAlloc(PGLOBAL g, UDF_ARGS *args, ulong len, PJSON jsp)
/*********************************************************************************/
/*********************************************************************************/
/* Set the BSON chain as changed. */
/* Set the BSON chain as changed. */
/*********************************************************************************/
/*********************************************************************************/
void
SetChanged
(
PBSON
bsp
)
static
void
SetChanged
(
PBSON
bsp
)
{
{
if
(
bsp
->
Bsp
)
if
(
bsp
->
Bsp
)
SetChanged
(
bsp
->
Bsp
);
SetChanged
(
bsp
->
Bsp
);
...
...
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