Tp5 database transaction rollback problem

I test with the simplest code,
opens the transaction, inserts data, and rolls back .
but the database still inserts new data .

my database type is InnoDB
so I wonder if that"s what it says in the document,
pay attention to make sure your database connection uses the same one during transaction operations.

Will two links be used in this code?

Db::startTrans();
$data = [
    "setting_id" => 1,
    "user_agent" => "123123",
    "rewrite_url" => "qweqwe"
];
Db("cdn_mobile")->insert($data);
Db::rollback();


Db ('cdn_mobile')-> insert ($data);
this sentence is replaced by:
Db::table (' cdn_mobile')-> insert ($data);
).

Menu