Hi, Kristofer!
On Nov 17, Kristofer Pettersson wrote:
> #At file:///home/thek/Development/cpp/mysqlbzr/mysql-5.1-bug37016/
>
> 2704 Kristofer Pettersson 2008-11-17
> Bug#37016 TRUNCATE TABLE removes some rows but not all
>
> === modified file 'sql/sql_delete.cc'
> --- a/sql/sql_delete.cc 2008-11-03 13:08:42 +0000
> +++ b/sql/sql_delete.cc 2008-11-17 11:33:48 +0000
> @@ -1065,7 +1065,10 @@ trunc_by_del:
> thd->clear_current_stmt_binlog_row_based();
> error= mysql_delete(thd, table_list, (COND*) 0, (SQL_LIST*) 0,
> HA_POS_ERROR, LL(0), TRUE);
> - ha_enable_transaction(thd, TRUE);
> +
> + if (!error)
> + ha_enable_transaction(thd, TRUE);
> +
No, this makes no sense. After transactions were disabled they must
be enabled. Not conditionally enabled, otherwise under certain
conditions they'll stay disabled which may affect all future operations
inthis connection.
Regards / Mit vielen GrЭъen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect
/_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB MЭnchen 161028
<___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten
GeschДftsfЭhrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin HДring