diff options
34 files changed, 132 insertions, 66 deletions
diff --git a/client/Makefile.am b/client/Makefile.am index 9c994814714..92c46519275 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -16,9 +16,8 @@ # This file is public domain and comes with NO WARRANTY of any kind -INCLUDES = -I$(srcdir)/../include \ - -I../include -I$(srcdir)/.. -I$(top_srcdir) \ - -I.. $(openssl_includes) +#AUTOMAKE_OPTIONS = nostdinc +INCLUDES = -I$(top_srcdir)/include $(openssl_includes) LIBS = @CLIENT_LIBS@ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \ diff --git a/client/mysql.cc b/client/mysql.cc index 391779ef801..13943691fb4 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1070,9 +1070,13 @@ static void initialize_readline (char *name) rl_readline_name = name; /* Tell the completer that we want a crack first. */ - /* rl_attempted_completion_function = (CPPFunction *)mysql_completion;*/ +#if RL_READLINE_VERSION > 0x0400 rl_attempted_completion_function = &new_mysql_completion; rl_completion_entry_function= &no_completion; +#else + rl_attempted_completion_function =(CPPFunction *)new_mysql_completion; + rl_completion_entry_function= (Function *)no_completion; +#endif } /* @@ -1087,7 +1091,11 @@ static char **new_mysql_completion (const char *text, int end __attribute__((unused))) { if (!status.batch && !quick) +#if RL_READLINE_VERSION > 0x0400 return rl_completion_matches(text, new_command_generator); +#else + return completion_matches((char *)text, (CPFunction *)new_command_generator); +#endif else return (char**) 0; } diff --git a/dbug/Makefile.am b/dbug/Makefile.am index 08f0164c02c..bd512ee1d1d 100644 --- a/dbug/Makefile.am +++ b/dbug/Makefile.am @@ -15,7 +15,7 @@ # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include LDADD = libdbug.a ../strings/libmystrings.a pkglib_LIBRARIES = libdbug.a noinst_HEADERS = dbug_long.h diff --git a/extra/Makefile.am b/extra/Makefile.am index 2d7dc95f616..6895d7a09f8 100644 --- a/extra/Makefile.am +++ b/extra/Makefile.am @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include -I.. +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \ ../dbug/libdbug.a ../strings/libmystrings.a bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \ diff --git a/fs/Makefile.am b/fs/Makefile.am index 33d1acd913d..6fea3d455a3 100644 --- a/fs/Makefile.am +++ b/fs/Makefile.am @@ -27,11 +27,8 @@ DISTCLEANFILES = CorbaFS-common.* CorbaFS-stubs.* CorbaFS-skels.* CorbaFS.h MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include \ - -I$(srcdir)/../regex \ - -I$(srcdir) -I../include -I.. -I. \ - -I$(srcdir) -I../include -I.. -I. \ - $(orbit_includes) +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include \ + -I$(top_srcdir)/regex $(orbit_includes) WRAPLIBS= @WRAPLIBS@ libexec_PROGRAMS = mysqlcorbafsd noinst_PROGRAMS =mysqlfs_test diff --git a/heap/Makefile.am b/heap/Makefile.am index 41d98b79ae9..ec631148dce 100644 --- a/heap/Makefile.am +++ b/heap/Makefile.am @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include LDADD = libheap.a ../mysys/libmysys.a ../dbug/libdbug.a \ ../strings/libmystrings.a pkglib_LIBRARIES = libheap.a diff --git a/include/myisammrg.h b/include/myisammrg.h index c3b3b39424b..16d3528717b 100644 --- a/include/myisammrg.h +++ b/include/myisammrg.h @@ -84,6 +84,7 @@ extern int myrg_rfirst(MYRG_INFO *file,byte *buf,int inx); extern int myrg_rlast(MYRG_INFO *file,byte *buf,int inx); extern int myrg_rnext(MYRG_INFO *file,byte *buf,int inx); extern int myrg_rprev(MYRG_INFO *file,byte *buf,int inx); +extern int myrg_rnext_same(MYRG_INFO *file,byte *buf); extern int myrg_rkey(MYRG_INFO *file,byte *buf,int inx,const byte *key, uint key_len, enum ha_rkey_function search_flag); extern int myrg_rrnd(MYRG_INFO *file,byte *buf,ulonglong pos); diff --git a/isam/Makefile.am b/isam/Makefile.am index 8f23138f29f..6d9e4176d43 100644 --- a/isam/Makefile.am +++ b/isam/Makefile.am @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include LDADD = @CLIENT_EXTRA_LDFLAGS@ libnisam.a ../mysys/libmysys.a \ ../dbug/libdbug.a ../strings/libmystrings.a pkglib_LIBRARIES = libnisam.a diff --git a/libmysql/Makefile.am b/libmysql/Makefile.am index 3d380c14076..1d5a5b19180 100644 --- a/libmysql/Makefile.am +++ b/libmysql/Makefile.am @@ -20,8 +20,7 @@ target = libmysqlclient.la target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@ -DMYSQL_CLIENT LIBS = @CLIENT_LIBS@ -INCLUDES = -I$(srcdir)/../include -I../include \ - -I$(srcdir)/.. -I$(top_srcdir) -I.. $(openssl_includes) +INCLUDES = -I$(top_srcdir)/include $(openssl_includes) include $(srcdir)/Makefile.shared diff --git a/libmysql_r/Makefile.am b/libmysql_r/Makefile.am index e01fc7634a1..265e31fafdb 100644 --- a/libmysql_r/Makefile.am +++ b/libmysql_r/Makefile.am @@ -21,8 +21,7 @@ target = libmysqlclient_r.la target_defs = -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@ ## LIBS = @LIBS@ -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include \ - -I$(srcdir)/.. -I$(top_srcdir) -I.. $(openssl_includes) +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include $(openssl_includes) ## automake barfs if you don't use $(srcdir) or $(top_srcdir) in include include $(top_srcdir)/libmysql/Makefile.shared diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index 022a589e304..18469422e39 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -25,9 +25,8 @@ DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \ -DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \ -DDATADIR="\"$(MYSQLDATAdir)\"" \ -DSHAREDIR="\"$(MYSQLSHAREdir)\"" -INCLUDES= @MT_INCLUDES@ @bdb_includes@ -I$(srcdir)/../include \ - -I../include -I$(srcdir)/.. -I$(top_srcdir) -I.. \ - -I../sql -I../regex +INCLUDES= @MT_INCLUDES@ @bdb_includes@ -I$(top_srcdir)/include \ + -I$(top_srcdir)/sql -I$(top_srcdir)/regex noinst_LIBRARIES = libmysqld_int.a pkglib_LIBRARIES = libmysqld.a diff --git a/merge/Makefile.am b/merge/Makefile.am index 78441e84fac..25e15e9c6ec 100644 --- a/merge/Makefile.am +++ b/merge/Makefile.am @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include pkglib_LIBRARIES = libmerge.a noinst_HEADERS = mrg_def.h libmerge_a_SOURCES = mrg_open.c mrg_extra.c mrg_info.c mrg_locking.c \ diff --git a/myisam/Makefile.am b/myisam/Makefile.am index 1dbce5727f0..f8225868d96 100644 --- a/myisam/Makefile.am +++ b/myisam/Makefile.am @@ -17,7 +17,7 @@ EXTRA_DIST = mi_test_all.sh mi_test_all.res pkgdata_DATA = mi_test_all mi_test_all.res -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include LDADD = @CLIENT_EXTRA_LDFLAGS@ libmyisam.a ../mysys/libmysys.a \ ../dbug/libdbug.a ../strings/libmystrings.a pkglib_LIBRARIES = libmyisam.a diff --git a/myisam/ft_parser.c b/myisam/ft_parser.c index 29a48352cd6..358706a8ffa 100644 --- a/myisam/ft_parser.c +++ b/myisam/ft_parser.c @@ -111,7 +111,7 @@ FT_WORD * ft_linearize(TREE *wtree) #else #define misc_word_char(X) ((X)=='\'' || (X)=='-') #endif -#define word_char(s,X) (true_word_char(s,X) || misc_word_char(s,X)) +#define word_char(s,X) (true_word_char(s,X) || misc_word_char(X)) /* returns: @@ -132,8 +132,8 @@ byte ft_get_word(byte **start, byte *end, FT_WORD *word, FTB_PARAM *param) { for (;doc<end;doc++) { - /* - BAR TODO: discuss with Serge how to remove + /* + BAR TODO: discuss with Serge how to remove default_charset_info correctly */ if (true_word_char(default_charset_info,*doc)) break; diff --git a/myisam/mi_rkey.c b/myisam/mi_rkey.c index cefb7a74dd1..4a3c76809e8 100644 --- a/myisam/mi_rkey.c +++ b/myisam/mi_rkey.c @@ -38,7 +38,15 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len, info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); info->last_key_func=search_flag; - if (!info->use_packed_key) + if (info->once_flags & USE_PACKED_KEYS) + { + /* key is already packed! */ + key_buff=info->lastkey+info->s->base.max_key_length; + info->last_rkey_length=pack_key_length=key_len; + bmove(key_buff,key,key_len); + info->once_flags&= ~USE_PACKED_KEYS; + } + else { if (key_len == 0) key_len=USE_WHOLE_KEY; @@ -48,13 +56,6 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len, DBUG_EXECUTE("key",_mi_print_key(DBUG_FILE,share->keyinfo[inx].seg, key_buff,pack_key_length);); } - else - { - /* key is already packed! */ - key_buff=info->lastkey+info->s->base.max_key_length; - info->last_rkey_length=pack_key_length=key_len; - bmove(key_buff,key,key_len); - } if (fast_mi_readinfo(info)) goto err; diff --git a/myisam/mi_rrnd.c b/myisam/mi_rrnd.c index f8009441cff..29f686b0456 100644 --- a/myisam/mi_rrnd.c +++ b/myisam/mi_rrnd.c @@ -46,7 +46,10 @@ int mi_rrnd(MI_INFO *info, byte *buf, register my_off_t filepos) filepos= info->nextpos; } - info->lastinx= -1; /* Can't forward or backward */ + if (info->once_flags & RRND_PRESERVE_LASTINX) + info->once_flags&= ~RRND_PRESERVE_LASTINX; + else + info->lastinx= -1; /* Can't forward or backward */ /* Init all but update-flag */ info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); diff --git a/myisam/myisamdef.h b/myisam/myisamdef.h index 6499021861e..c63f4a28562 100644 --- a/myisam/myisamdef.h +++ b/myisam/myisamdef.h @@ -267,7 +267,7 @@ struct st_myisam_info { my_bool quick_mode; my_bool page_changed; /* If info->buff can't be used for rnext */ my_bool buff_used; /* If info->buff has to be reread for rnext */ - my_bool use_packed_key; /* For MYISAMMRG */ + my_bool once_flags; /* For MYISAMMRG */ #ifdef THREAD THR_LOCK_DATA lock; #endif @@ -288,6 +288,10 @@ struct st_myisam_info { #define WRITEINFO_UPDATE_KEYFILE 1 #define WRITEINFO_NO_UNLOCK 2 + /* once_flags */ +#define USE_PACKED_KEYS 1 +#define RRND_PRESERVE_LASTINX 2 + /* bits in state.changed */ #define STATE_CHANGED 1 diff --git a/myisammrg/Makefile.am b/myisammrg/Makefile.am index 6a6824affba..b5b1260385b 100644 --- a/myisammrg/Makefile.am +++ b/myisammrg/Makefile.am @@ -14,14 +14,15 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include pkglib_LIBRARIES = libmyisammrg.a noinst_HEADERS = myrg_def.h libmyisammrg_a_SOURCES = myrg_open.c myrg_extra.c myrg_info.c myrg_locking.c \ myrg_rrnd.c myrg_update.c myrg_delete.c myrg_rsame.c \ myrg_panic.c myrg_close.c myrg_create.c myrg_static.c \ myrg_rkey.c myrg_rfirst.c myrg_rlast.c myrg_rnext.c \ - myrg_rprev.c myrg_queue.c myrg_write.c myrg_range.c + myrg_rprev.c myrg_queue.c myrg_write.c myrg_range.c \ + myrg_rnext_same.c # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/myisammrg/myrg_rkey.c b/myisammrg/myrg_rkey.c index ba042352a51..c0cef5a4eca 100644 --- a/myisammrg/myrg_rkey.c +++ b/myisammrg/myrg_rkey.c @@ -62,9 +62,8 @@ int myrg_rkey(MYRG_INFO *info,byte *record,int inx, const byte *key, } else { - mi->use_packed_key=1; + mi->once_flags|= USE_PACKED_KEYS; err=mi_rkey(mi,0,inx,key_buff,pack_key_length,search_flag); - mi->use_packed_key=0; } info->last_used_table=table+1; @@ -83,5 +82,6 @@ int myrg_rkey(MYRG_INFO *info,byte *record,int inx, const byte *key, return HA_ERR_KEY_NOT_FOUND; mi=(info->current_table=(MYRG_TABLE *)queue_top(&(info->by_key)))->table; + mi->once_flags|= RRND_PRESERVE_LASTINX; return mi_rrnd(mi,record,mi->lastpos); } diff --git a/myisammrg/myrg_rnext_same.c b/myisammrg/myrg_rnext_same.c new file mode 100644 index 00000000000..b569459b77d --- /dev/null +++ b/myisammrg/myrg_rnext_same.c @@ -0,0 +1,40 @@ +/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include "myrg_def.h" + +int myrg_rnext_same(MYRG_INFO *info, byte *buf) +{ + uint err; + MI_INFO *mi; + + if (!info->current_table) + return (HA_ERR_KEY_NOT_FOUND); + + err=mi_rnext_same(info->current_table->table,buf); + if (err == HA_ERR_END_OF_FILE) + { + queue_remove(&(info->by_key),0); + if (!info->by_key.elements) + return HA_ERR_END_OF_FILE; + + mi=(info->current_table=(MYRG_TABLE *)queue_top(&(info->by_key)))->table; + mi->once_flags|= RRND_PRESERVE_LASTINX; + return mi_rrnd(mi,buf,mi->lastpos); + } + return err; +} + diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 204ca86f306..b397c2f7635 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -65,3 +65,6 @@ a t 19 19 20 20 drop table if exists t1; +SELECT * FROM (SELECT (SELECT * FROM (SELECT 1 as a))); +(SELECT * FROM (SELECT 1 as a)) +1 diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index de765a0e280..c1d8af4074a 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -33,4 +33,5 @@ while ($1) } enable_query_log; SELECT * FROM (SELECT * FROM t1) ORDER BY a ASC LIMIT 0,20; -drop table if exists t1;
\ No newline at end of file +drop table if exists t1; +SELECT * FROM (SELECT (SELECT * FROM (SELECT 1 as a))); diff --git a/mysys/Makefile.am b/mysys/Makefile.am index 2661363de11..330e1d6e59d 100644 --- a/mysys/Makefile.am +++ b/mysys/Makefile.am @@ -17,7 +17,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include -I.. -I$(srcdir) +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include -I$(srcdir) pkglib_LIBRARIES = libmysys.a LDADD = libmysys.a ../dbug/libdbug.a \ ../strings/libmystrings.a diff --git a/pstack/Makefile.am b/pstack/Makefile.am index 863a52f4488..77f84d212cd 100644 --- a/pstack/Makefile.am +++ b/pstack/Makefile.am @@ -20,7 +20,7 @@ # SUBDIRS = aout -INCLUDES = -I$(srcdir)/../include -I../include +INCLUDES = -I$(top_srcdir)/include noinst_HEADERS = bucomm.h debug.h ieee.h budbg.h demangle.h \ linuxthreads.h pstack.h pstacktrace.h SRC= bucomm.c filemode.c linuxthreads.c rddbg.c \ diff --git a/readline/Makefile.am b/readline/Makefile.am index e9c6b3b8d58..2fdb2e04bcd 100644 --- a/readline/Makefile.am +++ b/readline/Makefile.am @@ -2,7 +2,7 @@ # Makefile for the GNU readline library. # Copyright (C) 1994,1996,1997 Free Software Foundation, Inc. -INCLUDES = -I$(srcdir)/../include -I$(srcdir)/.. -I.. +INCLUDES = -I$(top_srcdir)/include noinst_LIBRARIES = libreadline.a diff --git a/regex/Makefile.am b/regex/Makefile.am index ee421b70bcf..2e23efcbf2a 100644 --- a/regex/Makefile.am +++ b/regex/Makefile.am @@ -15,7 +15,7 @@ # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include noinst_LIBRARIES = libregex.a LDADD = libregex.a ../strings/libmystrings.a noinst_HEADERS = cclass.h cname.h regex2.h utils.h engine.c regex.h diff --git a/sql/Makefile.am b/sql/Makefile.am index 09fedd393c2..828e74c67fc 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -22,9 +22,8 @@ MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) INCLUDES = @MT_INCLUDES@ \ @bdb_includes@ @innodb_includes@ \ - -I$(srcdir)/../include \ - -I$(srcdir)/../regex \ - -I$(srcdir) -I../include -I. $(openssl_includes) + -I$(top_srcdir)/include -I$(top_srcdir)/regex \ + -I$(srcdir) $(openssl_includes) WRAPLIBS= @WRAPLIBS@ SUBDIRS = share libexec_PROGRAMS = mysqld diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index 07683dca73e..4398aaecf4d 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -160,6 +160,16 @@ int ha_myisammrg::index_last(byte * buf) return error; } +int ha_myisammrg::index_next_same(byte * buf, + const byte *key __attribute__((unused)), + uint length __attribute__((unused))) +{ + statistic_increment(ha_read_next_count,&LOCK_status); + int error=myrg_rnext_same(file,buf); + table->status=error ? STATUS_NOT_FOUND: 0; + return error; +} + int ha_myisammrg::rnd_init(bool scan) { return myrg_extra(file,HA_EXTRA_RESET,0); diff --git a/sql/ha_myisammrg.h b/sql/ha_myisammrg.h index 8e33b99e418..008f5339caf 100644 --- a/sql/ha_myisammrg.h +++ b/sql/ha_myisammrg.h @@ -65,15 +65,16 @@ class ha_myisammrg: public handler int index_prev(byte * buf); int index_first(byte * buf); int index_last(byte * buf); + int index_next_same(byte *buf, const byte *key, uint keylen); int rnd_init(bool scan=1); int rnd_next(byte *buf); int rnd_pos(byte * buf, byte *pos); void position(const byte *record); - ha_rows ha_myisammrg::records_in_range(int inx, - const byte *start_key,uint start_key_len, - enum ha_rkey_function start_search_flag, - const byte *end_key,uint end_key_len, - enum ha_rkey_function end_search_flag); + ha_rows records_in_range(int inx, + const byte *start_key,uint start_key_len, + enum ha_rkey_function start_search_flag, + const byte *end_key,uint end_key_len, + enum ha_rkey_function end_search_flag); my_off_t row_position() { return myrg_position(file); } void info(uint); int extra(enum ha_extra_function operation); diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index b3d2b1602d0..6dc001a1932 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -50,15 +50,19 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t) if (res) DBUG_RETURN(-1); - for (TABLE_LIST *cursor= (TABLE_LIST *)tables; - cursor; - cursor=cursor->next) + for (SELECT_LEX *ssl= sl; ssl; ssl= ssl->next_select_in_list()) { - if (cursor->derived) + TABLE_LIST *t_tables= (TABLE_LIST *)ssl->table_list.first; + for (TABLE_LIST *cursor= (TABLE_LIST *)t_tables; + cursor; + cursor=cursor->next) { - res= mysql_derived(thd, lex, (SELECT_LEX_UNIT *)cursor->derived, - cursor); - if (res) DBUG_RETURN(res); + if (cursor->derived) + { + res= mysql_derived(thd, lex, (SELECT_LEX_UNIT *)cursor->derived, + cursor); + if (res) DBUG_RETURN(res); + } } } Item *item; diff --git a/strings/Makefile.am b/strings/Makefile.am index e53ff21cdf8..ac0b6d7f1e0 100644 --- a/strings/Makefile.am +++ b/strings/Makefile.am @@ -16,7 +16,7 @@ # This file is public domain and comes with NO WARRANTY of any kind -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include pkglib_LIBRARIES = libmystrings.a # Exact one of ASSEMBLER_X diff --git a/tests/Makefile.am b/tests/Makefile.am index 4935b6cd95a..5dc6871bd43 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -29,9 +29,7 @@ EXTRA_DIST = auto_increment.res auto_increment.tst \ # # C Test for 4.1 protocol # -INCLUDES = -I$(srcdir)/../include $(openssl_includes) \ - -I../include -I$(srcdir)/.. -I$(top_srcdir) \ - -I.. +INCLUDES = -I$(top_srcdir)/include $(openssl_includes) LIBS = @CLIENT_LIBS@ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la noinst_PROGRAMS = client_test diff --git a/tools/Makefile.am b/tools/Makefile.am index 3c786dc9281..0dc0b90c60e 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,5 +1,4 @@ -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include \ - $(openssl_includes) -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include $(openssl_includes) LDADD= @CLIENT_EXTRA_LDFLAGS@ ../libmysql_r/libmysqlclient_r.la @openssl_libs@ bin_PROGRAMS= mysqlmanager mysqlmanager_SOURCES= mysqlmanager.c diff --git a/vio/Makefile.am b/vio/Makefile.am index b53f3be9f91..16c70b12454 100644 --- a/vio/Makefile.am +++ b/vio/Makefile.am @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -INCLUDES = -I$(srcdir)/../include -I../include $(openssl_includes) +INCLUDES = -I$(top_srcdir)/include $(openssl_includes) LDADD = @CLIENT_EXTRA_LDFLAGS@ libvio.a $(openssl_libs) pkglib_LIBRARIES = libvio.a noinst_PROGRAMS = test-ssl test-sslserver test-sslclient |