mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Fix for bug #3: Allow VIEW as a column name. Also allow COPY. (CVS 507)
FossilOrigin-Name: d2bdc0feeb3a3595850f40ab211df7a3963d6c30
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
# This file implements tests for miscellanous features that were
|
||||
# left out of other test files.
|
||||
#
|
||||
# $Id: misc1.test,v 1.4 2002/03/13 18:54:08 drh Exp $
|
||||
# $Id: misc1.test,v 1.5 2002/03/30 15:26:52 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -152,4 +152,39 @@ do_test misc1-5.2 {
|
||||
}
|
||||
} {1 2 3 4}
|
||||
|
||||
# Certain keywords (especially non-standard keywords like "REPLACE") can
|
||||
# also be used as identifiers. The way this works in the parser is that
|
||||
# the parser first detects a syntax error, the error handling routine
|
||||
# sees that the special keyword caused the error, then replaces the keyword
|
||||
# with "ID" and tries again.
|
||||
#
|
||||
# Check the operation of this logic.
|
||||
#
|
||||
do_test misc1-6.1 {
|
||||
catchsql {
|
||||
CREATE TABLE t4(
|
||||
abort, asc, begin, cluster, conflict, copy, delimiters, desc, end,
|
||||
explain, fail, ignore, key, offset, pragma, replace, temp,
|
||||
vacuum, view
|
||||
);
|
||||
}
|
||||
} {0 {}}
|
||||
do_test misc1-6.2 {
|
||||
catchsql {
|
||||
INSERT INTO t4
|
||||
VALUES(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19);
|
||||
}
|
||||
} {0 {}}
|
||||
do_test misc1-6.3 {
|
||||
execsql {
|
||||
SELECT * FROM t4
|
||||
}
|
||||
} {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19}
|
||||
do_test misc1-6.4 {
|
||||
execsql {
|
||||
SELECT abort+asc,max(key,pragma,temp) FROM t4
|
||||
}
|
||||
} {3 17}
|
||||
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user