maria-developers team mailing list archive
Mailing list archive
Re: 9b999e79a35: MDEV-23108: Point in time recovery of binary log fails when sql_mode=ORACLE
On 17/07/20 1:46 pm, Sergei Golubchik wrote:
On Jul 17, sujatha wrote:
revision-id: 9b999e79a358de2c86ae44fe83cf6c62cff1d2ef (mariadb-10.3.21-180-g9b999e79a35)
timestamp: 2020-07-17 12:23:32 +0530
MDEV-23108: Point in time recovery of binary log fails when sql_mode=ORACLE
During point in time recovery of binary log syntax error is reported for
BEGIN statement and recovery fails.
In MariaDB 10.3 and later, setting the sql_mode system variable to Oracle
allows the server to understand a subset of Oracle's PL/SQL language. When
sql_mode=ORACLE is set, it switches the parser from the MariaDB parser to
Oracle compatible parser. With this change 'BEGIN' is not considered as
'START TRANSACTION'. Hence the syntax error is reported.
Add a new option to 'mysqlbinlog' tool named 'sql_mode_oracle'. When
'sql_mode_oracle' option is specified 'BEGIN' statements will be replaced
with 'START TRANSACTION' in the mysqlbinlog output.
Why not to print START TRANSACTION unconditionally? It worsk in all
modes, a user won't need to learn a new option.
There can be user applications that parse the mysqlbinlog output for BEGIN,
they may suffer if we change the expected BEGIN to something else. Hence
the current solution was chosen for GA versions. In 10.6 the BEGIN can
to START TRANSACTION unconditionally.
VP of MariaDB Server Engineering