Unexpected Extended Error Code #492
-
I've run into a situation where the extended error code is not matching any of the values in apsw.mapping_extended_result_codes. Am I misunderstanding something? Running on MacOS 12.7.1; other version info is in the sample output at the bottom. To reproduce, save the following code to an empty directory, then run it it two processes at the same time. (The second process needs an argument to the script, any string will do). Alternate hitting enter in each process. (Hopefully that makes sense).
The results from process 2 on my system are:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
See the SQLite doc. In practical terms result codes were an 8 bit number. When wanting to add detail in extended result codes, the bottom 8 bits are the corresponding result code. For example from the SQLite source:
You got code 5 - SQLITE_BUSY. Because the value is less than 256 it is a standard result code, and not an extended one. I have added apsw.ext.result_string for the next release that knows about this, and looks in the appropriate mapping.
That should be |
Beta Was this translation helpful? Give feedback.
See the SQLite doc. In practical terms result codes were an 8 bit number. When wanting to add detail in extended result codes, the bottom 8 bits are the corresponding result code. For example from the SQLite source:
You got code 5 - SQLITE_BUSY. Because the value is less than 256 it is a standard result code, and not an extended one. I have added apsw.ext.result_string for the next release…