diff options
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r-- | sql/sql_db.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc index c3cf7429222..80fea3ef1b1 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -239,7 +239,7 @@ void del_dbopt(const char *path) my_dbopt_t *opt; rw_wrlock(&LOCK_dboptions); if ((opt= (my_dbopt_t *)hash_search(&dboptions, (const byte*) path, - strlen(path)))) + (uint) strlen(path)))) hash_delete(&dboptions, (byte*) opt); rw_unlock(&LOCK_dboptions); } @@ -582,7 +582,7 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info, # database does not exist. */ qinfo.db = db; - qinfo.db_len = strlen(db); + qinfo.db_len = (uint) strlen(db); /* These DDL methods and logging protected with LOCK_mysql_create_db */ mysql_bin_log.write(&qinfo); @@ -653,7 +653,7 @@ bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info) default. */ qinfo.db = db; - qinfo.db_len = strlen(db); + qinfo.db_len = (uint) strlen(db); thd->clear_error(); /* These DDL methods and logging protected with LOCK_mysql_create_db */ @@ -777,7 +777,7 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) default. */ qinfo.db = db; - qinfo.db_len = strlen(db); + qinfo.db_len = (uint) strlen(db); thd->clear_error(); /* These DDL methods and logging protected with LOCK_mysql_create_db */ @@ -797,18 +797,18 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) goto exit; /* not much else we can do */ query_pos= query_data_start= strmov(query,"drop table "); query_end= query + MAX_DROP_TABLE_Q_LEN; - db_len= strlen(db); + db_len= (uint) strlen(db); for (tbl= dropped_tables; tbl; tbl= tbl->next_local) { uint tbl_name_len; /* 3 for the quotes and the comma*/ - tbl_name_len= strlen(tbl->table_name) + 3; + tbl_name_len= (uint) strlen(tbl->table_name) + 3; if (query_pos + tbl_name_len + 1 >= query_end) { /* These DDL methods and logging protected with LOCK_mysql_create_db */ - write_to_binlog(thd, query, query_pos -1 - query, db, db_len); + write_to_binlog(thd, query, (uint) (query_pos - 1 - query), db, db_len); query_pos= query_data_start; } @@ -821,7 +821,7 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) if (query_pos != query_data_start) { /* These DDL methods and logging protected with LOCK_mysql_create_db */ - write_to_binlog(thd, query, query_pos -1 - query, db, db_len); + write_to_binlog(thd, query, (uint) (query_pos - 1 - query), db, db_len); } } @@ -938,7 +938,7 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db, /* Drop the table nicely */ *extension= 0; // Remove extension TABLE_LIST *table_list=(TABLE_LIST*) - thd->calloc(sizeof(*table_list)+ strlen(db)+strlen(file->name)+2); + thd->calloc((uint) (sizeof(*table_list)+ strlen(db)+strlen(file->name)+2)); if (!table_list) goto err; table_list->db= (char*) (table_list+1); |