diff --git a/ext/misc/sha1.c b/ext/misc/sha1.c index b50cf5e7b7..11a94c2ac5 100644 --- a/ext/misc/sha1.c +++ b/ext/misc/sha1.c @@ -320,7 +320,6 @@ static void sha1QueryFunc( *pIsRecursive = 1; return; } - sqlite3_set_clientdata(db, "sha1_query()", &isRecursive, 0); hash_init(&cx); while( zSql[0] ){ rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, &zSql); @@ -347,6 +346,7 @@ static void sha1QueryFunc( hash_step(&cx,(unsigned char*)z,n); /* Compute a hash over the result of the query */ + sqlite3_set_clientdata(db, "sha1_query()", &isRecursive, 0); while( SQLITE_ROW==sqlite3_step(pStmt) ){ hash_step(&cx,(const unsigned char*)"R",1); for(i=0; i