List:Internals« Previous MessageNext Message »
From:Paul Cadach Date:June 20 2001 4:01pm
Subject:Re: Testing MySQL 4.0
View as plain text  
Hi again,

As I remember I forget to attach my current patch for sub-selects (for now
it's mostly for sql_yacc.yy).

> 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.
> Paul> 2) To handle sub-queries mysql_query needs to be splitted into four
> Paul> (as Monthy said in his message dated March, 7th):
> yes.
> Paul> a) query preparation (here IMHO we must check all fields, check that
> Paul> result fields of UNIONed tables have same type and size);
> Why do you have to check for union ?

Just to tell Sinisa not forget about... ;-)'

> Paul> b) optimize (found non-crossreferenced subqueries and execute them
> Paul> main query?, other optimizations);
> Paul> c) initialize
> Paul> d) execute
> Paul> e) free resources
> Paul> where initialize/execute/free can be called many times. So, I needs
a help
> Paul> to make this work.
> ok.

Michael, can you explain which function sets already used in the stages
listed above (to find where to split mysql_query())? I'm not familiar with
MySQL sources... :(((

> Paul> IMHO I've found and fixed a bug with upcoming UNIONs from Sinisa
> Paul> mysql_init_select(), mysql_new_select() at diff).
> Good! Can you email Sinisa a patch for this.


> Paul> What it could be? At least /lib/ have those
> The easy fix is to configure with --without-pstack.

Or --with-mysqld-ldflags=-Wl,-noinhibit-exec

BTW, when I'm trying to run mysqld under GDB without setting any args it
says about "Read manual how to run mysqld under root" and halts, but I can't
re-run it under GDB until GDB restart. If I specified '--one-thread -u
mysql' all works fine (server starts and after SIGSEGVs it can be restarted
without restarting GDB).