1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Ensure that it is not possible to open either virtual table or view columns using the blob API. Ticket #3078. (CVS 5041)

FossilOrigin-Name: 6039328fe05aaf9380d545e84dfabccb32a4d8ea
This commit is contained in:
danielk1977
2008-04-24 09:49:55 +00:00
parent 9eca081c13
commit 36961ed23f
4 changed files with 41 additions and 11 deletions

View File

@@ -12,7 +12,7 @@
**
** This file contains code used to implement incremental BLOB I/O.
**
** $Id: vdbeblob.c,v 1.21 2008/03/25 09:47:35 danielk1977 Exp $
** $Id: vdbeblob.c,v 1.22 2008/04/24 09:49:55 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -104,6 +104,16 @@ int sqlite3_blob_open(
sqlite3BtreeEnterAll(db);
pTab = sqlite3LocateTable(&sParse, 0, zTable, zDb);
if( pTab && IsVirtual(pTab) ){
pTab = 0;
sqlite3ErrorMsg(&sParse, "cannot open virtual table: %s", zTable);
}
#ifndef SQLITE_OMIT_VIEW
if( pTab && pTab->pSelect ){
pTab = 0;
sqlite3ErrorMsg(&sParse, "cannot open view: %s", zTable);
}
#endif
if( !pTab ){
if( sParse.zErrMsg ){
sqlite3_snprintf(sizeof(zErr), zErr, "%s", sParse.zErrMsg);