[tarantool-patches] Re: [PATCH] sql: Remove 'BEGIN TRANSACTION'
n.pettik
korablev at tarantool.org
Thu Jul 19 03:24:08 MSK 2018
> diff --git a/extra/lempar.c b/extra/lempar.c
> index 00fd79c..d043e39 100644
> --- a/extra/lempar.c
> +++ b/extra/lempar.c
> @@ -336,8 +336,8 @@ void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){
> if( pParser ){
> #ifdef YYTRACKMAXSTACKDEPTH
> pParser->yyhwm = 0;
> - pParser->is_fallback_failed = false;
> #endif
> + pParser->is_fallback_failed = false;
Could you please explain this code movement?
> +++ b/test/sql-tap/start-transaction.test.lua
> @@ -0,0 +1,266 @@
> +#!/usr/bin/env tarantool
> +test = require("sqltester")
> +test:plan(21)
> +
> +test:do_catchsql_test(
> + "start-transaction-1.0",
> + [[
> + CREATE TABLE IF NOT EXISTS t(id int PRIMARY KEY);
> + DELETE FROM t;
> + BEGIN;
> + INSERT INTO t VALUES (1);
> + INSERT INTO t VALUES (2);
> + COMMIT;
> + ]], {
> + -- <start-transaction-1.0>
> + 1, "near \"BEGIN\": syntax error"
> + -- <start-transaction-1.0>
> + })
> +
> +test:do_execsql_test(
> + "start-transaction-1.1",
> + [[
> + SELECT * FROM t;
> + ]], {
> + -- <start-transaction-1.1>
> +
> + -- <start-transaction-1.1>
> + })
> +
> +test:do_catchsql_test(
> + "start-transaction-1.2",
> + [[
> + CREATE TABLE IF NOT EXISTS t(id int primary key);
> + delete from t;
We write SQL queries in upper-case. Fix it in other places too.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20180719/502e7cf9/attachment.html>
More information about the Tarantool-patches
mailing list