Avoid a memory leak and/or assertion failure when parsing a table

declaration that contains a duplicate column name.
Ticket #1418. (CVS 2684)

FossilOrigin-Name: f43427742b1c086f2621c900f4ede1a34a8b44ee
This commit is contained in:
drh
2005-09-10 15:35:06 +00:00
parent 3dec223ca0
commit d891967052
4 changed files with 16 additions and 11 deletions
+6 -1
View File
@@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing the CREATE TABLE statement.
#
# $Id: table.test,v 1.40 2005/08/13 00:56:28 drh Exp $
# $Id: table.test,v 1.41 2005/09/10 15:35:07 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -388,6 +388,11 @@ do_test table-9.1 {
CREATE TABLE t6(a,b,a);
}
} {1 {duplicate column name: a}}
do_test table-9.2 {
catchsql {
CREATE TABLE t6(a varchar(100), b blob, a integer);
}
} {1 {duplicate column name: a}}
# Check the foreign key syntax.
#