| commit | f677044bf52ce006434d774bea5fc9758dcdf93e | [log] [tgz] |
|---|---|---|
| author | Etienne Bergeron <[email protected]> | Tue Nov 11 19:19:39 2025 |
| committer | Copybara-Service <[email protected]> | Tue Nov 11 19:43:35 2025 |
| tree | 4450c9fd962edaa7e70cd32e36c1b248bea865d1 | |
| parent | f4da1300592bb68f83f4bd0a8ba868043b680312 [diff] |
Remove SQLITE_OMIT_AUTORESET flag
Removing SQLITE_OMIT_AUTORESET flag. Chrome code is resetting the
statement through the Statement class destructor [1].
On an OP_HALT (end of statement), the default behavior is to always
reset the statement.
The behavior when defining SQLITE_OMIT_AUTORESET is that only statement
returning 'BUSY' or 'LOCKED' are reset. 'SQLITE_MISUSE_BKPT' is returned
otherwise.
The default and recommended behavior is to not use that flag.
```
The SQLite code under that flag is below [2]:
if( ALWAYS(p->eVdbeState==VDBE_HALT_STATE) ){
[...]
#ifdef SQLITE_OMIT_AUTORESET
if( (rc = p->rc&0xff)==SQLITE_BUSY || rc==SQLITE_LOCKED ){
sqlite3_reset((sqlite3_stmt*)p);
}else{
return SQLITE_MISUSE_BKPT;
}
#else
sqlite3_reset((sqlite3_stmt*)p); <<<--- New behavior
#endif
````
[1]
https://source.chromium.org/chromium/chromium/src/+/main:sql/statement.cc;l=80;drc=309e7aa9204b3a6d3c0770254499dd0044166550
[2]
https://source.chromium.org/chromium/chromium/src/+/main:third_party/sqlite/src/src/vdbeapi.c;l=821;drc=29c7c8b9135362fd1f9deee26e939c885439c36b
Change-Id: I5d91c8717c331dbaf5183845575da7b012a3955c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7133481
Reviewed-by: Greg Thompson <[email protected]>
Commit-Queue: Etienne Bergeron <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1543249}
NOKEYCHECK=True
GitOrigin-RevId: e03b8000707197f0098f4939869700923103b960
diff --git a/sqlite_chromium_configuration_flags.gni b/sqlite_chromium_configuration_flags.gni index e7cd033..604e3cc 100644 --- a/sqlite_chromium_configuration_flags.gni +++ b/sqlite_chromium_configuration_flags.gni
@@ -51,9 +51,6 @@ # See https://www.sqlite.org/optoverview.html#autoindex "SQLITE_OMIT_AUTOMATIC_INDEX", - # Chrome calls sqlite3_reset() correctly to reset prepared statements. - "SQLITE_OMIT_AUTORESET", - # Chromium does not use sqlite3_{get,free}_table(). # Chrome doesn't use sqlite3_compileoption_{used,get}(). "SQLITE_OMIT_COMPILEOPTION_DIAGS",