#At file:///home/thek/Development/cpp/mysqlbzr/mysql-6.0-bugteam/
2901 Kristofer Pettersson 2008-11-03 [merge]
Auto merge: 5.1-bugteam -> 6.0-bugteam
modified:
sql/sql_delete.cc
=== modified file 'sql/sql_delete.cc'
--- a/sql/sql_delete.cc 2008-10-10 16:23:30 +0000
+++ b/sql/sql_delete.cc 2008-11-03 16:06:35 +0000
@@ -407,7 +407,11 @@ cleanup:
if (error < 0 || (thd->lex->ignore && !thd->is_fatal_error))
{
- thd->row_count_func= deleted;
+ /*
+ 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);
DBUG_PRINT("info",("%ld records deleted",(long) deleted));
}
| Thread |
|---|
| • bzr commit into mysql-6.0 branch (kristofer.pettersson:2901) | Kristofer Pettersson | 3 Nov |