Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Unified Diff: third_party/sqlite/src/test/tkt3080.test

Issue 694353003: Get `gn gen` to succeed on Windows (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: remove GYP_DEFINES code Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/tkt2942.test ('k') | third_party/sqlite/src/test/tkt3093.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/tkt3080.test
diff --git a/third_party/sqlite/src/test/tkt3080.test b/third_party/sqlite/src/test/tkt3080.test
new file mode 100644
index 0000000000000000000000000000000000000000..bfccaa9b84b17db4fbdd3badb20a439c458a4063
--- /dev/null
+++ b/third_party/sqlite/src/test/tkt3080.test
@@ -0,0 +1,77 @@
+# 2008 April 27
+#
+# 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.
+#
+#***********************************************************************
+#
+# Ticket #3080
+#
+# Make sure that application-defined functions are able to recursively
+# invoke SQL statements that create and drop virtual tables.
+#
+# $Id: tkt3080.test,v 1.2 2008/11/05 16:37:35 drh Exp $
+#
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+
+do_test tkt3080.1 {
+ db function execsql execsql
+ db eval {
+ SELECT execsql('CREATE TABLE t1(x)');
+ }
+ execsql {SELECT name FROM sqlite_master}
+} {t1}
+do_test tkt3080.2 {
+ db eval {
+ INSERT INTO t1 VALUES('CREATE TABLE t2(y);');
+ SELECT execsql(x) FROM t1;
+ }
+ db eval {
+ SELECT name FROM sqlite_master;
+ }
+} {t1 t2}
+do_test tkt3080.3 {
+ execsql {
+ INSERT INTO t1 VALUES('CREATE TABLE t3(z); DROP TABLE t3;');
+ }
+ catchsql {
+ SELECT execsql(x) FROM t1 WHERE rowid=2;
+ }
+} {1 {database table is locked}}
+do_test tkt3080.4 {
+ db eval {
+ SELECT name FROM sqlite_master;
+ }
+} {t1 t2 t3}
+
+ifcapable vtab {
+ register_echo_module [sqlite3_connection_pointer db]
+ do_test tkt3080.10 {
+ set sql {
+ CREATE VIRTUAL TABLE t4 USING echo(t2);
+ INSERT INTO t4 VALUES(123);
+ DROP TABLE t4;
+ }
+ execsql {
+ DELETE FROM t1;
+ INSERT INTO t1 VALUES($sql);
+ }
+ db eval {
+ SELECT execsql(x) FROM t1
+ }
+ execsql {SELECT name FROM sqlite_master}
+ } {t1 t2 t3}
+ do_test tkt3080.11 {
+ execsql {SELECT * FROM t2}
+ } {123}
+}
+
+
+
+finish_test
« no previous file with comments | « third_party/sqlite/src/test/tkt2942.test ('k') | third_party/sqlite/src/test/tkt3093.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698