mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-27655 Spider: remove #ifdef MARIADB_BASE_VERSION
This commit is contained in:
@@ -812,11 +812,7 @@ int spider_db_mbase_result::fetch_table_status(
|
|||||||
int error_num;
|
int error_num;
|
||||||
MYSQL_ROW mysql_row;
|
MYSQL_ROW mysql_row;
|
||||||
MYSQL_TIME mysql_time;
|
MYSQL_TIME mysql_time;
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
uint not_used_uint;
|
uint not_used_uint;
|
||||||
#else
|
|
||||||
my_bool not_used_my_bool;
|
|
||||||
#endif
|
|
||||||
#ifdef SPIDER_HAS_TIME_STATUS
|
#ifdef SPIDER_HAS_TIME_STATUS
|
||||||
MYSQL_TIME_STATUS time_status;
|
MYSQL_TIME_STATUS time_status;
|
||||||
#else
|
#else
|
||||||
@@ -894,13 +890,8 @@ int spider_db_mbase_result::fetch_table_status(
|
|||||||
#endif
|
#endif
|
||||||
SPIDER_str_to_datetime(mysql_row[11], strlen(mysql_row[11]),
|
SPIDER_str_to_datetime(mysql_row[11], strlen(mysql_row[11]),
|
||||||
&mysql_time, 0, &time_status);
|
&mysql_time, 0, &time_status);
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
stat.create_time = (time_t) my_system_gmt_sec(&mysql_time,
|
stat.create_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||||
¬_used_long, ¬_used_uint);
|
¬_used_long, ¬_used_uint);
|
||||||
#else
|
|
||||||
stat.create_time = (time_t) my_system_gmt_sec(&mysql_time,
|
|
||||||
¬_used_long, ¬_used_my_bool);
|
|
||||||
#endif
|
|
||||||
} else
|
} else
|
||||||
stat.create_time = (time_t) 0;
|
stat.create_time = (time_t) 0;
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
@@ -919,13 +910,8 @@ int spider_db_mbase_result::fetch_table_status(
|
|||||||
#endif
|
#endif
|
||||||
SPIDER_str_to_datetime(mysql_row[12], strlen(mysql_row[12]),
|
SPIDER_str_to_datetime(mysql_row[12], strlen(mysql_row[12]),
|
||||||
&mysql_time, 0, &time_status);
|
&mysql_time, 0, &time_status);
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
stat.update_time = (time_t) my_system_gmt_sec(&mysql_time,
|
stat.update_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||||
¬_used_long, ¬_used_uint);
|
¬_used_long, ¬_used_uint);
|
||||||
#else
|
|
||||||
stat.update_time = (time_t) my_system_gmt_sec(&mysql_time,
|
|
||||||
¬_used_long, ¬_used_my_bool);
|
|
||||||
#endif
|
|
||||||
} else
|
} else
|
||||||
stat.update_time = (time_t) 0;
|
stat.update_time = (time_t) 0;
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
@@ -944,13 +930,8 @@ int spider_db_mbase_result::fetch_table_status(
|
|||||||
#endif
|
#endif
|
||||||
SPIDER_str_to_datetime(mysql_row[13], strlen(mysql_row[13]),
|
SPIDER_str_to_datetime(mysql_row[13], strlen(mysql_row[13]),
|
||||||
&mysql_time, 0, &time_status);
|
&mysql_time, 0, &time_status);
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
stat.check_time = (time_t) my_system_gmt_sec(&mysql_time,
|
stat.check_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||||
¬_used_long, ¬_used_uint);
|
¬_used_long, ¬_used_uint);
|
||||||
#else
|
|
||||||
stat.check_time = (time_t) my_system_gmt_sec(&mysql_time,
|
|
||||||
¬_used_long, ¬_used_my_bool);
|
|
||||||
#endif
|
|
||||||
} else
|
} else
|
||||||
stat.check_time = (time_t) 0;
|
stat.check_time = (time_t) 0;
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
@@ -1023,13 +1004,8 @@ int spider_db_mbase_result::fetch_table_status(
|
|||||||
#endif
|
#endif
|
||||||
SPIDER_str_to_datetime(mysql_row[6], strlen(mysql_row[6]),
|
SPIDER_str_to_datetime(mysql_row[6], strlen(mysql_row[6]),
|
||||||
&mysql_time, 0, &time_status);
|
&mysql_time, 0, &time_status);
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
stat.create_time = (time_t) my_system_gmt_sec(&mysql_time,
|
stat.create_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||||
¬_used_long, ¬_used_uint);
|
¬_used_long, ¬_used_uint);
|
||||||
#else
|
|
||||||
stat.create_time = (time_t) my_system_gmt_sec(&mysql_time,
|
|
||||||
¬_used_long, ¬_used_my_bool);
|
|
||||||
#endif
|
|
||||||
} else
|
} else
|
||||||
stat.create_time = (time_t) 0;
|
stat.create_time = (time_t) 0;
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
@@ -1048,13 +1024,8 @@ int spider_db_mbase_result::fetch_table_status(
|
|||||||
#endif
|
#endif
|
||||||
SPIDER_str_to_datetime(mysql_row[7], strlen(mysql_row[7]),
|
SPIDER_str_to_datetime(mysql_row[7], strlen(mysql_row[7]),
|
||||||
&mysql_time, 0, &time_status);
|
&mysql_time, 0, &time_status);
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
stat.update_time = (time_t) my_system_gmt_sec(&mysql_time,
|
stat.update_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||||
¬_used_long, ¬_used_uint);
|
¬_used_long, ¬_used_uint);
|
||||||
#else
|
|
||||||
stat.update_time = (time_t) my_system_gmt_sec(&mysql_time,
|
|
||||||
¬_used_long, ¬_used_my_bool);
|
|
||||||
#endif
|
|
||||||
} else
|
} else
|
||||||
stat.update_time = (time_t) 0;
|
stat.update_time = (time_t) 0;
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
@@ -1073,13 +1044,8 @@ int spider_db_mbase_result::fetch_table_status(
|
|||||||
#endif
|
#endif
|
||||||
SPIDER_str_to_datetime(mysql_row[8], strlen(mysql_row[8]),
|
SPIDER_str_to_datetime(mysql_row[8], strlen(mysql_row[8]),
|
||||||
&mysql_time, 0, &time_status);
|
&mysql_time, 0, &time_status);
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
stat.check_time = (time_t) my_system_gmt_sec(&mysql_time,
|
stat.check_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||||
¬_used_long, ¬_used_uint);
|
¬_used_long, ¬_used_uint);
|
||||||
#else
|
|
||||||
stat.check_time = (time_t) my_system_gmt_sec(&mysql_time,
|
|
||||||
¬_used_long, ¬_used_my_bool);
|
|
||||||
#endif
|
|
||||||
} else
|
} else
|
||||||
stat.check_time = (time_t) 0;
|
stat.check_time = (time_t) 0;
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
@@ -6556,11 +6522,7 @@ int spider_db_mbase_util::open_item_func(
|
|||||||
last_str = SPIDER_SQL_CLOSE_PAREN_STR;
|
last_str = SPIDER_SQL_CLOSE_PAREN_STR;
|
||||||
last_str_length = SPIDER_SQL_CLOSE_PAREN_LEN;
|
last_str_length = SPIDER_SQL_CLOSE_PAREN_LEN;
|
||||||
break;
|
break;
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
case Item_func::XOR_FUNC:
|
case Item_func::XOR_FUNC:
|
||||||
#else
|
|
||||||
case Item_func::COND_XOR_FUNC:
|
|
||||||
#endif
|
|
||||||
if (str)
|
if (str)
|
||||||
str->length(str->length() - SPIDER_SQL_OPEN_PAREN_LEN);
|
str->length(str->length() - SPIDER_SQL_OPEN_PAREN_LEN);
|
||||||
DBUG_RETURN(
|
DBUG_RETURN(
|
||||||
|
@@ -4037,11 +4037,7 @@ int spider_db_oracle_util::open_item_func(
|
|||||||
last_str = SPIDER_SQL_CLOSE_PAREN_STR;
|
last_str = SPIDER_SQL_CLOSE_PAREN_STR;
|
||||||
last_str_length = SPIDER_SQL_CLOSE_PAREN_LEN;
|
last_str_length = SPIDER_SQL_CLOSE_PAREN_LEN;
|
||||||
break;
|
break;
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
case Item_func::XOR_FUNC:
|
case Item_func::XOR_FUNC:
|
||||||
#else
|
|
||||||
case Item_func::COND_XOR_FUNC:
|
|
||||||
#endif
|
|
||||||
if (str)
|
if (str)
|
||||||
str->length(str->length() - SPIDER_SQL_OPEN_PAREN_LEN);
|
str->length(str->length() - SPIDER_SQL_OPEN_PAREN_LEN);
|
||||||
DBUG_RETURN(
|
DBUG_RETURN(
|
||||||
|
@@ -160,7 +160,6 @@ struct st_mysql_plugin spider_i_s_alloc_mem =
|
|||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
struct st_maria_plugin spider_i_s_alloc_mem_maria =
|
struct st_maria_plugin spider_i_s_alloc_mem_maria =
|
||||||
{
|
{
|
||||||
MYSQL_INFORMATION_SCHEMA_PLUGIN,
|
MYSQL_INFORMATION_SCHEMA_PLUGIN,
|
||||||
@@ -177,7 +176,6 @@ struct st_maria_plugin spider_i_s_alloc_mem_maria =
|
|||||||
"1.0",
|
"1.0",
|
||||||
MariaDB_PLUGIN_MATURITY_STABLE,
|
MariaDB_PLUGIN_MATURITY_STABLE,
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
extern SPIDER_DBTON spider_dbton[SPIDER_DBTON_SIZE];
|
extern SPIDER_DBTON spider_dbton[SPIDER_DBTON_SIZE];
|
||||||
|
|
||||||
@@ -282,7 +280,6 @@ struct st_mysql_plugin spider_i_s_wrapper_protocols =
|
|||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
struct st_maria_plugin spider_i_s_wrapper_protocols_maria =
|
struct st_maria_plugin spider_i_s_wrapper_protocols_maria =
|
||||||
{
|
{
|
||||||
MYSQL_INFORMATION_SCHEMA_PLUGIN,
|
MYSQL_INFORMATION_SCHEMA_PLUGIN,
|
||||||
@@ -299,4 +296,3 @@ struct st_maria_plugin spider_i_s_wrapper_protocols_maria =
|
|||||||
"1.0",
|
"1.0",
|
||||||
MariaDB_PLUGIN_MATURITY_STABLE,
|
MariaDB_PLUGIN_MATURITY_STABLE,
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
@@ -102,11 +102,7 @@
|
|||||||
#define SPIDER_HAS_MY_CHARLEN
|
#define SPIDER_HAS_MY_CHARLEN
|
||||||
#define SPIDER_open_temporary_table
|
#define SPIDER_open_temporary_table
|
||||||
|
|
||||||
#if defined(MARIADB_BASE_VERSION)
|
|
||||||
#define SPIDER_generate_partition_syntax(A,B,C,D,E,F,G,H) generate_partition_syntax(A,B,C,E,F,G)
|
#define SPIDER_generate_partition_syntax(A,B,C,D,E,F,G,H) generate_partition_syntax(A,B,C,E,F,G)
|
||||||
#else
|
|
||||||
#define SPIDER_generate_partition_syntax(A,B,C,D,E,F,G,H)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SPIDER_create_partition_name(A,B,C,D,E,F) create_partition_name(A,B,C,D,E,F)
|
#define SPIDER_create_partition_name(A,B,C,D,E,F) create_partition_name(A,B,C,D,E,F)
|
||||||
#define SPIDER_create_subpartition_name(A,B,C,D,E,F) create_subpartition_name(A,B,C,D,E,F)
|
#define SPIDER_create_subpartition_name(A,B,C,D,E,F) create_subpartition_name(A,B,C,D,E,F)
|
||||||
|
@@ -31,10 +31,8 @@
|
|||||||
|
|
||||||
extern struct st_mysql_plugin spider_i_s_alloc_mem;
|
extern struct st_mysql_plugin spider_i_s_alloc_mem;
|
||||||
extern struct st_mysql_plugin spider_i_s_wrapper_protocols;
|
extern struct st_mysql_plugin spider_i_s_wrapper_protocols;
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
extern struct st_maria_plugin spider_i_s_alloc_mem_maria;
|
extern struct st_maria_plugin spider_i_s_alloc_mem_maria;
|
||||||
extern struct st_maria_plugin spider_i_s_wrapper_protocols_maria;
|
extern struct st_maria_plugin spider_i_s_wrapper_protocols_maria;
|
||||||
#endif
|
|
||||||
|
|
||||||
extern volatile ulonglong spider_mon_table_cache_version;
|
extern volatile ulonglong spider_mon_table_cache_version;
|
||||||
extern volatile ulonglong spider_mon_table_cache_version_req;
|
extern volatile ulonglong spider_mon_table_cache_version_req;
|
||||||
@@ -3247,7 +3245,6 @@ spider_i_s_alloc_mem,
|
|||||||
spider_i_s_wrapper_protocols
|
spider_i_s_wrapper_protocols
|
||||||
mysql_declare_plugin_end;
|
mysql_declare_plugin_end;
|
||||||
|
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
maria_declare_plugin(spider)
|
maria_declare_plugin(spider)
|
||||||
{
|
{
|
||||||
MYSQL_STORAGE_ENGINE_PLUGIN,
|
MYSQL_STORAGE_ENGINE_PLUGIN,
|
||||||
@@ -3267,4 +3264,3 @@ maria_declare_plugin(spider)
|
|||||||
spider_i_s_alloc_mem_maria,
|
spider_i_s_alloc_mem_maria,
|
||||||
spider_i_s_wrapper_protocols_maria
|
spider_i_s_wrapper_protocols_maria
|
||||||
maria_declare_plugin_end;
|
maria_declare_plugin_end;
|
||||||
#endif
|
|
||||||
|
@@ -2733,11 +2733,7 @@ void spider_get_sys_table_sts_info(
|
|||||||
ha_statistics *stat
|
ha_statistics *stat
|
||||||
) {
|
) {
|
||||||
MYSQL_TIME mysql_time;
|
MYSQL_TIME mysql_time;
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
uint not_used_uint;
|
uint not_used_uint;
|
||||||
#else
|
|
||||||
my_bool not_used_my_bool;
|
|
||||||
#endif
|
|
||||||
long not_used_long;
|
long not_used_long;
|
||||||
DBUG_ENTER("spider_get_sys_table_sts_info");
|
DBUG_ENTER("spider_get_sys_table_sts_info");
|
||||||
stat->data_file_length = (ulonglong) table->
|
stat->data_file_length = (ulonglong) table->
|
||||||
@@ -2752,31 +2748,16 @@ void spider_get_sys_table_sts_info(
|
|||||||
field[SPIDER_TABLE_STS_MEAN_REC_LENGTH_POS]->val_int();
|
field[SPIDER_TABLE_STS_MEAN_REC_LENGTH_POS]->val_int();
|
||||||
table->field[SPIDER_TABLE_STS_CHECK_TIME_POS]->get_date(&mysql_time,
|
table->field[SPIDER_TABLE_STS_CHECK_TIME_POS]->get_date(&mysql_time,
|
||||||
SPIDER_date_mode_t(0));
|
SPIDER_date_mode_t(0));
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
stat->check_time = (time_t) my_system_gmt_sec(&mysql_time,
|
stat->check_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||||
¬_used_long, ¬_used_uint);
|
¬_used_long, ¬_used_uint);
|
||||||
#else
|
|
||||||
stat->check_time = (time_t) my_system_gmt_sec(&mysql_time,
|
|
||||||
¬_used_long, ¬_used_my_bool);
|
|
||||||
#endif
|
|
||||||
table->field[SPIDER_TABLE_STS_CREATE_TIME_POS]->get_date(&mysql_time,
|
table->field[SPIDER_TABLE_STS_CREATE_TIME_POS]->get_date(&mysql_time,
|
||||||
SPIDER_date_mode_t(0));
|
SPIDER_date_mode_t(0));
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
stat->create_time = (time_t) my_system_gmt_sec(&mysql_time,
|
stat->create_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||||
¬_used_long, ¬_used_uint);
|
¬_used_long, ¬_used_uint);
|
||||||
#else
|
|
||||||
stat->create_time = (time_t) my_system_gmt_sec(&mysql_time,
|
|
||||||
¬_used_long, ¬_used_my_bool);
|
|
||||||
#endif
|
|
||||||
table->field[SPIDER_TABLE_STS_UPDATE_TIME_POS]->get_date(&mysql_time,
|
table->field[SPIDER_TABLE_STS_UPDATE_TIME_POS]->get_date(&mysql_time,
|
||||||
SPIDER_date_mode_t(0));
|
SPIDER_date_mode_t(0));
|
||||||
#ifdef MARIADB_BASE_VERSION
|
|
||||||
stat->update_time = (time_t) my_system_gmt_sec(&mysql_time,
|
stat->update_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||||
¬_used_long, ¬_used_uint);
|
¬_used_long, ¬_used_uint);
|
||||||
#else
|
|
||||||
stat->update_time = (time_t) my_system_gmt_sec(&mysql_time,
|
|
||||||
¬_used_long, ¬_used_my_bool);
|
|
||||||
#endif
|
|
||||||
if (table->field[SPIDER_TABLE_STS_CHECKSUM_POS]->is_null())
|
if (table->field[SPIDER_TABLE_STS_CHECKSUM_POS]->is_null())
|
||||||
{
|
{
|
||||||
stat->checksum_null = TRUE;
|
stat->checksum_null = TRUE;
|
||||||
|
Reference in New Issue
Block a user