suche 36x36
  • Admin-Scout-small-Banner
           

    CURSOR Admin-Scout

    get the ultimate tool for Informix

    pfeil  
Latest versionsfixlist
14.10.xC10 FixList
12.10.xC16.X5 FixList
11.70.xC9.XB FixList
11.50.xC9.X2 FixList
11.10.xC3.W5 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

Informix - Problem description

Problem IT19806 Status: Closed

SELECT BSON_GET(DATA,ID)::JSON FROM TABNAME CAUSES ASSERTION FAILURE WHEN
RUN AGAINST A COLLECTION TABLE

product:
INFORMIX SERVER / 5725A3900 / C10 - IDS 12.10
Problem description:
You need to run this exact statement:

select bson_get(data,id)::json from tabname

Tabname needs to have been created as a collection table.
Example output from dbschema:

create collection table t2
  (
    id char(128) not null ,
    data "informix".bson,
    modcount bigint,
    flags integer,
    primary key (id)
  )

The correct syntax for bson_get() is to have the 2nd parameter
in quotes.  So the correct query if you were looking for the
field named "id" in the bson document would be:

select bson_get(data, "id")::json from t2

However, if the table is a collection table and you try to look
for the "id" field without the quotes, it causes the server to
SEGV and assert fail with the following stack:

afstack
mt_ex_throw_sig
afsig_handler

geval
geval
bson_get
geval
ev_geval
new_eval
evalcols
getrow
fetchrow
exfetch
sql_nfetch
sq_nfetch
sqmain
spawn_thread
th_init_initgls
startup

If you change "id" in the statement to some other field name
like this for example:

select bson_get(data, fname)::json from t2;

The select statement will fail with a -217 error.

If the table is not a collection table, but just a regular table
with a single bson column and you also use bson_get() and forget
the quotes around "id", in this case it will also just fail with
a -217 error.  Example:

create table t1 (c1 bson);
select bson_get(c1, id)::json from t1;
Problem Summary:
****************************************************************
* USERS AFFECTED:                                              *
* Informix user with bson_get() function                       *
****************************************************************
* PROBLEM DESCRIPTION:                                         *
* See Error Description                                        *
****************************************************************
* RECOMMENDATION:                                              *
* Update to IBM Informix Server 12.10.xC9                      *
****************************************************************
Local Fix:
Solution
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
21.03.2017
10.07.2017
10.07.2017
Problem solved at the following versions (IBM BugInfos)
12.10.xC9
Problem solved according to the fixlist(s) of the following version(s)
Informix EditionsInformix Editions
Informix Editions
DocumentationDocumentation
Documentation
IBM NewsletterIBM Newsletter
IBM Newsletter
Current BugsCurrent Bugs
Current Bugs
Bug ResearchBug Research
Bug Research
Bug FixlistsBug Fixlists
Bug Fixlists
Release NotesRelease Notes
Release Notes
Machine NotesMachine Notes
Machine Notes
Release NewsRelease News
Release News
Product LifecycleProduct Lifecycle
Lifecycle
Media DownloadMedia Download
Media Download