autocommit
autocommitは、insertやupdateやdeleteなどによるデータベースの変更を、commitするかどうかを指定します。
set autocommit on
と入力するとinsertやupdateやdeleteが実行されて正常終了した時点でコミットされます。
set autocommit off
と入力すると、insertやupdateやdeleteなどによるデータベースの変更を、commitコマンドなどを使用して変更を確定する必要があります。
set autocommit immediate
と入力すると、 set autocommit on と同じ効果が得られます。
set autocommit 2
というように数値を指定すると、insertやupdateやdeleteなどが2回正常終了したら、データベースに対する変更がcommitされます。
現在のautocommitの設定を見たい場合は
show autocommit
と入力します。