summaryrefslogtreecommitdiff
path: root/sql/my_json_writer.cc
diff options
context:
space:
mode:
authorSergei Krivonos <sergeikrivonos@gmail.com>2021-11-30 18:11:14 -0700
committerSergei Krivonos <sergeikrivonos@gmail.com>2021-12-04 22:25:46 -0500
commit2d21917e7db2db0900671aac2e29f49e4ff2acd7 (patch)
treebe7af81e8db1448100f9a4c7cb4510e2ba4cc421 /sql/my_json_writer.cc
parent9feaa6be07f8eb91736e51830f754bc99f939a51 (diff)
downloadmariadb-git-2d21917e7db2db0900671aac2e29f49e4ff2acd7.tar.gz
MDEV-27036: re-enable my_json_writer-t unit test
Diffstat (limited to 'sql/my_json_writer.cc')
-rw-r--r--sql/my_json_writer.cc22
1 files changed, 21 insertions, 1 deletions
diff --git a/sql/my_json_writer.cc b/sql/my_json_writer.cc
index 8284c9bbfca..8bc582c50a8 100644
--- a/sql/my_json_writer.cc
+++ b/sql/my_json_writer.cc
@@ -13,10 +13,14 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
+#include "my_json_writer.h"
+
+#include "sql_class.h"
#include "mariadb.h"
#include "sql_priv.h"
#include "sql_string.h"
-#include "my_json_writer.h"
+#include "log.h"
+
#if !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST)
#include <iostream>
@@ -328,6 +332,7 @@ Json_writer_temp_disable::Json_writer_temp_disable(THD *thd_arg)
thd= thd_arg;
thd->opt_trace.disable_tracing_if_required();
}
+
Json_writer_temp_disable::~Json_writer_temp_disable()
{
thd->opt_trace.enable_tracing_if_required();
@@ -497,3 +502,18 @@ void Single_line_formatting_helper::disable_and_flush()
state= INACTIVE;
}
+
+Json_writer_struct::Json_writer_struct(THD *thd)
+ : Json_writer_struct(thd->opt_trace.get_current_json())
+{
+}
+
+Json_writer_object::Json_writer_object(THD *thd, const char *str)
+ : Json_writer_object(thd->opt_trace.get_current_json(), str)
+{
+}
+
+Json_writer_array::Json_writer_array(THD *thd, const char *str)
+ : Json_writer_array(thd->opt_trace.get_current_json(), str)
+{
+}