![](https://secure.gravatar.com/avatar/39b623a1559cf9c69ac3d9d4fb44e7fe.jpg?s=120&d=mm&r=g)
Hi, Nikita! On Feb 28, Nikita Malyavin wrote:
On Fri, Dec 28, 2018 at 9:18 AM Sergei Golubchik
wrote: On Dec 28, Nikita Malyavin wrote:
Hi, Sergei!
In short, I am on the side of standard conformance.
Our TRUNCATE is not exactly a standard TRUNCATE. it's defined as DROP+REPLACE. But generally I agree, standard conformance.
The fun thing is that even handler::truncate() is defined as delete_all_rows() 🙂 Actually even ha_innodb does something same, and frm file is never deleted/touched. So physically it's always deletion of rows data, not DROP + CREATE Maybe I'm missing something, am I?
you are :) If the handlerton has a flag HTON_CAN_RECREATE, then Sql_cmd_truncate_table::lock_table() will set hton_can_recreate and Sql_cmd_truncate_table::truncate_table() will use dd_recreate_table(), not handler::delete_all_rows()
I'd try to remove HTON_CAN_RECREATE flag completely and implement recreate logic inside handler::delete_all_rows()
Yes, good idea, I'm thinking the same. So am I supposed to file MDEV for it then?
Yes, please Regards, Sergei Chief Architect MariaDB and security@mariadb.org