From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 8 Jul 2019 11:21:16 +0300 From: Konstantin Osipov Subject: Re: [PATCH 5/5] Allow to execute non-yielding DDL statements in transactions Message-ID: <20190708082116.GB21719@atlas> References: <2f4db121e3afe9599172b9a3abf8a48ab47e524b.1562357452.git.vdavydov.dev@gmail.com> <20190705225635.GB30966@atlas> <20190708080934.hp3zgk6ppw5mu2ww@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190708080934.hp3zgk6ppw5mu2ww@esperanza> To: Vladimir Davydov Cc: tarantool-patches@freelists.org List-ID: * Vladimir Davydov [19/07/08 11:14]: > On Sat, Jul 06, 2019 at 01:56:35AM +0300, Konstantin Osipov wrote: > > * Vladimir Davydov [19/07/05 23:27]: > > > > Please work on a test case which not only ensures the statements > > are allowed, but also produce desired results - as well as leave > > no traces/partial effects on rollback. > > As a matter of fact, this simple test does check that rollback doesn't > leave any traces - if it did, an attempt to commit the same statements > would fail: > > box.begin() create() box.rollback() -- suppose it leaved some traces > box.begin() create() box.commit() -- then this would fail > > It also checks that the DDL operations produce the desired results, > otherwise an attempt to drop created objects would fail: > > box.begin() create() box.commit() -- suppose it didn't create some objects > box.begin() drop() box.commit() -- then this would fail In any case you test a fixed number of combinations, and should come up with a randomized test. This feature encompasses all DDL operators, including: - roles - users - functions - SQL triggers - SQL foreign key constraints - SQL views - SQL check constraints Every object should be involved in the test, and the generated transactions should be random. -- Konstantin Osipov, Moscow, Russia https://scylladb.com