summaryrefslogtreecommitdiff
path: root/sql/sp_rcontext.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2016-09-27 10:13:08 +0400
committerAlexander Barkov <bar@mariadb.org>2017-04-05 15:02:51 +0400
commit76714a5c9a4c05fa7084f2c562a9eb50a0b7bd17 (patch)
treefc0e93ef9195d89d4079c8608e102012deb3b5e7 /sql/sp_rcontext.h
parent4bb87996b915a9383c7bf33c8683f128d3791014 (diff)
downloadmariadb-git-76714a5c9a4c05fa7084f2c562a9eb50a0b7bd17.tar.gz
MDEV-10582 sql_mode=ORACLE: explicit cursor attributes %ISOPEN, %ROWCOUNT, %FOUND, %NOTFOUND
Diffstat (limited to 'sql/sp_rcontext.h')
-rw-r--r--sql/sp_rcontext.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/sql/sp_rcontext.h b/sql/sp_rcontext.h
index 2640490fefa..b6b0d4de0c3 100644
--- a/sql/sp_rcontext.h
+++ b/sql/sp_rcontext.h
@@ -452,6 +452,15 @@ public:
my_bool is_open()
{ return MY_TEST(server_side_cursor); }
+ bool found() const
+ { return m_found; }
+
+ ulonglong row_count() const
+ { return m_row_count; }
+
+ ulonglong fetch_count() const
+ { return m_fetch_count; }
+
int fetch(THD *, List<sp_variable> *vars);
sp_instr_cpush *get_instr()
@@ -461,7 +470,10 @@ private:
Select_fetch_into_spvars result;
sp_lex_keeper *m_lex_keeper;
Server_side_cursor *server_side_cursor;
- sp_instr_cpush *m_i; // My push instruction
+ sp_instr_cpush *m_i; // My push instruction
+ ulonglong m_fetch_count; // Number of FETCH commands since last OPEN
+ ulonglong m_row_count; // Number of successful FETCH since last OPEN
+ bool m_found; // If last FETCH fetched a row
void destroy();
}; // class sp_cursor : public Sql_alloc