Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Kirill Shcherbatov <kshcherbatov@tarantool.org>,
	tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH v1 2/2] sql: enable multi-engine tests for SQL
Date: Fri, 22 Jun 2018 23:04:00 +0300	[thread overview]
Message-ID: <9418cbf4-7ffa-3cfd-a544-bd49b5e52a2c@tarantool.org> (raw)
In-Reply-To: <f9f9ff1379b6037389c918a94336656633d0c3fc.1529513981.git.kshcherbatov@tarantool.org>

Thanks for the patch!

Wow, looks like Vinyl really works on SQL.

Did you test sql-tap/ suite? Why is not it in the
patch? It could be updated automatically using a
short script that adds the engine setting at the
beginning of a file.

See 2 comments below.

On 20/06/2018 20:06, Kirill Shcherbatov wrote:
> Configured sql tests to set 'pragma sql_engine_default' on start.
> This allows to test both vinyl and memtx engines for SQL.
> 
> Resolves #2199.
> ---
>   test/sql/check-clear-ephemeral.result              |  6 ++++
>   test/sql/check-clear-ephemeral.test.lua            |  3 +-
>   test/sql/checks.result                             |  6 ++++
>   test/sql/checks.test.lua                           |  2 ++
>   test/sql/clear.result                              |  6 ++++
>   test/sql/clear.test.lua                            |  2 ++
>   test/sql/collation.result                          |  9 +++++
>   test/sql/collation.test.lua                        |  3 ++
>   test/sql/delete-multiple-idx.result                |  6 ++++
>   test/sql/delete-multiple-idx.test.lua              |  2 ++
>   test/sql/delete.result                             |  6 ++++
>   test/sql/delete.test.lua                           |  2 ++
>   test/sql/drop-index.result                         |  6 ++++
>   test/sql/drop-index.test.lua                       |  2 ++
>   test/sql/drop-table.result                         |  6 ++++
>   test/sql/drop-table.test.lua                       |  2 ++
>   test/sql/engine.cfg                                |  6 ++++
>   test/sql/engine.result                             | 42 ++++++++++++++++++++++
>   test/sql/engine.test.lua                           | 17 +++++++++
>   test/sql/errinj.result                             |  9 +++++
>   test/sql/errinj.test.lua                           |  3 ++
>   test/sql/gh-2929-primary-key.result                |  9 +++++
>   test/sql/gh-2929-primary-key.test.lua              |  4 +++
>   test/sql/gh-2981-check-autoinc.result              |  9 +++++
>   test/sql/gh-2981-check-autoinc.test.lua            |  4 +++
>   test/sql/gh-3199-no-mem-leaks.result               |  6 ++++
>   test/sql/gh-3199-no-mem-leaks.test.lua             |  2 ++
>   test/sql/gh2141-delete-trigger-drop-table.result   |  6 ++++
>   test/sql/gh2141-delete-trigger-drop-table.test.lua |  2 ++
>   test/sql/gh2251-multiple-update.result             |  6 ++++
>   test/sql/gh2251-multiple-update.test.lua           |  2 ++
>   test/sql/gh2483-remote-persistency-check.result    |  6 ++++
>   test/sql/gh2483-remote-persistency-check.test.lua  |  2 ++
>   .../gh2808-inline-unique-persistency-check.result  |  6 ++++
>   ...gh2808-inline-unique-persistency-check.test.lua |  2 ++
>   test/sql/icu-upper-lower.result                    |  6 ++++
>   test/sql/icu-upper-lower.test.lua                  |  2 ++
>   test/sql/insert-unique.result                      |  6 ++++
>   test/sql/insert-unique.test.lua                    |  2 ++
>   test/sql/iproto.result                             | 12 ++++++-
>   test/sql/iproto.test.lua                           |  6 +++-
>   test/sql/max-on-index.result                       |  6 ++++
>   test/sql/max-on-index.test.lua                     |  2 ++
>   test/sql/message-func-indexes.result               |  6 ++++
>   test/sql/message-func-indexes.test.lua             |  2 ++
>   test/sql/misc.result                               |  9 +++++
>   test/sql/misc.test.lua                             |  4 +++
>   test/sql/on-conflict.result                        |  6 ++++
>   test/sql/on-conflict.test.lua                      |  2 ++
>   test/sql/persistency.result                        |  6 ++++
>   test/sql/persistency.test.lua                      |  2 ++
>   test/sql/savepoints.result                         |  6 ++++
>   test/sql/savepoints.test.lua                       |  2 ++
>   test/sql/select-null.result                        |  6 ++++
>   test/sql/select-null.test.lua                      |  2 ++
>   test/sql/sql-statN-index-drop.result               |  6 ++++
>   test/sql/sql-statN-index-drop.test.lua             |  2 ++
>   test/sql/suite.ini                                 |  1 +
>   test/sql/tokenizer.result                          |  6 ++++
>   test/sql/tokenizer.test.lua                        |  2 ++
>   test/sql/transition.result                         |  9 +++++
>   test/sql/transition.test.lua                       |  4 +++
>   test/sql/transitive-transactions.result            | 10 ++++++
>   test/sql/transitive-transactions.test.lua          |  6 ++++
>   test/sql/triggers.result                           |  6 ++++
>   test/sql/triggers.test.lua                         |  2 ++
>   test/sql/update-with-nested-select.result          |  6 ++++
>   test/sql/update-with-nested-select.test.lua        |  2 ++
>   test/sql/upgrade.result                            |  6 ++++
>   test/sql/upgrade.test.lua                          |  2 ++
>   test/sql/view.result                               |  6 ++++
>   test/sql/view.test.lua                             |  2 ++
>   test/sql/view_delayed_wal.result                   |  6 ++++
>   test/sql/view_delayed_wal.test.lua                 |  2 ++
>   74 files changed, 390 insertions(+), 3 deletions(-)
>   create mode 100644 test/sql/engine.cfg
>   create mode 100644 test/sql/engine.result
>   create mode 100644 test/sql/engine.test.lua
> 
> diff --git a/test/sql/iproto.result b/test/sql/iproto.result
> index 3b7574a..92b7c2e 100644
> --- a/test/sql/iproto.result
> +++ b/test/sql/iproto.result
> @@ -500,7 +509,8 @@ cn:execute('select * from test where id = :1', {1})
>     - [1, 2, '3']
>   ...
>   -- gh-2602 obuf_alloc breaks the tuple in different slabs
> -_ = space:replace{1, 1, string.rep('a', 4 * 1024 * 1024)}
> +-- 4 * 1024 * 1024 is higher than vinyl max tuple size
> +if engine ~= 'vinyl' then _ = space:replace{1, 1, string.rep('a', 4 * 1024 * 1024)} end

