[tarantool-patches] Re: [PATCH 2/2] sql: use vtab::rowid_next() instead of index_max()
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Fri Nov 9 12:25:00 MSK 2018
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)
More information about the Tarantool-patches
mailing list