Q: gda-clnt/gda-recordset.c



hi,

in gda-clnt/gda-recordset.c there is following part of code:

[line 798 and following]
[----snip-----]
  rs->corba_rs = GDA_Command_open(cmd->command, corba_parameters,
              cursor_type, lock_type, &affected, &ev);
  error_list = gda_errors_from_exception(&ev);
  if (error_list)
    {
      rs->corba_rs = 0;
      gda_connection_add_errorlist(rs->cnc, error_list);
      return -1;
    }

  rs->field_attributes = GDA_Recordset_describe(rs->corba_rs, &ev);
[----snip-----]

if GDA_Command_open was called with a insert or a delete-statement there
will be no recordset to deliver and also no error to let us leave the
function. rs->corba_rs is NULL.

in GDA_Recordset_describe there's no validation for a NULL recordset
(and the application crashes).
my question: do I have to deliver an empty recordset in the
implementation of the server specific command_open method or should
there be a
validation in the client function?

kind regards

Stephan

-- 
-------------------------------------------------------------------
"Life is what happens to you while you're busy making other plans."
                                                        John Lennon
-------------------------------------------------------------------


Ci0tLSBXZWl0ZXJnZWxlaXRldGUgTmFjaHJpY2h0IC8gRm9yd2FyZGVkIE1lc3NhZ2UgLS0t
CkRhdGU6IFdlZCwgMSBEZWMgMTk5OSAxNjo0NTowMSArMDEwMCAoTUVUKQpGcm9tOiBTdGVw
aGFuIEhlaW56ZSA8U3QuSGVpbnplQGdteC5uZXQ+ClRvOiBnbm9tZS1kYi1saXN0QGdub21l
Lm9yZwpTdWJqZWN0OiBROiBnZGEtY2xudC9nZGEtcmVjb3Jkc2V0LmMKCj4gaGksCj4KPiBp
biBnZGEtY2xudC9nZGEtcmVjb3Jkc2V0LmMgdGhlcmUgaXMgZm9sbG93aW5nIHBhcnQgb2Yg
Y29kZToKPgo+IFtsaW5lIDc5OCBhbmQgZm9sbG93aW5nXQo+IFstLS0tc25pcC0tLS0tXQo+
ICAgcnMtPmNvcmJhX3JzID0gR0RBX0NvbW1hbmRfb3BlbihjbWQtPmNvbW1hbmQsIGNvcmJh
X3BhcmFtZXRlcnMsCj4gICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgbG9ja190eXBlLCAm
YWZm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