Commit bbb1140d authored by Kentoku SHIBA's avatar Kentoku SHIBA

add pointer of ha_spider to Spider's use_result function

parent f16633c1
......@@ -4197,7 +4197,7 @@ int spider_db_store_result(
request_key.handler = spider;
request_key.request_id = spider->db_request_id[link_idx];
request_key.next = NULL;
if (!(current->result = conn->db_conn->use_result(&request_key,
if (!(current->result = conn->db_conn->use_result(spider, &request_key,
&error_num)))
{
if (!error_num)
......@@ -4930,7 +4930,7 @@ void spider_db_discard_result(
request_key.handler = spider;
request_key.request_id = spider->db_request_id[link_idx];
request_key.next = NULL;
if ((result = conn->db_conn->use_result(&request_key, &error_num)))
if ((result = conn->db_conn->use_result(spider, &request_key, &error_num)))
{
result->free_result();
delete result;
......@@ -4960,7 +4960,7 @@ void spider_db_discard_multiple_result(
{
if (!conn->db_conn->cmp_request_key_to_snd(&request_key))
break;
if ((result = conn->db_conn->use_result(&request_key, &error_num)))
if ((result = conn->db_conn->use_result(spider, &request_key, &error_num)))
{
result->free_result();
delete result;
......@@ -6845,7 +6845,8 @@ int spider_db_bulk_insert(
request_key.handler = spider;
request_key.request_id = spider->db_request_id[roop_count2];
request_key.next = NULL;
if ((result = conn->db_conn->use_result(&request_key, &error_num)))
if ((result = conn->db_conn->use_result(spider, &request_key,
&error_num)))
{
result->free_result();
delete result;
......@@ -7015,7 +7016,8 @@ int spider_db_bulk_bulk_insert(
request_key.handler = spider;
request_key.request_id = spider->db_request_id[roop_count2];
request_key.next = NULL;
if ((result = conn->db_conn->use_result(&request_key, &error_num)))
if ((result = conn->db_conn->use_result(spider, &request_key,
&error_num)))
{
result->free_result();
delete result;
......@@ -7873,7 +7875,8 @@ int spider_db_direct_update(
request_key.handler = spider;
request_key.request_id = spider->db_request_id[roop_count];
request_key.next = NULL;
if ((result = conn->db_conn->use_result(&request_key, &error_num)))
if ((result = conn->db_conn->use_result(spider, &request_key,
&error_num)))
{
if (!counted)
{
......@@ -8199,7 +8202,8 @@ int spider_db_bulk_direct_update(
request_key.handler = spider;
request_key.request_id = spider->db_request_id[roop_count];
request_key.next = NULL;
if ((result = conn->db_conn->use_result(&request_key, &error_num)))
if ((result = conn->db_conn->use_result(spider, &request_key,
&error_num)))
{
if (!counted)
{
......@@ -8526,7 +8530,8 @@ int spider_db_direct_delete(
request_key.handler = spider;
request_key.request_id = spider->db_request_id[roop_count];
request_key.next = NULL;
if ((result = conn->db_conn->use_result(&request_key, &error_num)))
if ((result = conn->db_conn->use_result(spider, &request_key,
&error_num)))
{
if (!counted)
{
......@@ -10868,7 +10873,7 @@ int spider_db_udf_direct_sql(
request_key.handler = direct_sql;
request_key.request_id = 1;
request_key.next = NULL;
if ((result = conn->db_conn->use_result(&request_key, &error_num)))
if ((result = conn->db_conn->use_result(NULL, &request_key, &error_num)))
{
end_of_file = FALSE;
if (roop_count >= 0)
......@@ -11813,7 +11818,7 @@ int spider_db_udf_copy_tables(
request_key.handler = copy_tables;
request_key.request_id = 1;
request_key.next = NULL;
if ((result = tmp_conn->db_conn->use_result(&request_key, &error_num)))
if ((result = tmp_conn->db_conn->use_result(NULL, &request_key, &error_num)))
{
SPIDER_DB_ROW *row;
roop_count = 0;
......@@ -12290,7 +12295,8 @@ int spider_db_open_handler(
request_key.handler = spider;
request_key.request_id = spider->db_request_id[link_idx];
request_key.next = NULL;
if (!(result = conn->db_conn->use_result(&request_key, &error_num)))
if (!(result = conn->db_conn->use_result(spider, &request_key,
&error_num)))
{
if (!error_num)
{
......@@ -12429,7 +12435,8 @@ int spider_db_bulk_open_handler(
request_key.handler = spider;
request_key.request_id = spider->db_request_id[link_idx];
request_key.next = NULL;
if (!(result = conn->db_conn->use_result(&request_key, &error_num)))
if (!(result = conn->db_conn->use_result(spider, &request_key,
&error_num)))
{
if (!error_num)
{
......
......@@ -1438,6 +1438,7 @@ spider_db_result *spider_db_handlersocket::store_result(
}
spider_db_result *spider_db_handlersocket::use_result(
ha_spider *spider,
st_spider_db_request_key *request_key,
int *error_num
) {
......
......@@ -330,6 +330,7 @@ class spider_db_handlersocket: public spider_db_conn
int *error_num
);
spider_db_result *use_result(
ha_spider *spider,
st_spider_db_request_key *request_key,
int *error_num
);
......
......@@ -1123,6 +1123,7 @@ class spider_db_conn
int *error_num
) = 0;
virtual spider_db_result *use_result(
ha_spider *spider,
st_spider_db_request_key *request_key,
int *error_num
) = 0;
......
......@@ -2407,6 +2407,7 @@ spider_db_result *spider_db_mbase::store_result(
}
spider_db_result *spider_db_mbase::use_result(
ha_spider *spider,
st_spider_db_request_key *request_key,
int *error_num
) {
......
......@@ -453,6 +453,7 @@ class spider_db_mbase: public spider_db_conn
int *error_num
);
spider_db_result *use_result(
ha_spider *spider,
st_spider_db_request_key *request_key,
int *error_num
);
......
......@@ -1700,6 +1700,7 @@ spider_db_result *spider_db_oracle::store_result(
}
spider_db_result *spider_db_oracle::use_result(
ha_spider *spider,
st_spider_db_request_key *request_key,
int *error_num
) {
......
......@@ -380,6 +380,7 @@ class spider_db_oracle: public spider_db_conn
int *error_num
);
spider_db_result *use_result(
ha_spider *spider,
st_spider_db_request_key *request_key,
int *error_num
);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment