mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Unknown functions in the DEFAULT clause of a table cause an error when
the DEFAULT value is needed. Ticket [2d401a94287b5]. FossilOrigin-Name: 093917d7fda442012dfd1a1b2f20f85d2eefa093
This commit is contained in:
@ -11,7 +11,6 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this file is testing built-in functions.
|
||||
#
|
||||
# $Id: func.test,v 1.93 2009/06/19 16:44:41 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -1157,4 +1156,16 @@ do_test func-27.3 {
|
||||
catchsql {SELECT coalesce(1,2)}
|
||||
} {0 1}
|
||||
|
||||
# Ticket 2d401a94287b5
|
||||
# Unknown function in a DEFAULT expression causes a segfault.
|
||||
#
|
||||
do_test func-28.1 {
|
||||
db eval {
|
||||
CREATE TABLE t28(x, y DEFAULT(nosuchfunc(1)));
|
||||
}
|
||||
catchsql {
|
||||
INSERT INTO t28(x) VALUES(1);
|
||||
}
|
||||
} {1 {unknown function: nosuchfunc()}}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user