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
94ef277b
Commit
94ef277b
authored
Nov 09, 2021
by
Sergei Krivonos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-23766: fix by assert (Windows)
parent
04ad98b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
+13
-14
sql/my_json_writer.h
sql/my_json_writer.h
+10
-10
sql/opt_range.cc
sql/opt_range.cc
+3
-4
No files found.
sql/my_json_writer.h
View file @
94ef277b
...
...
@@ -24,7 +24,7 @@
#ifdef JSON_WRITER_UNIT_TEST
#include "sql_string.h"
// Also, mock objects are defined in my_json_writer-t.cc
#define VALIDITY_ASSERT(x) if (
(!
x)) this->invalid_json= true;
#define VALIDITY_ASSERT(x) if (
!(
x)) this->invalid_json= true;
#else
#include "sql_select.h"
#define VALIDITY_ASSERT(x) DBUG_ASSERT(x)
...
...
@@ -356,6 +356,9 @@ class Json_value_helper
/* A common base for Json_writer_object and Json_writer_array */
class
Json_writer_struct
{
Json_writer_struct
(
const
Json_writer_struct
&
)
=
delete
;
Json_writer_struct
&
operator
=
(
const
Json_writer_struct
&
)
=
delete
;
protected:
Json_writer
*
my_writer
;
Json_value_helper
context
;
...
...
@@ -394,18 +397,15 @@ class Json_writer_object : public Json_writer_struct
my_writer
->
add_member
(
name
);
}
public:
explicit
Json_writer_object
(
THD
*
thd
)
:
Json_writer_struct
(
thd
)
{
if
(
unlikely
(
my_writer
))
my_writer
->
start_object
();
}
explicit
Json_writer_object
(
THD
*
thd
,
const
char
*
str
)
explicit
Json_writer_object
(
THD
*
thd
,
const
char
*
str
=
nullptr
)
:
Json_writer_struct
(
thd
)
{
if
(
unlikely
(
my_writer
))
my_writer
->
add_member
(
str
).
start_object
();
{
if
(
str
)
my_writer
->
add_member
(
str
);
my_writer
->
start_object
();
}
}
~
Json_writer_object
()
...
...
sql/opt_range.cc
View file @
94ef277b
...
...
@@ -5101,9 +5101,8 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
n_child_scans
)))
DBUG_RETURN
(
NULL
);
Json_writer_object
trace_best_disjunct
=
named_trace
?
Json_writer_object
(
thd
,
"best_disjunct_quick"
)
:
Json_writer_object
(
thd
);
const
char
*
trace_best_disjunct_obj_name
=
named_trace
?
"best_disjunct_quick"
:
nullptr
;
Json_writer_object
trace_best_disjunct
(
thd
,
trace_best_disjunct_obj_name
);
Json_writer_array
to_merge
(
thd
,
"indexes_to_merge"
);
/*
Collect best 'range' scan for each of disjuncts, and, while doing so,
...
...
@@ -5649,7 +5648,7 @@ void print_keyparts(THD *thd, KEY *key, uint key_parts)
DBUG_ASSERT
(
thd
->
trace_started
());
KEY_PART_INFO
*
part
=
key
->
key_part
;
Json_writer_array
keyparts
=
Json_writer_array
(
thd
,
"keyparts"
);
Json_writer_array
keyparts
(
thd
,
"keyparts"
);
for
(
uint
i
=
0
;
i
<
key_parts
;
i
++
,
part
++
)
keyparts
.
add
(
part
->
field
->
field_name
);
}
...
...
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