Lines Matching refs:p

51 static void appendText(dynStr *p, const char *zText, int nText){  in appendText()  argument
53 if( p->z==0 || p->nUsed + nText + 1 >= p->nAlloc ){ in appendText()
55 p->nAlloc = p->nUsed + nText + 1000; in appendText()
56 zNew = sqliteRealloc(p->z, p->nAlloc); in appendText()
58 sqliteFree(p->z); in appendText()
59 memset(p, 0, sizeof(*p)); in appendText()
62 p->z = zNew; in appendText()
64 memcpy(&p->z[p->nUsed], zText, nText+1); in appendText()
65 p->nUsed += nText; in appendText()
71 static void appendQuoted(dynStr *p, const char *zText){ in appendQuoted() argument
73 appendText(p, "'", 1); in appendQuoted()
76 appendText(p, &zText[j], i-j+1); in appendQuoted()
78 appendText(p, "'", 1); in appendQuoted()
82 appendText(p, &zText[j], i-j); in appendQuoted()
84 appendText(p, "'", 1); in appendQuoted()
110 vacuumStruct *p = (vacuumStruct*)pArg; in vacuumCallback2() local
115 p->s2.nUsed = 0; in vacuumCallback2()
116 appendText(&p->s2, "INSERT INTO ", -1); in vacuumCallback2()
117 appendQuoted(&p->s2, p->zTable); in vacuumCallback2()
118 appendText(&p->s2, " VALUES", -1); in vacuumCallback2()
120 appendText(&p->s2, zSep, 1); in vacuumCallback2()
123 appendText(&p->s2, "NULL", 4); in vacuumCallback2()
125 appendQuoted(&p->s2, argv[i]); in vacuumCallback2()
128 appendText(&p->s2,")", 1); in vacuumCallback2()
129 p->rc = execsql(p->pzErrMsg, p->dbNew, p->s2.z); in vacuumCallback2()
130 return p->rc; in vacuumCallback2()
142 vacuumStruct *p = (vacuumStruct*)pArg; in vacuumCallback1() local
149 rc = execsql(p->pzErrMsg, p->dbNew, argv[2]); in vacuumCallback1()
152 p->s1.nUsed = 0; in vacuumCallback1()
153 appendText(&p->s1, "SELECT * FROM ", -1); in vacuumCallback1()
154 appendQuoted(&p->s1, argv[1]); in vacuumCallback1()
155 p->zTable = argv[1]; in vacuumCallback1()
156 rc = sqlite_exec(p->dbOld, p->s1.z, vacuumCallback2, p, &zErrMsg); in vacuumCallback1()
158 sqliteSetString(p->pzErrMsg, zErrMsg, (char*)0); in vacuumCallback1()
162 if( rc!=SQLITE_ABORT ) p->rc = rc; in vacuumCallback1()