From 0d586d62e5326053383eb2774b32ff20bbe2f4d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Sun, 20 Nov 2022 11:31:57 +0200 Subject: [PATCH 1/2] MDEV-29613 fixup: Fix Spider --- storage/spider/spd_conn.cc | 8 ++++---- storage/spider/spd_db_mysql.cc | 14 +++++++------- storage/spider/spd_table.cc | 2 +- storage/spider/spd_table.h | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/storage/spider/spd_conn.cc b/storage/spider/spd_conn.cc index 1e973493ba8..cef4ba04eb1 100644 --- a/storage/spider/spd_conn.cc +++ b/storage/spider/spd_conn.cc @@ -128,7 +128,7 @@ uchar *spider_conn_get_key( DBUG_ENTER("spider_conn_get_key"); *length = conn->conn_key_length; DBUG_PRINT("info",("spider conn_kind=%u", conn->conn_kind)); -#ifndef DBUG_OFF +#ifdef DBUG_TRACE spider_print_keys(conn->conn_key, conn->conn_key_length); #endif DBUG_RETURN((uchar*) conn->conn_key); @@ -829,19 +829,19 @@ SPIDER_CONN *spider_get_conn( if (conn_kind == SPIDER_CONN_KIND_MYSQL) { #endif -#ifndef DBUG_OFF +#ifdef DBUG_TRACE spider_print_keys(conn_key, share->conn_keys_lengths[link_idx]); #endif #if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) } else if (conn_kind == SPIDER_CONN_KIND_HS_READ) { conn_key = share->hs_read_conn_keys[link_idx]; -#ifndef DBUG_OFF +#ifdef DBUG_TRACE spider_print_keys(conn_key, share->hs_read_conn_keys_lengths[link_idx]); #endif } else { conn_key = share->hs_write_conn_keys[link_idx]; -#ifndef DBUG_OFF +#ifdef DBUG_TRACE spider_print_keys(conn_key, share->hs_write_conn_keys_lengths[link_idx]); #endif } diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc index 4f587c8b6ac..1710286dcb8 100644 --- a/storage/spider/spd_db_mysql.cc +++ b/storage/spider/spd_db_mysql.cc @@ -902,7 +902,7 @@ int spider_db_mbase_result::fetch_table_status( #endif } else stat.create_time = (time_t) 0; -#ifndef DBUG_OFF +#ifdef DBUG_TRACE { struct tm *ts, tmp_ts; char buf[80]; @@ -952,7 +952,7 @@ int spider_db_mbase_result::fetch_table_status( #endif } else stat.check_time = (time_t) 0; -#ifndef DBUG_OFF +#ifdef DBUG_TRACE { struct tm *ts, tmp_ts; char buf[80]; @@ -1031,7 +1031,7 @@ int spider_db_mbase_result::fetch_table_status( #endif } else stat.create_time = (time_t) 0; -#ifndef DBUG_OFF +#ifdef DBUG_TRACE { struct tm *ts, tmp_ts; char buf[80]; @@ -1056,7 +1056,7 @@ int spider_db_mbase_result::fetch_table_status( #endif } else stat.update_time = (time_t) 0; -#ifndef DBUG_OFF +#ifdef DBUG_TRACE { struct tm *ts, tmp_ts; char buf[80]; @@ -1081,7 +1081,7 @@ int spider_db_mbase_result::fetch_table_status( #endif } else stat.check_time = (time_t) 0; -#ifndef DBUG_OFF +#ifdef DBUG_TRACE { struct tm *ts, tmp_ts; char buf[80]; @@ -4065,7 +4065,7 @@ int spider_db_mariadb_util::append_column_value(ha_spider *spider, ptr = tmp_str.get_str(); } else if (field->type() == MYSQL_TYPE_GEOMETRY) { -#ifndef DBUG_OFF +#ifdef DBUG_TRACE double xmin, xmax, ymin, ymax; float8get(xmin, new_ptr); float8get(xmax, new_ptr + 8); @@ -4222,7 +4222,7 @@ int spider_db_mysql_util::append_column_value( } tmp_str.length(SIZEOF_STORED_DOUBLE * lcnt); */ -#ifndef DBUG_OFF +#ifdef DBUG_TRACE double xmin, xmax, ymin, ymax; /* float8store(buf,xmin); diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index 7a00061e3a2..a6d2768703d 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -3986,7 +3986,7 @@ int spider_set_connect_info_default_dbtable( )); } -#ifndef DBUG_OFF +#ifdef DBUG_TRACE void spider_print_keys( const char *key, uint length diff --git a/storage/spider/spd_table.h b/storage/spider/spd_table.h index 063f459ae8d..be3d526e4a2 100644 --- a/storage/spider/spd_table.h +++ b/storage/spider/spd_table.h @@ -439,7 +439,7 @@ int spider_set_connect_info_default_dbtable( int dbtable_name_length ); -#ifndef DBUG_OFF +#ifdef DBUG_TRACE void spider_print_keys( const char *key, uint length From c9ccd978eb2ad136882e8990312991e5c99f18ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Sun, 20 Nov 2022 11:33:47 +0200 Subject: [PATCH 2/2] Fix clang -Winconsistent-missing-override --- storage/spider/spd_db_mysql.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/spider/spd_db_mysql.h b/storage/spider/spd_db_mysql.h index 4d3706ae3af..e90461ea278 100644 --- a/storage/spider/spd_db_mysql.h +++ b/storage/spider/spd_db_mysql.h @@ -195,7 +195,7 @@ public: spider_string *str ) override; #endif - bool append_charset_name_before_string(); + bool append_charset_name_before_string() override; }; class spider_db_mysql_util: public spider_db_mbase_util