Lines Matching refs:pSession
10277 static void session_close(OpenSession *pSession){ in session_close() argument
10279 sqlite3session_delete(pSession->p); in session_close()
10280 sqlite3_free(pSession->zName); in session_close()
10281 for(i=0; i<pSession->nFilter; i++){ in session_close()
10282 sqlite3_free(pSession->azFilter[i]); in session_close()
10284 sqlite3_free(pSession->azFilter); in session_close()
10285 memset(pSession, 0, sizeof(OpenSession)); in session_close()
10310 OpenSession *pSession = (OpenSession*)pCtx; in session_filter() local
10312 for(i=0; i<pSession->nFilter; i++){ in session_filter()
10313 if( sqlite3_strglob(pSession->azFilter[i], zTab)==0 ) return 0; in session_filter()
13562 OpenSession *pSession = &p->aSession[0]; in do_meta_command() local
13574 pSession = &p->aSession[iSes]; in do_meta_command()
13578 pSession = &p->aSession[0]; in do_meta_command()
13589 if( pSession->p==0 ){ in do_meta_command()
13593 rc = sqlite3session_attach(pSession->p, azCmd[1]); in do_meta_command()
13608 if( pSession->p==0 ) goto session_not_open; in do_meta_command()
13616 rc = sqlite3session_changeset(pSession->p, &szChng, &pChng); in do_meta_command()
13618 rc = sqlite3session_patchset(pSession->p, &szChng, &pChng); in do_meta_command()
13640 session_close(pSession); in do_meta_command()
13653 ii = sqlite3session_enable(pSession->p, ii); in do_meta_command()
13655 pSession->zName, ii); in do_meta_command()
13666 for(ii=0; ii<pSession->nFilter; ii++){ in do_meta_command()
13667 sqlite3_free(pSession->azFilter[ii]); in do_meta_command()
13669 sqlite3_free(pSession->azFilter); in do_meta_command()
13670 nByte = sizeof(pSession->azFilter[0])*(nCmd-1); in do_meta_command()
13671 pSession->azFilter = sqlite3_malloc( nByte ); in do_meta_command()
13672 if( pSession->azFilter==0 ){ in do_meta_command()
13677 pSession->azFilter[ii-1] = sqlite3_mprintf("%s", azCmd[ii]); in do_meta_command()
13679 pSession->nFilter = ii-1; in do_meta_command()
13691 ii = sqlite3session_indirect(pSession->p, ii); in do_meta_command()
13693 pSession->zName, ii); in do_meta_command()
13704 ii = sqlite3session_isempty(pSession->p); in do_meta_command()
13706 pSession->zName, ii); in do_meta_command()
13738 pSession = &p->aSession[p->nSession]; in do_meta_command()
13739 rc = sqlite3session_create(p->db, azCmd[1], &pSession->p); in do_meta_command()
13745 pSession->nFilter = 0; in do_meta_command()
13746 sqlite3session_table_filter(pSession->p, session_filter, pSession); in do_meta_command()
13748 pSession->zName = sqlite3_mprintf("%s", zName); in do_meta_command()