mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Change for mearging MariaDB 10.0.4.
This commit is contained in:
@@ -569,7 +569,11 @@ int spider_db_mysql_result::fetch_table_status(
|
||||
#else
|
||||
my_bool not_used_my_bool;
|
||||
#endif
|
||||
int not_used_int;
|
||||
#ifdef SPIDER_HAS_TIME_STATUS
|
||||
MYSQL_TIME_STATUS time_status;
|
||||
#else
|
||||
int time_status;
|
||||
#endif
|
||||
long not_used_long;
|
||||
DBUG_ENTER("spider_db_mysql_result::fetch_table_status");
|
||||
DBUG_PRINT("info",("spider this=%p", this));
|
||||
@@ -630,8 +634,11 @@ int spider_db_mysql_result::fetch_table_status(
|
||||
("spider auto_increment_value=%lld", auto_increment_value));
|
||||
if (mysql_row[11])
|
||||
{
|
||||
#ifdef SPIDER_HAS_TIME_STATUS
|
||||
my_time_status_init(&time_status);
|
||||
#endif
|
||||
str_to_datetime(mysql_row[11], strlen(mysql_row[11]), &mysql_time, 0,
|
||||
¬_used_int);
|
||||
&time_status);
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
create_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_uint);
|
||||
@@ -652,8 +659,11 @@ int spider_db_mysql_result::fetch_table_status(
|
||||
#endif
|
||||
if (mysql_row[12])
|
||||
{
|
||||
#ifdef SPIDER_HAS_TIME_STATUS
|
||||
my_time_status_init(&time_status);
|
||||
#endif
|
||||
str_to_datetime(mysql_row[12], strlen(mysql_row[12]), &mysql_time, 0,
|
||||
¬_used_int);
|
||||
&time_status);
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
update_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_uint);
|
||||
@@ -674,8 +684,11 @@ int spider_db_mysql_result::fetch_table_status(
|
||||
#endif
|
||||
if (mysql_row[13])
|
||||
{
|
||||
#ifdef SPIDER_HAS_TIME_STATUS
|
||||
my_time_status_init(&time_status);
|
||||
#endif
|
||||
str_to_datetime(mysql_row[13], strlen(mysql_row[13]), &mysql_time, 0,
|
||||
¬_used_int);
|
||||
&time_status);
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
check_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_uint);
|
||||
@@ -739,8 +752,11 @@ int spider_db_mysql_result::fetch_table_status(
|
||||
("spider auto_increment_value=%lld", auto_increment_value));
|
||||
if (mysql_row[6])
|
||||
{
|
||||
#ifdef SPIDER_HAS_TIME_STATUS
|
||||
my_time_status_init(&time_status);
|
||||
#endif
|
||||
str_to_datetime(mysql_row[6], strlen(mysql_row[6]), &mysql_time, 0,
|
||||
¬_used_int);
|
||||
&time_status);
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
create_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_uint);
|
||||
@@ -761,8 +777,11 @@ int spider_db_mysql_result::fetch_table_status(
|
||||
#endif
|
||||
if (mysql_row[7])
|
||||
{
|
||||
#ifdef SPIDER_HAS_TIME_STATUS
|
||||
my_time_status_init(&time_status);
|
||||
#endif
|
||||
str_to_datetime(mysql_row[7], strlen(mysql_row[7]), &mysql_time, 0,
|
||||
¬_used_int);
|
||||
&time_status);
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
update_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_uint);
|
||||
@@ -783,8 +802,11 @@ int spider_db_mysql_result::fetch_table_status(
|
||||
#endif
|
||||
if (mysql_row[8])
|
||||
{
|
||||
#ifdef SPIDER_HAS_TIME_STATUS
|
||||
my_time_status_init(&time_status);
|
||||
#endif
|
||||
str_to_datetime(mysql_row[8], strlen(mysql_row[8]), &mysql_time, 0,
|
||||
¬_used_int);
|
||||
&time_status);
|
||||
#ifdef MARIADB_BASE_VERSION
|
||||
check_time = (time_t) my_system_gmt_sec(&mysql_time,
|
||||
¬_used_long, ¬_used_uint);
|
||||
@@ -4309,7 +4331,7 @@ int spider_mysql_share::append_key_select(
|
||||
const KEY *key_info = &table_share->key_info[idx];
|
||||
DBUG_ENTER("spider_mysql_share::append_key_select");
|
||||
for (key_part = key_info->key_part, part_num = 0;
|
||||
part_num < key_info->key_parts; key_part++, part_num++)
|
||||
part_num < spider_user_defined_key_parts(key_info); key_part++, part_num++)
|
||||
{
|
||||
field = key_part->field;
|
||||
field_length = column_name_str[field->field_index].length();
|
||||
@@ -4636,7 +4658,8 @@ int spider_mysql_handler::append_key_column_types(
|
||||
SPIDER_RESULT_LIST *result_list = &spider->result_list;
|
||||
KEY *key_info = result_list->key_info;
|
||||
uint key_name_length, key_count;
|
||||
key_part_map full_key_part_map = make_prev_keypart_map(key_info->key_parts);
|
||||
key_part_map full_key_part_map =
|
||||
make_prev_keypart_map(spider_user_defined_key_parts(key_info));
|
||||
key_part_map start_key_part_map;
|
||||
KEY_PART_INFO *key_part;
|
||||
Field *field;
|
||||
@@ -4647,7 +4670,8 @@ int spider_mysql_handler::append_key_column_types(
|
||||
tmp_str.init_calc_mem(115);
|
||||
|
||||
start_key_part_map = start_key->keypart_map & full_key_part_map;
|
||||
DBUG_PRINT("info", ("spider key_info->key_parts=%u", key_info->key_parts));
|
||||
DBUG_PRINT("info", ("spider spider_user_defined_key_parts=%u",
|
||||
spider_user_defined_key_parts(key_info)));
|
||||
DBUG_PRINT("info", ("spider full_key_part_map=%lu", full_key_part_map));
|
||||
DBUG_PRINT("info", ("spider start_key_part_map=%lu", start_key_part_map));
|
||||
|
||||
@@ -4703,7 +4727,8 @@ int spider_mysql_handler::append_key_join_columns_for_bka(
|
||||
) {
|
||||
KEY *key_info = spider->result_list.key_info;
|
||||
uint length, key_name_length, key_count;
|
||||
key_part_map full_key_part_map = make_prev_keypart_map(key_info->key_parts);
|
||||
key_part_map full_key_part_map =
|
||||
make_prev_keypart_map(spider_user_defined_key_parts(key_info));
|
||||
key_part_map start_key_part_map;
|
||||
KEY_PART_INFO *key_part;
|
||||
Field *field;
|
||||
@@ -4712,7 +4737,8 @@ int spider_mysql_handler::append_key_join_columns_for_bka(
|
||||
DBUG_ENTER("spider_mysql_handler::append_key_join_columns_for_bka");
|
||||
DBUG_PRINT("info",("spider this=%p", this));
|
||||
start_key_part_map = start_key->keypart_map & full_key_part_map;
|
||||
DBUG_PRINT("info", ("spider key_info->key_parts=%u", key_info->key_parts));
|
||||
DBUG_PRINT("info", ("spider spider_user_defined_key_parts=%u",
|
||||
spider_user_defined_key_parts(key_info)));
|
||||
DBUG_PRINT("info", ("spider full_key_part_map=%lu", full_key_part_map));
|
||||
DBUG_PRINT("info", ("spider start_key_part_map=%lu", start_key_part_map));
|
||||
|
||||
@@ -5806,7 +5832,7 @@ int spider_mysql_handler::append_key_select_with_alias(
|
||||
int field_length;
|
||||
DBUG_ENTER("spider_mysql_handler::append_key_select_with_alias");
|
||||
for (key_part = key_info->key_part, part_num = 0;
|
||||
part_num < key_info->key_parts; key_part++, part_num++)
|
||||
part_num < spider_user_defined_key_parts(key_info); key_part++, part_num++)
|
||||
{
|
||||
field = key_part->field;
|
||||
field_length = mysql_share->column_name_str[field->field_index].length();
|
||||
@@ -6084,13 +6110,15 @@ int spider_mysql_handler::append_key_column_values(
|
||||
KEY *key_info = result_list->key_info;
|
||||
uint length;
|
||||
uint store_length;
|
||||
key_part_map full_key_part_map = make_prev_keypart_map(key_info->key_parts);
|
||||
key_part_map full_key_part_map =
|
||||
make_prev_keypart_map(spider_user_defined_key_parts(key_info));
|
||||
key_part_map start_key_part_map;
|
||||
KEY_PART_INFO *key_part;
|
||||
Field *field;
|
||||
DBUG_ENTER("spider_mysql_handler::append_key_column_values");
|
||||
start_key_part_map = start_key->keypart_map & full_key_part_map;
|
||||
DBUG_PRINT("info", ("spider key_info->key_parts=%u", key_info->key_parts));
|
||||
DBUG_PRINT("info", ("spider spider_user_defined_key_parts=%u",
|
||||
spider_user_defined_key_parts(key_info)));
|
||||
DBUG_PRINT("info", ("spider full_key_part_map=%lu", full_key_part_map));
|
||||
DBUG_PRINT("info", ("spider start_key_part_map=%lu", start_key_part_map));
|
||||
|
||||
@@ -6633,13 +6661,13 @@ int spider_mysql_handler::append_match_against(
|
||||
|
||||
ft_init_key = ft_info->key;
|
||||
key_info = &table->key_info[ft_info->inx];
|
||||
DBUG_PRINT("info", ("spider key_info->key_parts=%u",
|
||||
key_info->key_parts));
|
||||
DBUG_PRINT("info", ("spider spider_user_defined_key_parts=%u",
|
||||
spider_user_defined_key_parts(key_info)));
|
||||
|
||||
for (
|
||||
key_part = key_info->key_part,
|
||||
key_count = 0;
|
||||
key_count < (int) key_info->key_parts;
|
||||
key_count < (int) spider_user_defined_key_parts(key_info);
|
||||
key_part++,
|
||||
key_count++
|
||||
) {
|
||||
@@ -6849,7 +6877,7 @@ int spider_mysql_handler::append_key_order_for_merge_with_alias(
|
||||
for (
|
||||
key_part = key_info->key_part,
|
||||
length = 1;
|
||||
length <= (int) key_info->key_parts;
|
||||
length <= (int) spider_user_defined_key_parts(key_info);
|
||||
key_part++,
|
||||
length++
|
||||
) {
|
||||
@@ -7051,7 +7079,8 @@ int spider_mysql_handler::append_key_order_with_alias(
|
||||
for (
|
||||
key_part = key_info->key_part + result_list->key_order,
|
||||
length = 1;
|
||||
length + result_list->key_order < (int) key_info->key_parts &&
|
||||
length + result_list->key_order <
|
||||
(int) spider_user_defined_key_parts(key_info) &&
|
||||
length < result_list->max_order;
|
||||
key_part++,
|
||||
length++
|
||||
@@ -7085,7 +7114,8 @@ int spider_mysql_handler::append_key_order_with_alias(
|
||||
}
|
||||
}
|
||||
if (
|
||||
length + result_list->key_order <= (int) key_info->key_parts &&
|
||||
length + result_list->key_order <=
|
||||
(int) spider_user_defined_key_parts(key_info) &&
|
||||
length <= result_list->max_order
|
||||
) {
|
||||
field = key_part->field;
|
||||
@@ -7117,7 +7147,8 @@ int spider_mysql_handler::append_key_order_with_alias(
|
||||
for (
|
||||
key_part = key_info->key_part + result_list->key_order,
|
||||
length = 1;
|
||||
length + result_list->key_order < (int) key_info->key_parts &&
|
||||
length + result_list->key_order <
|
||||
(int) spider_user_defined_key_parts(key_info) &&
|
||||
length < result_list->max_order;
|
||||
key_part++,
|
||||
length++
|
||||
@@ -7151,7 +7182,8 @@ int spider_mysql_handler::append_key_order_with_alias(
|
||||
}
|
||||
}
|
||||
if (
|
||||
length + result_list->key_order <= (int) key_info->key_parts &&
|
||||
length + result_list->key_order <=
|
||||
(int) spider_user_defined_key_parts(key_info) &&
|
||||
length <= result_list->max_order
|
||||
) {
|
||||
field = key_part->field;
|
||||
@@ -10576,7 +10608,8 @@ int spider_mysql_copy_table::append_copy_where(
|
||||
sql.q_append(SPIDER_SQL_OPEN_PAREN_STR, SPIDER_SQL_OPEN_PAREN_LEN);
|
||||
Field *field;
|
||||
KEY_PART_INFO *key_part = key_info->key_part;
|
||||
for (roop_count = key_info->key_parts - 1; roop_count >= 0; roop_count--)
|
||||
for (roop_count = spider_user_defined_key_parts(key_info) - 1;
|
||||
roop_count >= 0; roop_count--)
|
||||
{
|
||||
for (roop_count2 = 0; roop_count2 < roop_count; roop_count2++)
|
||||
{
|
||||
@@ -10621,7 +10654,7 @@ int spider_mysql_copy_table::append_key_order_str(
|
||||
Field *field;
|
||||
DBUG_ENTER("spider_mysql_copy_table::append_key_order_str");
|
||||
DBUG_PRINT("info",("spider this=%p", this));
|
||||
if ((int) key_info->key_parts > start_pos)
|
||||
if ((int) spider_user_defined_key_parts(key_info) > start_pos)
|
||||
{
|
||||
if (sql.reserve(SPIDER_SQL_ORDER_LEN))
|
||||
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
|
||||
@@ -10631,7 +10664,7 @@ int spider_mysql_copy_table::append_key_order_str(
|
||||
for (
|
||||
key_part = key_info->key_part + start_pos,
|
||||
length = 0;
|
||||
length + start_pos < (int) key_info->key_parts;
|
||||
length + start_pos < (int) spider_user_defined_key_parts(key_info);
|
||||
key_part++,
|
||||
length++
|
||||
) {
|
||||
@@ -10661,7 +10694,7 @@ int spider_mysql_copy_table::append_key_order_str(
|
||||
for (
|
||||
key_part = key_info->key_part + start_pos,
|
||||
length = 0;
|
||||
length + start_pos < (int) key_info->key_parts;
|
||||
length + start_pos < (int) spider_user_defined_key_parts(key_info);
|
||||
key_part++,
|
||||
length++
|
||||
) {
|
||||
|
Reference in New Issue
Block a user