mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fixed compiler warnings (A few of these was bugs)
client/mysqldump.c: Slave needs to be initialized with 0 dbug/dbug.c: Removed not existing function plugin/semisync/semisync_master.cc: Fixed compiler warning sql/opt_range.cc: thd needs to be set early as it's used in some error conditions. sql/sql_table.cc: Changed to use uchar* to make array indexing portable storage/innobase/handler/ha_innodb.cc: Removed not used variable storage/maria/ma_delete.c: Fixed compiler warning storage/maria/ma_write.c: Fixed compiler warning
This commit is contained in:
@@ -1960,8 +1960,9 @@ bool mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists,
|
||||
static uint32 comment_length(THD *thd, uint32 comment_pos,
|
||||
const char **comment_start)
|
||||
{
|
||||
const char *query= thd->query();
|
||||
const char *query_end= query + thd->query_length();
|
||||
/* We use uchar * here to make array indexing portable */
|
||||
const uchar *query= (uchar*) thd->query();
|
||||
const uchar *query_end= (uchar*) query + thd->query_length();
|
||||
const uchar *const state_map= thd->charset()->state_map;
|
||||
|
||||
for (; query < query_end; query++)
|
||||
@@ -1975,12 +1976,12 @@ static uint32 comment_length(THD *thd, uint32 comment_pos,
|
||||
state_map[*query] != MY_LEX_LONG_COMMENT || query[1] != '*')
|
||||
return 0;
|
||||
|
||||
*comment_start= query;
|
||||
*comment_start= (char*) query;
|
||||
|
||||
for (query+= 3; query < query_end; query++)
|
||||
{
|
||||
if (query[-1] == '*' && query[0] == '/')
|
||||
return query - *comment_start + 1;
|
||||
return (char*) query - *comment_start + 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user