Informix - Problembeschreibung
Problem IT19806 | Status: Geschlossen |
SELECT BSON_GET(DATA,ID)::JSON FROM TABNAME CAUSES ASSERTION FAILURE WHEN RUN AGAINST A COLLECTION TABLE | |
Produkt: | |
INFORMIX SERVER / 5725A3900 / C10 - IDS 12.10 | |
Problembeschreibung: | |
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-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * Informix user with bson_get() function * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Update to IBM Informix Server 12.10.xC9 * **************************************************************** | |
Local-Fix: | |
Lösung | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 21.03.2017 10.07.2017 10.07.2017 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
12.10.xC9 | |
Problem behoben lt. FixList in der Version |