diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-06-18 12:40:53 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-06-18 15:43:59 +0300 |
commit | 0121d5a790983c08dabedc66e70f862e47f7c8c7 (patch) | |
tree | 5a3912526fd63ed6c1886240724c9116a6ac7577 /sql/sp_rcontext.cc | |
parent | 63027a5763b2b9550979366f9e7488b2d9328cc0 (diff) | |
parent | c55de8d40bba29503773a6a56d6f13f19ca7e339 (diff) | |
download | mariadb-git-0121d5a790983c08dabedc66e70f862e47f7c8c7.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'sql/sp_rcontext.cc')
-rw-r--r-- | sql/sp_rcontext.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc index 6166d1d9615..997f2abe053 100644 --- a/sql/sp_rcontext.cc +++ b/sql/sp_rcontext.cc @@ -851,9 +851,15 @@ int sp_cursor::fetch(THD *thd, List<sp_variable> *vars, bool error_on_no_data) result.set_spvar_list(vars); + DBUG_ASSERT(!thd->is_error()); + /* Attempt to fetch one row */ if (server_side_cursor->is_open()) + { server_side_cursor->fetch(1); + if (thd->is_error()) + return -1; // e.g. data type conversion failed + } /* If the cursor was pointing after the last row, the fetch will |