ALTER SEQUENCE ... RESTART WITH (SELECT NULL) NO CYCLE is accepted #2648
Last updated: 2011-03-28 17:31:38 +0200
Date: 2010-08-11 15:14:57 +0200
Setting a sequence value to NULL is allowed, but causes interesting problems afterwards. First a not-NULL violation is caused at the first invocation (it is likely to be on a key column, e.g. serial), then a second invocation yields in a very large negative number (looks like overflow).
I think we should just disallow NULL as valid input here.
Date: 2010-08-11 15:19:14 +0200
The parser correctly forces a positive integer, however, it also allows subselects which can return negative integers and nulls such as a simple SELECT NULL. Hence, the check should be done at execution time.
Date: 2010-08-11 15:20:33 +0200
sql>alter sequence "sys"."seq_5128" restart with null no cycle;
(typical way to find this is to do a "restart with (select max(id) from ..." on a table with no tuples)
Date: 2010-08-30 09:21:51 +0200
The Jun2010-SP2 version has been released.
Date: 2010-12-03 22:34:11 +0100
could be handled in mvc_restart_seq
Date: 2011-01-24 21:02:19 +0100
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=809ced83d8c4
Date: 2011-01-24 21:03:27 +0100
Fixed in current, test added.
Date: 2011-03-28 17:31:38 +0200
The Mar2011 version has been released.
The text was updated successfully, but these errors were encountered: