0
0
MySQLquery~10 mins

Isolation levels in MySQL - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the transaction isolation level to READ COMMITTED.

MySQL
SET TRANSACTION ISOLATION LEVEL [1];
Drag options to blanks, or click blank then click option'
AREAD COMMITTED
BREPEATABLE READ
CREAD UNCOMMITTED
DSERIALIZABLE
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing READ UNCOMMITTED which allows dirty reads.
Using SERIALIZABLE which is stricter than needed.
2fill in blank
medium

Complete the code to start a transaction with the SERIALIZABLE isolation level.

MySQL
START TRANSACTION ISOLATION LEVEL [1];
Drag options to blanks, or click blank then click option'
AREAD UNCOMMITTED
BREAD COMMITTED
CSERIALIZABLE
DREPEATABLE READ
Attempts:
3 left
💡 Hint
Common Mistakes
Using REPEATABLE READ which is less strict.
Forgetting to specify the isolation level in the transaction start.
3fill in blank
hard

Fix the error in the code to set the isolation level globally.

MySQL
SET GLOBAL TRANSACTION ISOLATION LEVEL [1];
Drag options to blanks, or click blank then click option'
AREPEATABLE READ
BREAD UNCOMMITTED
CREAD COMMITTED
DSERIALIZABLE
Attempts:
3 left
💡 Hint
Common Mistakes
Using an unsupported isolation level for global setting.
Syntax errors in the SET GLOBAL command.
4fill in blank
hard

Fill both blanks to complete the query that shows the current transaction isolation level.

MySQL
SELECT @@transaction_isolation AS [1], @@global.transaction_isolation AS [2];
Drag options to blanks, or click blank then click option'
Acurrent_level
Bglobal_level
Cisolation_level
Dlevel
Attempts:
3 left
💡 Hint
Common Mistakes
Using the same alias for both columns.
Using non-descriptive alias names.
5fill in blank
hard

Fill the blanks to complete the code that sets the isolation level for the next transaction and then starts it.

MySQL
SET SESSION TRANSACTION ISOLATION LEVEL [1]; START TRANSACTION [2];
Drag options to blanks, or click blank then click option'
AREAD COMMITTED
BISOLATION LEVEL SERIALIZABLE
CREAD UNCOMMITTED
DISOLATION LEVEL READ COMMITTED
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing isolation level keywords incorrectly.
Not specifying isolation level in START TRANSACTION.