summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-11-09 23:51:51 -0800
committerIgor Babaev <igor@askmonty.org>2012-11-09 23:51:51 -0800
commit094f4cf77890c5a747a57cf2bed149b0b6933507 (patch)
tree8b49d3ba3b35bf8e914b29163eefac05f6c5420d /sql/sql_delete.cc
parentb0fec77df9c359474f8f2c11c538ae0db8e31975 (diff)
downloadmariadb-git-094f4cf77890c5a747a57cf2bed149b0b6933507.tar.gz
Fixed bug mdev-3845.
If triggers are used for an insert/update/delete statement than the values of all virtual columns must be computed as any of them may be used by the triggers.
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 72a5b9703b3..90ca139d17b 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -313,7 +313,9 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
while (!(error=info.read_record(&info)) && !thd->killed &&
! thd->is_error())
{
- update_virtual_fields(thd, table);
+ update_virtual_fields(thd, table,
+ triggers_applicable ? VCOL_UPDATE_ALL :
+ VCOL_UPDATE_FOR_READ);
thd->examined_row_count++;
// thd->is_error() is tested to disallow delete row on error
if (!select || select->skip_record(thd) > 0)