]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Also test that setting sqlite3_vtab.zErrMsg works from within the xRename method...
authordanielk1977 <danielk1977@noemail.net>
Fri, 1 Aug 2008 17:51:47 +0000 (17:51 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Fri, 1 Aug 2008 17:51:47 +0000 (17:51 +0000)
FossilOrigin-Name: 4f4a9ccae7d25b9856d1203f6b289d552c2b425e

manifest
manifest.uuid
src/test8.c
test/vtab1.test

index d7974593d330e79de4c51777f88bd3ece5cffd5e..ed994a6a5682ee33b98520e2fa23d1e14363a826 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Test\sthat\svirtual\stable\smethods\sxBestIndex,\sxOpen,\sxFilter,\sxNext,\sxColumn,\sxRowid,\sxUpdate,\sxSync\sand\sxBegin\scan\sall\sreturn\serror\smessages\susing\sthe\ssqlite3_vtab.zErrMsg\svariable.\s(CVS\s5519)
-D 2008-08-01T17:37:41
+C Also\stest\sthat\ssetting\ssqlite3_vtab.zErrMsg\sworks\sfrom\swithin\sthe\sxRename\smethod.\s(CVS\s5520)
+D 2008-08-01T17:51:47
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in bbb62eecc851379aef5a48a1bf8787eb13e6ec06
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -158,7 +158,7 @@ F src/test4.c 41056378671e7b00e6305fa9ac6fa27e6f96f406
 F src/test5.c 847eb5cfe89c197b6b494858ccf60be981235bdf
 F src/test6.c 0a0304a69cfa4962a429d084c6d451ff9e4fb572
 F src/test7.c 475b1fa7e3275408b40a3cbdc9508cbdc41ffa02
-F src/test8.c f869497d3f6e8a7566e9b7116dce7ada49ee1183
+F src/test8.c 0517adadd05a21bb119d14d0b9b8d7776a6fe9f9
 F src/test9.c 904ebe0ed1472d6bad17a81e2ecbfc20017dc237
 F src/test_async.c da9f58f49faccd3a26ba89f58de125862351b6e2
 F src/test_autoext.c f53b0cdf7bf5f08100009572a5d65cdb540bd0ad
@@ -569,7 +569,7 @@ F test/vacuum3.test 75dee6ffd1baa60308dcad93f2c689126500dcff
 F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102
 F test/veryquick.test e265401afefa994cdf2fe4b6f286b1e87c2f9b9d
 F test/view.test 5799906511d6c77cfe3516d3d1189224350ef732
-F test/vtab1.test 2108cfb3ff72cb0f46363589d3c4746c04723368
+F test/vtab1.test e321e3c80434fe8de97fa4ad815882d2c7838d21
 F test/vtab2.test 1da49b015582965a8fc386aa23d051a5a622b08e
 F test/vtab3.test baad99fd27217f5d6db10660522e0b7192446de1
 F test/vtab4.test 942f8b8280b3ea8a41dae20e7822d065ca1cb275
@@ -615,7 +615,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 6a6b94302acdfe6404b04bff1cc8d16c1ef69df9
-R 5672f7054494561346fae0939e873dda
+P 007359b770f225877880b11f4c5d97bb548e38ca
+R f0d8797192a7ea8466c2e723f27015ad
 U danielk1977
-Z bf74e8d5f26a63b2617162677c14612e
+Z 096b5dd0921e6fbf5cb91dacb681b73e
index c38e0fd1e8ac9130295f0bd9e38dbb35d89e79a2..04dfbfc1884157d3febf342c660336657a79a350 100644 (file)
@@ -1 +1 @@
-007359b770f225877880b11f4c5d97bb548e38ca
\ No newline at end of file
+4f4a9ccae7d25b9856d1203f6b289d552c2b425e
\ No newline at end of file
index c6e1aa481bdc6acc4d8936c72c59e4cfaac2b475..daaa33f56f09463dd9320abe6a97847d11afb7d6 100644 (file)
@@ -13,7 +13,7 @@
 ** is not included in the SQLite library.  It is used for automated
 ** testing of the SQLite library.
 **
-** $Id: test8.c,v 1.70 2008/08/01 17:37:41 danielk1977 Exp $
+** $Id: test8.c,v 1.71 2008/08/01 17:51:47 danielk1977 Exp $
 */
 #include "sqliteInt.h"
 #include "tcl.h"
@@ -49,7 +49,7 @@ typedef struct echo_cursor echo_cursor;
 **
 **   xBestIndex   xOpen     xFilter   xNext   
 **   xColumn      xRowid    xUpdate   xSync   
-**   xBegin
+**   xBegin       xRename
 **
 ** This is done by setting the global tcl variable:
 **
@@ -1218,6 +1218,10 @@ static int echoRename(sqlite3_vtab *vtab, const char *zNewName){
   int rc = SQLITE_OK;
   echo_vtab *p = (echo_vtab *)vtab;
 
+  if( simulateVtabError(p, "xRename") ){
+    return SQLITE_ERROR;
+  }
+
   if( p->isPattern ){
     int nThis = strlen(p->zThis);
     char *zSql = sqlite3MPrintf(0, "ALTER TABLE %s RENAME TO %s%s", 
index c46b9ada5ac5db2af1b3900362eb9093749c6b9b..3bf7286ce3d755bd095d9151de9a0a0824362915 100644 (file)
@@ -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.56 2008/08/01 17:37:41 danielk1977 Exp $
+# $Id: vtab1.test,v 1.57 2008/08/01 17:51:47 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -1154,5 +1154,12 @@ 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
+
 unset -nocomplain echo_module_begin_fail
 finish_test