-- Test unsupported set variables for MySQL protocol
-- These should succeed with a warning instead of failing
-- Test setting an unsupported variable
-- SQLNESS PROTOCOL MYSQL
SET autocommit = 1;

affected_rows: 0

-- Test setting with @@ prefix (previously this would succeed)
-- SQLNESS PROTOCOL MYSQL
SET @@autocommit = 1;

affected_rows: 0

-- Test setting character_set_client (commonly used by MySQL clients)
-- SQLNESS PROTOCOL MYSQL
SET character_set_client = 'utf8mb4';

affected_rows: 0

-- Test setting character_set_results
-- SQLNESS PROTOCOL MYSQL
SET character_set_results = 'utf8mb4';

affected_rows: 0

-- Test setting sql_mode
-- SQLNESS PROTOCOL MYSQL
SET sql_mode = 'STRICT_TRANS_TABLES';

affected_rows: 0

-- Test multiple unsupported settings
-- SQLNESS PROTOCOL MYSQL
SET @@session.sql_mode = 'TRADITIONAL';

affected_rows: 0

-- Test NAMES (special MySQL syntax for character set)
-- SQLNESS PROTOCOL MYSQL
SET NAMES utf8mb4;

affected_rows: 0

-- Test collation_connection
-- SQLNESS PROTOCOL MYSQL
SET collation_connection = 'utf8mb4_unicode_ci';

affected_rows: 0

-- Test SHOW WARNINGS after setting unsupported variable
-- SQLNESS PROTOCOL MYSQL
SET some_unsupported_var = 123;

affected_rows: 0

-- SQLNESS PROTOCOL MYSQL
SHOW WARNINGS;

+---------+------+-----------------------------------------------+
| Level   | Code | Message                                       |
+---------+------+-----------------------------------------------+
| Warning | 1000 | Unsupported set variable SOME_UNSUPPORTED_VAR |
+---------+------+-----------------------------------------------+

-- Test that warning is cleared after next statement
-- SQLNESS PROTOCOL MYSQL
SELECT 1;

+----------+
| Int64(1) |
+----------+
| 1        |
+----------+

-- SQLNESS PROTOCOL MYSQL
SHOW WARNINGS;

affected_rows: 0

