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
addb28f6
Commit
addb28f6
authored
Nov 05, 2020
by
Olivier Bertrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to fix failing tests
parent
ecb00f3c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
storage/connect/json.cpp
storage/connect/json.cpp
+8
-9
No files found.
storage/connect/json.cpp
View file @
addb28f6
...
@@ -1053,7 +1053,7 @@ PSZ JOBJECT::GetText(PGLOBAL g, PSZ text)
...
@@ -1053,7 +1053,7 @@ PSZ JOBJECT::GetText(PGLOBAL g, PSZ text)
return
text
;
return
text
;
if
(
!
text
)
{
if
(
!
text
)
{
text
=
(
char
*
)
PlugSubAlloc
(
g
,
NULL
,
0
);
text
=
(
char
*
)
PlugSubAlloc
(
g
,
NULL
,
512
);
// TODO: get size
text
[
0
]
=
0
;
text
[
0
]
=
0
;
n
=
1
;
n
=
1
;
}
else
}
else
...
@@ -1079,8 +1079,8 @@ PSZ JOBJECT::GetText(PGLOBAL g, PSZ text)
...
@@ -1079,8 +1079,8 @@ PSZ JOBJECT::GetText(PGLOBAL g, PSZ text)
}
else
for
(
PJPR
jp
=
First
;
jp
;
jp
=
jp
->
Next
)
}
else
for
(
PJPR
jp
=
First
;
jp
;
jp
=
jp
->
Next
)
jp
->
Val
->
GetText
(
g
,
text
);
jp
->
Val
->
GetText
(
g
,
text
);
if
(
n
)
//
if (n)
PlugSubAlloc
(
g
,
NULL
,
strlen
(
text
)
+
1
);
//
PlugSubAlloc(g, NULL, strlen(text) + 1);
return
text
+
n
;
return
text
+
n
;
}
// end of GetText;
}
// end of GetText;
...
@@ -1290,7 +1290,7 @@ PSZ JARRAY::GetText(PGLOBAL g, PSZ text)
...
@@ -1290,7 +1290,7 @@ PSZ JARRAY::GetText(PGLOBAL g, PSZ text)
PJVAL
jp
;
PJVAL
jp
;
if
(
!
text
)
{
if
(
!
text
)
{
text
=
(
char
*
)
PlugSubAlloc
(
g
,
NULL
,
0
);
text
=
(
char
*
)
PlugSubAlloc
(
g
,
NULL
,
512
);
text
[
0
]
=
0
;
text
[
0
]
=
0
;
n
=
1
;
n
=
1
;
}
else
}
else
...
@@ -1299,8 +1299,8 @@ PSZ JARRAY::GetText(PGLOBAL g, PSZ text)
...
@@ -1299,8 +1299,8 @@ PSZ JARRAY::GetText(PGLOBAL g, PSZ text)
for
(
jp
=
First
;
jp
;
jp
=
jp
->
Next
)
for
(
jp
=
First
;
jp
;
jp
=
jp
->
Next
)
jp
->
GetText
(
g
,
text
);
jp
->
GetText
(
g
,
text
);
if
(
n
)
//
if (n)
PlugSubAlloc
(
g
,
NULL
,
strlen
(
text
)
+
1
);
//
PlugSubAlloc(g, NULL, strlen(text) + 1);
return
text
+
n
;
return
text
+
n
;
}
// end of GetText;
}
// end of GetText;
...
@@ -1536,8 +1536,7 @@ PSZ JVALUE::GetString(PGLOBAL g)
...
@@ -1536,8 +1536,7 @@ PSZ JVALUE::GetString(PGLOBAL g)
p
=
(
char
*
)
PlugDup
(
g
,
(
Val
->
B
)
?
"true"
:
"false"
);
p
=
(
char
*
)
PlugDup
(
g
,
(
Val
->
B
)
?
"true"
:
"false"
);
break
;
break
;
case
TYPE_NULL
:
case
TYPE_NULL
:
p
=
(
char
*
)
PlugDup
(
g
,
"null"
)
p
=
(
char
*
)
PlugDup
(
g
,
"null"
);
;
break
;
break
;
default:
default:
p
=
NULL
;
p
=
NULL
;
...
@@ -1546,7 +1545,7 @@ PSZ JVALUE::GetString(PGLOBAL g)
...
@@ -1546,7 +1545,7 @@ PSZ JVALUE::GetString(PGLOBAL g)
}
else
}
else
p
=
NULL
;
p
=
NULL
;
return
(
p
==
buf
)
?
(
char
*
)
PlugDup
(
g
,
buf
)
:
p
;
return
(
p
==
buf
)
?
(
char
*
)
PlugDup
(
g
,
buf
)
:
p
;
}
// end of GetString
}
// end of GetString
/***********************************************************************/
/***********************************************************************/
...
...
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