MDEV-24818 was implemented in the MariaDB Server 10.6 branch that was eventually released as 10.6.0, only the first INSERT statement was executed in "bulk insert into empty table" mode. After that change, also the INSERT IGNORE statement will be executed in the same mode, covered by the table-level undo log record "on rollback, make the table empty" that was written by the first INSERT statement. That is, the attempt to insert duplicate key a=2 will result in an empty table, instead of a table that contains the two rows (1),(2).
serg wrote in
MDEV-31835 that the INSERT and LOAD statements containing an IGNORE clause must be rejected with an error in this case. As far as I understand, this would have to be implemented in the functions mysql_insert() and mysql_load().
If we want to limit this to the case of InnoDB bulk insert and not the generic case of unique_checks=0, some storage engine API change may be necessary, to query the value of InnoDB trx_t::bulk_insert.