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
d4d71153
Commit
d4d71153
authored
Nov 15, 2021
by
Sergei Krivonos
Committed by
Sergei Krivonos
Nov 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Json_writer_object add integers
parent
8101af68
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
sql/my_json_writer.h
sql/my_json_writer.h
+14
-14
sql/opt_range.cc
sql/opt_range.cc
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+1
-1
No files found.
sql/my_json_writer.h
View file @
d4d71153
...
...
@@ -18,6 +18,9 @@
#include "my_base.h"
#if !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST)
#include <set>
#include <stack>
#include <string>
#include <vector>
#endif
...
...
@@ -30,6 +33,8 @@
#define VALIDITY_ASSERT(x) DBUG_ASSERT(x)
#endif
#include <type_traits>
class
Opt_trace_stmt
;
class
Opt_trace_context
;
class
Json_writer
;
...
...
@@ -440,17 +445,22 @@ class Json_writer_object : public Json_writer_struct
}
return
*
this
;
}
Json_writer_object
&
add
(
const
char
*
name
,
ulonglong
value
)
{
DBUG_ASSERT
(
!
closed
);
if
(
my_writer
)
{
add_member
(
name
);
context
.
add_ll
(
static_cast
<
longlong
>
(
value
)
);
my_writer
->
add_ull
(
value
);
}
return
*
this
;
}
Json_writer_object
&
add
(
const
char
*
name
,
longlong
value
)
template
<
class
IntT
,
typename
=
typename
::
std
::
enable_if
<
std
::
is_integral
<
IntT
>
::
value
>::
type
>
Json_writer_object
&
add
(
const
char
*
name
,
IntT
value
)
{
DBUG_ASSERT
(
!
closed
);
if
(
my_writer
)
...
...
@@ -460,6 +470,7 @@ class Json_writer_object : public Json_writer_struct
}
return
*
this
;
}
Json_writer_object
&
add
(
const
char
*
name
,
double
value
)
{
DBUG_ASSERT
(
!
closed
);
...
...
@@ -470,18 +481,7 @@ class Json_writer_object : public Json_writer_struct
}
return
*
this
;
}
#ifndef _WIN64
Json_writer_object
&
add
(
const
char
*
name
,
size_t
value
)
{
DBUG_ASSERT
(
!
closed
);
if
(
my_writer
)
{
add_member
(
name
);
context
.
add_ll
(
static_cast
<
longlong
>
(
value
));
}
return
*
this
;
}
#endif
Json_writer_object
&
add
(
const
char
*
name
,
const
char
*
value
)
{
DBUG_ASSERT
(
!
closed
);
...
...
sql/opt_range.cc
View file @
d4d71153
...
...
@@ -6908,7 +6908,7 @@ static bool ror_intersect_add(ROR_INTERSECT_INFO *info,
DBUG_PRINT
(
"info"
,
(
"info->total_cost= %g"
,
info
->
total_cost
));
}
else
trace_costs
->
add
(
"disk_sweep_cost"
,
static_cast
<
longlong
>
(
0
)
);
trace_costs
->
add
(
"disk_sweep_cost"
,
0
);
DBUG_PRINT
(
"info"
,
(
"New out_rows: %g"
,
info
->
out_rows
));
DBUG_PRINT
(
"info"
,
(
"New cost: %g, %scovering"
,
info
->
total_cost
,
...
...
sql/sql_select.cc
View file @
d4d71153
...
...
@@ -396,7 +396,7 @@ static void trace_table_dependencies(THD *thd,
{
if
(
map
&
(
1ULL
<<
j
))
{
trace_one_table
.
add
(
"map_bit"
,
static_cast
<
longlong
>
(
j
)
);
trace_one_table
.
add
(
"map_bit"
,
j
);
break
;
}
}
...
...
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