summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2010-07-02 20:24:39 -0700
committerIgor Babaev <igor@askmonty.org>2010-07-02 20:24:39 -0700
commitb95bd9f5e2040609e2269772ec4ed043d0036cf4 (patch)
tree03d1d64e574100dd934e2d2fb8dcf0925e4200fb /sql/sql_update.cc
parent4ee9e66d87cc9ee265b502f803c6884fa3f45940 (diff)
downloadmariadb-git-b95bd9f5e2040609e2269772ec4ed043d0036cf4.tar.gz
Fixed bug #601164.
The functions mysql_delete and mysql_update lacked calls of updated_virtual_fields(). This caused wrong results for some DELETEs/UPDATEs. Added test cases for this bug.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 3c8f537d1d8..e260310206a 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -469,6 +469,7 @@ int mysql_update(THD *thd,
while (!(error=info.read_record(&info)) &&
!thd->killed && !thd->is_error())
{
+ update_virtual_fields(table);
if (!select || select->skip_record(thd) > 0)
{
if (table->file->was_semi_consistent_read())
@@ -575,6 +576,7 @@ int mysql_update(THD *thd,
while (!(error=info.read_record(&info)) && !thd->killed)
{
+ update_virtual_fields(table);
if (!select || select->skip_record(thd) > 0)
{
if (table->file->was_semi_consistent_read())