diff options
author | Guilhem Bichot <guilhem@mysql.com> | 2008-11-21 15:21:50 +0100 |
---|---|---|
committer | Guilhem Bichot <guilhem@mysql.com> | 2008-11-21 15:21:50 +0100 |
commit | 33b194c36ec28528fd349dd17412848de2f1171c (patch) | |
tree | 68cba4897925b9395dd0bfe53b5b95a777d78637 /sql/sql_delete.cc | |
parent | 8d96bcda72df224f7a656cbcc1535a027bada75f (diff) | |
parent | 1d521f6c20881997c9162bd11cadcbc77d20520b (diff) | |
download | mariadb-git-33b194c36ec28528fd349dd17412848de2f1171c.tar.gz |
Merge of 5.1-main into 5.1-maria. There were no changes to storage/myisam, or mysql-test/t/*myisam*.
However there were three new tests mysql-test/suite/parts/t/partition*myisam.test, of which I make here
copies for Maria.
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 5debb3170f7..47d2d69ef35 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -398,7 +398,11 @@ cleanup: free_underlaid_joins(thd, select_lex); 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)); } |