On Wed, Mar 29, 2017 at 9:58 AM, Hick Gunter <[email protected]> wrote:
> The section at the end, which is executed first, contains the necessary > database locking and schema checking opcodes. These cannot be generated > before the rest of the program has analysed which operations are performed > on which tables and therefore which of the attached database(s) needs to be > locked and at which level. It is much easier to goto back and forth (change > just the target of the goto at opcode 1) than to relocate all the > instruction addresses in the code. > > The Halt opcode will perform any necessary commit processing and wrap up > execution of the bytecode program (like setting SQLITE_DONE if no more rows > are available form a SELECT program). I guess it is much easier to have a > specfic opcode for this rather than to just "fall off" the end of the > program (which would require checking the number of bytecodes generated at > every opcode). > Ah, that makes a lot of sense Gunter, thanks! I really appreciate the education. I do like to understand the why and how of things, and thank you for taking the time to share your hard-earned knowledge. Cheers, --DD _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

