1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Add tests to make sure altering or adding an index to a virtual table is prohibited. (CVS 3280)

FossilOrigin-Name: 6c3e8852ffbaf5ab52ffdf7ed3767fa1d4fd5882
This commit is contained in:
danielk1977
2006-06-21 12:36:25 +00:00
parent 9d1b2a28f8
commit 5ee9d6977f
5 changed files with 55 additions and 14 deletions

View File

@@ -22,7 +22,7 @@
** COMMIT
** ROLLBACK
**
** $Id: build.c,v 1.406 2006/06/21 07:34:11 danielk1977 Exp $
** $Id: build.c,v 1.407 2006/06/21 12:36:25 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -2304,6 +2304,12 @@ void sqlite3CreateIndex(
goto exit_create_index;
}
#endif
#ifndef SQLITE_OMIT_VIRTUALTABLE
if( IsVirtual(pTab) ){
sqlite3ErrorMsg(pParse, "virtual tables may not be indexed");
goto exit_create_index;
}
#endif
/*
** Find the name of the index. Make sure there is not already another