Merge sanja.is.com.ua:/home/bell/mysql/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/work-update-4.1
This commit is contained in:
commit
8079acf080
@ -16,9 +16,8 @@
|
|||||||
|
|
||||||
# This file is public domain and comes with NO WARRANTY of any kind
|
# This file is public domain and comes with NO WARRANTY of any kind
|
||||||
|
|
||||||
INCLUDES = -I$(srcdir)/../include \
|
#AUTOMAKE_OPTIONS = nostdinc
|
||||||
-I../include -I$(srcdir)/.. -I$(top_srcdir) \
|
INCLUDES = -I$(top_srcdir)/include $(openssl_includes)
|
||||||
-I.. $(openssl_includes)
|
|
||||||
LIBS = @CLIENT_LIBS@
|
LIBS = @CLIENT_LIBS@
|
||||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la
|
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la
|
||||||
bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \
|
bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \
|
||||||
|
@ -1070,9 +1070,13 @@ static void initialize_readline (char *name)
|
|||||||
rl_readline_name = name;
|
rl_readline_name = name;
|
||||||
|
|
||||||
/* Tell the completer that we want a crack first. */
|
/* 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_attempted_completion_function = &new_mysql_completion;
|
||||||
rl_completion_entry_function= &no_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)))
|
int end __attribute__((unused)))
|
||||||
{
|
{
|
||||||
if (!status.batch && !quick)
|
if (!status.batch && !quick)
|
||||||
|
#if RL_READLINE_VERSION > 0x0400
|
||||||
return rl_completion_matches(text, new_command_generator);
|
return rl_completion_matches(text, new_command_generator);
|
||||||
|
#else
|
||||||
|
return completion_matches((char *)text, (CPFunction *)new_command_generator);
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
return (char**) 0;
|
return (char**) 0;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||||
# MA 02111-1307, USA
|
# 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
|
LDADD = libdbug.a ../strings/libmystrings.a
|
||||||
pkglib_LIBRARIES = libdbug.a
|
pkglib_LIBRARIES = libdbug.a
|
||||||
noinst_HEADERS = dbug_long.h
|
noinst_HEADERS = dbug_long.h
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# 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 \
|
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \
|
||||||
../dbug/libdbug.a ../strings/libmystrings.a
|
../dbug/libdbug.a ../strings/libmystrings.a
|
||||||
bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \
|
bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \
|
||||||
|
@ -27,11 +27,8 @@ DISTCLEANFILES = CorbaFS-common.* CorbaFS-stubs.* CorbaFS-skels.* CorbaFS.h
|
|||||||
MYSQLDATAdir = $(localstatedir)
|
MYSQLDATAdir = $(localstatedir)
|
||||||
MYSQLSHAREdir = $(pkgdatadir)
|
MYSQLSHAREdir = $(pkgdatadir)
|
||||||
MYSQLBASEdir= $(prefix)
|
MYSQLBASEdir= $(prefix)
|
||||||
INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include \
|
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include \
|
||||||
-I$(srcdir)/../regex \
|
-I$(top_srcdir)/regex $(orbit_includes)
|
||||||
-I$(srcdir) -I../include -I.. -I. \
|
|
||||||
-I$(srcdir) -I../include -I.. -I. \
|
|
||||||
$(orbit_includes)
|
|
||||||
WRAPLIBS= @WRAPLIBS@
|
WRAPLIBS= @WRAPLIBS@
|
||||||
libexec_PROGRAMS = mysqlcorbafsd
|
libexec_PROGRAMS = mysqlcorbafsd
|
||||||
noinst_PROGRAMS =mysqlfs_test
|
noinst_PROGRAMS =mysqlfs_test
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# 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 \
|
LDADD = libheap.a ../mysys/libmysys.a ../dbug/libdbug.a \
|
||||||
../strings/libmystrings.a
|
../strings/libmystrings.a
|
||||||
pkglib_LIBRARIES = libheap.a
|
pkglib_LIBRARIES = libheap.a
|
||||||
|
@ -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_rlast(MYRG_INFO *file,byte *buf,int inx);
|
||||||
extern int myrg_rnext(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_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,
|
extern int myrg_rkey(MYRG_INFO *file,byte *buf,int inx,const byte *key,
|
||||||
uint key_len, enum ha_rkey_function search_flag);
|
uint key_len, enum ha_rkey_function search_flag);
|
||||||
extern int myrg_rrnd(MYRG_INFO *file,byte *buf,ulonglong pos);
|
extern int myrg_rrnd(MYRG_INFO *file,byte *buf,ulonglong pos);
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# 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 \
|
LDADD = @CLIENT_EXTRA_LDFLAGS@ libnisam.a ../mysys/libmysys.a \
|
||||||
../dbug/libdbug.a ../strings/libmystrings.a
|
../dbug/libdbug.a ../strings/libmystrings.a
|
||||||
pkglib_LIBRARIES = libnisam.a
|
pkglib_LIBRARIES = libnisam.a
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
target = libmysqlclient.la
|
target = libmysqlclient.la
|
||||||
target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@ -DMYSQL_CLIENT
|
target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@ -DMYSQL_CLIENT
|
||||||
LIBS = @CLIENT_LIBS@
|
LIBS = @CLIENT_LIBS@
|
||||||
INCLUDES = -I$(srcdir)/../include -I../include \
|
INCLUDES = -I$(top_srcdir)/include $(openssl_includes)
|
||||||
-I$(srcdir)/.. -I$(top_srcdir) -I.. $(openssl_includes)
|
|
||||||
|
|
||||||
include $(srcdir)/Makefile.shared
|
include $(srcdir)/Makefile.shared
|
||||||
|
|
||||||
|
@ -21,8 +21,7 @@ target = libmysqlclient_r.la
|
|||||||
target_defs = -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@
|
target_defs = -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@
|
||||||
## LIBS = @LIBS@
|
## LIBS = @LIBS@
|
||||||
|
|
||||||
INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include \
|
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include $(openssl_includes)
|
||||||
-I$(srcdir)/.. -I$(top_srcdir) -I.. $(openssl_includes)
|
|
||||||
|
|
||||||
## automake barfs if you don't use $(srcdir) or $(top_srcdir) in include
|
## automake barfs if you don't use $(srcdir) or $(top_srcdir) in include
|
||||||
include $(top_srcdir)/libmysql/Makefile.shared
|
include $(top_srcdir)/libmysql/Makefile.shared
|
||||||
|
@ -25,9 +25,8 @@ DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \
|
|||||||
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
|
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
|
||||||
-DDATADIR="\"$(MYSQLDATAdir)\"" \
|
-DDATADIR="\"$(MYSQLDATAdir)\"" \
|
||||||
-DSHAREDIR="\"$(MYSQLSHAREdir)\""
|
-DSHAREDIR="\"$(MYSQLSHAREdir)\""
|
||||||
INCLUDES= @MT_INCLUDES@ @bdb_includes@ -I$(srcdir)/../include \
|
INCLUDES= @MT_INCLUDES@ @bdb_includes@ -I$(top_srcdir)/include \
|
||||||
-I../include -I$(srcdir)/.. -I$(top_srcdir) -I.. \
|
-I$(top_srcdir)/sql -I$(top_srcdir)/regex
|
||||||
-I../sql -I../regex
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libmysqld_int.a
|
noinst_LIBRARIES = libmysqld_int.a
|
||||||
pkglib_LIBRARIES = libmysqld.a
|
pkglib_LIBRARIES = libmysqld.a
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# 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
|
pkglib_LIBRARIES = libmerge.a
|
||||||
noinst_HEADERS = mrg_def.h
|
noinst_HEADERS = mrg_def.h
|
||||||
libmerge_a_SOURCES = mrg_open.c mrg_extra.c mrg_info.c mrg_locking.c \
|
libmerge_a_SOURCES = mrg_open.c mrg_extra.c mrg_info.c mrg_locking.c \
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
EXTRA_DIST = mi_test_all.sh mi_test_all.res
|
EXTRA_DIST = mi_test_all.sh mi_test_all.res
|
||||||
pkgdata_DATA = mi_test_all 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 \
|
LDADD = @CLIENT_EXTRA_LDFLAGS@ libmyisam.a ../mysys/libmysys.a \
|
||||||
../dbug/libdbug.a ../strings/libmystrings.a
|
../dbug/libdbug.a ../strings/libmystrings.a
|
||||||
pkglib_LIBRARIES = libmyisam.a
|
pkglib_LIBRARIES = libmyisam.a
|
||||||
|
@ -111,7 +111,7 @@ FT_WORD * ft_linearize(TREE *wtree)
|
|||||||
#else
|
#else
|
||||||
#define misc_word_char(X) ((X)=='\'' || (X)=='-')
|
#define misc_word_char(X) ((X)=='\'' || (X)=='-')
|
||||||
#endif
|
#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:
|
/* returns:
|
||||||
|
@ -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->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
|
||||||
info->last_key_func=search_flag;
|
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)
|
if (key_len == 0)
|
||||||
key_len=USE_WHOLE_KEY;
|
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,
|
DBUG_EXECUTE("key",_mi_print_key(DBUG_FILE,share->keyinfo[inx].seg,
|
||||||
key_buff,pack_key_length););
|
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))
|
if (fast_mi_readinfo(info))
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -46,6 +46,9 @@ int mi_rrnd(MI_INFO *info, byte *buf, register my_off_t filepos)
|
|||||||
filepos= info->nextpos;
|
filepos= info->nextpos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (info->once_flags & RRND_PRESERVE_LASTINX)
|
||||||
|
info->once_flags&= ~RRND_PRESERVE_LASTINX;
|
||||||
|
else
|
||||||
info->lastinx= -1; /* Can't forward or backward */
|
info->lastinx= -1; /* Can't forward or backward */
|
||||||
/* Init all but update-flag */
|
/* Init all but update-flag */
|
||||||
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
|
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
|
||||||
|
@ -267,7 +267,7 @@ struct st_myisam_info {
|
|||||||
my_bool quick_mode;
|
my_bool quick_mode;
|
||||||
my_bool page_changed; /* If info->buff can't be used for rnext */
|
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 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
|
#ifdef THREAD
|
||||||
THR_LOCK_DATA lock;
|
THR_LOCK_DATA lock;
|
||||||
#endif
|
#endif
|
||||||
@ -288,6 +288,10 @@ struct st_myisam_info {
|
|||||||
#define WRITEINFO_UPDATE_KEYFILE 1
|
#define WRITEINFO_UPDATE_KEYFILE 1
|
||||||
#define WRITEINFO_NO_UNLOCK 2
|
#define WRITEINFO_NO_UNLOCK 2
|
||||||
|
|
||||||
|
/* once_flags */
|
||||||
|
#define USE_PACKED_KEYS 1
|
||||||
|
#define RRND_PRESERVE_LASTINX 2
|
||||||
|
|
||||||
/* bits in state.changed */
|
/* bits in state.changed */
|
||||||
|
|
||||||
#define STATE_CHANGED 1
|
#define STATE_CHANGED 1
|
||||||
|
@ -14,14 +14,15 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# 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
|
pkglib_LIBRARIES = libmyisammrg.a
|
||||||
noinst_HEADERS = myrg_def.h
|
noinst_HEADERS = myrg_def.h
|
||||||
libmyisammrg_a_SOURCES = myrg_open.c myrg_extra.c myrg_info.c myrg_locking.c \
|
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_rrnd.c myrg_update.c myrg_delete.c myrg_rsame.c \
|
||||||
myrg_panic.c myrg_close.c myrg_create.c myrg_static.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_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
|
# Don't update the files from bitkeeper
|
||||||
%::SCCS/s.%
|
%::SCCS/s.%
|
||||||
|
@ -62,9 +62,8 @@ int myrg_rkey(MYRG_INFO *info,byte *record,int inx, const byte *key,
|
|||||||
}
|
}
|
||||||
else
|
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);
|
err=mi_rkey(mi,0,inx,key_buff,pack_key_length,search_flag);
|
||||||
mi->use_packed_key=0;
|
|
||||||
}
|
}
|
||||||
info->last_used_table=table+1;
|
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;
|
return HA_ERR_KEY_NOT_FOUND;
|
||||||
|
|
||||||
mi=(info->current_table=(MYRG_TABLE *)queue_top(&(info->by_key)))->table;
|
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);
|
return mi_rrnd(mi,record,mi->lastpos);
|
||||||
}
|
}
|
||||||
|
40
myisammrg/myrg_rnext_same.c
Normal file
40
myisammrg/myrg_rnext_same.c
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -65,3 +65,6 @@ a t
|
|||||||
19 19
|
19 19
|
||||||
20 20
|
20 20
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
|
SELECT * FROM (SELECT (SELECT * FROM (SELECT 1 as a)));
|
||||||
|
(SELECT * FROM (SELECT 1 as a))
|
||||||
|
1
|
||||||
|
@ -34,3 +34,4 @@ while ($1)
|
|||||||
enable_query_log;
|
enable_query_log;
|
||||||
SELECT * FROM (SELECT * FROM t1) ORDER BY a ASC LIMIT 0,20;
|
SELECT * FROM (SELECT * FROM t1) ORDER BY a ASC LIMIT 0,20;
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
|
SELECT * FROM (SELECT (SELECT * FROM (SELECT 1 as a)));
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
MYSQLDATAdir = $(localstatedir)
|
MYSQLDATAdir = $(localstatedir)
|
||||||
MYSQLSHAREdir = $(pkgdatadir)
|
MYSQLSHAREdir = $(pkgdatadir)
|
||||||
MYSQLBASEdir= $(prefix)
|
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
|
pkglib_LIBRARIES = libmysys.a
|
||||||
LDADD = libmysys.a ../dbug/libdbug.a \
|
LDADD = libmysys.a ../dbug/libdbug.a \
|
||||||
../strings/libmystrings.a
|
../strings/libmystrings.a
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
SUBDIRS = aout
|
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 \
|
noinst_HEADERS = bucomm.h debug.h ieee.h budbg.h demangle.h \
|
||||||
linuxthreads.h pstack.h pstacktrace.h
|
linuxthreads.h pstack.h pstacktrace.h
|
||||||
SRC= bucomm.c filemode.c linuxthreads.c rddbg.c \
|
SRC= bucomm.c filemode.c linuxthreads.c rddbg.c \
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# Makefile for the GNU readline library.
|
# Makefile for the GNU readline library.
|
||||||
# Copyright (C) 1994,1996,1997 Free Software Foundation, Inc.
|
# 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
|
noinst_LIBRARIES = libreadline.a
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||||
# MA 02111-1307, USA
|
# MA 02111-1307, USA
|
||||||
|
|
||||||
INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include
|
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include
|
||||||
noinst_LIBRARIES = libregex.a
|
noinst_LIBRARIES = libregex.a
|
||||||
LDADD = libregex.a ../strings/libmystrings.a
|
LDADD = libregex.a ../strings/libmystrings.a
|
||||||
noinst_HEADERS = cclass.h cname.h regex2.h utils.h engine.c regex.h
|
noinst_HEADERS = cclass.h cname.h regex2.h utils.h engine.c regex.h
|
||||||
|
@ -22,9 +22,8 @@ MYSQLSHAREdir = $(pkgdatadir)
|
|||||||
MYSQLBASEdir= $(prefix)
|
MYSQLBASEdir= $(prefix)
|
||||||
INCLUDES = @MT_INCLUDES@ \
|
INCLUDES = @MT_INCLUDES@ \
|
||||||
@bdb_includes@ @innodb_includes@ \
|
@bdb_includes@ @innodb_includes@ \
|
||||||
-I$(srcdir)/../include \
|
-I$(top_srcdir)/include -I$(top_srcdir)/regex \
|
||||||
-I$(srcdir)/../regex \
|
-I$(srcdir) $(openssl_includes)
|
||||||
-I$(srcdir) -I../include -I. $(openssl_includes)
|
|
||||||
WRAPLIBS= @WRAPLIBS@
|
WRAPLIBS= @WRAPLIBS@
|
||||||
SUBDIRS = share
|
SUBDIRS = share
|
||||||
libexec_PROGRAMS = mysqld
|
libexec_PROGRAMS = mysqld
|
||||||
|
@ -160,6 +160,16 @@ int ha_myisammrg::index_last(byte * buf)
|
|||||||
return error;
|
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)
|
int ha_myisammrg::rnd_init(bool scan)
|
||||||
{
|
{
|
||||||
return myrg_extra(file,HA_EXTRA_RESET,0);
|
return myrg_extra(file,HA_EXTRA_RESET,0);
|
||||||
|
@ -65,11 +65,12 @@ class ha_myisammrg: public handler
|
|||||||
int index_prev(byte * buf);
|
int index_prev(byte * buf);
|
||||||
int index_first(byte * buf);
|
int index_first(byte * buf);
|
||||||
int index_last(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_init(bool scan=1);
|
||||||
int rnd_next(byte *buf);
|
int rnd_next(byte *buf);
|
||||||
int rnd_pos(byte * buf, byte *pos);
|
int rnd_pos(byte * buf, byte *pos);
|
||||||
void position(const byte *record);
|
void position(const byte *record);
|
||||||
ha_rows ha_myisammrg::records_in_range(int inx,
|
ha_rows records_in_range(int inx,
|
||||||
const byte *start_key,uint start_key_len,
|
const byte *start_key,uint start_key_len,
|
||||||
enum ha_rkey_function start_search_flag,
|
enum ha_rkey_function start_search_flag,
|
||||||
const byte *end_key,uint end_key_len,
|
const byte *end_key,uint end_key_len,
|
||||||
|
@ -50,7 +50,10 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
|
|||||||
if (res)
|
if (res)
|
||||||
DBUG_RETURN(-1);
|
DBUG_RETURN(-1);
|
||||||
|
|
||||||
for (TABLE_LIST *cursor= (TABLE_LIST *)tables;
|
for (SELECT_LEX *ssl= sl; ssl; ssl= ssl->next_select_in_list())
|
||||||
|
{
|
||||||
|
TABLE_LIST *t_tables= (TABLE_LIST *)ssl->table_list.first;
|
||||||
|
for (TABLE_LIST *cursor= (TABLE_LIST *)t_tables;
|
||||||
cursor;
|
cursor;
|
||||||
cursor=cursor->next)
|
cursor=cursor->next)
|
||||||
{
|
{
|
||||||
@ -61,6 +64,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
|
|||||||
if (res) DBUG_RETURN(res);
|
if (res) DBUG_RETURN(res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Item *item;
|
Item *item;
|
||||||
List_iterator<Item> it(sl->item_list);
|
List_iterator<Item> it(sl->item_list);
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
# This file is public domain and comes with NO WARRANTY of any kind
|
# 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
|
pkglib_LIBRARIES = libmystrings.a
|
||||||
|
|
||||||
# Exact one of ASSEMBLER_X
|
# Exact one of ASSEMBLER_X
|
||||||
|
@ -29,9 +29,7 @@ EXTRA_DIST = auto_increment.res auto_increment.tst \
|
|||||||
#
|
#
|
||||||
# C Test for 4.1 protocol
|
# C Test for 4.1 protocol
|
||||||
#
|
#
|
||||||
INCLUDES = -I$(srcdir)/../include $(openssl_includes) \
|
INCLUDES = -I$(top_srcdir)/include $(openssl_includes)
|
||||||
-I../include -I$(srcdir)/.. -I$(top_srcdir) \
|
|
||||||
-I..
|
|
||||||
LIBS = @CLIENT_LIBS@
|
LIBS = @CLIENT_LIBS@
|
||||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la
|
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la
|
||||||
noinst_PROGRAMS = client_test
|
noinst_PROGRAMS = client_test
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include \
|
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include $(openssl_includes)
|
||||||
$(openssl_includes) -I../include
|
|
||||||
LDADD= @CLIENT_EXTRA_LDFLAGS@ ../libmysql_r/libmysqlclient_r.la @openssl_libs@
|
LDADD= @CLIENT_EXTRA_LDFLAGS@ ../libmysql_r/libmysqlclient_r.la @openssl_libs@
|
||||||
bin_PROGRAMS= mysqlmanager
|
bin_PROGRAMS= mysqlmanager
|
||||||
mysqlmanager_SOURCES= mysqlmanager.c
|
mysqlmanager_SOURCES= mysqlmanager.c
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# 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)
|
LDADD = @CLIENT_EXTRA_LDFLAGS@ libvio.a $(openssl_libs)
|
||||||
pkglib_LIBRARIES = libvio.a
|
pkglib_LIBRARIES = libvio.a
|
||||||
noinst_PROGRAMS = test-ssl test-sslserver test-sslclient
|
noinst_PROGRAMS = test-ssl test-sslserver test-sslclient
|
||||||
|
Loading…
x
Reference in New Issue
Block a user