# eXtremeSQL Autocheckpoint

> Normally, in order for an application (including an SQL client or server) to "see" the modifications made in the current transaction, it is necessary to call a checkpoint API, for example `mco_trans_checkpoint()`. When the autocheckpoint feature is enabled, the SQL engine checkpoints the transaction every time any modifications are made.

> The feature is enabled and disabled by calling the `autocheckpoint()` function as follows:

>         select autocheckpoint(true);

> or

>         select autocheckpoint(false);

> Note that, for the autocheckpoint to make sense, SQL transactions must be opened explicitly via the start transaction statement which will later be committed or rolled back. For example:

>         XSQL>create table t(s string);
>         XSQL>insert into t values('one');
>         XSQL>select autocheckpoint(true);
>         #1
>         ------------------------------------------------------------------------------
>         null

>         Selected records: 1
>         XSQL>start transaction;
>         XSQL>select * from t;
>         s
>         ------------------------------------------------------------------------------
>         one

>         Selected records: 1
>         XSQL>update t set s = 'two' where s = 'one';
>         XSQL>select * from t;
>         s
>         ------------------------------------------------------------------------------
>         two

>         Selected records: 1
>         XSQL>rollback transaction;
>         XSQL>select * from t;
>         s
>         ------------------------------------------------------------------------------
>         one

>         Selected records: 1