diff options
author | Nayuta Yanagisawa <nayuta.yanagisawa@hey.com> | 2022-01-05 22:04:48 +0900 |
---|---|---|
committer | Nayuta Yanagisawa <nayuta.yanagisawa@hey.com> | 2022-01-05 22:04:48 +0900 |
commit | 05b17c3dd0652e1732607c0ef67d2f72a8670ae2 (patch) | |
tree | 2abdf7f81760877a33d24922a08fd703c8726c11 | |
parent | 8d7d39a26cc56db59c9e869d3a5d9af945d7366f (diff) | |
download | mariadb-git-05b17c3dd0652e1732607c0ef67d2f72a8670ae2.tar.gz |
tmp (doesn't work)
-rw-r--r-- | storage/spider/spd_table.cc | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index 801c3252455..f90392b75d3 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -7295,27 +7295,19 @@ int spider_db_init( } { - uint i = 0; - THD *thd= spider_create_thd(); - tmp_disable_binlog(thd); - thd->security_ctx->skip_grants(); - thd->client_capabilities |= CLIENT_MULTI_RESULTS; + MYSQL *mysql= mysql_init(NULL); + if (mysql_real_connect_local(mysql) == NULL) + goto error_init_udf_table_mon_list_hash; - while (spider_init_queries[i].length && !thd->killed) + uint i = 0; + while (spider_init_queries[i].length) { - dispatch_command(COM_QUERY, thd, spider_init_queries[i].str, - (uint) spider_init_queries[i].length, FALSE, FALSE); - if (unlikely(thd->is_error())) + if (mysql_real_query(mysql, spider_init_queries[i].str, spider_init_queries[i].length)) { - fprintf(stderr, "[ERROR] %s\n", spider_stmt_da_message(thd)); - thd->clear_error(); - break; + goto error_init_udf_table_mon_list_hash; } ++i; } - thd->client_capabilities -= CLIENT_MULTI_RESULTS; - reenable_binlog(thd); - spider_destroy_thd(thd); } #ifndef WITHOUT_SPIDER_BG_SEARCH |