@@ -6070,6 +6070,36 @@ public function testSessionSystemVariables(): void {
60706070 $ this ->assertSame ( 'utf8mb4 ' , $ result [0 ]->{'@@session.character_set_client ' } );
60716071 }
60726072
6073+ public function testSystemVariablesWithKeywords (): void {
6074+ $ this ->assertQuery ( 'SET default_storage_engine = InnoDB ' );
6075+ $ result = $ this ->assertQuery ( 'SELECT @@default_storage_engine ' );
6076+ $ this ->assertSame ( 'InnoDB ' , $ result [0 ]->{'@@default_storage_engine ' } );
6077+
6078+ $ this ->assertQuery ( 'SET default_collation_for_utf8mb4 = utf8mb4_0900_ai_ci ' );
6079+ $ result = $ this ->assertQuery ( 'SELECT @@default_collation_for_utf8mb4 ' );
6080+ $ this ->assertSame ( 'utf8mb4_0900_ai_ci ' , $ result [0 ]->{'@@default_collation_for_utf8mb4 ' } );
6081+
6082+ $ this ->assertQuery ( 'SET resultset_metadata = FULL ' );
6083+ $ result = $ this ->assertQuery ( 'SELECT @@resultset_metadata ' );
6084+ $ this ->assertSame ( 'FULL ' , $ result [0 ]->{'@@resultset_metadata ' } );
6085+
6086+ $ this ->assertQuery ( 'SET session_track_gtids = OWN_GTID ' );
6087+ $ result = $ this ->assertQuery ( 'SELECT @@session_track_gtids ' );
6088+ $ this ->assertSame ( 'OWN_GTID ' , $ result [0 ]->{'@@session_track_gtids ' } );
6089+
6090+ $ this ->assertQuery ( 'SET session_track_transaction_info = STATE ' );
6091+ $ result = $ this ->assertQuery ( 'SELECT @@session_track_transaction_info ' );
6092+ $ this ->assertSame ( 'STATE ' , $ result [0 ]->{'@@session_track_transaction_info ' } );
6093+
6094+ $ this ->assertQuery ( 'SET transaction_isolation = SERIALIZABLE ' );
6095+ $ result = $ this ->assertQuery ( 'SELECT @@transaction_isolation ' );
6096+ $ this ->assertSame ( 'SERIALIZABLE ' , $ result [0 ]->{'@@transaction_isolation ' } );
6097+
6098+ $ this ->assertQuery ( 'SET use_secondary_engine = FORCED ' );
6099+ $ result = $ this ->assertQuery ( 'SELECT @@use_secondary_engine ' );
6100+ $ this ->assertSame ( 'FORCED ' , $ result [0 ]->{'@@use_secondary_engine ' } );
6101+ }
6102+
60736103 public function testUserVariables (): void {
60746104 $ this ->assertQuery ( 'SET @my_var = 1 ' );
60756105 $ result = $ this ->assertQuery ( 'SELECT @my_var ' );
0 commit comments