mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Ensure ALTER TABLE respects the system table convention - "sqlite_*". (CVS 2115)
FossilOrigin-Name: f635b6aae661ac85eec49b197f3bb4b85172a457
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this script is testing the ALTER TABLE statement.
|
||||
#
|
||||
# $Id: alter.test,v 1.5 2004/11/19 08:02:14 danielk1977 Exp $
|
||||
# $Id: alter.test,v 1.6 2004/11/19 08:41:34 danielk1977 Exp $
|
||||
#
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
@ -255,6 +255,16 @@ do_test alter-2.3 {
|
||||
ALTER TABLE [<t2>] RENAME TO i3;
|
||||
}
|
||||
} {1 {there is already another table or index with this name: i3}}
|
||||
do_test alter-2.4 {
|
||||
catchsql {
|
||||
ALTER TABLE SqLiTe_master RENAME TO master;
|
||||
}
|
||||
} {1 {table sqlite_master may not be altered}}
|
||||
do_test alter-2.5 {
|
||||
catchsql {
|
||||
ALTER TABLE t3 RENAME TO sqlite_t3;
|
||||
}
|
||||
} {1 {object name reserved for internal use: sqlite_t3}}
|
||||
|
||||
# If this compilation does not include triggers, omit the alter-3.* tests.
|
||||
ifcapable trigger {
|
||||
|
Reference in New Issue
Block a user