1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

cleanup: if there is return from if-part, we don't need else statement

This commit is contained in:
konstantin@mysql.com
2003-12-10 22:26:31 +03:00
parent ea81fd27bb
commit 124c4ca346
11 changed files with 36 additions and 56 deletions

View File

@ -1409,18 +1409,15 @@ bool select_insert::send_eof()
::send_error(&thd->net);
return 1;
}
char buff[160];
if (info.handle_duplicates == DUP_IGNORE)
sprintf(buff,ER(ER_INSERT_INFO),info.records,info.records-info.copied,
thd->cuted_fields);
else
{
char buff[160];
if (info.handle_duplicates == DUP_IGNORE)
sprintf(buff,ER(ER_INSERT_INFO),info.records,info.records-info.copied,
thd->cuted_fields);
else
sprintf(buff,ER(ER_INSERT_INFO),info.records,info.deleted,
thd->cuted_fields);
::send_ok(&thd->net,info.copied+info.deleted,last_insert_id,buff);
return 0;
}
sprintf(buff,ER(ER_INSERT_INFO),info.records,info.deleted,
thd->cuted_fields);
::send_ok(&thd->net,info.copied+info.deleted,last_insert_id,buff);
return 0;
}