In MariaDB, ROW_COUNT() is a built-in function that returns the number of rows updated, inserted or deleted by the preceding statement.
The value returned by ROW_COUNT() is the same as the row count that the mysql client displays and the value from the mysql_affected_rows() C API function.