diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-08-29 18:27:16 +0300 |
---|---|---|
committer | Varun Gupta <varunraiko1803@gmail.com> | 2017-11-01 23:13:02 +0530 |
commit | 24e219b179142b3708ff4bdf5ae3db96d6fa184a (patch) | |
tree | dede0c065c0229dd765a8afd5a7ee22bb0f662c4 /sql/sql_window.cc | |
parent | f4ba298abd06024f619659a4d9aae1e3fad97b08 (diff) | |
download | mariadb-git-24e219b179142b3708ff4bdf5ae3db96d6fa184a.tar.gz |
Remove has_error as a member from Item_sum and use THD::is_error() instead
Additionally, allow a query with window functions to be killed by the user during
its execution.
Diffstat (limited to 'sql/sql_window.cc')
-rw-r--r-- | sql/sql_window.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sql/sql_window.cc b/sql/sql_window.cc index e60e23c80cf..9a274179b21 100644 --- a/sql/sql_window.cc +++ b/sql/sql_window.cc @@ -1080,8 +1080,6 @@ protected: while ((item_sum= it++)) { item_sum->add(); - if (item_sum->has_error) - return; } } @@ -2807,10 +2805,11 @@ bool compute_window_func(THD *thd, cursor_manager->notify_cursors_next_row(); } - /* check if we found any error in the window function while calling the add function */ + /* Check if we found any error in the window function while adding values + through cursors. */ + if (thd->is_error() || thd->is_killed()) + break; - if (win_func->window_func()->has_error) - goto label; /* Return to current row after notifying cursors for each window function. */ @@ -2824,7 +2823,6 @@ bool compute_window_func(THD *thd, rownum++; } -label: my_free(rowid_buf); partition_trackers.delete_elements(); end_read_record(&info); |