1443
class select_result :public Sql_alloc {
1446
SELECT_LEX_UNIT *unit;
1449
virtual ~select_result() {};
1450
virtual int prepare(List<Item> &,
1457
Because of peculiarities of prepared statements protocol
1458
we need to know number of columns in the result set (if
1459
there is a result set) apart from sending columns metadata.
1461
virtual uint32_t field_count(List<Item> &fields) const
1462
{ return fields.elements; }
1463
virtual bool send_fields(List<Item> &list, uint32_t flags)=0;
1464
virtual bool send_data(List<Item> &items)=0;
1465
virtual bool initialize_tables (JOIN *)
1467
virtual void send_error(uint32_t errcode,const char *err);
1468
virtual bool send_eof()=0;
1469
virtual void abort() {}
1471
Cleanup instance of this class for next execution of a prepared
1472
statement/stored procedure.
1474
virtual void cleanup();
1475
void set_session(Session *session_arg) { session= session_arg; }
1476
void begin_dataset() {}
1481
Base class for select_result descendands which intercept and
1482
transform result set rows. As the rows are not sent to the client,
1483
sending of result set metadata should be suppressed as well.
1486
class select_result_interceptor: public select_result
1489
select_result_interceptor() {} /* Remove gcc warning */
1490
uint32_t field_count(List<Item> &) const
1492
bool send_fields(List<Item> &,
1498
class select_send :public select_result {
1500
True if we have sent result set metadata to the client.
1501
In this case the client always expects us to end the result
1502
set with an eof or error packet
1504
bool is_result_set_started;
1506
select_send() :is_result_set_started(false) {}
1507
bool send_fields(List<Item> &list, uint32_t flags);
1508
bool send_data(List<Item> &items);
1511
virtual void cleanup();
1515
1445
class select_to_file :public select_result_interceptor {