Commit 8c28b27f authored by Nayuta Yanagisawa's avatar Nayuta Yanagisawa

MDEV-28301 Spider: Fix GCC warnings, comparing the result of pointer addition ... and NULL

The condition of the if statements are always true.
parent 480323f7
...@@ -3444,27 +3444,15 @@ int spider_db_mbase::append_lock_tables( ...@@ -3444,27 +3444,15 @@ int spider_db_mbase::append_lock_tables(
conn_link_idx = tmp_spider->conn_link_idx[tmp_link_idx]; conn_link_idx = tmp_spider->conn_link_idx[tmp_link_idx];
spider_mbase_share *db_share = (spider_mbase_share *) spider_mbase_share *db_share = (spider_mbase_share *)
tmp_spider->share->dbton_share[conn->dbton_id]; tmp_spider->share->dbton_share[conn->dbton_id];
if (&db_share->db_names_str[conn_link_idx])
{ db_name = db_share->db_names_str[conn_link_idx].ptr();
db_name = db_share->db_names_str[conn_link_idx].ptr(); db_name_length = db_share->db_names_str[conn_link_idx].length();
db_name_length = db_share->db_names_str[conn_link_idx].length(); db_name_charset = tmp_spider->share->access_charset;
db_name_charset = tmp_spider->share->access_charset;
} else { table_name = db_share->table_names_str[conn_link_idx].ptr();
db_name = tmp_spider->share->tgt_dbs[conn_link_idx]; table_name_length = db_share->table_names_str[conn_link_idx].length();
db_name_length = tmp_spider->share->tgt_dbs_lengths[conn_link_idx]; table_name_charset = tmp_spider->share->access_charset;
db_name_charset = system_charset_info;
}
if (&db_share->table_names_str[conn_link_idx])
{
table_name = db_share->table_names_str[conn_link_idx].ptr();
table_name_length = db_share->table_names_str[conn_link_idx].length();
table_name_charset = tmp_spider->share->access_charset;
} else {
table_name = tmp_spider->share->tgt_table_names[conn_link_idx];
table_name_length =
tmp_spider->share->tgt_table_names_lengths[conn_link_idx];
table_name_charset = system_charset_info;
}
if ((error_num = spider_db_mbase_utility-> if ((error_num = spider_db_mbase_utility->
append_lock_table_body( append_lock_table_body(
str, str,
......
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