Merge pull request #1419 from mattn/fix-vtab-open-error
Return error from vtable cursor open instead of ignoring it
This commit is contained in:
@@ -113,6 +113,9 @@ uintptr_t goVOpen(void *pVTab, char **pzErr);
|
|||||||
|
|
||||||
static int cXOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor) {
|
static int cXOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor) {
|
||||||
void *vTabCursor = (void *)goVOpen(((goVTab*)pVTab)->vTab, &(pVTab->zErrMsg));
|
void *vTabCursor = (void *)goVOpen(((goVTab*)pVTab)->vTab, &(pVTab->zErrMsg));
|
||||||
|
if (!vTabCursor) {
|
||||||
|
return SQLITE_ERROR;
|
||||||
|
}
|
||||||
goVTabCursor *pCursor = (goVTabCursor *)sqlite3_malloc(sizeof(goVTabCursor));
|
goVTabCursor *pCursor = (goVTabCursor *)sqlite3_malloc(sizeof(goVTabCursor));
|
||||||
if (!pCursor) {
|
if (!pCursor) {
|
||||||
return SQLITE_NOMEM;
|
return SQLITE_NOMEM;
|
||||||
|
|||||||
Reference in New Issue
Block a user