1. Just increase vinyl_max_tuple_size to the same value. This
test should work both for vinyl and memtx.

>   ---
>   ...
>   res = cn:execute('select * from test')
> diff --git a/test/sql/transitive-transactions.result b/test/sql/transitive-transactions.result
> index 272a25a..1cced76 100644
> --- a/test/sql/transitive-transactions.result
> +++ b/test/sql/transitive-transactions.result
> @@ -104,7 +110,11 @@ box.space.PARENT:select();
>   ---
>   - - [1, 1]
>   ...
> +-- vinyl doesn't rollback failed transactions
>   box.sql.execute('PRAGMA defer_foreign_keys = 1;')

2. Vinyl rollbacks failed transactions, but it does not
rollback the whole transaction on a non-caught exception.

Lets better do rollback always. It is no-op in memtx when no
active transactions.

> +if engine == 'vinyl' then
> +    box.rollback()
> +end
>   fk_defer();
>   ---
>   ...

  reply	other threads:[~2018-06-22 20:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 17:06 [tarantool-patches] [PATCH v1 0/2] sql: default engine pragma Kirill Shcherbatov
2018-06-20 17:06 ` [tarantool-patches] [PATCH v1 1/2] sql: introduce pragma sql_default_engine Kirill Shcherbatov
2018-06-22 20:04   ` [tarantool-patches] " Vladislav Shpilevoy
2018-06-26 12:22     ` Kirill Shcherbatov
2018-06-26 13:34       ` Vladislav Shpilevoy
2018-06-26 17:09         ` Kirill Shcherbatov
2018-06-27 12:32           ` Vladislav Shpilevoy
2018-06-27 15:59             ` Kirill Shcherbatov
2018-06-20 17:06 ` [tarantool-patches] [PATCH v1 2/2] sql: enable multi-engine tests for SQL Kirill Shcherbatov
2018-06-22 20:04   ` Vladislav Shpilevoy [this message]
2018-06-26 12:22     ` [tarantool-patches] " Kirill Shcherbatov
2018-06-26 13:34       ` Vladislav Shpilevoy
2018-06-26 17:09         ` Kirill Shcherbatov
2018-06-26 12:23 ` [tarantool-patches] [PATCH v1 2/3] sql: fix SQL Count for vinyl engine Kirill Shcherbatov
2018-06-28 15:35 ` [tarantool-patches] Re: [PATCH v1 0/2] sql: default engine pragma Vladislav Shpilevoy
2018-06-28 16:00   ` n.pettik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9418cbf4-7ffa-3cfd-a544-bd49b5e52a2c@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v1 2/2] sql: enable multi-engine tests for SQL' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox