From 178e6cfb2879370edd3900bd2427439c9a278a81 Mon Sep 17 00:00:00 2001 From: Kentoku SHIBA Date: Thu, 19 Sep 2013 03:01:32 +0900 Subject: fix MDEV-4737 Server crashes in spider_mysql_handler::append_match_against on SELECT .. MATCH .. AGAINST .. BOOLEAN MODE --- storage/spider/ha_spider.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc index 726362872aa..a0f425d8f58 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc @@ -7597,6 +7597,12 @@ FT_INFO *ha_spider::ft_init_ext( DBUG_PRINT("info",("spider flags=%u", flags)); DBUG_PRINT("info",("spider inx=%u", inx)); DBUG_PRINT("info",("spider key=%s", key->c_ptr_safe())); + if (inx == NO_SUCH_KEY) + { + my_error(ER_FT_MATCHING_KEY_NOT_FOUND, MYF(0)); + DBUG_RETURN(NULL); + } + tmp_ft_info = ft_current; if (ft_current) ft_current = ft_current->next; @@ -7611,7 +7617,7 @@ FT_INFO *ha_spider::ft_init_ext( spider_malloc(spider_current_trx, 2, sizeof(st_spider_ft_info), MYF(MY_WME | MY_ZEROFILL)))) { - store_error_num = HA_ERR_OUT_OF_MEM; + my_error(HA_ERR_OUT_OF_MEM, MYF(0)); DBUG_RETURN(NULL); } if (tmp_ft_info) -- cgit v1.2.1 From 708a28ff7911c68ed5358cd5ebf4db8c534041ed Mon Sep 17 00:00:00 2001 From: Kentoku SHIBA Date: Thu, 19 Sep 2013 03:03:55 +0900 Subject: fix MDEV-4738 INSERT DELAYED on a SPIDER table doesn't produce ER_DELAYED_NOT_SUPPORTED, doesn't work like delayed, and doesn't honor lock_wait_timeout like normal INSERT --- storage/spider/ha_spider.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc index a0f425d8f58..841b48000f1 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc @@ -1191,6 +1191,7 @@ THR_LOCK_DATA **ha_spider::store_lock( lock_type = TL_READ; if ( lock_type >= TL_WRITE_CONCURRENT_INSERT && lock_type <= TL_WRITE && + lock_type != TL_WRITE_DELAYED && !thd->in_lock_tables && !thd_tablespace_op(thd) ) lock_type = TL_WRITE_ALLOW_WRITE; -- cgit v1.2.1 From 240e62b8906bd07515104e976e86c09987a9a73d Mon Sep 17 00:00:00 2001 From: Kentoku SHIBA Date: Thu, 19 Sep 2013 03:05:52 +0900 Subject: fix MDEV-4735 Assertion `! is_set()' fails in Diagnostics_area::set_ok_status on attempt to create a temporary SPIDER table connecting to non-existing source --- storage/spider/spd_table.cc | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index 3f67d1f5edf..0e66bf275c9 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -4512,18 +4512,24 @@ SPIDER_SHARE *spider_get_share( } } - spider_get_sts(share, spider->search_link_idx, tmp_time, + if (spider_get_sts(share, spider->search_link_idx, tmp_time, spider, sts_interval, sts_mode, #ifdef WITH_PARTITION_STORAGE_ENGINE sts_sync, #endif - 1, HA_STATUS_VARIABLE | HA_STATUS_CONST | HA_STATUS_AUTO); - spider_get_crd(share, spider->search_link_idx, tmp_time, + 1, HA_STATUS_VARIABLE | HA_STATUS_CONST | HA_STATUS_AUTO)) + { + thd->clear_error(); + } + if (spider_get_crd(share, spider->search_link_idx, tmp_time, spider, table, crd_interval, crd_mode, #ifdef WITH_PARTITION_STORAGE_ENGINE crd_sync, #endif - 1); + 1)) + { + thd->clear_error(); + } /* if ( (*error_num = spider_get_sts(share, spider->search_link_idx, tmp_time, @@ -4935,18 +4941,24 @@ SPIDER_SHARE *spider_get_share( } } - spider_get_sts(share, spider->search_link_idx, + if (spider_get_sts(share, spider->search_link_idx, tmp_time, spider, sts_interval, sts_mode, #ifdef WITH_PARTITION_STORAGE_ENGINE sts_sync, #endif - 1, HA_STATUS_VARIABLE | HA_STATUS_CONST | HA_STATUS_AUTO); - spider_get_crd(share, spider->search_link_idx, + 1, HA_STATUS_VARIABLE | HA_STATUS_CONST | HA_STATUS_AUTO)) + { + thd->clear_error(); + } + if (spider_get_crd(share, spider->search_link_idx, tmp_time, spider, table, crd_interval, crd_mode, #ifdef WITH_PARTITION_STORAGE_ENGINE crd_sync, #endif - 1); + 1)) + { + thd->clear_error(); + } /* if ( (*error_num = spider_get_sts(share, spider->search_link_idx, -- cgit v1.2.1