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;
|
||||
MYSQL_ROW mysql_row;
|
||||
MYSQL_TIME mysql_time;
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
uint not_used_uint;
|
||||
#else
|
||||
my_bool not_used_my_bool;
|
||||
#endif
|
||||
#ifdef SPIDER_HAS_TIME_STATUS
|
||||
MYSQL_TIME_STATUS time_status;
|
||||
#else
|
||||
@@ -894,13 +890,8 @@ int spider_db_mbase_result::fetch_table_status(
|
||||
#endif
|
||||
SPIDER_str_to_datetime(mysql_row[11], strlen(mysql_row[11]),
|
||||
&mysql_time, 0, &time_status);
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
stat.create_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_uint);
|
||||
#else
|
||||
stat.create_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_my_bool);
|
||||
#endif
|
||||
} else
|
||||
stat.create_time = (time_t) 0;
|
||||
#ifndef DBUG_OFF
|
||||
@@ -919,13 +910,8 @@ int spider_db_mbase_result::fetch_table_status(
|
||||
#endif
|
||||
SPIDER_str_to_datetime(mysql_row[12], strlen(mysql_row[12]),
|
||||
&mysql_time, 0, &time_status);
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
stat.update_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_uint);
|
||||
#else
|
||||
stat.update_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_my_bool);
|
||||
#endif
|
||||
} else
|
||||
stat.update_time = (time_t) 0;
|
||||
#ifndef DBUG_OFF
|
||||
@@ -944,13 +930,8 @@ int spider_db_mbase_result::fetch_table_status(
|
||||
#endif
|
||||
SPIDER_str_to_datetime(mysql_row[13], strlen(mysql_row[13]),
|
||||
&mysql_time, 0, &time_status);
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
stat.check_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_uint);
|
||||
#else
|
||||
stat.check_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_my_bool);
|
||||
#endif
|
||||
} else
|
||||
stat.check_time = (time_t) 0;
|
||||
#ifndef DBUG_OFF
|
||||
@@ -1023,13 +1004,8 @@ int spider_db_mbase_result::fetch_table_status(
|
||||
#endif
|
||||
SPIDER_str_to_datetime(mysql_row[6], strlen(mysql_row[6]),
|
||||
&mysql_time, 0, &time_status);
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
stat.create_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_uint);
|
||||
#else
|
||||
stat.create_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_my_bool);
|
||||
#endif
|
||||
} else
|
||||
stat.create_time = (time_t) 0;
|
||||
#ifndef DBUG_OFF
|
||||
@@ -1048,13 +1024,8 @@ int spider_db_mbase_result::fetch_table_status(
|
||||
#endif
|
||||
SPIDER_str_to_datetime(mysql_row[7], strlen(mysql_row[7]),
|
||||
&mysql_time, 0, &time_status);
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
stat.update_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_uint);
|
||||
#else
|
||||
stat.update_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_my_bool);
|
||||
#endif
|
||||
} else
|
||||
stat.update_time = (time_t) 0;
|
||||
#ifndef DBUG_OFF
|
||||
@@ -1073,13 +1044,8 @@ int spider_db_mbase_result::fetch_table_status(
|
||||
#endif
|
||||
SPIDER_str_to_datetime(mysql_row[8], strlen(mysql_row[8]),
|
||||
&mysql_time, 0, &time_status);
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
stat.check_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_uint);
|
||||
#else
|
||||
stat.check_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_my_bool);
|
||||
#endif
|
||||
} else
|
||||
stat.check_time = (time_t) 0;
|
||||
#ifndef DBUG_OFF
|
||||
@@ -6556,11 +6522,7 @@ int spider_db_mbase_util::open_item_func(
|
||||
last_str = SPIDER_SQL_CLOSE_PAREN_STR;
|
||||
last_str_length = SPIDER_SQL_CLOSE_PAREN_LEN;
|
||||
break;
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
case Item_func::XOR_FUNC:
|
||||
#else
|
||||
case Item_func::COND_XOR_FUNC:
|
||||
#endif
|
||||
if (str)
|
||||
str->length(str->length() - SPIDER_SQL_OPEN_PAREN_LEN);
|
||||
DBUG_RETURN(
|
||||
|
@@ -4037,11 +4037,7 @@ int spider_db_oracle_util::open_item_func(
|
||||
last_str = SPIDER_SQL_CLOSE_PAREN_STR;
|
||||
last_str_length = SPIDER_SQL_CLOSE_PAREN_LEN;
|
||||
break;
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
case Item_func::XOR_FUNC:
|
||||
#else
|
||||
case Item_func::COND_XOR_FUNC:
|
||||
#endif
|
||||
if (str)
|
||||
str->length(str->length() - SPIDER_SQL_OPEN_PAREN_LEN);
|
||||
DBUG_RETURN(
|
||||
|
@@ -160,7 +160,6 @@ struct st_mysql_plugin spider_i_s_alloc_mem =
|
||||
0,
|
||||
};
|
||||
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
struct st_maria_plugin spider_i_s_alloc_mem_maria =
|
||||
{
|
||||
MYSQL_INFORMATION_SCHEMA_PLUGIN,
|
||||
@@ -177,7 +176,6 @@ struct st_maria_plugin spider_i_s_alloc_mem_maria =
|
||||
"1.0",
|
||||
MariaDB_PLUGIN_MATURITY_STABLE,
|
||||
};
|
||||
#endif
|
||||
|
||||
extern SPIDER_DBTON spider_dbton[SPIDER_DBTON_SIZE];
|
||||
|
||||
@@ -282,7 +280,6 @@ struct st_mysql_plugin spider_i_s_wrapper_protocols =
|
||||
0,
|
||||
};
|
||||
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
struct st_maria_plugin spider_i_s_wrapper_protocols_maria =
|
||||
{
|
||||
MYSQL_INFORMATION_SCHEMA_PLUGIN,
|
||||
@@ -299,4 +296,3 @@ struct st_maria_plugin spider_i_s_wrapper_protocols_maria =
|
||||
"1.0",
|
||||
MariaDB_PLUGIN_MATURITY_STABLE,
|
||||
};
|
||||
#endif
|
||||
|
@@ -102,11 +102,7 @@
|
||||
#define SPIDER_HAS_MY_CHARLEN
|
||||
#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)
|
||||
#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_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_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_wrapper_protocols_maria;
|
||||
#endif
|
||||
|
||||
extern volatile ulonglong spider_mon_table_cache_version;
|
||||
extern volatile ulonglong spider_mon_table_cache_version_req;
|
||||
@@ -3247,7 +3245,6 @@ spider_i_s_alloc_mem,
|
||||
spider_i_s_wrapper_protocols
|
||||
mysql_declare_plugin_end;
|
||||
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
maria_declare_plugin(spider)
|
||||
{
|
||||
MYSQL_STORAGE_ENGINE_PLUGIN,
|
||||
@@ -3267,4 +3264,3 @@ maria_declare_plugin(spider)
|
||||
spider_i_s_alloc_mem_maria,
|
||||
spider_i_s_wrapper_protocols_maria
|
||||
maria_declare_plugin_end;
|
||||
#endif
|
||||
|
@@ -2733,11 +2733,7 @@ void spider_get_sys_table_sts_info(
|
||||
ha_statistics *stat
|
||||
) {
|
||||
MYSQL_TIME mysql_time;
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
uint not_used_uint;
|
||||
#else
|
||||
my_bool not_used_my_bool;
|
||||
#endif
|
||||
long not_used_long;
|
||||
DBUG_ENTER("spider_get_sys_table_sts_info");
|
||||
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();
|
||||
table->field[SPIDER_TABLE_STS_CHECK_TIME_POS]->get_date(&mysql_time,
|
||||
SPIDER_date_mode_t(0));
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
stat->check_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_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,
|
||||
SPIDER_date_mode_t(0));
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
stat->create_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_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,
|
||||
SPIDER_date_mode_t(0));
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
stat->update_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_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())
|
||||
{
|
||||
stat->checksum_null = TRUE;
|
||||
|
Reference in New Issue
Block a user