Commit e48e717b authored by Kentoku SHIBA's avatar Kentoku SHIBA

Revert change for 10.0.4. It's remerge later.

parent 9adb6e99
...@@ -7840,7 +7840,7 @@ int ha_spider::info( ...@@ -7840,7 +7840,7 @@ int ha_spider::info(
thd->main_da.message()); thd->main_da.message());
#else #else
strmov(spider_init_error_table->init_error_msg, strmov(spider_init_error_table->init_error_msg,
thd->get_stmt_da()->message()); thd->stmt_da->message());
#endif #endif
spider_init_error_table->init_error_time = spider_init_error_table->init_error_time =
(time_t) time((time_t*) 0); (time_t) time((time_t*) 0);
...@@ -8066,7 +8066,7 @@ ha_rows ha_spider::records_in_range( ...@@ -8066,7 +8066,7 @@ ha_rows ha_spider::records_in_range(
thd->main_da.message()); thd->main_da.message());
#else #else
strmov(spider_init_error_table->init_error_msg, strmov(spider_init_error_table->init_error_msg,
thd->get_stmt_da()->message()); thd->stmt_da->message());
#endif #endif
spider_init_error_table->init_error_time = spider_init_error_table->init_error_time =
(time_t) time((time_t*) 0); (time_t) time((time_t*) 0);
...@@ -8110,7 +8110,7 @@ ha_rows ha_spider::records_in_range( ...@@ -8110,7 +8110,7 @@ ha_rows ha_spider::records_in_range(
KEY *key_info = &table->key_info[inx]; KEY *key_info = &table->key_info[inx];
key_part_map full_key_part_map = key_part_map full_key_part_map =
make_prev_keypart_map(key_info->user_defined_key_parts); make_prev_keypart_map(key_info->key_parts);
key_part_map start_key_part_map; key_part_map start_key_part_map;
key_part_map end_key_part_map; key_part_map end_key_part_map;
key_part_map tgt_key_part_map; key_part_map tgt_key_part_map;
...@@ -8308,7 +8308,7 @@ int ha_spider::check_crd() ...@@ -8308,7 +8308,7 @@ int ha_spider::check_crd()
thd->main_da.message()); thd->main_da.message());
#else #else
strmov(spider_init_error_table->init_error_msg, strmov(spider_init_error_table->init_error_msg,
thd->get_stmt_da()->message()); thd->stmt_da->message());
#endif #endif
spider_init_error_table->init_error_time = spider_init_error_table->init_error_time =
(time_t) time((time_t*) 0); (time_t) time((time_t*) 0);
...@@ -9726,9 +9726,9 @@ int ha_spider::create( ...@@ -9726,9 +9726,9 @@ int ha_spider::create(
if ( if (
(thd->lex->alter_info.flags & (thd->lex->alter_info.flags &
( (
Alter_info::ALTER_ADD_PARTITION | Alter_info::ALTER_DROP_PARTITION | ALTER_ADD_PARTITION | ALTER_DROP_PARTITION |
Alter_info::ALTER_COALESCE_PARTITION | Alter_info::ALTER_REORGANIZE_PARTITION | ALTER_COALESCE_PARTITION | ALTER_REORGANIZE_PARTITION |
Alter_info::ALTER_TABLE_REORG | Alter_info::ALTER_REBUILD_PARTITION ALTER_TABLE_REORG | ALTER_REBUILD_PARTITION
) )
) && ) &&
memcmp(name + strlen(name) - 5, "#TMP#", 5) memcmp(name + strlen(name) - 5, "#TMP#", 5)
...@@ -9873,9 +9873,9 @@ int ha_spider::rename_table( ...@@ -9873,9 +9873,9 @@ int ha_spider::rename_table(
if ( if (
(thd->lex->alter_info.flags & (thd->lex->alter_info.flags &
( (
Alter_info::ALTER_ADD_PARTITION | Alter_info::ALTER_DROP_PARTITION | ALTER_ADD_PARTITION | ALTER_DROP_PARTITION |
Alter_info::ALTER_COALESCE_PARTITION | Alter_info::ALTER_REORGANIZE_PARTITION | ALTER_COALESCE_PARTITION | ALTER_REORGANIZE_PARTITION |
Alter_info::ALTER_TABLE_REORG | Alter_info::ALTER_REBUILD_PARTITION ALTER_TABLE_REORG | ALTER_REBUILD_PARTITION
) )
) )
) )
...@@ -10000,9 +10000,9 @@ int ha_spider::delete_table( ...@@ -10000,9 +10000,9 @@ int ha_spider::delete_table(
sql_command == SQLCOM_ALTER_TABLE && sql_command == SQLCOM_ALTER_TABLE &&
(thd->lex->alter_info.flags & (thd->lex->alter_info.flags &
( (
Alter_info::ALTER_ADD_PARTITION | Alter_info::ALTER_DROP_PARTITION | ALTER_ADD_PARTITION | ALTER_DROP_PARTITION |
Alter_info::ALTER_COALESCE_PARTITION | Alter_info::ALTER_REORGANIZE_PARTITION | ALTER_COALESCE_PARTITION | ALTER_REORGANIZE_PARTITION |
Alter_info::ALTER_TABLE_REORG | Alter_info::ALTER_REBUILD_PARTITION ALTER_TABLE_REORG | ALTER_REBUILD_PARTITION
) )
) )
) )
...@@ -10614,7 +10614,7 @@ void ha_spider::set_select_column_mode() ...@@ -10614,7 +10614,7 @@ void ha_spider::set_select_column_mode()
/* need primary key columns */ /* need primary key columns */
key_info = &table_share->key_info[table_share->primary_key]; key_info = &table_share->key_info[table_share->primary_key];
key_part = key_info->key_part; key_part = key_info->key_part;
for (roop_count = 0; roop_count < (int) key_info->user_defined_key_parts; for (roop_count = 0; roop_count < (int) key_info->key_parts;
roop_count++) roop_count++)
{ {
field = key_part[roop_count].field; field = key_part[roop_count].field;
......
...@@ -2255,7 +2255,7 @@ void *spider_bg_conn_action( ...@@ -2255,7 +2255,7 @@ void *spider_bg_conn_action(
#if MYSQL_VERSION_ID < 50500 #if MYSQL_VERSION_ID < 50500
strmov(result_list->bgs_error_msg, thd->main_da.message()); strmov(result_list->bgs_error_msg, thd->main_da.message());
#else #else
strmov(result_list->bgs_error_msg, thd->get_stmt_da()->message()); strmov(result_list->bgs_error_msg, thd->stmt_da->message());
#endif #endif
} }
if (!dbton_handler->need_lock_before_set_sql_for_exec(sql_type)) if (!dbton_handler->need_lock_before_set_sql_for_exec(sql_type))
...@@ -2309,7 +2309,7 @@ void *spider_bg_conn_action( ...@@ -2309,7 +2309,7 @@ void *spider_bg_conn_action(
thd->main_da.message()); thd->main_da.message());
#else #else
strmov(result_list->bgs_error_msg, strmov(result_list->bgs_error_msg,
thd->get_stmt_da()->message()); thd->stmt_da->message());
#endif #endif
} else } else
spider_db_discard_multiple_result(spider, conn->link_idx, spider_db_discard_multiple_result(spider, conn->link_idx,
...@@ -2332,7 +2332,7 @@ void *spider_bg_conn_action( ...@@ -2332,7 +2332,7 @@ void *spider_bg_conn_action(
thd->main_da.message()); thd->main_da.message());
#else #else
strmov(result_list->bgs_error_msg, strmov(result_list->bgs_error_msg,
thd->get_stmt_da()->message()); thd->stmt_da->message());
#endif #endif
} else { } else {
spider->connection_ids[conn->link_idx] = conn->connection_id; spider->connection_ids[conn->link_idx] = conn->connection_id;
...@@ -2350,7 +2350,7 @@ void *spider_bg_conn_action( ...@@ -2350,7 +2350,7 @@ void *spider_bg_conn_action(
thd->main_da.message()); thd->main_da.message());
#else #else
strmov(result_list->bgs_error_msg, strmov(result_list->bgs_error_msg,
thd->get_stmt_da()->message()); thd->stmt_da->message());
#endif #endif
} }
} else { } else {
...@@ -2364,7 +2364,7 @@ void *spider_bg_conn_action( ...@@ -2364,7 +2364,7 @@ void *spider_bg_conn_action(
#if MYSQL_VERSION_ID < 50500 #if MYSQL_VERSION_ID < 50500
strmov(result_list->bgs_error_msg, thd->main_da.message()); strmov(result_list->bgs_error_msg, thd->main_da.message());
#else #else
strmov(result_list->bgs_error_msg, thd->get_stmt_da()->message()); strmov(result_list->bgs_error_msg, thd->stmt_da->message());
#endif #endif
} }
#ifdef HA_CAN_BULK_ACCESS #ifdef HA_CAN_BULK_ACCESS
...@@ -2387,7 +2387,7 @@ void *spider_bg_conn_action( ...@@ -2387,7 +2387,7 @@ void *spider_bg_conn_action(
#if MYSQL_VERSION_ID < 50500 #if MYSQL_VERSION_ID < 50500
strmov(result_list->bgs_error_msg, thd->main_da.message()); strmov(result_list->bgs_error_msg, thd->main_da.message());
#else #else
strmov(result_list->bgs_error_msg, thd->get_stmt_da()->message()); strmov(result_list->bgs_error_msg, thd->stmt_da->message());
#endif #endif
conn->mta_conn_mutex_unlock_later = FALSE; conn->mta_conn_mutex_unlock_later = FALSE;
} }
...@@ -2420,9 +2420,9 @@ void *spider_bg_conn_action( ...@@ -2420,9 +2420,9 @@ void *spider_bg_conn_action(
strmov((char *) bg_direct_sql->bg_error_msg, strmov((char *) bg_direct_sql->bg_error_msg,
thd->main_da.message()); thd->main_da.message());
#else #else
bg_direct_sql->bg_error = thd->get_stmt_da()->sql_errno(); bg_direct_sql->bg_error = thd->stmt_da->sql_errno();
strmov((char *) bg_direct_sql->bg_error_msg, strmov((char *) bg_direct_sql->bg_error_msg,
thd->get_stmt_da()->message()); thd->stmt_da->message());
#endif #endif
pthread_mutex_unlock(direct_sql->bg_mutex); pthread_mutex_unlock(direct_sql->bg_mutex);
is_error = TRUE; is_error = TRUE;
......
...@@ -680,7 +680,7 @@ int spider_db_errorno( ...@@ -680,7 +680,7 @@ int spider_db_errorno(
current_thd && current_thd &&
spider_param_force_commit(current_thd) == 1 spider_param_force_commit(current_thd) == 1
) { ) {
push_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, push_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
error_num, conn->db_conn->get_error()); error_num, conn->db_conn->get_error());
if (!conn->mta_conn_mutex_unlock_later) if (!conn->mta_conn_mutex_unlock_later)
{ {
...@@ -1387,13 +1387,13 @@ int spider_db_append_key_columns( ...@@ -1387,13 +1387,13 @@ int spider_db_append_key_columns(
SPIDER_RESULT_LIST *result_list = &spider->result_list; SPIDER_RESULT_LIST *result_list = &spider->result_list;
KEY *key_info = result_list->key_info; KEY *key_info = result_list->key_info;
uint key_name_length, key_count; uint key_name_length, key_count;
key_part_map full_key_part_map = make_prev_keypart_map(key_info->user_defined_key_parts); key_part_map full_key_part_map = make_prev_keypart_map(key_info->key_parts);
key_part_map start_key_part_map; key_part_map start_key_part_map;
char tmp_buf[MAX_FIELD_WIDTH]; char tmp_buf[MAX_FIELD_WIDTH];
DBUG_ENTER("spider_db_append_key_columns"); DBUG_ENTER("spider_db_append_key_columns");
start_key_part_map = start_key->keypart_map & full_key_part_map; start_key_part_map = start_key->keypart_map & full_key_part_map;
DBUG_PRINT("info", ("spider key_info->user_defined_key_parts=%u", key_info->user_defined_key_parts)); DBUG_PRINT("info", ("spider key_info->key_parts=%u", key_info->key_parts));
DBUG_PRINT("info", ("spider full_key_part_map=%lu", full_key_part_map)); 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)); DBUG_PRINT("info", ("spider start_key_part_map=%lu", start_key_part_map));
...@@ -1533,7 +1533,7 @@ int spider_db_append_key_where_internal( ...@@ -1533,7 +1533,7 @@ int spider_db_append_key_where_internal(
} }
if (key_info) if (key_info)
full_key_part_map = make_prev_keypart_map(key_info->user_defined_key_parts); full_key_part_map = make_prev_keypart_map(key_info->key_parts);
else else
full_key_part_map = 0; full_key_part_map = 0;
...@@ -1549,8 +1549,8 @@ int spider_db_append_key_where_internal( ...@@ -1549,8 +1549,8 @@ int spider_db_append_key_where_internal(
end_key_part_map = 0; end_key_part_map = 0;
use_both = FALSE; use_both = FALSE;
} }
DBUG_PRINT("info", ("spider key_info->user_defined_key_parts=%u", key_info ? DBUG_PRINT("info", ("spider key_info->key_parts=%u", key_info ?
key_info->user_defined_key_parts : 0)); key_info->key_parts : 0));
DBUG_PRINT("info", ("spider full_key_part_map=%lu", full_key_part_map)); 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)); DBUG_PRINT("info", ("spider start_key_part_map=%lu", start_key_part_map));
DBUG_PRINT("info", ("spider end_key_part_map=%lu", end_key_part_map)); DBUG_PRINT("info", ("spider end_key_part_map=%lu", end_key_part_map));
...@@ -2699,7 +2699,7 @@ int spider_db_fetch_key( ...@@ -2699,7 +2699,7 @@ int spider_db_fetch_key(
for ( for (
key_part = key_info->key_part, key_part = key_info->key_part,
part_num = 0; part_num = 0;
part_num < key_info->user_defined_key_parts; part_num < key_info->key_parts;
key_part++, key_part++,
part_num++ part_num++
) { ) {
...@@ -4635,7 +4635,7 @@ int spider_db_seek_tmp_key( ...@@ -4635,7 +4635,7 @@ int spider_db_seek_tmp_key(
for ( for (
key_part = key_info->key_part, key_part = key_info->key_part,
part_num = 0; part_num = 0;
part_num < key_info->user_defined_key_parts; part_num < key_info->key_parts;
key_part++, key_part++,
part_num++ part_num++
) { ) {
...@@ -4782,7 +4782,7 @@ void spider_db_set_cardinarity( ...@@ -4782,7 +4782,7 @@ void spider_db_set_cardinarity(
for (roop_count = 0; roop_count < (int) table->s->keys; roop_count++) for (roop_count = 0; roop_count < (int) table->s->keys; roop_count++)
{ {
key_info = &table->key_info[roop_count]; key_info = &table->key_info[roop_count];
for (roop_count2 = 0; roop_count2 < (int) key_info->user_defined_key_parts; for (roop_count2 = 0; roop_count2 < (int) key_info->key_parts;
roop_count2++) roop_count2++)
{ {
key_part = &key_info->key_part[roop_count2]; key_part = &key_info->key_part[roop_count2];
...@@ -5438,7 +5438,7 @@ int spider_db_update_auto_increment( ...@@ -5438,7 +5438,7 @@ int spider_db_update_auto_increment(
for (roop_count = first_set ? 1 : 0; for (roop_count = first_set ? 1 : 0;
roop_count < (int) affected_rows; roop_count < (int) affected_rows;
roop_count++) roop_count++)
push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
ER_SPIDER_AUTOINC_VAL_IS_DIFFERENT_NUM, ER_SPIDER_AUTOINC_VAL_IS_DIFFERENT_NUM,
ER_SPIDER_AUTOINC_VAL_IS_DIFFERENT_STR); ER_SPIDER_AUTOINC_VAL_IS_DIFFERENT_STR);
} }
...@@ -5454,7 +5454,7 @@ int spider_db_update_auto_increment( ...@@ -5454,7 +5454,7 @@ int spider_db_update_auto_increment(
#endif #endif
) { ) {
for (roop_count = 0; roop_count < (int) affected_rows; roop_count++) for (roop_count = 0; roop_count < (int) affected_rows; roop_count++)
push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
ER_SPIDER_AUTOINC_VAL_IS_DIFFERENT_NUM, ER_SPIDER_AUTOINC_VAL_IS_DIFFERENT_NUM,
ER_SPIDER_AUTOINC_VAL_IS_DIFFERENT_STR); ER_SPIDER_AUTOINC_VAL_IS_DIFFERENT_STR);
} }
...@@ -7759,7 +7759,7 @@ uint spider_db_check_ft_idx( ...@@ -7759,7 +7759,7 @@ uint spider_db_check_ft_idx(
key_info = &table->key_info[roop_count]; key_info = &table->key_info[roop_count];
if ( if (
key_info->algorithm == HA_KEY_ALG_FULLTEXT && key_info->algorithm == HA_KEY_ALG_FULLTEXT &&
item_count - 1 == key_info->user_defined_key_parts item_count - 1 == key_info->key_parts
) { ) {
match1 = TRUE; match1 = TRUE;
for (roop_count2 = 1; roop_count2 < item_count; roop_count2++) for (roop_count2 = 1; roop_count2 < item_count; roop_count2++)
...@@ -7770,7 +7770,7 @@ uint spider_db_check_ft_idx( ...@@ -7770,7 +7770,7 @@ uint spider_db_check_ft_idx(
DBUG_RETURN(MAX_KEY); DBUG_RETURN(MAX_KEY);
match2 = FALSE; match2 = FALSE;
for (key_part = key_info->key_part, part_num = 0; for (key_part = key_info->key_part, part_num = 0;
part_num < key_info->user_defined_key_parts; key_part++, part_num++) part_num < key_info->key_parts; key_part++, part_num++)
{ {
if (key_part->field == field) if (key_part->field == field)
{ {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#define SPIDER_HAS_APPEND_FOR_SINGLE_QUOTE #define SPIDER_HAS_APPEND_FOR_SINGLE_QUOTE
#define SPIDER_HAS_SHOW_SIMPLE_FUNC #define SPIDER_HAS_SHOW_SIMPLE_FUNC
#endif #endif
#if 0 && defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100003 #if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100003
#define SPIDER_GENERATE_PARTITION_SYNTAX_HAS_CURRENT_COMMENT_START #define SPIDER_GENERATE_PARTITION_SYNTAX_HAS_CURRENT_COMMENT_START
#endif #endif
......
This diff is collapsed.
...@@ -1159,7 +1159,7 @@ my_bool spider_ping_table_init_body( ...@@ -1159,7 +1159,7 @@ my_bool spider_ping_table_init_body(
#if MYSQL_VERSION_ID < 50500 #if MYSQL_VERSION_ID < 50500
strcpy(message, thd->main_da.message()); strcpy(message, thd->main_da.message());
#else #else
strcpy(message, thd->get_stmt_da()->message()); strcpy(message, thd->stmt_da->message());
#endif #endif
goto error; goto error;
} }
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#else #else
#include "sql_priv.h" #include "sql_priv.h"
#include "probes_mysql.h" #include "probes_mysql.h"
#include "my_getopt.h"
#include "sql_class.h" #include "sql_class.h"
#include "sql_partition.h" #include "sql_partition.h"
#include "sql_servers.h" #include "sql_servers.h"
...@@ -6986,7 +6985,7 @@ bool spider_check_pk_update( ...@@ -6986,7 +6985,7 @@ bool spider_check_pk_update(
key_info = &table_share->key_info[table_share->primary_key]; key_info = &table_share->key_info[table_share->primary_key];
key_part = key_info->key_part; key_part = key_info->key_part;
for (roop_count = 0; roop_count < (int) key_info->user_defined_key_parts; roop_count++) for (roop_count = 0; roop_count < (int) key_info->key_parts; roop_count++)
{ {
if (bitmap_is_set(table->write_set, if (bitmap_is_set(table->write_set,
key_part[roop_count].field->field_index)) key_part[roop_count].field->field_index))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment