Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch api-armor-audit Excluding Merge-Ins
This is equivalent to a diff from 2e968114fd to ad34b2542e
2023-10-15
| ||
12:11 | Add coverage of more functions to SQLITE_ENABLE_API_ARMOR builds. (check-in: 6cb7750348 user: stephan tags: trunk) | |
2023-10-14
| ||
20:44 | JNI: extend [baf220e78a46246c47] to include macro-generated sqlite3_value_...() bindings. (Closed-Leaf check-in: ad34b2542e user: stephan tags: api-armor-audit) | |
20:34 | JNI: make the sqlite3_value_...() family of bindings resistent to NULL arguments. (check-in: baf220e78a user: stephan tags: api-armor-audit) | |
2023-10-13
| ||
12:57 | Actually prevent PRAGMA writable_schema=ON from being set in defensive mode, rather than just preventing it from functioning. (check-in: 2b574d9e7e user: drh tags: trunk) | |
12:48 | Round one of an audit for SQLITE_ENABLE_API_ARMOR for functions exposed by JNI and those functions missing armor, as reported in several forum posts. (check-in: 8c25c4b18a user: stephan tags: api-armor-audit) | |
01:39 | Avoid potential overflow in hex(). See forum post 7ac0c9c5ea. (check-in: 2e968114fd user: larrybr tags: trunk) | |
2023-10-12
| ||
20:51 | Make sure virtual tables have been connected before trying to invoke the xIntegrity method during PRAGMA integrity_check. (check-in: 4a4eccb681 user: drh tags: trunk) | |
Changes to ext/jni/src/c/sqlite3-jni.c.
︙ | |||
905 906 907 908 909 910 911 | 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 | - + | /* ** This function is NOT part of the sqlite3 public API. It is strictly ** for use by the sqlite project's own Java/JNI bindings. ** ** For purposes of certain hand-crafted JNI function bindings, we ** need a way of reporting errors which is consistent with the rest of |
︙ | |||
968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 | 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 | + - - + + | const char * const z, int n){ jstring rv = NULL; if( 0==n || (n<0 && z && !z[0]) ){ /* Fast-track the empty-string case via the MUTF-8 API. We could hypothetically do this for any strings where n<4 and z is NUL-terminated and none of z[0..3] are NUL bytes. */ rv = (*env)->NewStringUTF(env, ""); s3jni_oom_check( rv ); }else if( z ){ jbyteArray jba; if( n<0 ) n = sqlite3Strlen30(z); jba = s3jni_new_jbyteArray((unsigned const char *)z, n); if( jba ){ rv = (*env)->NewObject(env, SJG.g.cString, SJG.g.ctorStringBA, jba, SJG.g.oCharsetUtf8); S3JniIfThrew{ S3JniExceptionReport; S3JniExceptionClear; } S3JniUnrefLocal(jba); } |
︙ | |||
1464 1465 1466 1467 1468 1469 1470 | 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 | - - - + + + - + + + | #define PtrGet_sqlite3(OBJ) PtrGet_T(sqlite3, OBJ) #define PtrGet_sqlite3_backup(OBJ) PtrGet_T(sqlite3_backup, OBJ) #define PtrGet_sqlite3_blob(OBJ) PtrGet_T(sqlite3_blob, OBJ) #define PtrGet_sqlite3_context(OBJ) PtrGet_T(sqlite3_context, OBJ) #define PtrGet_sqlite3_stmt(OBJ) PtrGet_T(sqlite3_stmt, OBJ) #define PtrGet_sqlite3_value(OBJ) PtrGet_T(sqlite3_value, OBJ) /* |
︙ | |||
2050 2051 2052 2053 2054 2055 2056 2057 | 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 | + + + + + + + - + - + + - + - + + + | return (jint)CName(S3JniLongPtr_sqlite3(jpDb)); \ } /** Create a trivial JNI wrapper for (int64 CName(sqlite3*)). */ #define WRAP_INT64_DB(JniNameSuffix,CName) \ JniDecl(jlong,JniNameSuffix)(JniArgsEnvClass, jlong jpDb){ \ return (jlong)CName(S3JniLongPtr_sqlite3(jpDb)); \ } /** Create a trivial JNI wrapper for (jstring CName(sqlite3*,int)). */ #define WRAP_STR_DB_INT(JniNameSuffix,CName) \ JniDecl(jstring,JniNameSuffix)(JniArgsEnvClass, jlong jpDb, jint ndx){ \ return s3jni_utf8_to_jstring( \ CName(S3JniLongPtr_sqlite3(jpDb), (int)ndx), \ -1); \ } /** Create a trivial JNI wrapper for (int CName(sqlite3_value*)). */ |
︙ | |||
2097 2098 2099 2100 2101 2102 2103 | 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 | - - - - - - - - + + + + + + + | WRAP_INT_STMT_INT(1stmt_1explain, sqlite3_stmt_explain) WRAP_INT_STMT(1stmt_1isexplain, sqlite3_stmt_isexplain) WRAP_BOOL_STMT(1stmt_1readonly, sqlite3_stmt_readonly) WRAP_INT_DB(1system_1errno, sqlite3_system_errno) WRAP_INT_VOID(1threadsafe, sqlite3_threadsafe) WRAP_INT_DB(1total_1changes, sqlite3_total_changes) WRAP_INT64_DB(1total_1changes64, sqlite3_total_changes64) |
︙ | |||
2362 2363 2364 2365 2366 2367 2368 | 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 | - + | S3JniApi(sqlite3_bind_java_object(),jint,1bind_1java_1object)( JniArgsEnvClass, jlong jpStmt, jint ndx, jobject val ){ sqlite3_stmt * const pStmt = S3JniLongPtr_sqlite3_stmt(jpStmt); int rc = SQLITE_MISUSE; if(pStmt){ |
︙ | |||
2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 | 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 | + + + + + + + + + + + + + + + + + + | ){ jbyte * const pBuf = baData ? s3jni_jbyteArray_bytes(baData) : 0; int const rc = sqlite3_bind_text16(S3JniLongPtr_sqlite3_stmt(jpStmt), (int)ndx, pBuf, (int)nMax, SQLITE_TRANSIENT); s3jni_jbyteArray_release(baData, pBuf); return (jint)rc; } S3JniApi(sqlite3_bind_value(),jint,1bind_1value)( JniArgsEnvClass, jlong jpStmt, jint ndx, jlong jpValue ){ int rc = 0; sqlite3_stmt * pStmt = S3JniLongPtr_sqlite3_stmt(jpStmt); if( pStmt ){ sqlite3_value *v = S3JniLongPtr_sqlite3_value(jpValue); if( v ){ rc = sqlite3_bind_value(pStmt, (int)ndx, v); }else{ rc = sqlite3_bind_null(pStmt, (int)ndx); } }else{ rc = SQLITE_MISUSE; } return (jint)rc; } S3JniApi(sqlite3_bind_zeroblob(),jint,1bind_1zeroblob)( JniArgsEnvClass, jlong jpStmt, jint ndx, jint n ){ return (jint)sqlite3_bind_zeroblob(S3JniLongPtr_sqlite3_stmt(jpStmt), (int)ndx, (int)n); } |
︙ | |||
2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 | 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 | + + + + | S3JniApi(sqlite3_cancel_auto_extension(),jboolean,1cancel_1auto_1extension)( JniArgsEnvClass, jobject jAutoExt ){ S3JniAutoExtension * ax; jboolean rc = JNI_FALSE; int i; if( !jAutoExt ){ return rc; } S3JniAutoExt_mutex_enter; /* This algo corresponds to the one in the core. */ for( i = SJG.autoExt.nExt-1; i >= 0; --i ){ ax = &SJG.autoExt.aExt[i]; if( ax->jObj && (*env)->IsSameObject(env, ax->jObj, jAutoExt) ){ S3JniAutoExtension_clear(ax); /* Move final entry into this slot. */ |
︙ | |||
2774 2775 2776 2777 2778 2779 2780 | 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 | - - + + - - + + - - + + - + + | return (jlong)sqlite3_column_int64(PtrGet_sqlite3_stmt(jpStmt), (int)ndx); } S3JniApi(sqlite3_column_text(),jbyteArray,1column_1text)( JniArgsEnvClass, jobject jpStmt, jint ndx ){ sqlite3_stmt * const stmt = PtrGet_sqlite3_stmt(jpStmt); |
︙ | |||
2854 2855 2856 2857 2858 2859 2860 | 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 | - + | S3JniDb * ps; jobject pOld = 0; /* previous hoook */ S3JniHook * pHook; /* ps->hooks.commit|rollback */ S3JniDb_mutex_enter; ps = S3JniDb_from_jlong(jpDb); if( !ps ){ |
︙ | |||
2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 | 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 | + + + + + + + + + + + + - - - - - - - - - - - - | ){ const char * z = sqlite3_compileoption_get(n); jstring const rv = z ? (*env)->NewStringUTF( env, z ) : 0; /* We know these to be ASCII, so MUTF-8 is fine. */; s3jni_oom_check(z ? !!rv : 1); return rv; } S3JniApi(sqlite3_compileoption_used(),jboolean,1compileoption_1used)( JniArgsEnvClass, jstring name ){ const char *zUtf8 = s3jni_jstring_to_mutf8(name) /* We know these to be ASCII, so MUTF-8 is fine (and hypothetically faster to convert). */; const jboolean rc = 0==sqlite3_compileoption_used(zUtf8) ? JNI_FALSE : JNI_TRUE; s3jni_mutf8_release(name, zUtf8); return rc; } S3JniApi(sqlite3_complete(),int,1complete)( JniArgsEnvClass, jbyteArray jSql ){ jbyte * const pBuf = s3jni_jbyteArray_bytes(jSql); const jsize nBa = pBuf ? (*env)->GetArrayLength(env, jSql) : 0; int rc; assert( (nBa>0 ? 0==pBuf[nBa-1] : (pBuf ? 0==*pBuf : 1)) && "Byte array is not NUL-terminated." ); rc = (pBuf && 0==pBuf[(nBa ? nBa-1 : 0)]) ? sqlite3_complete( (const char *)pBuf ) : (jSql ? SQLITE_NOMEM : SQLITE_MISUSE); s3jni_jbyteArray_release(jSql, pBuf); return rc; } |
︙ | |||
3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 | 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 | + + + | S3JniApi(sqlite3_create_collation() sqlite3_create_collation_v2(), jint,1create_1collation )(JniArgsEnvClass, jobject jDb, jstring name, jint eTextRep, jobject oCollation){ int rc; S3JniDb * ps; if( !jDb || !name || !encodingTypeIsValid(eTextRep) ){ return (jint)SQLITE_MISUSE; } S3JniDb_mutex_enter; ps = S3JniDb_from_java(jDb); jclass const klazz = (*env)->GetObjectClass(env, oCollation); jmethodID const midCallback = (*env)->GetMethodID(env, klazz, "call", "([B[B)I"); S3JniUnrefLocal(klazz); S3JniIfThrew{ |
︙ | |||
3237 3238 3239 3240 3241 3242 3243 | 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | } error_cleanup: /* Reminder: on sqlite3_create_function() error, s will be ** destroyed via create_function(). */ return (jint)rc; } |
︙ | |||
3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 | 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 | + | ps->zMainDbName = zStr; } }else{ rc = SQLITE_NOMEM; } S3JniDb_mutex_leave; break; case 0: default: rc = SQLITE_MISUSE; } return rc; } S3JniApi( |
︙ | |||
3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 | 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | int pOut = 0; rc = sqlite3_db_config( ps->pDb, (int)op, onOff, &pOut ); if( 0==rc && jOut ){ OutputPointer_set_Int32(env, jOut, pOut); } break; } case 0: default: rc = SQLITE_MISUSE; } return (jint)rc; } /* ** This is a workaround for openjdk v19 (and possibly others) encoding ** this function's name differently than JDK v8 does. If we do not ** install both names for this function then Java will not be able to ** find the function in both environments. */ JniDecl(jint,1db_1config__Lorg_sqlite_jni_sqlite3_2IILorg_sqlite_jni_OutputPointer_00024Int32_2)( JniArgsEnvClass, jobject jDb, jint op, jint onOff, jobject jOut ){ return JniFuncName(1db_1config__Lorg_sqlite_jni_sqlite3_2IILorg_sqlite_jni_OutputPointer_Int32_2)( env, jKlazz, jDb, op, onOff, jOut ); } S3JniApi(sqlite3_db_filename(),jstring,1db_1filename)( JniArgsEnvClass, jobject jDb, jstring jDbName ){ S3JniDb * const ps = S3JniDb_from_java(jDb); char *zDbName; jstring jRv = 0; int nStr = 0; if( !ps || !jDbName ){ return 0; } zDbName = s3jni_jstring_to_utf8( jDbName, &nStr); if( zDbName ){ char const * zRv = sqlite3_db_filename(ps->pDb, zDbName); sqlite3_free(zDbName); if( zRv ){ jRv = s3jni_utf8_to_jstring( zRv, -1); } } return jRv; } S3JniApi(sqlite3_db_handle(),jobject,1db_1handle)( JniArgsEnvClass, jobject jpStmt ){ sqlite3_stmt * const pStmt = PtrGet_sqlite3_stmt(jpStmt); sqlite3 * const pDb = pStmt ? sqlite3_db_handle(pStmt) : 0; S3JniDb * const ps = pDb ? S3JniDb_from_c(pDb) : 0; return ps ? ps->jDb : 0; } S3JniApi(sqlite3_db_readonly(),jint,1db_1readonly)( JniArgsEnvClass, jobject jDb, jstring jDbName ){ int rc = 0; S3JniDb * const ps = S3JniDb_from_java(jDb); char *zDbName = jDbName ? s3jni_jstring_to_utf8( jDbName, 0 ) : 0; rc = sqlite3_db_readonly(ps ? ps->pDb : 0, zDbName); sqlite3_free(zDbName); return (jint)rc; } S3JniApi(sqlite3_db_release_memory(),int,1db_1release_1memory)( JniArgsEnvClass, jobject jDb ){ sqlite3 * const pDb = PtrGet_sqlite3(jDb); return pDb ? sqlite3_db_release_memory(pDb) : SQLITE_MISUSE; } |
︙ | |||
3545 3546 3547 3548 3549 3550 3551 | 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 | - - - - + - - + | return rv; } S3JniApi(sqlite3_last_insert_rowid(),jlong,1last_1insert_1rowid)( JniArgsEnvClass, jobject jpDb ){ |
︙ | |||
3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 | 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 | + + - + + + + - + | JniArgsEnvClass, jstring strName, jobject jOut ){ sqlite3 * pOut = 0; char *zName = 0; S3JniDb * ps = 0; S3JniEnv * jc = 0; int rc; if( 0==jOut ) return SQLITE_MISUSE; rc = s3jni_open_pre(env, &jc, strName, &zName, &ps); if( 0==rc ){ rc = s3jni_open_post(env, jc, ps, &pOut, jOut, sqlite3_open(zName, &pOut)); assert(rc==0 ? pOut!=0 : 1); sqlite3_free(zName); } return (jint)rc; } S3JniApi(sqlite3_open_v2(),jint,1open_1v2)( JniArgsEnvClass, jstring strName, |
︙ | |||
3692 3693 3694 3695 3696 3697 3698 | 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 | + - + + + + + - + - + - + - + | jint sqlite3_jni_prepare_v123( int prepVersion, JNIEnv * const env, jclass self, jlong jpDb, jbyteArray baSql, jint nMax, jint prepFlags, jobject jOutStmt, jobject outTail){ sqlite3_stmt * pStmt = 0; jobject jStmt = 0; const char * zTail = 0; sqlite3 * const pDb = S3JniLongPtr_sqlite3(jpDb); |
︙ | |||
3741 3742 3743 3744 3745 3746 3747 | 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 | + - - + + + | S3JniUnrefLocal(jStmt); jStmt = 0; } }else{ S3JniUnrefLocal(jStmt); jStmt = 0; } if( jOutStmt ){ |
︙ | |||
4066 4067 4068 4069 4070 4071 4072 | 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 | + + + - + - + | /* Impl for sqlite3_result_text/blob() and friends. */ static void result_blob_text(int as64 /* true for text64/blob64() mode */, int eTextRep /* 0 for blobs, else SQLITE_UTF... */, JNIEnv * const env, sqlite3_context *pCx, jbyteArray jBa, jlong nMax){ int const asBlob = 0==eTextRep; if( !pCx ){ /* We should arguably emit a warning here. But where to log it? */ return; |
︙ | |||
4216 4217 4218 4219 4220 4221 4222 | 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 | + + - + - + | ){ sqlite3_result_int64(PtrGet_sqlite3_context(jpCx), (sqlite3_int64)v); } S3JniApi(sqlite3_result_java_object(),void,1result_1java_1object)( JniArgsEnvClass, jobject jpCx, jobject v ){ sqlite3_context * pCx = PtrGet_sqlite3_context(jpCx); if( !pCx ) return; |
︙ | |||
4465 4466 4467 4468 4469 4470 4471 | 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 | - | static int s3jni_strlike_glob(int isLike, JNIEnv *const env, jbyteArray baG, jbyteArray baT, jint escLike){ int rc = 0; jbyte * const pG = s3jni_jbyteArray_bytes(baG); jbyte * const pT = pG ? s3jni_jbyteArray_bytes(baT) : 0; |
︙ | |||
4505 4506 4507 4508 4509 4510 4511 | 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 | - - - + - - - + + - - + + | } return rv; } S3JniApi(sqlite3_step(),jint,1step)( JniArgsEnvClass,jobject jStmt ){ |
︙ | |||
4689 4690 4691 4692 4693 4694 4695 | 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 | - - + + + + + + + + + + + + + + + + - + + - - + + + + + + + + + + - + + - + + - + + - - + + + + - - + + - - + + - - - + + + | } S3JniApi(sqlite3_value_blob(),jbyteArray,1value_1blob)( JniArgsEnvClass, jlong jpSVal ){ sqlite3_value * const sv = S3JniLongPtr_sqlite3_value(jpSVal); |
︙ |
Changes to ext/jni/src/c/sqlite3-jni.h.
︙ | |||
935 936 937 938 939 940 941 942 943 944 945 946 947 948 | 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 | + + + + + + + + | * Class: org_sqlite_jni_CApi * Method: sqlite3_bind_text16 * Signature: (JI[BI)I */ JNIEXPORT jint JNICALL Java_org_sqlite_jni_CApi_sqlite3_1bind_1text16 (JNIEnv *, jclass, jlong, jint, jbyteArray, jint); /* * Class: org_sqlite_jni_CApi * Method: sqlite3_bind_value * Signature: (JIJ)I */ JNIEXPORT jint JNICALL Java_org_sqlite_jni_CApi_sqlite3_1bind_1value (JNIEnv *, jclass, jlong, jint, jlong); /* * Class: org_sqlite_jni_CApi * Method: sqlite3_bind_zeroblob * Signature: (JII)I */ JNIEXPORT jint JNICALL Java_org_sqlite_jni_CApi_sqlite3_1bind_1zeroblob (JNIEnv *, jclass, jlong, jint, jint); |
︙ | |||
1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 | 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 | + + + + + + + + + + + + + + + + | * Class: org_sqlite_jni_CApi * Method: sqlite3_db_config * Signature: (Lorg/sqlite/jni/sqlite3;ILjava/lang/String;)I */ JNIEXPORT jint JNICALL Java_org_sqlite_jni_CApi_sqlite3_1db_1config__Lorg_sqlite_jni_sqlite3_2ILjava_lang_String_2 (JNIEnv *, jclass, jobject, jint, jstring); /* * Class: org_sqlite_jni_CApi * Method: sqlite3_db_name * Signature: (JI)Ljava/lang/String; */ JNIEXPORT jstring JNICALL Java_org_sqlite_jni_CApi_sqlite3_1db_1name (JNIEnv *, jclass, jlong, jint); /* * Class: org_sqlite_jni_CApi * Method: sqlite3_db_filename * Signature: (Lorg/sqlite/jni/sqlite3;Ljava/lang/String;)Ljava/lang/String; */ JNIEXPORT jstring JNICALL Java_org_sqlite_jni_CApi_sqlite3_1db_1filename (JNIEnv *, jclass, jobject, jstring); /* * Class: org_sqlite_jni_CApi * Method: sqlite3_db_handle * Signature: (Lorg/sqlite/jni/sqlite3_stmt;)Lorg/sqlite/jni/sqlite3; */ JNIEXPORT jobject JNICALL Java_org_sqlite_jni_CApi_sqlite3_1db_1handle (JNIEnv *, jclass, jobject); /* * Class: org_sqlite_jni_CApi * Method: sqlite3_db_readonly * Signature: (Lorg/sqlite/jni/sqlite3;Ljava/lang/String;)I */ JNIEXPORT jint JNICALL Java_org_sqlite_jni_CApi_sqlite3_1db_1readonly (JNIEnv *, jclass, jobject, jstring); /* * Class: org_sqlite_jni_CApi * Method: sqlite3_db_release_memory * Signature: (Lorg/sqlite/jni/sqlite3;)I */ JNIEXPORT jint JNICALL Java_org_sqlite_jni_CApi_sqlite3_1db_1release_1memory (JNIEnv *, jclass, jobject); |
︙ |
Changes to ext/jni/src/org/sqlite/jni/CApi.java.
︙ | |||
395 396 397 398 399 400 401 402 403 404 405 406 407 408 | 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | + + + + + + + + + + + | public static int sqlite3_bind_text16( @NotNull sqlite3_stmt stmt, int ndx, @Nullable byte[] data ){ return (null == data) ? sqlite3_bind_null(stmt.getNativePointer(), ndx) : sqlite3_bind_text16(stmt.getNativePointer(), ndx, data, data.length); } static native int sqlite3_bind_value(@NotNull long ptrToStmt, int ndx, long ptrToValue); /** Functions like the C-level sqlite3_bind_value(), or sqlite3_bind_null() if val is null. */ public static int sqlite3_bind_value(@NotNull sqlite3_stmt stmt, int ndx, sqlite3_value val){ return sqlite3_bind_value(stmt.getNativePointer(), ndx, null==val ? 0L : val.getNativePointer()); } static native int sqlite3_bind_zeroblob(@NotNull long ptrToStmt, int ndx, int n); public static int sqlite3_bind_zeroblob(@NotNull sqlite3_stmt stmt, int ndx, int n){ return sqlite3_bind_zeroblob(stmt.getNativePointer(), ndx, n); } |
︙ | |||
806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 | 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 | + + + + + + + + + | SQLITE_DBCONFIG_MAINDBNAME. Returns SQLITE_MISUSE if op is not SQLITE_DBCONFIG_MAINDBNAME, but that set of options may be extended in future versions. */ public static native int sqlite3_db_config( @NotNull sqlite3 db, int op, @NotNull String val ); private static native String sqlite3_db_name(@NotNull long ptrToDb, int ndx); public static String sqlite3_db_name(@NotNull sqlite3 db, int ndx){ return null==db ? null : sqlite3_db_name(db.getNativePointer(), ndx); } public static native String sqlite3_db_filename( @NotNull sqlite3 db, @NotNull String dbName ); public static native sqlite3 sqlite3_db_handle(@NotNull sqlite3_stmt stmt); public static native int sqlite3_db_readonly(@NotNull sqlite3 db, String dbName); public static native int sqlite3_db_release_memory(sqlite3 db); public static native int sqlite3_db_status( @NotNull sqlite3 db, int op, @NotNull OutputPointer.Int32 pCurrent, @NotNull OutputPointer.Int32 pHighwater, boolean reset ); |
︙ |
Changes to ext/jni/src/org/sqlite/jni/Tester1.java.
︙ | |||
251 252 253 254 255 256 257 258 259 260 261 262 263 264 | 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | + + + + + + | affirm(0 == rc); affirm(db.getNativePointer()!=0); sqlite3_db_config(db, SQLITE_DBCONFIG_DEFENSIVE, 1, null) /* This function has different mangled names in jdk8 vs jdk19, and this call is here to ensure that the build fails if it cannot find both names. */; affirm( 0==sqlite3_db_readonly(db,"main") ); affirm( 0==sqlite3_db_readonly(db,null) ); affirm( 0>sqlite3_db_readonly(db,"nope") ); affirm( 0>sqlite3_db_readonly(null,null) ); affirm( 0==sqlite3_last_insert_rowid(null) ); // These interrupt checks are only to make sure that the JNI binding // has the proper exported symbol names. They don't actually test // anything useful. affirm( !sqlite3_is_interrupted(db) ); sqlite3_interrupt(db); affirm( sqlite3_is_interrupted(db) ); sqlite3_close_v2(db); |
︙ | |||
1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 | 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 | + + + | final sqlite3 db1 = outDb.get(); execSql(db1, "CREATE TABLE IF NOT EXISTS t(a)"); rc = sqlite3_open(dbName, outDb); ++metrics.dbOpen; affirm( 0 == rc ); affirm( outDb.get() != db1 ); final sqlite3 db2 = outDb.get(); affirm( "main".equals( sqlite3_db_name(db1, 0) ) ); rc = sqlite3_db_config(db1, SQLITE_DBCONFIG_MAINDBNAME, "foo"); affirm( sqlite3_db_filename(db1, "foo").endsWith(dbName) ); affirm( "foo".equals( sqlite3_db_name(db1, 0) ) ); final ValueHolder<Integer> xBusyCalled = new ValueHolder<>(0); BusyHandlerCallback handler = new BusyHandlerCallback(){ @Override public int call(int n){ //outln("busy handler #"+n); return n > 2 ? 0 : ++xBusyCalled.value; } |
︙ | |||
1452 1453 1454 1455 1456 1457 1458 | 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 | - + + + + + + + + + + + | affirm( 0==rc ); affirm( bPrimaryKey.value ); affirm( !bAutoinc.value ); affirm( bNotNull.value ); affirm( "noCase".equals(zCollSeq.value) ); affirm( "duck".equals(zDataType.value) ); |
︙ |
Changes to src/loadext.c.
︙ | |||
726 727 728 729 730 731 732 733 734 735 736 737 738 739 | 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 | + + + | } /* ** Enable or disable extension loading. Extension loading is disabled by ** default so as not to open security holes in older applications. */ int sqlite3_enable_load_extension(sqlite3 *db, int onoff){ #ifdef SQLITE_ENABLE_API_ARMOR if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; #endif sqlite3_mutex_enter(db->mutex); if( onoff ){ db->flags |= SQLITE_LoadExtension|SQLITE_LoadExtFunc; }else{ db->flags &= ~(u64)(SQLITE_LoadExtension|SQLITE_LoadExtFunc); } sqlite3_mutex_leave(db->mutex); |
︙ | |||
747 748 749 750 751 752 753 | 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 | - + | ** extensions. ** ** This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN ** mutex must be held while accessing this list. */ typedef struct sqlite3AutoExtList sqlite3AutoExtList; static SQLITE_WSD struct sqlite3AutoExtList { |
︙ | |||
775 776 777 778 779 780 781 782 783 784 785 786 787 788 | 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 | + + + | ** Register a statically linked extension that is automatically ** loaded by every new database connection. */ int sqlite3_auto_extension( void (*xInit)(void) ){ int rc = SQLITE_OK; #ifdef SQLITE_ENABLE_API_ARMOR if( xInit==0 ) return SQLITE_MISUSE_BKPT; #endif #ifndef SQLITE_OMIT_AUTOINIT rc = sqlite3_initialize(); if( rc ){ return rc; }else #endif { |
︙ | |||
827 828 829 830 831 832 833 834 835 836 837 838 839 840 | 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 | + + + | ){ #if SQLITE_THREADSAFE sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN); #endif int i; int n = 0; wsdAutoextInit; #ifdef SQLITE_ENABLE_API_ARMOR if( xInit==0 ) return 0; #endif sqlite3_mutex_enter(mutex); for(i=(int)wsdAutoext.nExt-1; i>=0; i--){ if( wsdAutoext.aExt[i]==xInit ){ wsdAutoext.nExt--; wsdAutoext.aExt[i] = wsdAutoext.aExt[wsdAutoext.nExt]; n++; break; |
︙ |
Changes to src/main.c.
︙ | |||
950 951 952 953 954 955 956 957 958 959 960 961 962 963 | 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 | + + + + | /* ** Configuration settings for an individual database connection */ int sqlite3_db_config(sqlite3 *db, int op, ...){ va_list ap; int rc; #ifdef SQLITE_ENABLE_API_ARMOR if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; #endif sqlite3_mutex_enter(db->mutex); va_start(ap, op); switch( op ){ case SQLITE_DBCONFIG_MAINDBNAME: { /* IMP: R-06824-28531 */ /* IMP: R-36257-52125 */ db->aDb[0].zDbSName = va_arg(ap,char*); |
︙ | |||
2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 | 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 | + + + + + + | void *sqlite3_preupdate_hook( sqlite3 *db, /* Attach the hook to this database */ void(*xCallback)( /* Callback function */ void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64), void *pArg /* First callback argument */ ){ void *pRet; #ifdef SQLITE_ENABLE_API_ARMOR if( db==0 || xCallback==0 ){ return; } #endif sqlite3_mutex_enter(db->mutex); pRet = db->pPreUpdateArg; db->xPreUpdateCallback = xCallback; db->pPreUpdateArg = pArg; sqlite3_mutex_leave(db->mutex); return pRet; } |
︙ |
Changes to src/notify.c.
︙ | |||
148 149 150 151 152 153 154 155 156 157 158 159 160 161 | 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | + + + | int sqlite3_unlock_notify( sqlite3 *db, void (*xNotify)(void **, int), void *pArg ){ int rc = SQLITE_OK; #ifdef SQLITE_ENABLE_API_ARMOR if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; #endif sqlite3_mutex_enter(db->mutex); enterMutex(); if( xNotify==0 ){ removeFromBlockedList(db); db->pBlockingConnection = 0; db->pUnlockConnection = 0; |
︙ |
Changes to src/vdbeapi.c.
︙ | |||
401 402 403 404 405 406 407 | 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 | - + + - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + | if( sqlite3VdbeMemTooBig(pOut) ){ sqlite3_result_error_toobig(pCtx); } } static int invokeValueDestructor( const void *p, /* Value to destroy */ void (*xDel)(void*), /* The destructor */ |
︙ | |||
543 544 545 546 547 548 549 | 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 | + + + + + + + + + - + + + + + + - + + + + + + + + + + | void (*xDel)(void *) ){ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); setResultStrOrError(pCtx, z, n & ~(u64)1, SQLITE_UTF16LE, xDel); } #endif /* SQLITE_OMIT_UTF16 */ void sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){ Mem *pOut; #ifdef SQLITE_ENABLE_API_ARMOR if( pCtx==0 ) return; if( pValue==0 ){ sqlite3_result_null(pCtx); return; } #endif |
︙ | |||
841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 | 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 | + + + + + + + + + + + + | /* ** Extract the user data from a sqlite3_context structure and return a ** pointer to it. */ void *sqlite3_user_data(sqlite3_context *p){ #ifdef SQLITE_ENABLE_API_ARMOR if( p==0 ) return 0; #else assert( p && p->pFunc ); #endif return p->pFunc->pUserData; } /* ** Extract the user data from a sqlite3_context structure and return a ** pointer to it. ** ** IMPLEMENTATION-OF: R-46798-50301 The sqlite3_context_db_handle() interface ** returns a copy of the pointer to the database connection (the 1st ** parameter) of the sqlite3_create_function() and ** sqlite3_create_function16() routines that originally registered the ** application defined function. */ sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){ #ifdef SQLITE_ENABLE_API_ARMOR if( p==0 ) return 0; #else assert( p && p->pOut ); #endif return p->pOut->db; } /* ** If this routine is invoked from within an xColumn method of a virtual ** table, then it returns true if and only if the the call is during an ** UPDATE operation and the value of the column will not be modified ** by the UPDATE. ** ** If this routine is called from any context other than within the ** xColumn method of a virtual table, then the return value is meaningless ** and arbitrary. ** ** Virtual table implements might use this routine to optimize their ** performance by substituting a NULL result, or some other light-weight ** value, as a signal to the xUpdate routine that the column is unchanged. */ int sqlite3_vtab_nochange(sqlite3_context *p){ #ifdef SQLITE_ENABLE_API_ARMOR if( p==0 ) return 0; #else assert( p ); #endif return sqlite3_value_nochange(p->pOut); } /* ** The destructor function for a ValueList object. This needs to be ** a separate function, unknowable to the application, to ensure that ** calls to sqlite3_vtab_in_first()/sqlite3_vtab_in_next() that are not |
︙ | |||
1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 | 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 | + + + | ** Undocumented behavior: If iArg is negative then access a cache of ** auxiliary data pointers that is available to all functions within a ** single prepared statement. The iArg values must match. */ void *sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){ AuxData *pAuxData; #ifdef SQLITE_ENABLE_API_ARMOR if( pCtx==0 ) return 0; #endif assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); #if SQLITE_ENABLE_STAT4 if( pCtx->pVdbe==0 ) return 0; #else assert( pCtx->pVdbe!=0 ); #endif for(pAuxData=pCtx->pVdbe->pAuxData; pAuxData; pAuxData=pAuxData->pNextAux){ |
︙ | |||
1066 1067 1068 1069 1070 1071 1072 | 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 | - + + + + + | void sqlite3_set_auxdata( sqlite3_context *pCtx, int iArg, void *pAux, void (*xDelete)(void*) ){ AuxData *pAuxData; |
︙ | |||
1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 | 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 | + + + | sqlite3_mutex_leave(p->db->mutex); } return rc; } int sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){ int rc; Vdbe *p = (Vdbe *)pStmt; #ifdef SQLITE_ENABLE_API_ARMOR if( p==0 ) return SQLITE_MISUSE_BKPT; #endif sqlite3_mutex_enter(p->db->mutex); if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){ rc = SQLITE_TOOBIG; }else{ assert( (n & 0x7FFFFFFF)==n ); rc = sqlite3_bind_zeroblob(pStmt, i, n); } |
︙ | |||
1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 | 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 | + + + | /* ** Set the explain mode for a statement. */ int sqlite3_stmt_explain(sqlite3_stmt *pStmt, int eMode){ Vdbe *v = (Vdbe*)pStmt; int rc; #ifdef SQLITE_ENABLE_API_ARMOR if( pStmt==0 ) return SQLITE_MISUSE_BKPT; #endif sqlite3_mutex_enter(v->db->mutex); if( ((int)v->explain)==eMode ){ rc = SQLITE_OK; }else if( eMode<0 || eMode>2 ){ rc = SQLITE_ERROR; }else if( (v->prepFlags & SQLITE_PREPARE_SAVESQL)==0 ){ rc = SQLITE_ERROR; |
︙ | |||
2025 2026 2027 2028 2029 2030 2031 | 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 | - + + + + + + + | } /* ** This function is called from within a pre-update callback to retrieve ** a field of the row currently being updated or deleted. */ int sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ |
︙ | |||
2089 2090 2091 2092 2093 2094 2095 | 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 | - + + + + + + - + + + + + + - + + + + + + - + + + + + + + | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK /* ** This function is called from within a pre-update callback to retrieve ** the number of columns in the row being updated, deleted or inserted. */ int sqlite3_preupdate_count(sqlite3 *db){ |
︙ | |||
2211 2212 2213 2214 2215 2216 2217 | 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 | - - + + + + + + + | sqlite3_stmt *pStmt, /* Prepared statement being queried */ int iScan, /* Index of loop to report on */ int iScanStatusOp, /* Which metric to return */ int flags, void *pOut /* OUT: Write the answer here */ ){ Vdbe *p = (Vdbe*)pStmt; |
︙ | |||
2362 2363 2364 2365 2366 2367 2368 | 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 | - + | /* ** Zero all counters associated with the sqlite3_stmt_scanstatus() data. */ void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){ Vdbe *p = (Vdbe*)pStmt; int ii; |
Changes to src/vdbeblob.c.
︙ | |||
138 139 140 141 142 143 144 | 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | - + | #ifdef SQLITE_ENABLE_API_ARMOR if( ppBlob==0 ){ return SQLITE_MISUSE_BKPT; } #endif *ppBlob = 0; #ifdef SQLITE_ENABLE_API_ARMOR |
︙ |