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
a4e999ee
Commit
a4e999ee
authored
Nov 05, 2020
by
Olivier Bertrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to fix failing tests
parent
addb28f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
storage/connect/json.cpp
storage/connect/json.cpp
+16
-8
No files found.
storage/connect/json.cpp
View file @
a4e999ee
...
...
@@ -1053,7 +1053,7 @@ PSZ JOBJECT::GetText(PGLOBAL g, PSZ text)
return
text
;
if
(
!
text
)
{
text
=
(
char
*
)
PlugSubAlloc
(
g
,
NULL
,
512
);
// TODO: get size
text
=
(
PSZ
)
malloc
(
1024
);
// TODO: get size
text
[
0
]
=
0
;
n
=
1
;
}
else
...
...
@@ -1079,10 +1079,14 @@ PSZ JOBJECT::GetText(PGLOBAL g, PSZ text)
}
else
for
(
PJPR
jp
=
First
;
jp
;
jp
=
jp
->
Next
)
jp
->
Val
->
GetText
(
g
,
text
);
//if (n)
// PlugSubAlloc(g, NULL, strlen(text) + 1);
if
(
n
)
{
PSZ
txt
=
(
PSZ
)
PlugSubAlloc
(
g
,
NULL
,
strlen
(
text
));
strcpy
(
txt
,
text
+
1
);
// Remove leading blank
free
(
text
);
text
=
txt
;
}
// endif n
return
text
+
n
;
return
text
;
}
// end of GetText;
/***********************************************************************/
...
...
@@ -1290,7 +1294,7 @@ PSZ JARRAY::GetText(PGLOBAL g, PSZ text)
PJVAL
jp
;
if
(
!
text
)
{
text
=
(
char
*
)
PlugSubAlloc
(
g
,
NULL
,
512
);
text
=
(
char
*
)
malloc
(
1024
);
// Should be large enough
text
[
0
]
=
0
;
n
=
1
;
}
else
...
...
@@ -1299,10 +1303,14 @@ PSZ JARRAY::GetText(PGLOBAL g, PSZ text)
for
(
jp
=
First
;
jp
;
jp
=
jp
->
Next
)
jp
->
GetText
(
g
,
text
);
//if (n)
// PlugSubAlloc(g, NULL, strlen(text) + 1);
if
(
n
)
{
PSZ
txt
=
(
PSZ
)
PlugSubAlloc
(
g
,
NULL
,
strlen
(
text
));
strcpy
(
txt
,
text
+
1
);
// Remove leading blank
free
(
text
);
text
=
txt
;
}
// endif n
return
text
+
n
;
return
text
;
}
// end of GetText;
/***********************************************************************/
...
...
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