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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
aa107ef3
Commit
aa107ef3
authored
Feb 25, 2015
by
Olivier Bertrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- FIX assert failure when sorting JSON tables
modified: storage/connect/tabjson.cpp storage/connect/tabjson.h
parent
e027f5e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
storage/connect/tabjson.cpp
storage/connect/tabjson.cpp
+4
-4
storage/connect/tabjson.h
storage/connect/tabjson.h
+4
-1
No files found.
storage/connect/tabjson.cpp
View file @
aa107ef3
...
...
@@ -117,7 +117,8 @@ TDBJSN::TDBJSN(PJDEF tdp, PTXF txfp) : TDBDOS(tdp, txfp)
Jmode
=
tdp
->
Jmode
;
Xcol
=
tdp
->
Xcol
;
Fpos
=
-
1
;
Spos
=
N
=
0
;
//Spos = 0;
N
=
0
;
Limit
=
tdp
->
Limit
;
NextSame
=
0
;
SameRow
=
0
;
...
...
@@ -134,7 +135,7 @@ TDBJSN::TDBJSN(TDBJSN *tdbp) : TDBDOS(NULL, tdbp)
Jmode
=
tdbp
->
Jmode
;
Xcol
=
tdbp
->
Xcol
;
Fpos
=
tdbp
->
Fpos
;
Spos
=
tdbp
->
Spos
;
//
Spos = tdbp->Spos;
N
=
tdbp
->
N
;
Limit
=
tdbp
->
Limit
;
NextSame
=
tdbp
->
NextSame
;
...
...
@@ -222,7 +223,7 @@ bool TDBJSN::OpenDB(PGLOBAL g)
/* Table already open replace it at its beginning. */
/*******************************************************************/
Fpos
=
-
1
;
Spos
=
0
;
//
Spos = 0;
NextSame
=
0
;
SameRow
=
0
;
}
else
{
...
...
@@ -1299,7 +1300,6 @@ bool TDBJSON::OpenDB(PGLOBAL g)
/* Table already open replace it at its beginning. */
/*******************************************************************/
Fpos
=
-
1
;
Spos
=
0
;
NextSame
=
false
;
SameRow
=
0
;
return
false
;
...
...
storage/connect/tabjson.h
View file @
aa107ef3
...
...
@@ -94,7 +94,7 @@ class TDBJSN : public TDBDOS {
JMODE
Jmode
;
// MODE_OBJECT by default
char
*
Xcol
;
// Name of expandable column
int
Fpos
;
// The current row index
int
Spos
;
// DELETE start index
//
int Spos; // DELETE start index
int
N
;
// The current Rownum
int
Limit
;
// Limit of multiple values
int
Pretty
;
// Depends on file structure
...
...
@@ -175,6 +175,9 @@ class TDBJSON : public TDBJSN {
virtual
int
GetMaxSize
(
PGLOBAL
g
);
virtual
void
ResetSize
(
void
);
virtual
int
GetRecpos
(
void
)
{
return
Fpos
;}
virtual
int
GetProgCur
(
void
)
{
return
N
;}
virtual
bool
SetRecpos
(
PGLOBAL
g
,
int
recpos
)
{
Fpos
=
recpos
-
1
;
return
false
;}
virtual
bool
OpenDB
(
PGLOBAL
g
);
virtual
int
ReadDB
(
PGLOBAL
g
);
virtual
bool
PrepareWriting
(
PGLOBAL
g
)
{
return
false
;}
...
...
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