diff --git a/recipes-openharmony/openharmony/openharmony-standard-3.0/appdatamgr-IsColumnNull-initialize-result.patch b/recipes-openharmony/openharmony/openharmony-standard-3.0/appdatamgr-IsColumnNull-initialize-result.patch new file mode 100644 index 0000000000000000000000000000000000000000..ec527d30ca0463664741995defd2c56e1782ae03 --- /dev/null +++ b/recipes-openharmony/openharmony/openharmony-standard-3.0/appdatamgr-IsColumnNull-initialize-result.patch @@ -0,0 +1,31 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 + +appdatamgr/IsColumnNull: initialize result value + +testIsColumnNull0003 ACTS testcase sometimes fail because the +result value of IsColumnNull is unpredictable when an error is returned. +This is because AbsSharedResultSet::IsColumnNull does not set any +value to &isNull when there is an error. The result value is +not initialized, producing an unpredictable output of IsColumnNull. + +Apply to foundation/distributeddatamgr/appdatamgr + +Upstream-Status: Pending + +Signed-off-by: Francesco Pham <francesco.pham@huawei.com> + +diff --git a/frameworks/jskitsimpl/native_rdb/napi_result_set.cpp b/frameworks/jskitsimpl/native_rdb/napi_result_set.cpp +index 59dd279..000fd87 100644 +--- a/frameworks/jskitsimpl/native_rdb/napi_result_set.cpp ++++ b/frameworks/jskitsimpl/native_rdb/napi_result_set.cpp +@@ -491,7 +491,7 @@ napi_value ResultSetProxy::IsColumnNull(napi_env env, napi_callback_info info) + { + LOG_DEBUG("IsColumnNull Begin!"); + int32_t columnIndex; +- bool result; ++ bool result=true; + size_t argc = MAX_INPUT_COUNT; + napi_value args[MAX_INPUT_COUNT] = { 0 }; + napi_get_cb_info(env, info, &argc, args, nullptr, nullptr); diff --git a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb index 0ae43e0fdaa65c66ae66e146af5bd75a0d2648f2..53537f6c7bdf686824bf4c1ae1e789883956dd60 100644 --- a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb +++ b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb @@ -94,6 +94,8 @@ SRC_URI += "file://hisysevent-socket-path.patch;patchdir=${S}/base/hiviewdfx/his # Patch to allow /system/profile and /system/usr to be symlinks to /usr/lib/openharmony SRC_URI += "file://foundation_distributedschedule_safwk-slash-system-symlink.patch;patchdir=${S}/foundation/distributedschedule/safwk" +SRC_URI += "file://appdatamgr-IsColumnNull-initialize-result.patch;patchdir=${S}/foundation/distributeddatamgr/appdatamgr" + SRC_URI += "file://test-xts-acts-fix-Defpermission-typo.patch;patchdir=${S}/test/xts/acts" SRC_URI += "file://test-xts-acts-fix-faultloggertest.patch;patchdir=${S}/test/xts/acts" SRC_URI += "file://test-xts-acts-fix-hicolliecpptest.patch;patchdir=${S}/test/xts/acts"