ext/pdo_sqlite/sqlite/src/prepare.c
/*
** Rerun the compilation of a statement after a schema change.
** Return true if the statement was recompiled successfully.
** Return false if there is an error of some kind.
*/
Rerun the compilation of a statement after a schema change.
Return true if the statement was recompiled successfully.
Return false if there is an error of some kind.
Rerun the compilation of a statement after a schema change . Return true if the statement was recompiled successfully . Return false if there is an error of some kind .
int sqlite3Reprepare(Vdbe *p){
  int rc;
  sqlite3_stmt *pNew;
  const char *zSql;
  sqlite3 *db;
  zSql = sqlite3VdbeGetSql(p);
  if( zSql==0 ){
    return 0;
  }
  db = sqlite3VdbeDb(p);
  rc = sqlite3Prepare(db, zSql, -1, 0, &pNew, 0);
  if( rc ){
    assert( pNew==0 );
    return 0;
  }else{
    assert( pNew!=0 );
  }
  sqlite3VdbeSwap((Vdbe*)pNew, p);
  sqlite3_transfer_bindings(pNew, (sqlite3_stmt*)p);
  sqlite3VdbeResetStepResult((Vdbe*)pNew);
  sqlite3VdbeFinalize((Vdbe*)pNew);
  return 1;
}
int sqlite3Reprepare ( Vdbe * p ) { int rc ; sqlite3_stmt * pNew ; const char * zSql ; sqlite3 * db ; zSql = sqlite3VdbeGetSql ( p ) ; if ( zSql == 0 ) { return 0 ; } db = sqlite3VdbeDb ( p ) ; rc = sqlite3Prepare ( db , zSql , -1 , 0 , & pNew , 0 ) ; if ( rc ) { assert ( pNew == 0 ) ; return 0 ; } else { assert ( pNew != 0 ) ; } sqlite3VdbeSwap ( ( Vdbe * ) pNew , p ) ; sqlite3_transfer_bindings ( pNew , ( sqlite3_stmt * ) p ) ; sqlite3VdbeResetStepResult ( ( Vdbe * ) pNew ) ; sqlite3VdbeFinalize ( ( Vdbe * ) pNew ) ; return 1 ; }
Rerun the compilation of a statement after a schema change.
Rerun the compilation of a statement after a schema change .