Hi one time more,
> As I remember I forget to attach my current patch for sub-selects (for now
> it's mostly for sql_yacc.yy).
Mailing list strips attachments... :(((
> > Paul> 1) How to store sub-selects in expression? My view is to create
> > Paul> Item_subselect class and store select's parameters there, then
> convert it to
> > Paul> single value/set of values/temptable when running query and this
> > Paul> optimization is possible (i.e. when sub-query doesn't have
> > Paul> to parent's tables/query)
> > Yes, this should be ok.
One more thing is to convert regular select to return Item_select which with
1) directly to network;
2) into temporary table (located in memory for tiny tables and disk-based
for huge tables).
So select will be more regular and will be re-usable for sub-selects (when
results always sends to temporary table). Or, for example, Item_select sends
results directly to network if its root query (i.e. doesn't have parent
query) or into temporary table and returns "handle" to this table.