diff options
author | unknown <igor@olga.mysql.com> | 2007-02-07 14:41:57 -0800 |
---|---|---|
committer | unknown <igor@olga.mysql.com> | 2007-02-07 14:41:57 -0800 |
commit | 3609c3a4a3aaa42525d22d9de4f92c0ca7ffeeac (patch) | |
tree | 7a6c439a65c4d5d7cf88f8d2c9a461069b372870 /sql/sql_update.cc | |
parent | 3a54e5930dc70da39cea42464448cdda14178603 (diff) | |
download | mariadb-git-3609c3a4a3aaa42525d22d9de4f92c0ca7ffeeac.tar.gz |
Fixed bug #25931.
View check option clauses were ignored for updates of multi-table
views when the updates could not be performed on fly and the rows
to update had to be put into temporary tables first.
mysql-test/r/view.result:
Added a test case for bug #25931.
mysql-test/t/view.test:
Added a test case for bug #25931.
Adjusted another existed test case to have the correct result.
sql/sql_update.cc:
Fixed bug #25931.
View check option clauses were ignored for updates of multi-table
views when the updates could not be performed on fly and the rows
to update had to be put into temporary tables first.
Added the required check to multi_update::do_updates to fix the problem.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 04d341b5f67..1db77f8704c 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1445,6 +1445,15 @@ int multi_update::do_updates(bool from_send_error) if (!can_compare_record || compare_record(table, thd->query_id)) { + int error; + if ((error= cur_table->view_check_option(thd, ignore)) != + VIEW_CHECK_OK) + { + if (error == VIEW_CHECK_SKIP) + continue; + else if (error == VIEW_CHECK_ERROR) + goto err; + } if ((local_error=table->file->update_row(table->record[1], table->record[0]))) { |