DELETE/TRUNCATE from a large table makes MariaDB crashing
You can follow below steps, it may help you.

CREATE TABLE db_test.table2_tmp LIKE db_test.table2;

]RENAME TABLE db_test.table2 TO db_test.table2_to_be_deleted;

RENAME TABLE db_test.table2_tmp TO db_test.table2;

DROP TABLE db_test.table2_to_be_deleted;