1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

WL#1567: Add ROW_COUNT() Function to retrieve count of rows updated/inserted/deleted

mysql-test/r/sp.result:
  New test cases for function ROW_COUNT().
mysql-test/t/sp.test:
  New test cases for function ROW_COUNT().
sql/item_func.cc:
  New Item_func_row_count.
sql/item_func.h:
  New Item_func_row_count.
sql/lex.h:
  New symbol for function ROW_COUNT().
sql/sql_class.h:
  New slot in THD for storing the row_count after insert, delete and update.
sql/sql_delete.cc:
  Set thd->row_count_func when deleting.
sql/sql_insert.cc:
  Set thd->row_count_func when inserting.
sql/sql_parse.cc:
  Stored procedure CALLs send the row count from the last insert, delete or update.
sql/sql_update.cc:
  Set thd->row_count_func when updating.
sql/sql_yacc.yy:
  New function ROW_COUNT().
This commit is contained in:
unknown
2004-05-04 13:45:20 +02:00
parent 2eecc377a6
commit 7c4ceb739f
11 changed files with 88 additions and 8 deletions

View File

@@ -829,6 +829,7 @@ public:
bool charset_is_system_charset, charset_is_collation_connection;
bool slow_command;
ulong row_count_func; /* For the ROW_COUNT() function */
sp_rcontext *spcont; // SP runtime context
sp_cache *sp_proc_cache;
sp_cache *sp_func_cache;