From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id B421425DCB for ; Wed, 16 Jan 2019 15:06:45 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hgl1-55CPEdk for ; Wed, 16 Jan 2019 15:06:45 -0500 (EST) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 6B84424AD6 for ; Wed, 16 Jan 2019 15:06:45 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: [tarantool-patches] Re: [PATCH 5/6] sql: fix error message for improperly created index From: "n.pettik" In-Reply-To: Date: Wed, 16 Jan 2019 23:06:43 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <834f24a401b7829d0bbad2e57985ab4040065046.1547035184.git.korablev@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: Vladislav Shpilevoy > On 14 Jan 2019, at 17:06, Vladislav Shpilevoy = wrote: >=20 > Thanks for the patch! See 1 comment below. >=20 > On 09/01/2019 15:13, Nikita Pettik wrote: >> Table can be created without any indexes (for instance, from = Lua-land). >> On the other hand, bytecode generated for CREATE INDEX statement >> attempts at finding entry in _index space with given space id. >> In case it is not found error "wrong space id" is raised. On the = other >> hand, it is obvious that such message is appeared when table doesn't >> have any created indexes yet. Hence, lets fix this message to = indicate >> that primary key should be created before any secondary indexes. >> Closes #3914 >=20 > The test index1.test.lua fails. I guess, because you introduce > ADD CONSTRAINT PRIMARY KEY only in the next commit. Lets move this > part of the test into the latter. I guess I accidentally put it in this patch. Moved to the next one. diff --git a/test/sql-tap/index1.test.lua b/test/sql-tap/index1.test.lua index ccb6753c9..121381747 100755 --- a/test/sql-tap/index1.test.lua +++ b/test/sql-tap/index1.test.lua @@ -1,6 +1,6 @@ #!/usr/bin/env tarantool test =3D require("sqltester") -test:plan(73) +test:plan(72) =20 --!./tcltestrunner.lua -- 2001 September 15 @@ -1034,13 +1034,4 @@ test:do_catchsql_test( 1, "can not add a secondary key before primary" }) =20 -test:do_catchsql_test( - "alter-8.2", - [[ - ALTER TABLE t ADD CONSTRAINT pk PRIMARY KEY("id"); - CREATE UNIQUE INDEX i ON t("id"); - ]], { - 0 -}) -=