mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Add newly created virtual tables to the current transaction. (CVS 3267)
FossilOrigin-Name: ea7e4eca106cea27d5dc447d2afcd45448152151
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this file is creating and dropping virtual tables.
|
||||
#
|
||||
# $Id: vtab1.test,v 1.20 2006/06/17 03:27:23 danielk1977 Exp $
|
||||
# $Id: vtab1.test,v 1.21 2006/06/17 11:30:33 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -234,7 +234,10 @@ do_test vtab1-3.1 {
|
||||
CREATE VIRTUAL TABLE t1 USING echo(treal);
|
||||
}
|
||||
set echo_module
|
||||
} [list xCreate echo treal]
|
||||
} [list xCreate echo treal \
|
||||
xSync echo(treal) \
|
||||
xCommit echo(treal) \
|
||||
]
|
||||
|
||||
# Test that a SELECT on t1 doesn't crash. No rows are returned
|
||||
# because the underlying real table is currently empty.
|
||||
|
41
test/vtab2.test
Normal file
41
test/vtab2.test
Normal file
@ -0,0 +1,41 @@
|
||||
# 2006 June 10
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# $Id: vtab2.test,v 1.1 2006/06/17 11:30:33 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
ifcapable !vtab {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
register_schema_module [sqlite3_connection_pointer db]
|
||||
do_test vtab2-1.1 {
|
||||
execsql {
|
||||
CREATE VIRTUAL TABLE schema USING schema;
|
||||
SELECT * FROM schema;
|
||||
}
|
||||
} [list \
|
||||
main schema 0 database {} 0 {} 0 \
|
||||
main schema 1 tablename {} 0 {} 0 \
|
||||
main schema 2 cid {} 0 {} 0 \
|
||||
main schema 3 name {} 0 {} 0 \
|
||||
main schema 4 type {} 0 {} 0 \
|
||||
main schema 5 not_null {} 0 {} 0 \
|
||||
main schema 6 dflt_value {} 0 {} 0 \
|
||||
main schema 7 pk {} 0 {} 0 \
|
||||
]
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user