Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org, Nikita Pettik <korablev@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH 2/2] sql: use vtab::rowid_next() instead of index_max()
Date: Fri, 9 Nov 2018 12:25:00 +0300	[thread overview]
Message-ID: <09285440-67e3-3b42-0ba3-287d8c61af4c@tarantool.org> (raw)
In-Reply-To: <4545090c3c5873e881c67afa58e656be2d5aae44.1540838910.git.korablev@tarantool.org>

Thanks for the patch!

I moved the new error code there, and removed errinj test. My review fixes
here and on the branch:

===============================================================================

diff --git a/src/box/errcode.h b/src/box/errcode.h
index 04f4f34ee..d64b6f3ba 100644
--- a/src/box/errcode.h
+++ b/src/box/errcode.h
@@ -223,6 +223,7 @@ struct errcode_record {
  	/*168 */_(ER_DROP_FK_CONSTRAINT,	"Failed to drop foreign key constraint '%s': %s") \
  	/*169 */_(ER_NO_SUCH_CONSTRAINT,	"Constraint %s does not exist") \
  	/*170 */_(ER_CONSTRAINT_EXISTS,		"Constraint %s already exists") \
+	/*171 */_(ER_ROWID_OVERFLOW,            "Rowid is overflowed: too many entries in ephemeral space") \
  
  /*
   * !IMPORTANT! Please follow instructions at start of the file
diff --git a/test/sql/errinj.result b/test/sql/errinj.result
index 60f776c3c..a0ba60f45 100644
--- a/test/sql/errinj.result
+++ b/test/sql/errinj.result
@@ -279,18 +279,3 @@ errinj.set("ERRINJ_WAL_IO", false)
  box.sql.execute("DROP TABLE t3;")
  ---
  ...
--- Make sure that overflow of rowid used for ephemeral spaces
--- is hadnled properly.
---
-box.error.injection.set("ERRINJ_ROWID_OVERFLOW", true)
----
-- ok
-...
-box.sql.execute("WITH RECURSIVE tmp AS (SELECT 1 UNION ALL SELECT * FROM tmp LIMIT 2) SELECT * FROM tmp;")
----
-- error: 'Rowid is overflowed: too many entries in ephemeral space'
-...
-box.error.injection.set("ERRINJ_ROWID_OVERFLOW", false)
----
-- ok
-...
diff --git a/test/sql/errinj.test.lua b/test/sql/errinj.test.lua
index 034a43d4e..25d73f0c2 100644
--- a/test/sql/errinj.test.lua
+++ b/test/sql/errinj.test.lua
@@ -97,10 +97,3 @@ box.sql.execute("ALTER TABLE t3 DROP CONSTRAINT fk1;")
  box.sql.execute("INSERT INTO t3 VALUES(1, 1, 3);")
  errinj.set("ERRINJ_WAL_IO", false)
  box.sql.execute("DROP TABLE t3;")
-
--- Make sure that overflow of rowid used for ephemeral spaces
--- is hadnled properly.
---
-box.error.injection.set("ERRINJ_ROWID_OVERFLOW", true)
-box.sql.execute("WITH RECURSIVE tmp AS (SELECT 1 UNION ALL SELECT * FROM tmp LIMIT 2) SELECT * FROM tmp;")
-box.error.injection.set("ERRINJ_ROWID_OVERFLOW", false)

  reply	other threads:[~2018-11-09  9:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-29 19:02 [tarantool-patches] [PATCH 0/2] Re-implement rowid generation for ephemeral spaces Nikita Pettik
2018-10-29 19:02 ` [tarantool-patches] [PATCH 1/2] space: add method to fetch next rowid Nikita Pettik
2018-10-30  8:45   ` Vladimir Davydov
2018-10-30 10:32     ` n.pettik
2018-11-09  9:25   ` [tarantool-patches] " Vladislav Shpilevoy
2018-11-11 23:16     ` n.pettik
2018-11-11 23:22       ` Vladislav Shpilevoy
2018-11-14 23:11         ` n.pettik
2018-11-21 18:58       ` Konstantin Osipov
2018-10-29 19:02 ` [tarantool-patches] [PATCH 2/2] sql: use vtab::rowid_next() instead of index_max() Nikita Pettik
2018-11-09  9:25   ` Vladislav Shpilevoy [this message]
2018-11-15  4:54 ` [tarantool-patches] Re: [PATCH 0/2] Re-implement rowid generation for ephemeral spaces Kirill Yukhin

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=09285440-67e3-3b42-0ba3-287d8c61af4c@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH 2/2] sql: use vtab::rowid_next() instead of index_max()' \
    /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