summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2003-12-10 22:26:31 +0300
committerunknown <konstantin@mysql.com>2003-12-10 22:26:31 +0300
commitceab00b0c8ac072d83f565ac6c0f86bf8e0c22f3 (patch)
treebbfbb126a26544bfe84128c5ea57d8cc2355ef69 /sql/sql_insert.cc
parent4c00978b43921525d59f52da1ad13b516da16f1e (diff)
downloadmariadb-git-ceab00b0c8ac072d83f565ac6c0f86bf8e0c22f3.tar.gz
cleanup: if there is return from if-part, we don't need else statement
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc19
1 files changed, 8 insertions, 11 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 3414e76e092..a92379a6d3b 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -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;
}