- struct show_raw *rr, **rrp;
- if (!cl->connection)
- { /* the client has no connection */
- return -1;
- }
- rr = xmalloc(sizeof(*rr));
- *data2 = rr;
- rr->position = position;
- rr->active = 0;
- rr->data = data;
- rr->error_handler = error_handler;
- rr->record_handler = record_handler;
- rr->binary = binary;
- if (syntax)
- rr->syntax = xstrdup(syntax);
- else
- rr->syntax = 0;
- if (esn)
- rr->esn = xstrdup(esn);
- else
- rr->esn = 0;
- rr->next = 0;
-
- for (rrp = &cl->show_raw; *rrp; rrp = &(*rrp)->next)
- ;
- *rrp = rr;
-
- if (cl->state == Client_Failed)
- {
- client_show_raw_error(cl, "client failed");
- }
- else if (cl->state == Client_Disconnected)
- {
- client_show_raw_error(cl, "client disconnected");
- }
+ if (syntax == 0 && esn == 0)
+ client_show_immediate(cl->resultset, client_get_database(cl),
+ position, data,
+ error_handler, record_handler,
+ binary);