[tarantool-patches] Re: [PATCH] sql: make DROP TABLE delete entry from _sequence_data

  • From: Vladislav Shpilevoy <v.shpilevoy@xxxxxxxxxxxxx>
  • To: Nikita Pettik <korablev@xxxxxxxxxxxxx>, tarantool-patches@xxxxxxxxxxxxx
  • Date: Mon, 15 Oct 2018 21:54:42 +0300

Hi! Thanks for the patch!

diff --git a/test/sql/drop-table.result b/test/sql/drop-table.result
index 08f249668..bf02e3def 100644
--- a/test/sql/drop-table.result
+++ b/test/sql/drop-table.result
@@ -29,6 +29,23 @@ box.sql.execute("INSERT INTO zzzoobar VALUES (111, 222, 'c3', 
444)")
  ---
  - error: 'no such table: ZZZOOBAR'
  ...
+-- gh-3712: if space features sequence, data from _sequence_data
+-- must be deleted before space is dropped.
+--
+box.sql.execute("CREATE TABLE t1 (id INT PRIMARY KEY AUTOINCREMENT);")
+---
+...
+box.sql.execute("INSERT INTO t1 VALUES (NULL);")
+---
+...
+box.snapshot()
+---
+- ok
+...
+test_run:cmd('restart server default')

Unfortunately, we have no luxury of time to restart a
server on such a simple test. Lets just check that
_sequence_data space is empty.

+box.sql.execute("DROP TABLE t1;")
+---
+...
  -- Cleanup
  -- DROP TABLE should do the job
  -- Debug

Other related posts: