<div dir="ltr">Forgot tests, sorry.<br>Here they are:<br><br><br><div>diff --git a/test/sql-tap/start-transaction.test.lua b/test/sql-tap/start-transaction.test.lua</div><div>new file mode 100755</div><div>index 0000000..a2a622e</div><div>--- /dev/null</div><div>+++ b/test/sql-tap/start-transaction.test.lua</div><div>@@ -0,0 +1,147 @@</div><div>+#!/usr/bin/env tarantool</div><div>+test = require("sqltester")</div><div>+test:plan(10)</div><div>+</div><div>+test:do_catchsql_test(</div><div>+<span style="white-space:pre">        </span>"start-transaction-1.0",</div><div>+<span style="white-space:pre">   </span>[[</div><div>+<span style="white-space:pre">           </span>BEGIN;</div><div>+<span style="white-space:pre">                       </span>CREATE TABLE IF NOT EXISTS t(id int PRIMARY KEY);</div><div>+<span style="white-space:pre">            </span>COMMIT;</div><div>+<span style="white-space:pre">      </span>]], {</div><div>+<span style="white-space:pre">        </span>-- <start-transaction-1.0></div><div>+<span style="white-space:pre">     </span>1, "near \"BEGIN\": syntax error"</div><div>+<span style="white-space:pre">        </span>-- <start-transaction-1.0></div><div>+<span style="white-space:pre">     </span>})</div><div>+</div><div>+test:do_catchsql_test(</div><div>+<span style="white-space:pre">     </span>"start-transaction-1.1",</div><div>+<span style="white-space:pre">   </span>[[</div><div>+<span style="white-space:pre">           </span>BEGIN TRANSACTION;</div><div>+<span style="white-space:pre">                   </span>CREATE TABLE IF NOT EXISTS t(id int PRIMARY KEY);</div><div>+<span style="white-space:pre">            </span>COMMIT;</div><div>+<span style="white-space:pre">      </span>]], {</div><div>+<span style="white-space:pre">        </span>-- <start-transaction-1.1></div><div>+<span style="white-space:pre">     </span>1, "near \"BEGIN\": syntax error"</div><div>+<span style="white-space:pre">        </span>-- <start-transaction-1.1></div><div>+<span style="white-space:pre">     </span>})</div><div>+</div><div>+test:do_catchsql_test(</div><div>+<span style="white-space:pre">     </span>"start-transaction-1.2",</div><div>+<span style="white-space:pre">   </span>[[</div><div>+<span style="white-space:pre">           </span>CREATE TABLE IF NOT EXISTS t(id int PRIMARY KEY);</div><div>+<span style="white-space:pre">            </span>START TRANSACTION;</div><div>+<span style="white-space:pre">                   </span>INSERT INTO t VALUES (1);</div><div>+<span style="white-space:pre">                    </span>DELETE FROM t;</div><div>+<span style="white-space:pre">               </span>COMMIT;</div><div>+<span style="white-space:pre">      </span>]], {</div><div>+<span style="white-space:pre">        </span>-- <start-transaction-1.2></div><div>+<span style="white-space:pre">     </span>0</div><div>+<span style="white-space:pre">    </span>-- <start-transaction-1.2></div><div>+<span style="white-space:pre">     </span>})</div><div>+</div><div>+test:do_catchsql_test(</div><div>+<span style="white-space:pre">     </span>"start-transaction-1.3",</div><div>+<span style="white-space:pre">   </span>[[</div><div>+<span style="white-space:pre">           </span>START TRANSACTION;</div><div>+<span style="white-space:pre">                   </span>INSERT INTO t VALUES (1);</div><div>+<span style="white-space:pre">                    </span>DELETE FROM t;</div><div>+<span style="white-space:pre">               </span>COMMIT TRANSACTION;</div><div>+<span style="white-space:pre">  </span>]], {</div><div>+<span style="white-space:pre">        </span>-- <start-transaction-1.3></div><div>+<span style="white-space:pre">     </span>1, "keyword \"TRANSACTION\" is reserved"</div><div>+<span style="white-space:pre"> </span>-- <start-transaction-1.3></div><div>+<span style="white-space:pre">     </span>})</div><div>+</div><div>+test:do_catchsql_test(</div><div>+<span style="white-space:pre">     </span>"start-transaction-1.4",</div><div>+<span style="white-space:pre">   </span>[[</div><div>+<span style="white-space:pre">           </span>COMMIT;</div><div>+<span style="white-space:pre">              </span>START TRANSACTION;</div><div>+<span style="white-space:pre">                   </span>INSERT INTO t VALUES (1);</div><div>+<span style="white-space:pre">                    </span>DELETE FROM t;</div><div>+<span style="white-space:pre">               </span>END;</div><div>+<span style="white-space:pre"> </span>]], {</div><div>+<span style="white-space:pre">        </span>-- <start-transaction-1.4></div><div>+<span style="white-space:pre">     </span>1, "keyword \"END\" is reserved"</div><div>+<span style="white-space:pre"> </span>-- <start-transaction-1.4></div><div>+<span style="white-space:pre">     </span>})</div><div>+</div><div>+test:do_catchsql_test(</div><div>+<span style="white-space:pre">     </span>"start-transaction-1.5",</div><div>+<span style="white-space:pre">   </span>[[</div><div>+<span style="white-space:pre">           </span>COMMIT;</div><div>+<span style="white-space:pre">              </span>START TRANSACTION;</div><div>+<span style="white-space:pre">                   </span>INSERT INTO t VALUES (1);</div><div>+<span style="white-space:pre">                    </span>DELETE FROM t;</div><div>+<span style="white-space:pre">               </span>END TRANSACTION;</div><div>+<span style="white-space:pre">     </span>]], {</div><div>+<span style="white-space:pre">        </span>-- <start-transaction-1.5></div><div>+<span style="white-space:pre">     </span>1, "keyword \"END\" is reserved"</div><div>+<span style="white-space:pre"> </span>-- <start-transaction-1.5></div><div>+<span style="white-space:pre">     </span>})</div><div>+</div><div>+test:do_catchsql_test(</div><div>+<span style="white-space:pre">     </span>"start-transaction-1.6",</div><div>+<span style="white-space:pre">   </span>[[</div><div>+<span style="white-space:pre">           </span>COMMIT;</div><div>+<span style="white-space:pre">              </span>START TRANSACTION;</div><div>+<span style="white-space:pre">                   </span>INSERT INTO t VALUES (1);</div><div>+<span style="white-space:pre">                    </span>DELETE FROM t;</div><div>+<span style="white-space:pre">                       </span>ROLLBACK;</div><div>+<span style="white-space:pre">    </span>]], {</div><div>+<span style="white-space:pre">        </span>-- <start-transaction-1.6></div><div>+<span style="white-space:pre">     </span>0</div><div>+<span style="white-space:pre">    </span>-- <start-transaction-1.6></div><div>+<span style="white-space:pre">     </span>})</div><div>+</div><div>+test:do_catchsql_test(</div><div>+<span style="white-space:pre">     </span>"start-transaction-1.7",</div><div>+<span style="white-space:pre">   </span>[[</div><div>+<span style="white-space:pre">           </span>START TRANSACTION;</div><div>+<span style="white-space:pre">                   </span>INSERT INTO t VALUES (1);</div><div>+<span style="white-space:pre">                    </span>DELETE FROM t;</div><div>+<span style="white-space:pre">                       </span>ROLLBACK TRANSACTION;</div><div>+<span style="white-space:pre">                </span>COMMIT;</div><div>+<span style="white-space:pre">      </span>]], {</div><div>+<span style="white-space:pre">        </span>-- <start-transaction-1.7></div><div>+<span style="white-space:pre">     </span>1, "keyword \"TRANSACTION\" is reserved"</div><div>+<span style="white-space:pre"> </span>-- <start-transaction-1.7></div><div>+<span style="white-space:pre">     </span>})</div><div>+</div><div>+test:do_catchsql_test(</div><div>+<span style="white-space:pre">     </span>"start-transaction-1.8",</div><div>+<span style="white-space:pre">   </span>[[</div><div>+<span style="white-space:pre">           </span>COMMIT;</div><div>+<span style="white-space:pre">              </span>START TRANSACTION;</div><div>+<span style="white-space:pre">                   </span>INSERT INTO t VALUES (1);</div><div>+<span style="white-space:pre">                    </span>DELETE FROM t;</div><div>+<span style="white-space:pre">                       </span>SAVEPOINT s1;</div><div>+<span style="white-space:pre">                        </span>INSERT INTO t VALUES (2);</div><div>+<span style="white-space:pre">                    </span>DELETE FROM t;</div><div>+<span style="white-space:pre">                       </span>ROLLBACK TO s1;</div><div>+<span style="white-space:pre">              </span>COMMIT;</div><div>+<span style="white-space:pre">      </span>]], {</div><div>+<span style="white-space:pre">        </span>-- <start-transaction-1.8></div><div>+<span style="white-space:pre">     </span>0</div><div>+<span style="white-space:pre">    </span>-- <start-transaction-1.8></div><div>+<span style="white-space:pre">     </span>})</div><div>+</div><div>+test:do_catchsql_test(</div><div>+<span style="white-space:pre">     </span>"start-transaction-1.9",</div><div>+<span style="white-space:pre">   </span>[[</div><div>+<span style="white-space:pre">           </span>START TRANSACTION;</div><div>+<span style="white-space:pre">                   </span>INSERT INTO t VALUES (1);</div><div>+<span style="white-space:pre">                    </span>DELETE FROM t;</div><div>+<span style="white-space:pre">                       </span>SAVEPOINT s1;</div><div>+<span style="white-space:pre">                        </span>INSERT INTO t VALUES (2);</div><div>+<span style="white-space:pre">                    </span>DELETE FROM t;</div><div>+<span style="white-space:pre">                       </span>ROLLBACK TRANSACTION TO s1;</div><div>+<span style="white-space:pre">          </span>COMMIT;</div><div>+<span style="white-space:pre">      </span>]], {</div><div>+<span style="white-space:pre">        </span>-- <start-transaction-1.9></div><div>+<span style="white-space:pre">     </span>1, "keyword \"TRANSACTION\" is reserved"</div><div>+<span style="white-space:pre"> </span>-- <start-transaction-1.9></div><div>+<span style="white-space:pre">     </span>})</div><div>+</div><div>+test:finish_test()</div></div>