Skip to content
Snippets Groups Projects
Commit 16ffc1a2 authored by Francesco Pham's avatar Francesco Pham
Browse files

openharmony-standard: appdatamgr-IsColumnNull-initialize-result.patch


add appdatamgr-IsColumnNull-initialize-result.patch and apply to
foundation/distributeddatamgr/appdatamgr

```
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.
```

Signed-off-by: default avatarFrancesco Pham <francesco.pham@huawei.com>
parent a851108f
No related branches found
No related tags found
1 merge request!116openharmony-standard: raspberrypi4-64 support
# 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);
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment