1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Add tests to ensure triggers cannot be created on virtual tables. (CVS 3273)

FossilOrigin-Name: 9470e27962d2fe9c0d1921d9aab7d8f0047ac1fd
This commit is contained in:
danielk1977
2006-06-19 06:32:23 +00:00
parent b8cbb872cf
commit 3d5ff1c2fe
3 changed files with 32 additions and 8 deletions

View File

@ -10,7 +10,7 @@
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# $Id: vtab5.test,v 1.3 2006/06/19 05:33:45 danielk1977 Exp $
# $Id: vtab5.test,v 1.4 2006/06/19 06:32:23 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -100,5 +100,29 @@ do_test vtab5.2.3 {
}
} {ABc2 Abc3 aBc4 abc1}
# Test that it is impossible to create a triggger on a virtual table.
#
do_test vtab5.3.1 {
catchsql {
CREATE TRIGGER trig INSTEAD OF INSERT ON echo_strings BEGIN
SELECT 1, 2, 3;
END;
}
} {1 {cannot create triggers on virtual tables}}
do_test vtab5.3.2 {
catchsql {
CREATE TRIGGER trig AFTER INSERT ON echo_strings BEGIN
SELECT 1, 2, 3;
END;
}
} {1 {cannot create triggers on virtual tables}}
do_test vtab5.3.2 {
catchsql {
CREATE TRIGGER trig BEFORE INSERT ON echo_strings BEGIN
SELECT 1, 2, 3;
END;
}
} {1 {cannot create triggers on virtual tables}}
finish_test