From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 8 Jul 2019 19:51:03 +0300 From: Vladimir Davydov Subject: Re: [PATCH 5/5] Allow to execute non-yielding DDL statements in transactions Message-ID: <20190708165103.y6mymhvsvwmckbhy@esperanza> References: <2f4db121e3afe9599172b9a3abf8a48ab47e524b.1562357452.git.vdavydov.dev@gmail.com> <20190708122626.GD11062@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190708122626.GD11062@atlas> To: Konstantin Osipov Cc: tarantool-patches@freelists.org List-ID: On Mon, Jul 08, 2019 at 03:26:26PM +0300, Konstantin Osipov wrote: > * Vladimir Davydov [19/07/05 23:27]: > > +box.begin() s:insert{4, 4} s:create_index('sk', {parts = {2, 'unsigned'}}) -- error > > +--- > > +- error: DDL does not support yielding statements in transactions > > this message is rather obscure. Let's try to explain it in more > plain English. "Even if your engine allows a yield in transaction, > yielding in a transaction that has a DDL statement in it is not > uspported unless it's the first statement". > > Is it what you wanted to say? Basically, yes, but I'd prefer to keep the error message as brief as possible. Besides we can't put such a text in ER_UNSUPPORTED error which has the following template: "%s does not support %s". We can, of course, introduce a separate error code, but I failed to come up with a good name for it :-/ What about DDL does not support long operations, such as building an index or checking a space format, in a transaction ?