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

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

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 months 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/veryquick.test ('k') | third_party/sqlite/src/test/vtab5.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/vtab1.test
diff --git a/third_party/sqlite/src/test/vtab1.test b/third_party/sqlite/src/test/vtab1.test
index 3bf7286ce3d755bd095d9151de9a0a0824362915..a9aca503c445e6597425d1bb34b713cf088f3532 100644
--- a/third_party/sqlite/src/test/vtab1.test
+++ b/third_party/sqlite/src/test/vtab1.test
@@ -1154,12 +1154,29 @@ foreach method [list \
incr tn
}
-do_test vtab1-16.$tn {
- set echo_module_fail(xRename,t2) "the xRename method has failed"
- catchsql { ALTER TABLE echo_t2 RENAME TO another_name }
-} "1 {echo-vtab-error: the xRename method has failed}"
-unset echo_module_fail(xRename,t2)
-incr tn
+ifcapable altertable {
+ do_test vtab1-16.$tn {
+ set echo_module_fail(xRename,t2) "the xRename method has failed"
+ catchsql { ALTER TABLE echo_t2 RENAME TO another_name }
+ } "1 {echo-vtab-error: the xRename method has failed}"
+ unset echo_module_fail(xRename,t2)
+ incr tn
+}
+
+# The following test case exposes an instance in sqlite3_declare_vtab()
+# an error message was set using a call similar to sqlite3_mprintf(zErr),
+# where zErr is an arbitrary string. This is no good if the string contains
+# characters that can be mistaken for printf() formatting directives.
+#
+do_test vtab1-17.1 {
+ execsql {
+ PRAGMA writable_schema = 1;
+ INSERT INTO sqlite_master VALUES(
+ 'table', 't3', 't3', 0, 'INSERT INTO "%s%s" VALUES(1)'
+ );
+ }
+ catchsql { CREATE VIRTUAL TABLE t4 USING echo(t3); }
+} {1 {vtable constructor failed: t4}}
unset -nocomplain echo_module_begin_fail
finish_test
« no previous file with comments | « third_party/sqlite/src/test/veryquick.test ('k') | third_party/sqlite/src/test/vtab5.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698