MDEV-6946: Assertion `0' failed in mysql_execute_command on SET STATEMENT keycache1.key_buffer_size=.. FOR

Variable type should be taken by mask GET_TYPE_MASK.
MDEV-6940: SET STATEMENT executed after SET GLOBAL does not work

SET STATEMENT is actually session variables SET so option_type should be set.
Fixed test suite global variable saving