summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@sun.com>2010-05-18 14:52:51 +0200
committerJon Olav Hauglid <jon.hauglid@sun.com>2010-05-18 14:52:51 +0200
commit198d51efe7a7bcd9ffceb2953faccc39d6df55d6 (patch)
tree7a7d548b20b27bd6b1cdb29f4052ffd1b406f39b /sql/sql_delete.cc
parentd1dd2d11c4207b8e75931b9c575ea51273185b4b (diff)
parent21643fb22e527f4328b1dde1d21193b5e80455e3 (diff)
downloadmariadb-git-198d51efe7a7bcd9ffceb2953faccc39d6df55d6.tar.gz
manual merge from mysql-trunk-bugfixing
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 2a8503077aa..10bdb8a22a6 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -187,8 +187,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
if (prune_partitions(thd, table, conds))
{
free_underlaid_joins(thd, select_lex);
- thd->row_count_func= 0;
- my_ok(thd, (ha_rows) thd->row_count_func); // No matching records
+ // No matching record
+ my_ok(thd, 0);
DBUG_RETURN(0);
}
#endif
@@ -204,7 +204,6 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
{
delete select;
free_underlaid_joins(thd, select_lex);
- thd->row_count_func= 0;
/*
Error was already created by quick select evaluation (check_quick()).
TODO: Add error code output parameter to Item::val_xxx() methods.
@@ -213,7 +212,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
*/
if (thd->is_error())
DBUG_RETURN(TRUE);
- my_ok(thd, (ha_rows) thd->row_count_func);
+ my_ok(thd, 0);
/*
We don't need to call reset_auto_increment in this case, because
mysql_truncate always gives a NULL conds argument, hence we never
@@ -460,8 +459,7 @@ cleanup:
If a TRUNCATE TABLE was issued, the number of rows should be reported as
zero since the exact number is unknown.
*/
- thd->row_count_func= reset_auto_increment ? 0 : deleted;
- my_ok(thd, (ha_rows) thd->row_count_func);
+ my_ok(thd, reset_auto_increment ? 0 : deleted);
DBUG_PRINT("info",("%ld records deleted",(long) deleted));
}
DBUG_RETURN(error >= 0 || thd->is_error());
@@ -1058,8 +1056,7 @@ bool multi_delete::send_eof()
if (!local_error)
{
- thd->row_count_func= deleted;
- ::my_ok(thd, (ha_rows) thd->row_count_func);
+ ::my_ok(thd, deleted);
}
return 0;
}