cancel
Showing results for 
Search instead for 
Did you mean: 

Database (17.0.0.1358) crashes while using sp_parse_json

torsten_brinkmann2
Discoverer
0 Kudos

Dear Sir or Madam,

we are using the internal function sp_parse_json for parsing incoming json strings.

When using the following json string the database (version 17.0.0.1358) crashes.

So we have two problems.

The database crashes and this should not happen in any circumstances.

The other problem is parsing of json strings with different structures in the containing objects which is allowed by json standard.

We could identify the problem in the json string in the object "escalationInfo.buyerEscalationEligibilityInfo.startTime".

In the first object this value is null and in the following objects the startTime contains a value.

So we think the parser can not parse the json string because the containing objects does not have the same structure.

So in our opinion the parser does not parse the whole json string, it parse the first object and expects the following structure to be the same like the first objects.

We appreciate any kind of help.

Best regards

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186998
Contributor
0 Kudos

Hi Torsten,

I confirmed this phenomenon in the following environment.

SA17.0.1.1359(latest version) on Windows Server 2008 R2

When I executed "SA Crash Example", the following messages are displayed.

-----------------------------------------------------------------------------

dbeng17 has encountered a serious error and needs to close.

We are sorry for the inconvanience.

Please tell SAP about this problem.

We have created an error report that you can send to help us improve dbeng17.

We will treat this report as confidential and anonymous.

-----------------------------------------------------------------------------

By the way, the following statement succeed.

http://dcx.sap.com/index.html#sqla170/en/html/81793e416ce210148f98935c8ef5e212.html

-----

BEGIN

    DECLARE json_data LONG VARCHAR;

    CREATE LOCAL TEMPORARY TABLE test (

        name AS VARCHAR(64),

        age AS INT);

    INSERT INTO test (name, age) VALUES ('Frank',51);

    INSERT INTO test (name, age) VALUES ('Bill',22);

    INSERT INTO test (name, age) VALUES ('Jackie',37);

    SELECT * INTO json_data FROM test FOR JSON RAW;

    CALL sp_parse_json ( 'sql_array', json_data );

    SELECT sql_array [[row_num]] .name AS name, sql_array [[row_num]] .age AS age

        FROM sa_rowgenerator ( 1, 3 );

END;

-----

Anyway, I think that the crash of dbeng17 has a problem.

When you have an official account for support, you should ask this question using the account.(You must present the repro step of this phenomenon)

You may obtain useful information.

Thanks,

Atsushi