** Allocate space and save off current error string. */
| 12662 | ** Allocate space and save off current error string. |
| 12663 | */ |
| 12664 | static char *save_err_msg( |
| 12665 | sqlite3 *db /* Database to query */ |
| 12666 | ){ |
| 12667 | int nErrMsg = 1+strlen30(sqlite3_errmsg(db)); |
| 12668 | char *zErrMsg = sqlite3_malloc64(nErrMsg); |
| 12669 | if( zErrMsg ){ |
| 12670 | memcpy(zErrMsg, sqlite3_errmsg(db), nErrMsg); |
| 12671 | } |
| 12672 | return zErrMsg; |
| 12673 | } |
| 12674 | |
| 12675 | #ifdef __linux__ |
| 12676 | /* |
no test coverage detected