diff options
-rw-r--r-- | sql/opt_range.cc | 5 | ||||
-rw-r--r-- | sql/sp_head.cc | 10 | ||||
-rw-r--r-- | sql/sql_acl.cc | 2 | ||||
-rw-r--r-- | sql/sql_db.cc | 3 | ||||
-rw-r--r-- | sql/sql_insert.cc | 11 | ||||
-rw-r--r-- | sql/sql_parse.cc | 2 | ||||
-rw-r--r-- | sql/sql_update.cc | 4 |
7 files changed, 17 insertions, 20 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index a144570a405..7f98462cf84 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -1882,7 +1882,6 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge, double blocks_in_index_read; ha_rows roru_total_records; double roru_intersect_part= 1.0; - double sweep_cost; DBUG_ENTER("get_best_disjunct_quick"); DBUG_PRINT("info", ("Full table scan cost =%g", read_time)); @@ -2449,7 +2448,7 @@ bool ror_intersect_add(const PARAM *param, ROR_INTERSECT_INFO *info, DBUG_PRINT("info", ("Adding scan on %s", info->param->table->key_info[ror_scan->keynr].name)); SEL_ARG *tuple_arg= NULL; - char *key_ptr= key_val; + char *key_ptr= (char*) key_val; bool cur_covered, prev_covered= bitmap_is_set(&info->covered_fields, key_part->fieldnr); @@ -2481,7 +2480,7 @@ bool ror_intersect_add(const PARAM *param, ROR_INTERSECT_INFO *info, } } ha_rows records; - min_range.length= max_range.length= key_ptr - key_val; + min_range.length= max_range.length= ((char*) key_ptr - (char*) key_val); records= param->table->file-> records_in_range(ror_scan->keynr, &min_range, diff --git a/sql/sp_head.cc b/sql/sp_head.cc index d4ba43cef20..89114e4f62b 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -695,7 +695,6 @@ sp_head::restore_lex(THD *thd) DBUG_ENTER("sp_head::restore_lex"); LEX *sublex= thd->lex; LEX *oldlex= (LEX *)m_lex.pop(); - SELECT_LEX *sl; if (! oldlex) return; // Nothing to restore @@ -866,7 +865,7 @@ sp_head::show_create_procedure(THD *thd) if (sql_mode_var) { sql_mode_str= sql_mode_var->value_ptr(thd, OPT_SESSION, 0); - sql_mode_len= strlen(sql_mode_str); + sql_mode_len= strlen((char*) sql_mode_str); } field_list.push_back(new Item_empty_string("Procedure", NAME_LEN)); @@ -883,7 +882,7 @@ sp_head::show_create_procedure(THD *thd) protocol->prepare_for_resend(); protocol->store(m_name.str, m_name.length, system_charset_info); if (sql_mode_var) - protocol->store(sql_mode_str, sql_mode_len, system_charset_info); + protocol->store((char*) sql_mode_str, sql_mode_len, system_charset_info); protocol->store(m_defstr.str, m_defstr.length, system_charset_info); res= protocol->write(); send_eof(thd); @@ -931,7 +930,7 @@ sp_head::show_create_function(THD *thd) if (sql_mode_var) { sql_mode_str= sql_mode_var->value_ptr(thd, OPT_SESSION, 0); - sql_mode_len= strlen(sql_mode_str); + sql_mode_len= strlen((char*) sql_mode_str); } field_list.push_back(new Item_empty_string("Function",NAME_LEN)); @@ -947,7 +946,7 @@ sp_head::show_create_function(THD *thd) protocol->prepare_for_resend(); protocol->store(m_name.str, m_name.length, system_charset_info); if (sql_mode_var) - protocol->store(sql_mode_str, sql_mode_len, system_charset_info); + protocol->store((char*) sql_mode_str, sql_mode_len, system_charset_info); protocol->store(m_defstr.str, m_defstr.length, system_charset_info); res= protocol->write(); send_eof(thd); @@ -990,7 +989,6 @@ int sp_instr_stmt::exec_stmt(THD *thd, LEX *lex) { LEX *olex; // The other lex - SELECT_LEX *sl; int res; olex= thd->lex; // Save the other lex diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index fcd51eb2273..10a12ef6d04 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -2907,7 +2907,7 @@ bool check_grant_all_columns(THD *thd, ulong want_access, GRANT_INFO *grant, { GRANT_TABLE *grant_table; GRANT_COLUMN *grant_column; - Field *field=0,**ptr; + Field *field=0; want_access &= ~grant->privilege; if (!want_access) diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 5a42c79efe9..a1ccfe8d22c 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -225,7 +225,7 @@ void del_dbopt(const char *path) { my_dbopt_t *opt; rw_wrlock(&LOCK_dboptions); - if ((opt= (my_dbopt_t *)hash_search(&dboptions, path, strlen(path)))) + if ((opt= (my_dbopt_t *)hash_search(&dboptions, (byte*) path, strlen(path)))) hash_delete(&dboptions, (byte*) opt); rw_unlock(&LOCK_dboptions); } @@ -549,7 +549,6 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) char path[FN_REFLEN+16], tmp_db[NAME_LEN+1]; MY_DIR *dirp; uint length; - my_dbopt_t *dbopt; DBUG_ENTER("mysql_rm_db"); VOID(pthread_mutex_lock(&LOCK_mysql_create_db)); diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 08bf33e560d..33b99d4ccf9 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -407,7 +407,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, !thd->cuted_fields)) { thd->row_count_func= info.copied+info.deleted+info.updated; - send_ok(thd, thd->row_count_func, id); + send_ok(thd, (ulong) (ulong) thd->row_count_func, id); } else { @@ -420,7 +420,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records, (ulong) (info.deleted+info.updated), (ulong) thd->cuted_fields); thd->row_count_func= info.copied+info.deleted+info.updated; - ::send_ok(thd, thd->row_count_func, (ulonglong)id,buff); + ::send_ok(thd, (ulong) thd->row_count_func, (ulonglong)id,buff); } free_underlaid_joins(thd, &thd->lex->select_lex); table->insert_values=0; @@ -453,6 +453,7 @@ static bool check_view_insertability(TABLE_LIST *view, ulong query_id) { DBUG_ENTER("check_key_in_view"); + uint i; TABLE *table= view->table; Item **trans= view->field_translation; Field **field_ptr= table->field; @@ -462,7 +463,7 @@ static bool check_view_insertability(TABLE_LIST *view, ulong query_id) view->contain_auto_increment= 0; /* check simplicity and prepare unique test of view */ - for (uint i= 0; i < num; i++) + for (i= 0; i < num; i++) { /* simple SELECT list entry (field without expression) */ if (trans[i]->type() != Item::FIELD_ITEM) @@ -473,7 +474,7 @@ static bool check_view_insertability(TABLE_LIST *view, ulong query_id) ((Item_field *)trans[i])->field->query_id= other_query_id; } /* unique test */ - for (uint i= 0; i < num; i++) + for (i= 0; i < num; i++) { Item_field *field= (Item_field *)trans[i]; if (field->field->query_id == query_id) @@ -1728,7 +1729,7 @@ bool select_insert::send_eof() sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records, (ulong) (info.deleted+info.updated), (ulong) thd->cuted_fields); thd->row_count_func= info.copied+info.deleted+info.updated; - ::send_ok(thd, thd->row_count_func, last_insert_id, buff); + ::send_ok(thd, (ulong) thd->row_count_func, last_insert_id, buff); DBUG_RETURN(0); } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index fe2d6f8faa1..be063211a7d 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3672,7 +3672,7 @@ purposes internal to the MySQL server", MYF(0)); } if (res == 0) - send_ok(thd, (thd->row_count_func < 0 ? 0 : thd->row_count_func)); + send_ok(thd, (ulong) (thd->row_count_func < 0 ? 0 : thd->row_count_func)); else goto error; // Substatement should already have sent error } diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 591a2dc0807..7d49c422194 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -421,7 +421,7 @@ int mysql_update(THD *thd, (ulong) thd->cuted_fields); thd->row_count_func= (thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated; - send_ok(thd, thd->row_count_func, + send_ok(thd, (ulong) thd->row_count_func, thd->insert_id_used ? thd->insert_id() : 0L,buff); DBUG_PRINT("info",("%d records updated",updated)); } @@ -1208,7 +1208,7 @@ bool multi_update::send_eof() (ulong) thd->cuted_fields); thd->row_count_func= (thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated; - ::send_ok(thd, thd->row_count_func, + ::send_ok(thd, (ulong) thd->row_count_func, thd->insert_id_used ? thd->insert_id() : 0L,buff); return 0; } |