From: Michael Widenius Date: June 20 2001 2:46pm Subject: Re: Testing MySQL 4.0 List-Archive: http://lists.mysql.com/internals/986 Message-Id: <15152.46938.560266.680603@narttu.mysql.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! >>>>> "Paul" == Paul Cadach writes: Paul> Hi, Paul> ----- Original Message ----- Paul> From: "Sasha Pachev" Paul> To: ; Paul> Sent: Wednesday, June 20, 2001 6:44 AM Paul> Subject: Testing MySQL 4.0 >> Hello, MySQL users/hackers: Paul> [skipped] >> Also, now is the best time to throw in suggestions, feature requests, etc. >> Once we've stablized the branch, it would be a lot harder to get us to Paul> change >> things. Paul> Todays I've cloned 4.0 tree and trying to hack sub-select. For now it's can Paul> be found in attached diff. To continue working under sub-selects I want to Paul> know an opinions of MySQL team: 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 cross-references 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 parts Paul> (as Monthy said in his message dated March, 7th): yes. Paul> a) query preparation (here IMHO we must check all fields, check that all Paul> result fields of UNIONed tables have same type and size); Why do you have to check for union ? Paul> b) optimize (found non-crossreferenced subqueries and execute them before 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. Paul> IMHO I've found and fixed a bug with upcoming UNIONs from Sinisa (check Paul> mysql_init_select(), mysql_new_select() at diff). Good! Can you email Sinisa a patch for this. Paul> Also, I've got a problem with linking mysqld under RedHat-7.0: Paul> ../pstack/libpstack.a(linuxthreads.o): In function Paul> `linuxthreads_notify_others':/usr/src/MySQL/mysql-4.0/pstack/linuxthreads.c: Paul> 50: Paul> undefined reference to `__pthread_handles_num' Paul> /usr/src/MySQL/mysql-4.0/pstack/linuxthreads.c:58: undefined reference to Paul> `__pthread_offsetof_pid' Paul> /usr/src/MySQL/mysql-4.0/pstack/linuxthreads.c:58: undefined reference to Paul> `__pthread_initial_thread' Paul> /usr/src/MySQL/mysql-4.0/pstack/linuxthreads.c:63: undefined reference to Paul> `__pthread_sizeof_handle' Paul> /usr/src/MySQL/mysql-4.0/pstack/linuxthreads.c:63: undefined reference to Paul> `__pthread_offsetof_descr' Paul> /usr/src/MySQL/mysql-4.0/pstack/linuxthreads.c:63: undefined reference to Paul> `__pthread_handles' Paul> /usr/src/MySQL/mysql-4.0/pstack/linuxthreads.c:65: undefined reference to Paul> `__pthread_offsetof_pid' Paul> /usr/src/MySQL/mysql-4.0/pstack/linuxthreads.c:62: undefined reference to Paul> `__pthread_handles_num' Paul> /usr/src/MySQL/mysql-4.0/pstack/linuxthreads.c:88: undefined reference to Paul> `__pthread_handles_num' Paul> What it could be? At least /lib/libpthread.0.9.so have those symbols... The easy fix is to configure with --without-pstack. Andrei has sent me a new copy of pstack, but I haven't had time to upgrade MySQL 4.0 with this yet. >> So, in short, have fun... Paul> Yep, I trying... ;-)' Regards, Monty