Syntax:
STOP SLAVE [thread_types]

thread_types:
    [thread_type [, thread_type] ... ]

thread_type: IO_THREAD | SQL_THREAD

Stops the slave threads. STOP SLAVE requires the SUPER privilege.
Recommended best practice is to execute STOP SLAVE on the slave before
stopping the slave server (see
http://dev.mysql.com/doc/refman/5.5/en/server-shutdown.html, for more
information).

When using the row-based logging format: You should execute STOP SLAVE
on the slave prior to shutting down the slave server if you are
replicating any tables that use a nontransactional storage engine (see
the Note later in this section). In MySQL 5.5.9 and later, you can also
use STOP SLAVE SQL_THREAD for this purpose.

Like START SLAVE, this statement may be used with the IO_THREAD and
SQL_THREAD options to name the thread or threads to be stopped.

*Note*: In MySQL 5.5, STOP SLAVE waits until the current replication
event group affecting one or more non-transactional tables has finished
executing (if there is any such replication group), or until the user
issues a KILL QUERY or KILL CONNECTION statement. (Bug #319, Bug
#38205)

URL: https://mariadb.com/kb/en/stop-slave/

