diff --git a/storage/spider/mysql-test/spider/r/variable_deprecation.result b/storage/spider/mysql-test/spider/r/variable_deprecation.result index 4b52da3c996..39b7f9d320a 100644 --- a/storage/spider/mysql-test/spider/r/variable_deprecation.result +++ b/storage/spider/mysql-test/spider/r/variable_deprecation.result @@ -43,37 +43,6 @@ Warnings: Warning 1287 The table parameter 'internal_offset' is deprecated and will be removed in a future release DROP TABLE tbl_a; DROP TABLE tbl_b; -# MDEV-28005 Deprecate Spider plugin variables regarding UDFs -SET GLOBAL spider_udf_ds_bulk_insert_rows = 1; -Warnings: -Warning 1287 '@@spider_udf_ds_bulk_insert_rows' is deprecated and will be removed in a future release -SHOW VARIABLES LIKE "spider_udf_ds_bulk_insert_rows"; -Variable_name Value -spider_udf_ds_bulk_insert_rows -1 -SET spider_udf_ds_table_loop_mode = 1; -Warnings: -Warning 1287 '@@spider_udf_ds_table_loop_mode' is deprecated and will be removed in a future release -SHOW VARIABLES LIKE "spider_udf_ds_table_loop_mode"; -Variable_name Value -spider_udf_ds_table_loop_mode 1 -SET spider_udf_ds_use_real_table = 1; -Warnings: -Warning 1287 '@@spider_udf_ds_use_real_table' is deprecated and will be removed in a future release -SHOW VARIABLES LIKE "spider_udf_ds_use_real_table"; -Variable_name Value -spider_udf_ds_use_real_table 1 -SET GLOBAL spider_udf_ct_bulk_insert_interval = 1; -Warnings: -Warning 1287 '@@spider_udf_ct_bulk_insert_interval' is deprecated and will be removed in a future release -SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_interval"; -Variable_name Value -spider_udf_ct_bulk_insert_interval 1 -SET GLOBAL spider_udf_ct_bulk_insert_rows = 1; -Warnings: -Warning 1287 '@@spider_udf_ct_bulk_insert_rows' is deprecated and will be removed in a future release -SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_rows"; -Variable_name Value -spider_udf_ct_bulk_insert_rows 1 # MDEV-27981 Deprecate spider_internal_limit SET spider_internal_limit = 1; Warnings: diff --git a/storage/spider/mysql-test/spider/t/variable_deprecation.test b/storage/spider/mysql-test/spider/t/variable_deprecation.test index 63965cb38c4..c115e8fbec3 100644 --- a/storage/spider/mysql-test/spider/t/variable_deprecation.test +++ b/storage/spider/mysql-test/spider/t/variable_deprecation.test @@ -29,22 +29,6 @@ eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='internal_offset "1"'; DROP TABLE tbl_a; DROP TABLE tbl_b; ---echo # MDEV-28005 Deprecate Spider plugin variables regarding UDFs -SET GLOBAL spider_udf_ds_bulk_insert_rows = 1; -SHOW VARIABLES LIKE "spider_udf_ds_bulk_insert_rows"; - -SET spider_udf_ds_table_loop_mode = 1; -SHOW VARIABLES LIKE "spider_udf_ds_table_loop_mode"; - -SET spider_udf_ds_use_real_table = 1; -SHOW VARIABLES LIKE "spider_udf_ds_use_real_table"; - -SET GLOBAL spider_udf_ct_bulk_insert_interval = 1; -SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_interval"; - -SET GLOBAL spider_udf_ct_bulk_insert_rows = 1; -SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_rows"; - --echo # MDEV-27981 Deprecate spider_internal_limit SET spider_internal_limit = 1; SHOW VARIABLES LIKE "spider_internal_limit"; diff --git a/storage/spider/spd_copy_tables.cc b/storage/spider/spd_copy_tables.cc index 4b2f5174ce0..eb2454b2f29 100644 --- a/storage/spider/spd_copy_tables.cc +++ b/storage/spider/spd_copy_tables.cc @@ -1000,8 +1000,7 @@ long long spider_copy_tables_body( else copy_tables->access_charset = system_charset_info; - bulk_insert_rows = spider_param_udf_ct_bulk_insert_rows( - copy_tables->bulk_insert_rows); + bulk_insert_rows= copy_tables->bulk_insert_rows; for (src_tbl_conn = copy_tables->table_conn[0]; src_tbl_conn; src_tbl_conn = src_tbl_conn->next) { diff --git a/storage/spider/spd_db_conn.cc b/storage/spider/spd_db_conn.cc index c29e9253b3f..1b9b4d7ddc6 100644 --- a/storage/spider/spd_db_conn.cc +++ b/storage/spider/spd_db_conn.cc @@ -9138,10 +9138,8 @@ int spider_db_udf_direct_sql( SPIDER_CONN *conn = direct_sql->conn; SPIDER_DB_RESULT *result = NULL; TABLE *table; - int bulk_insert_rows = (int) spider_param_udf_ds_bulk_insert_rows(thd, - direct_sql->bulk_insert_rows); - int table_loop_mode = spider_param_udf_ds_table_loop_mode(thd, - direct_sql->table_loop_mode); + int bulk_insert_rows= (int) direct_sql->bulk_insert_rows; + int table_loop_mode= direct_sql->table_loop_mode; double ping_interval_at_trx_start = spider_param_ping_interval_at_trx_start(thd); time_t tmp_time = (time_t) time((time_t*) 0); @@ -9255,14 +9253,13 @@ int spider_db_udf_direct_sql( { while (!error_num && !end_of_file) { - udf_table_mutex_index = spider_udf_calc_hash( - direct_sql->db_names[roop_count], - spider_param_udf_table_lock_mutex_count()); - udf_table_mutex_index += spider_udf_calc_hash( - direct_sql->table_names[roop_count], - spider_param_udf_table_lock_mutex_count()); - udf_table_mutex_index %= - spider_param_udf_table_lock_mutex_count(); + udf_table_mutex_index= + spider_udf_calc_hash(direct_sql->db_names[roop_count], + spider_udf_table_lock_mutex_count); + udf_table_mutex_index+= + spider_udf_calc_hash(direct_sql->table_names[roop_count], + spider_udf_table_lock_mutex_count); + udf_table_mutex_index%= spider_udf_table_lock_mutex_count; pthread_mutex_lock( &trx->udf_table_mutexes[udf_table_mutex_index]); table = direct_sql->tables[roop_count]; @@ -10313,8 +10310,7 @@ int spider_db_udf_copy_tables( pthread_mutex_unlock(&tmp_conn->mta_conn_mutex); goto error_db_query; } - bulk_insert_rows = spider_param_udf_ct_bulk_insert_rows( - copy_tables->bulk_insert_rows); + bulk_insert_rows= copy_tables->bulk_insert_rows; if ( select_ct->append_key_order_str(key_info, 0, FALSE) || select_ct->append_limit(0, bulk_insert_rows) || @@ -10526,8 +10522,7 @@ int spider_db_udf_copy_tables( insert_ct->set_sql_to_pos(); } DBUG_PRINT("info",("spider sleep")); - bulk_insert_interval = spider_param_udf_ct_bulk_insert_interval( - copy_tables->bulk_insert_interval); + bulk_insert_interval= copy_tables->bulk_insert_interval; my_sleep(bulk_insert_interval); } } diff --git a/storage/spider/spd_direct_sql.cc b/storage/spider/spd_direct_sql.cc index 6a7d5109081..333532bb107 100644 --- a/storage/spider/spd_direct_sql.cc +++ b/storage/spider/spd_direct_sql.cc @@ -1594,10 +1594,9 @@ long long spider_direct_sql_body( } trx->updated_in_this_trx = TRUE; DBUG_PRINT("info",("spider trx->updated_in_this_trx=TRUE")); - use_real_table = spider_param_udf_ds_use_real_table(thd, - direct_sql->use_real_table); - for (roop_count = 0; roop_count < direct_sql->table_count; roop_count++) - { + use_real_table= direct_sql->use_real_table; + for (roop_count= 0; roop_count < direct_sql->table_count; roop_count++) + { #ifdef SPIDER_NEED_INIT_ONE_TABLE_FOR_FIND_TEMPORARY_TABLE #ifdef SPIDER_use_LEX_CSTRING_for_database_tablename_alias LEX_CSTRING db_name = diff --git a/storage/spider/spd_param.cc b/storage/spider/spd_param.cc index 4bbfdb1f565..d129006ced8 100644 --- a/storage/spider/spd_param.cc +++ b/storage/spider/spd_param.cc @@ -1952,103 +1952,6 @@ int spider_param_direct_dup_insert( direct_dup_insert : THDVAR(thd, direct_dup_insert)); } -static uint spider_udf_table_lock_mutex_count; -/* - 1-: mutex count - */ -static MYSQL_SYSVAR_UINT( - udf_table_lock_mutex_count, - spider_udf_table_lock_mutex_count, - PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, - "Mutex count of table lock for Spider UDFs", - NULL, - NULL, - 20, - 1, - 4294967295U, - 0 -); - -uint spider_param_udf_table_lock_mutex_count() -{ - DBUG_ENTER("spider_param_udf_table_lock_mutex_count"); - DBUG_RETURN(spider_udf_table_lock_mutex_count); -} - -static uint spider_udf_table_mon_mutex_count; -/* - 1-: mutex count - */ -static MYSQL_SYSVAR_UINT( - udf_table_mon_mutex_count, - spider_udf_table_mon_mutex_count, - PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, - "Mutex count of table mon for Spider UDFs", - NULL, - NULL, - 20, - 1, - 4294967295U, - 0 -); - -uint spider_param_udf_table_mon_mutex_count() -{ - DBUG_ENTER("spider_param_udf_table_mon_mutex_count"); - DBUG_RETURN(spider_udf_table_mon_mutex_count); -} - -/* - 1-:number of rows - */ -static MYSQL_THDVAR_LONGLONG( - udf_ds_bulk_insert_rows, /* name */ - PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */ - "Number of rows for bulk inserting", /* comment */ - NULL, /* check */ - NULL, /* update */ - -1, /* def */ - -1, /* min */ - 9223372036854775807LL, /* max */ - 0 /* blk */ -); - -longlong spider_param_udf_ds_bulk_insert_rows( - THD *thd, - longlong udf_ds_bulk_insert_rows -) { - DBUG_ENTER("spider_param_udf_ds_bulk_insert_rows"); - DBUG_RETURN(THDVAR(thd, udf_ds_bulk_insert_rows) <= 0 ? - udf_ds_bulk_insert_rows : THDVAR(thd, udf_ds_bulk_insert_rows)); -} - -/* - -1 :use table parameter - 0 :drop records - 1 :insert last table - 2 :insert first table and loop again - */ -static MYSQL_THDVAR_INT( - udf_ds_table_loop_mode, /* name */ - PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */ - "Table loop mode if the number of tables in table list are less than the number of result sets", /* comment */ - NULL, /* check */ - NULL, /* update */ - -1, /* def */ - -1, /* min */ - 2, /* max */ - 0 /* blk */ -); - -int spider_param_udf_ds_table_loop_mode( - THD *thd, - int udf_ds_table_loop_mode -) { - DBUG_ENTER("spider_param_udf_ds_table_loop_mode"); - DBUG_RETURN(THDVAR(thd, udf_ds_table_loop_mode) == -1 ? - udf_ds_table_loop_mode : THDVAR(thd, udf_ds_table_loop_mode)); -} - static char *spider_remote_access_charset; /* */ @@ -2281,58 +2184,6 @@ int spider_param_bka_mode( bka_mode : THDVAR(thd, bka_mode)); } -static int spider_udf_ct_bulk_insert_interval; -/* - -1 : The UDF parameter is adopted. - 0 or more : Milliseconds. - */ -static MYSQL_SYSVAR_INT( - udf_ct_bulk_insert_interval, - spider_udf_ct_bulk_insert_interval, - PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, - "The interval time between bulk insert and next bulk insert at coping", - NULL, - NULL, - -1, - -1, - 2147483647, - 0 -); - -int spider_param_udf_ct_bulk_insert_interval( - int udf_ct_bulk_insert_interval -) { - DBUG_ENTER("spider_param_udf_ct_bulk_insert_interval"); - DBUG_RETURN(spider_udf_ct_bulk_insert_interval < 0 ? - udf_ct_bulk_insert_interval : spider_udf_ct_bulk_insert_interval); -} - -static longlong spider_udf_ct_bulk_insert_rows; -/* - -1,0 : The UDF parameter is adopted. - 1 or more : Number of rows. - */ -static MYSQL_SYSVAR_LONGLONG( - udf_ct_bulk_insert_rows, - spider_udf_ct_bulk_insert_rows, - PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, - "The number of rows inserted with bulk insert of one time at coping", - NULL, - NULL, - -1, - -1, - 9223372036854775807LL, - 0 -); - -longlong spider_param_udf_ct_bulk_insert_rows( - longlong udf_ct_bulk_insert_rows -) { - DBUG_ENTER("spider_param_udf_ct_bulk_insert_rows"); - DBUG_RETURN(spider_udf_ct_bulk_insert_rows <= 0 ? - udf_ct_bulk_insert_rows : spider_udf_ct_bulk_insert_rows); -} - /* -1 :use table parameter 0 :not use @@ -2517,33 +2368,6 @@ int spider_param_read_only_mode( read_only_mode : THDVAR(thd, read_only_mode)); } - -/* - -1 :use UDF parameter - 0 :can not use - 1 :can use - */ -static MYSQL_THDVAR_INT( - udf_ds_use_real_table, /* name */ - PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */ - "Use real table for temporary table list", /* comment */ - NULL, /* check */ - NULL, /* update */ - -1, /* def */ - -1, /* min */ - 1, /* max */ - 0 /* blk */ -); - -int spider_param_udf_ds_use_real_table( - THD *thd, - int udf_ds_use_real_table -) { - DBUG_ENTER("spider_param_udf_ds_use_real_table"); - DBUG_RETURN(THDVAR(thd, udf_ds_use_real_table) == -1 ? - udf_ds_use_real_table : THDVAR(thd, udf_ds_use_real_table)); -} - static my_bool spider_general_log; static MYSQL_SYSVAR_BOOL( general_log, @@ -3182,10 +3006,6 @@ static struct st_mysql_sys_var* spider_system_variables[] = { MYSQL_SYSVAR(local_lock_table), MYSQL_SYSVAR(use_pushdown_udf), MYSQL_SYSVAR(direct_dup_insert), - MYSQL_SYSVAR(udf_table_lock_mutex_count), - MYSQL_SYSVAR(udf_table_mon_mutex_count), - MYSQL_SYSVAR(udf_ds_bulk_insert_rows), - MYSQL_SYSVAR(udf_ds_table_loop_mode), MYSQL_SYSVAR(remote_access_charset), MYSQL_SYSVAR(remote_autocommit), MYSQL_SYSVAR(remote_time_zone), @@ -3197,8 +3017,6 @@ static struct st_mysql_sys_var* spider_system_variables[] = { MYSQL_SYSVAR(connect_mutex), MYSQL_SYSVAR(bka_engine), MYSQL_SYSVAR(bka_mode), - MYSQL_SYSVAR(udf_ct_bulk_insert_interval), - MYSQL_SYSVAR(udf_ct_bulk_insert_rows), MYSQL_SYSVAR(use_handler), MYSQL_SYSVAR(error_read_mode), MYSQL_SYSVAR(error_write_mode), @@ -3206,7 +3024,6 @@ static struct st_mysql_sys_var* spider_system_variables[] = { MYSQL_SYSVAR(skip_parallel_search), MYSQL_SYSVAR(direct_order_limit), MYSQL_SYSVAR(read_only_mode), - MYSQL_SYSVAR(udf_ds_use_real_table), MYSQL_SYSVAR(general_log), MYSQL_SYSVAR(index_hint_pushdown), MYSQL_SYSVAR(max_connections), diff --git a/storage/spider/spd_param.h b/storage/spider/spd_param.h index 0c5392e302a..4e06034de4c 100644 --- a/storage/spider/spd_param.h +++ b/storage/spider/spd_param.h @@ -14,6 +14,9 @@ along with this program); if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +constexpr uint spider_udf_table_lock_mutex_count= 20; +constexpr uint spider_udf_table_mon_mutex_count= 20; + my_bool spider_param_support_xa(); my_bool spider_param_connect_mutex(); uint spider_param_connect_error_interval(); @@ -263,16 +266,6 @@ int spider_param_direct_dup_insert( THD *thd, int direct_dup_insert ); -uint spider_param_udf_table_lock_mutex_count(); -uint spider_param_udf_table_mon_mutex_count(); -longlong spider_param_udf_ds_bulk_insert_rows( - THD *thd, - longlong udf_ds_bulk_insert_rows -); -int spider_param_udf_ds_table_loop_mode( - THD *thd, - int udf_ds_table_loop_mode -); char *spider_param_remote_access_charset(); int spider_param_remote_autocommit(); char *spider_param_remote_time_zone(); @@ -293,12 +286,6 @@ int spider_param_bka_mode( THD *thd, int bka_mode ); -int spider_param_udf_ct_bulk_insert_interval( - int udf_ct_bulk_insert_interval -); -longlong spider_param_udf_ct_bulk_insert_rows( - longlong udf_ct_bulk_insert_rows -); int spider_param_use_handler( THD *thd, int use_handler @@ -327,10 +314,6 @@ int spider_param_read_only_mode( THD *thd, int read_only_mode ); -int spider_param_udf_ds_use_real_table( - THD *thd, - int udf_ds_use_real_table -); my_bool spider_param_general_log(); my_bool spider_param_index_hint_pushdown( THD *thd diff --git a/storage/spider/spd_ping_table.cc b/storage/spider/spd_ping_table.cc index 9814cf30666..ebd5ac866ca 100644 --- a/storage/spider/spd_ping_table.cc +++ b/storage/spider/spd_ping_table.cc @@ -97,8 +97,8 @@ SPIDER_TABLE_MON_LIST *spider_get_ping_table_mon_list( free_root(&mem_root, MYF(0)); } - mutex_hash = spider_udf_calc_hash(str->c_ptr(), - spider_param_udf_table_mon_mutex_count()); + mutex_hash= + spider_udf_calc_hash(str->c_ptr(), spider_udf_table_mon_mutex_count); DBUG_PRINT("info",("spider hash key=%s", str->c_ptr())); DBUG_PRINT("info",("spider hash key length=%u", str->length())); hash_value = my_calc_hash( @@ -224,8 +224,8 @@ int spider_release_ping_table_mon_list( conv_name_str.q_append(conv_name, conv_name_length); conv_name_str.q_append(link_idx_str, link_idx_str_length); - mutex_hash = spider_udf_calc_hash(conv_name_str.c_ptr_safe(), - spider_param_udf_table_mon_mutex_count()); + mutex_hash= spider_udf_calc_hash(conv_name_str.c_ptr_safe(), + spider_udf_table_mon_mutex_count); my_hash_value_type hash_value = my_calc_hash( &spider_udf_table_mon_list_hash[mutex_hash], (uchar*) conv_name_str.c_ptr(), conv_name_str.length()); diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index 8292f8f5c24..d3ba8356b40 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -4386,7 +4386,7 @@ SPIDER_SHARE *spider_create_share( (uint) (sizeof(*tmp_cardinality_upd) * bitmap_size), &tmp_table_mon_mutex_bitmap, (uint) (sizeof(*tmp_table_mon_mutex_bitmap) * - ((spider_param_udf_table_mon_mutex_count() + 7) / 8)), + ((spider_udf_table_mon_mutex_count + 7) / 8)), NullS)) ) { *error_num = HA_ERR_OUT_OF_MEM; @@ -4436,7 +4436,7 @@ SPIDER_SHARE *spider_create_share( buf_pos = strmov(buf_pos, link_idx_str); *buf_pos = '\0'; spider_set_bit(tmp_table_mon_mutex_bitmap, - spider_udf_calc_hash(buf, spider_param_udf_table_mon_mutex_count()) + spider_udf_calc_hash(buf, spider_udf_table_mon_mutex_count) ); } @@ -4667,7 +4667,7 @@ SPIDER_SHARE *spider_get_share( { pthread_mutex_lock(&share->mutex); for (roop_count = 0; - roop_count < (int) spider_param_udf_table_mon_mutex_count(); + roop_count < (int) spider_udf_table_mon_mutex_count; roop_count++ ) { if (spider_bit_is_set(share->table_mon_mutex_bitmap, roop_count)) @@ -4699,7 +4699,7 @@ SPIDER_SHARE *spider_get_share( FALSE, error_num)) ) { for (roop_count = 0; - roop_count < (int) spider_param_udf_table_mon_mutex_count(); + roop_count < (int) spider_udf_table_mon_mutex_count; roop_count++ ) { if (spider_bit_is_set(share->table_mon_mutex_bitmap, roop_count)) @@ -4721,7 +4721,7 @@ SPIDER_SHARE *spider_get_share( *error_num != HA_ERR_END_OF_FILE ) { for (roop_count = 0; - roop_count < (int) spider_param_udf_table_mon_mutex_count(); + roop_count < (int) spider_udf_table_mon_mutex_count; roop_count++ ) { if (spider_bit_is_set(share->table_mon_mutex_bitmap, roop_count)) @@ -4754,7 +4754,7 @@ SPIDER_SHARE *spider_get_share( } } for (roop_count = 0; - roop_count < (int) spider_param_udf_table_mon_mutex_count(); + roop_count < (int) spider_udf_table_mon_mutex_count; roop_count++ ) { if (spider_bit_is_set(share->table_mon_mutex_bitmap, roop_count)) @@ -5147,7 +5147,7 @@ SPIDER_SHARE *spider_get_share( { pthread_mutex_lock(&share->mutex); for (roop_count = 0; - roop_count < (int) spider_param_udf_table_mon_mutex_count(); + roop_count < (int) spider_udf_table_mon_mutex_count; roop_count++ ) { if (spider_bit_is_set(share->table_mon_mutex_bitmap, roop_count)) @@ -5180,7 +5180,7 @@ SPIDER_SHARE *spider_get_share( FALSE, error_num)) ) { for (roop_count = 0; - roop_count < (int) spider_param_udf_table_mon_mutex_count(); + roop_count < (int) spider_udf_table_mon_mutex_count; roop_count++ ) { if (spider_bit_is_set(share->table_mon_mutex_bitmap, roop_count)) @@ -5199,7 +5199,7 @@ SPIDER_SHARE *spider_get_share( *error_num != HA_ERR_END_OF_FILE ) { for (roop_count = 0; - roop_count < (int) spider_param_udf_table_mon_mutex_count(); + roop_count < (int) spider_udf_table_mon_mutex_count; roop_count++ ) { if (spider_bit_is_set(share->table_mon_mutex_bitmap, roop_count)) @@ -5229,7 +5229,7 @@ SPIDER_SHARE *spider_get_share( } } for (roop_count = 0; - roop_count < (int) spider_param_udf_table_mon_mutex_count(); + roop_count < (int) spider_udf_table_mon_mutex_count; roop_count++ ) { if (spider_bit_is_set(share->table_mon_mutex_bitmap, roop_count)) @@ -6399,7 +6399,7 @@ int spider_db_done( } spider_free(NULL, spider_table_sts_threads, MYF(0)); - for (roop_count = spider_param_udf_table_mon_mutex_count() - 1; + for (roop_count= spider_udf_table_mon_mutex_count - 1; roop_count >= 0; roop_count--) { while ((table_mon_list = (SPIDER_TABLE_MON_LIST *) my_hash_element( @@ -6415,10 +6415,10 @@ int spider_db_done( spider_udf_table_mon_list_hash[roop_count].array.size_of_element); my_hash_free(&spider_udf_table_mon_list_hash[roop_count]); } - for (roop_count = spider_param_udf_table_mon_mutex_count() - 1; + for (roop_count= spider_udf_table_mon_mutex_count - 1; roop_count >= 0; roop_count--) pthread_cond_destroy(&spider_udf_table_mon_conds[roop_count]); - for (roop_count = spider_param_udf_table_mon_mutex_count() - 1; + for (roop_count= spider_udf_table_mon_mutex_count - 1; roop_count >= 0; roop_count--) pthread_mutex_destroy(&spider_udf_table_mon_mutexes[roop_count]); spider_free(NULL, spider_udf_table_mon_mutexes, MYF(0)); @@ -6768,17 +6768,17 @@ int spider_db_init( if (!(spider_udf_table_mon_mutexes = (pthread_mutex_t *) spider_bulk_malloc(NULL, 53, MYF(MY_WME | MY_ZEROFILL), &spider_udf_table_mon_mutexes, (uint) (sizeof(pthread_mutex_t) * - spider_param_udf_table_mon_mutex_count()), + spider_udf_table_mon_mutex_count), &spider_udf_table_mon_conds, (uint) (sizeof(pthread_cond_t) * - spider_param_udf_table_mon_mutex_count()), + spider_udf_table_mon_mutex_count), &spider_udf_table_mon_list_hash, (uint) (sizeof(HASH) * - spider_param_udf_table_mon_mutex_count()), + spider_udf_table_mon_mutex_count), NullS)) ) goto error_alloc_mon_mutxes; for (roop_count = 0; - roop_count < (int) spider_param_udf_table_mon_mutex_count(); + roop_count < (int) spider_udf_table_mon_mutex_count; roop_count++) { if (mysql_mutex_init(spd_key_mutex_udf_table_mon, @@ -6786,7 +6786,7 @@ int spider_db_init( goto error_init_udf_table_mon_mutex; } for (roop_count = 0; - roop_count < (int) spider_param_udf_table_mon_mutex_count(); + roop_count < (int) spider_udf_table_mon_mutex_count; roop_count++) { if (mysql_cond_init(spd_key_cond_udf_table_mon, @@ -6794,7 +6794,7 @@ int spider_db_init( goto error_init_udf_table_mon_cond; } for (roop_count = 0; - roop_count < (int) spider_param_udf_table_mon_mutex_count(); + roop_count < (int) spider_udf_table_mon_mutex_count; roop_count++) { if (my_hash_init(PSI_INSTRUMENT_ME, &spider_udf_table_mon_list_hash[roop_count], @@ -6880,7 +6880,7 @@ error_init_table_sts_threads: spider_free_sts_threads(&spider_table_sts_threads[roop_count]); } spider_free(NULL, spider_table_sts_threads, MYF(0)); - roop_count = spider_param_udf_table_mon_mutex_count() - 1; + roop_count= spider_udf_table_mon_mutex_count - 1; error_init_udf_table_mon_list_hash: for (; roop_count >= 0; roop_count--) { @@ -6890,11 +6890,11 @@ error_init_udf_table_mon_list_hash: spider_udf_table_mon_list_hash[roop_count].array.size_of_element); my_hash_free(&spider_udf_table_mon_list_hash[roop_count]); } - roop_count = spider_param_udf_table_mon_mutex_count() - 1; + roop_count= spider_udf_table_mon_mutex_count - 1; error_init_udf_table_mon_cond: for (; roop_count >= 0; roop_count--) pthread_cond_destroy(&spider_udf_table_mon_conds[roop_count]); - roop_count = spider_param_udf_table_mon_mutex_count() - 1; + roop_count= spider_udf_table_mon_mutex_count - 1; error_init_udf_table_mon_mutex: for (; roop_count >= 0; roop_count--) pthread_mutex_destroy(&spider_udf_table_mon_mutexes[roop_count]); diff --git a/storage/spider/spd_trx.cc b/storage/spider/spd_trx.cc index 79509abbfbc..4ff171d5114 100644 --- a/storage/spider/spd_trx.cc +++ b/storage/spider/spd_trx.cc @@ -1123,7 +1123,7 @@ int spider_free_trx_alloc( spider_free_tmp_share_alloc(trx->tmp_share); } spider_db_udf_free_set_names(trx); - for (roop_count = spider_param_udf_table_lock_mutex_count() - 1; + for (roop_count = spider_udf_table_lock_mutex_count - 1; roop_count >= 0; roop_count--) pthread_mutex_destroy(&trx->udf_table_mutexes[roop_count]); spider_free_trx_ha(trx); @@ -1176,7 +1176,7 @@ SPIDER_TRX *spider_get_trx( &tmp_share, (uint) (sizeof(SPIDER_SHARE)), &tmp_wide_handler, (uint) sizeof(SPIDER_WIDE_HANDLER), &udf_table_mutexes, (uint) (sizeof(pthread_mutex_t) * - spider_param_udf_table_lock_mutex_count()), + spider_udf_table_lock_mutex_count), NullS)) ) goto error_alloc_trx; @@ -1186,7 +1186,7 @@ SPIDER_TRX *spider_get_trx( trx->udf_table_mutexes = udf_table_mutexes; for (roop_count = 0; - roop_count < (int) spider_param_udf_table_lock_mutex_count(); + roop_count < (int) spider_udf_table_lock_mutex_count; roop_count++) { if (mysql_mutex_init(spd_key_mutex_udf_table,