mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 15:14:17 +00:00
add sqlite 3.3.8 to in tree libs
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3735 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
3b35430557
commit
165f180162
387 files changed
+234653
No files matched your search
@@ -0,0 +1,77 @@
|
||||
# 2001 September 15
|
||||
#
|
||||
# The author disclaims copyright to this source code. In place of
|
||||
# a legal notice, here is a blessing:
|
||||
#
|
||||
# May you do good and not evil.
|
||||
# May you find forgiveness for yourself and forgive others.
|
||||
# May you share freely, never taking more than you give.
|
||||
#
|
||||
#***********************************************************************
|
||||
# This file implements regression tests for SQLite library.
|
||||
#
|
||||
# This file implements tests for foreign keys.
|
||||
#
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
ifcapable {!foreignkey} {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
# Create a table and some data to work with.
|
||||
#
|
||||
do_test fkey1-1.0 {
|
||||
execsql {
|
||||
CREATE TABLE t1(
|
||||
a INTEGER PRIMARY KEY,
|
||||
b INTEGER
|
||||
REFERENCES t1 ON DELETE CASCADE
|
||||
REFERENCES t2,
|
||||
c TEXT,
|
||||
FOREIGN KEY (b,c) REFERENCES t2(x,y) ON UPDATE CASCADE
|
||||
);
|
||||
}
|
||||
} {}
|
||||
do_test fkey1-1.1 {
|
||||
execsql {
|
||||
CREATE TABLE t2(
|
||||
x INTEGER PRIMARY KEY,
|
||||
y TEXT
|
||||
);
|
||||
}
|
||||
} {}
|
||||
do_test fkey1-1.2 {
|
||||
execsql {
|
||||
CREATE TABLE t3(
|
||||
a INTEGER REFERENCES t2,
|
||||
b INTEGER REFERENCES t1,
|
||||
FOREIGN KEY (a,b) REFERENCES t2(x,y)
|
||||
);
|
||||
}
|
||||
} {}
|
||||
|
||||
do_test fkey1-2.1 {
|
||||
execsql {
|
||||
CREATE TABLE t4(a integer primary key);
|
||||
CREATE TABLE t5(x references t4);
|
||||
CREATE TABLE t6(x references t4);
|
||||
CREATE TABLE t7(x references t4);
|
||||
CREATE TABLE t8(x references t4);
|
||||
CREATE TABLE t9(x references t4);
|
||||
CREATE TABLE t10(x references t4);
|
||||
DROP TABLE t7;
|
||||
DROP TABLE t9;
|
||||
DROP TABLE t5;
|
||||
DROP TABLE t8;
|
||||
DROP TABLE t6;
|
||||
DROP TABLE t10;
|
||||
}
|
||||
} {}
|
||||
|
||||
|
||||
|
||||
|
||||
finish_test
|
||||
Reference in new issue
Block a user