diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc index 49ab2fd29ecf0..759404bbaaf82 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc @@ -9332,7 +9332,7 @@ ulong ha_spider::table_flags_for_partition() { DBUG_ENTER("ha_spider::table_flags_for_partition"); DBUG_PRINT("info",("spider this=%p", this)); - DBUG_RETURN( + ulong flags = #ifdef HA_PT_CALL_AT_ONCE_STORE_LOCK HA_PT_CALL_AT_ONCE_STORE_LOCK | #endif @@ -9354,8 +9354,8 @@ ulong ha_spider::table_flags_for_partition() #ifdef HA_PT_CALL_AT_ONCE_TOP_TABLE HA_PT_CALL_AT_ONCE_TOP_TABLE | #endif - 0 - ); + 0; + DBUG_RETURN(flags); } const char *ha_spider::index_type( diff --git a/storage/spider/spd_conn.cc b/storage/spider/spd_conn.cc index 8e9d7d60317ab..11cb46de985be 100644 --- a/storage/spider/spd_conn.cc +++ b/storage/spider/spd_conn.cc @@ -26,6 +26,7 @@ #include "probes_mysql.h" #include "sql_class.h" #include "sql_partition.h" +#include "sql_table.h" #include "tztime.h" #endif #include "spd_err.h" @@ -1923,15 +1924,16 @@ int spider_conn_queue_loop_check( (uchar *) loop_check_buf, buf_sz - 1); #endif pthread_mutex_lock(&conn->loop_check_mutex); - if (unlikely( #ifdef SPIDER_HAS_HASH_VALUE_TYPE - !(lcptr = (SPIDER_CONN_LOOP_CHECK *) - my_hash_search_using_hash_value(&conn->loop_checked, hash_value, - (uchar *) loop_check_buf, buf_sz - 1)) || + lcptr = (SPIDER_CONN_LOOP_CHECK *) + my_hash_search_using_hash_value(&conn->loop_checked, hash_value, + (uchar *) loop_check_buf, buf_sz - 1); #else - !(lcptr = (SPIDER_CONN_LOOP_CHECK *) my_hash_search( - &conn->loop_checked, (uchar *) loop_check_buf, buf_sz - 1)) || + lcptr = (SPIDER_CONN_LOOP_CHECK *) my_hash_search( + &conn->loop_checked, (uchar *) loop_check_buf, buf_sz - 1); #endif + if (unlikely( + !lcptr || ( !lcptr->flag && ( diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc index c1da9cb7945d8..c43b5fc14f7db 100644 --- a/storage/spider/spd_db_mysql.cc +++ b/storage/spider/spd_db_mysql.cc @@ -2359,8 +2359,9 @@ int spider_db_mbase::print_warnings( DBUG_PRINT("info",("spider row[2]=%s", row[2])); longlong res_num = (longlong) my_strtoll10(row[1], (char**) NULL, &error_num); - my_printf_error(res_num, row[2], MYF(0)); - error_num = res_num; + DBUG_PRINT("info",("spider res_num=%lld", res_num)); + my_printf_error((int) res_num, row[2], MYF(0)); + error_num = (int) res_num; row = mysql_fetch_row(res); } }