Fix a segfault in "ALTER TABLE t1 ADD COLUMN b DEFAULT (-+1)". Also an assert() failure that could occur if SQLITE_ENABLE_STAT4 were not defined.

FossilOrigin-Name: 9fec3e38287067d60874530300fbeb602958c951
This commit is contained in:
dan
2013-08-08 12:21:32 +00:00
parent 6cb8d76ccb
commit ad45ed7414
5 changed files with 21 additions and 11 deletions
+5
View File
@@ -143,6 +143,11 @@ do_test alter4-2.6 {
alter table t1 add column d DEFAULT CURRENT_TIME;
}
} {1 {Cannot add a column with non-constant default}}
do_test alter4-2.7 {
catchsql {
alter table t1 add column d default (-+1);
}
} {1 {Cannot add a column with non-constant default}}
do_test alter4-2.99 {
execsql {
DROP TABLE t1;