Other Statements
| Description | Syntax | Difference |
|---|---|---|
| Transaction-related syntax | Default database isolation level | The default isolation level of an M-compatible database is READ COMMITTED, and that of MySQL is REPEATABLE READ. Only the READ COMMITTED and REPEATABLE READ isolation levels take effect in M-compatible databases. |
| Transaction-related syntax | Transaction nesting | In M-compatible mode, nested transactions are not automatically committed, but in MySQL, they are automatically committed. |
| Transaction-related syntax | Autocommit | In M-compatible mode, GaussDB is used for storage and the GaussDB transaction mechanism is inherited. If DDL or DCL is executed in a transaction, the transaction is not automatically committed. In MySQL, if DDL, DCL, management-related, or lock-related statements are executed, the transaction is automatically committed. |
| Transaction-related syntax | Rollback is required after an error is reported. | If an error is reported for a transaction in an M-compatible database, rollback needs to be performed. There is no such restriction in MySQL. |
| Transaction-related syntax | Lock mechanism | The M-compatible lock mechanism can be used only in transaction blocks. There is no such restriction in MySQL. |
| Lock mechanism | Lock mechanism |
|
| PBE | PBE |
|
| Single-line comment syntax | Single-line comment syntax | The single-line comment syntax is consistent with MySQL only when the m_format_behavior_compat_options parameter is set to 'forbid_none_space_comment'. |