diff options
author | Kentoku SHIBA <kentokushiba@gmail.com> | 2014-03-25 04:48:23 +0900 |
---|---|---|
committer | Kentoku SHIBA <kentokushiba@gmail.com> | 2014-03-25 04:48:23 +0900 |
commit | 993dd378b741c293bd251675d726bbf5e2f5f1fe (patch) | |
tree | 290578aeaa4a087bce2bbe2c69227da8b9f1a250 /storage/spider | |
parent | 4e9e561549f5d878a7ec94d1777ae6935d551a67 (diff) | |
download | mariadb-git-993dd378b741c293bd251675d726bbf5e2f5f1fe.tar.gz |
fix for MariaDB 10.0.7 building errors
Diffstat (limited to 'storage/spider')
-rw-r--r-- | storage/spider/ha_spider.cc | 20 | ||||
-rw-r--r-- | storage/spider/spd_db_conn.cc | 6 | ||||
-rw-r--r-- | storage/spider/spd_db_include.h | 4 | ||||
-rw-r--r-- | storage/spider/spd_table.cc | 9 |
4 files changed, 35 insertions, 4 deletions
diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc index 6d22d71c81d..1cc6cb9b882 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc @@ -8718,8 +8718,10 @@ ulonglong ha_spider::table_flags() const HA_HAS_RECORDS | HA_PARTIAL_COLUMN_READ | #ifdef HA_CAN_BULK_ACCESS +#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) (support_bulk_access_hs() ? HA_CAN_BULK_ACCESS : 0) | #endif +#endif SPIDER_CAN_BG_SEARCH | SPIDER_CAN_BG_INSERT | SPIDER_CAN_BG_UPDATE | @@ -10614,10 +10616,14 @@ int ha_spider::info_push( DBUG_PRINT("info",("spider this=%p", this)); #ifdef HA_CAN_BULK_ACCESS if ( +#ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS +#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) + info_type != INFO_KIND_HS_RET_FIELDS && +#endif +#endif info_type != INFO_KIND_BULK_ACCESS_BEGIN && info_type != INFO_KIND_BULK_ACCESS_CURRENT && - info_type != INFO_KIND_BULK_ACCESS_END && - info_type != INFO_KIND_HS_RET_FIELDS + info_type != INFO_KIND_BULK_ACCESS_END ) { if (!is_bulk_access_clone) { @@ -10796,12 +10802,16 @@ int ha_spider::info_push( ) { DBUG_RETURN(error_num); } +#ifdef HA_CAN_BULK_ACCESS +#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) memset( bulk_access_link_current->spider->result_list.hs_r_bulk_open_index, 0, share->link_bitmap_size); memset( bulk_access_link_current->spider->result_list.hs_w_bulk_open_index, 0, share->link_bitmap_size); +#endif +#endif /* #if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) if ((error_num = bulk_access_link_current->spider->reset_hs_strs_pos( @@ -12078,10 +12088,12 @@ int ha_spider::sync_from_clone_source( low_priority = spider->low_priority; memcpy(conns, spider->conns, sizeof(SPIDER_CONN *) * share->link_count); +#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) memcpy(hs_r_conns, spider->hs_r_conns, sizeof(SPIDER_CONN *) * share->link_count); memcpy(hs_w_conns, spider->hs_w_conns, sizeof(SPIDER_CONN *) * share->link_count); +#endif spider_thread_id = spider->spider_thread_id; trx_conn_adjustment = spider->trx_conn_adjustment; #if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) @@ -12134,6 +12146,8 @@ int ha_spider::sync_from_clone_source( external_lock_cnt = spider->external_lock_cnt; } +#ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS +#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) if (spider->hs_pushed_ret_fields_num < MAX_FIELDS) { SPIDER_HS_UINT32_INFO tmp_info; @@ -12144,6 +12158,8 @@ int ha_spider::sync_from_clone_source( DBUG_RETURN(error_num); } } +#endif +#endif DBUG_PRINT("info",("spider bulk_access_link->spider->dbton_handler=%p", dbton_handler)); DBUG_PRINT("info",("spider ptr bulk_access_link->spider->dbton_handler=%p", diff --git a/storage/spider/spd_db_conn.cc b/storage/spider/spd_db_conn.cc index 4f8279c5d0c..37f363d51c5 100644 --- a/storage/spider/spd_db_conn.cc +++ b/storage/spider/spd_db_conn.cc @@ -5605,7 +5605,6 @@ int spider_db_bulk_bulk_insert( ) { int error_num = 0, first_insert_link_idx = -1, tmp_error_num; int roop_count2; - SPIDER_RESULT_LIST *result_list = &spider->result_list; SPIDER_SHARE *share = spider->share; SPIDER_CONN *conn, *first_insert_conn = NULL; TABLE *table = spider->get_table(); @@ -5645,6 +5644,7 @@ int spider_db_bulk_bulk_insert( if (conn->conn_kind != SPIDER_CONN_KIND_MYSQL) { uint roop_count; + SPIDER_RESULT_LIST *result_list = &spider->result_list; DBUG_PRINT("info",("spider conn=%p", conn)); DBUG_PRINT("info",("spider result_list->hs_upd_rows=%llu", result_list->hs_upd_rows)); @@ -6584,9 +6584,9 @@ int spider_db_bulk_direct_update( #if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) if (!spider_bit_is_set(spider->do_hs_direct_update, roop_count)) { +#endif if (!counted) { -#endif *update_rows = spider->conns[roop_count]->db_conn->affected_rows(); DBUG_PRINT("info", ("spider update_rows = %u", *update_rows)); counted = TRUE; @@ -9953,7 +9953,9 @@ int spider_db_bulk_open_handler( int link_idx ) { int error_num = 0; +#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) bool opening_index = FALSE; +#endif DBUG_ENTER("spider_db_bulk_open_handler"); DBUG_PRINT("info",("spider spider=%p", spider)); DBUG_PRINT("info",("spider conn=%p", conn)); diff --git a/storage/spider/spd_db_include.h b/storage/spider/spd_db_include.h index 6a5b4ac9e0f..035905b84ee 100644 --- a/storage/spider/spd_db_include.h +++ b/storage/spider/spd_db_include.h @@ -26,6 +26,10 @@ #define SPIDER_HAS_SHOW_SIMPLE_FUNC #endif +#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100007 +#define SPIDER_HAS_DISCOVER_TABLE_STRUCTURE_COMMENT +#endif + #if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100004 #define SPIDER_HAS_TIME_STATUS #define SPIDER_HAS_DECIMAL_OPERATION_RESULTS_VALUE_TYPE diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index 9b97ae61078..cc9ed922837 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -4323,11 +4323,13 @@ SPIDER_SHARE *spider_get_share( &result_list->tmp_table_created, sizeof(uchar) * share->link_bitmap_size, #ifdef HA_CAN_BULK_ACCESS +#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) &result_list->hs_r_bulk_open_index, sizeof(uchar) * share->link_bitmap_size, &result_list->hs_w_bulk_open_index, sizeof(uchar) * share->link_bitmap_size, #endif +#endif &result_list->sql_kind_backup, sizeof(uint) * share->link_count, &spider->dbton_handler, sizeof(spider_db_handler *) * SPIDER_DBTON_SIZE, @@ -4762,11 +4764,13 @@ SPIDER_SHARE *spider_get_share( &result_list->tmp_table_created, sizeof(uchar) * share->link_bitmap_size, #ifdef HA_CAN_BULK_ACCESS +#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) &result_list->hs_r_bulk_open_index, sizeof(uchar) * share->link_bitmap_size, &result_list->hs_w_bulk_open_index, sizeof(uchar) * share->link_bitmap_size, #endif +#endif &result_list->sql_kind_backup, sizeof(uint) * share->link_count, &spider->dbton_handler, sizeof(spider_db_handler *) * SPIDER_DBTON_SIZE, @@ -8049,8 +8053,13 @@ int spider_discover_table_structure( { DBUG_RETURN(ER_SPIDER_UNKNOWN_NUM); } +#ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE_COMMENT + if (!(part_syntax = generate_partition_syntax(part_info, &part_syntax_len, + FALSE, TRUE, info, NULL, NULL))) +#else if (!(part_syntax = generate_partition_syntax(part_info, &part_syntax_len, FALSE, TRUE, info, NULL))) +#endif { DBUG_RETURN(HA_ERR_OUT_OF_MEM); } |