Commit 515c747d authored by unknown's avatar unknown

merge


BitKeeper/etc/ignore:
  auto-union
acinclude.m4:
  Auto merged
Docs/manual.texi:
  Auto merged
include/my_sys.h:
  Auto merged
include/mysql.h:
  Auto merged
libmysqld/libmysqld.c:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/t/count_distinct2.test:
  Auto merged
mysql-test/t/flush.test:
  Auto merged
mysql-test/t/rpl000017.test:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysys/Makefile.am:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
libmysqld/Makefile.am:
  Added back md5.c
parents 41972bea cef1d752
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
*.la *.la
*.lo *.lo
*.o *.o
*.reject
*.spec *.spec
*/*_pure_*warnings */*_pure_*warnings
*/.pure */.pure
...@@ -152,6 +153,7 @@ client/mysqlbinlog ...@@ -152,6 +153,7 @@ client/mysqlbinlog
client/mysqlcheck client/mysqlcheck
client/mysqldump client/mysqldump
client/mysqlimport client/mysqlimport
client/mysqlmanager-pwgen
client/mysqlmanagerc client/mysqlmanagerc
client/mysqlshow client/mysqlshow
client/mysqltest client/mysqltest
...@@ -214,6 +216,7 @@ libmysqld/examples/mysqltest.c ...@@ -214,6 +216,7 @@ libmysqld/examples/mysqltest.c
libmysqld/examples/readline.cc libmysqld/examples/readline.cc
libmysqld/examples/sql_string.cc libmysqld/examples/sql_string.cc
libmysqld/examples/sql_string.h libmysqld/examples/sql_string.h
libmysqld/examples/test-gdbinit
libmysqld/field.cc libmysqld/field.cc
libmysqld/field_conv.cc libmysqld/field_conv.cc
libmysqld/filesort.cc libmysqld/filesort.cc
...@@ -337,6 +340,7 @@ scripts/make_binary_distribution ...@@ -337,6 +340,7 @@ scripts/make_binary_distribution
scripts/msql2mysql scripts/msql2mysql
scripts/mysql_config scripts/mysql_config
scripts/mysql_convert_table_format scripts/mysql_convert_table_format
scripts/mysql_explain_log
scripts/mysql_find_rows scripts/mysql_find_rows
scripts/mysql_fix_privilege_tables scripts/mysql_fix_privilege_tables
scripts/mysql_install_db scripts/mysql_install_db
...@@ -413,5 +417,3 @@ vio/test-ssl ...@@ -413,5 +417,3 @@ vio/test-ssl
vio/test-sslclient vio/test-sslclient
vio/test-sslserver vio/test-sslserver
vio/viotest-ssl vio/viotest-ssl
client/mysqlmanager-pwgen
*.reject
...@@ -34122,10 +34122,12 @@ detect duplicated @code{UNIQUE} keys. ...@@ -34122,10 +34122,12 @@ detect duplicated @code{UNIQUE} keys.
@item @item
By using @code{DATA DIRECTORY="directory"} or @code{INDEX By using @code{DATA DIRECTORY="directory"} or @code{INDEX
DIRECTORY="directory"} you can specify where the table handler should DIRECTORY="directory"} you can specify where the table handler should
put it's table and index files. This only works for @code{MyISAM} tables put it's table and index files. Note that the directory should be a full
in @code{MySQL} 4.0, when you are not using the @code{--skip-symlink} path to the directory (not relative path).
option. @xref{Symbolic links to tables}.
This only works for @code{MyISAM} tables in @code{MySQL} 4.0, when you
are not using the @code{--skip-symlink} option. @xref{Symbolic links to
tables}.
@end itemize @end itemize
...@@ -42012,7 +42014,7 @@ a stand-alone server without modifying any code. ...@@ -42012,7 +42014,7 @@ a stand-alone server without modifying any code.
@findex @code{mysql_server_init()} @findex @code{mysql_server_init()}
@code{int mysql_server_init(int argc, const char **argv, const char **groups)} @code{int mysql_server_init(int argc, char **argv, char **groups)}
@subsubheading Description @subsubheading Description
...@@ -42032,8 +42034,8 @@ command-line arguments for the server. ...@@ -42032,8 +42034,8 @@ command-line arguments for the server.
The @code{NULL}-terminated list of strings in @code{groups} The @code{NULL}-terminated list of strings in @code{groups}
selects which groups in the option files will be active. selects which groups in the option files will be active.
@xref{Option files}. For convenience, @code{groups} may be @xref{Option files}. For convenience, @code{groups} may be
@code{NULL}, in which case the @code{[server]} group will be @code{NULL}, in which case the @code{[server]} and @code{[emedded]} groups
active. will be active.
@subsubheading Example @subsubheading Example
...@@ -42047,6 +42049,7 @@ static char *server_args[] = @{ ...@@ -42047,6 +42049,7 @@ static char *server_args[] = @{
"--set-variable=key_buffer_size=32M" "--set-variable=key_buffer_size=32M"
@}; @};
static char *server_groups[] = @{ static char *server_groups[] = @{
"embedded",
"server", "server",
"this_program_SERVER", "this_program_SERVER",
(char *)NULL (char *)NULL
...@@ -42379,6 +42382,9 @@ included the thread libraries on the link/compile line. ...@@ -42379,6 +42382,9 @@ included the thread libraries on the link/compile line.
@menu @menu
* libmysqld overview:: Overview of the Embedded MySQL Server Library * libmysqld overview:: Overview of the Embedded MySQL Server Library
* libmysqld compiling:: Compiling Programs with @code{libmysqld} * libmysqld compiling:: Compiling Programs with @code{libmysqld}
* libmysqld restrictions::
* libmysqld options::
* libmysqld TODO::
* libmysqld example:: A Simple Embedded Server Example * libmysqld example:: A Simple Embedded Server Example
* libmysqld licensing:: Licensing the Embedded Server * libmysqld licensing:: Licensing the Embedded Server
@end menu @end menu
...@@ -42391,21 +42397,100 @@ full-featured MySQL server inside the client application. The ...@@ -42391,21 +42397,100 @@ full-featured MySQL server inside the client application. The
main benefits are increased speed and more simple management for main benefits are increased speed and more simple management for
embedded applications. embedded applications.
@node libmysqld compiling, libmysqld example, libmysqld overview, libmysqld The API is identical for the embedded MySQL version and MySQL
client/server version. To change an old threaded application to use the
embedded library, on normall only have to add calls to the following
functions:
@multitable @columnfractions .25 .7
@item @code{mysql_server_init()} @tab Should be called before any other other MySQL function is called, preferably early in the @code{main()} function.
@item @code{mysql_server_end()} @tab Should be called before doing an exit of your program.
@item @code{mysql_thread_init()} @tab Should be called in all threads you are created that will access MySQL.
@item @code{mysql_thread_end()} @tab Should be called before calling @code{pthread_exit()}
@end multitable
and link your code with @code{libmysqld.a} instead of @code{libmysqlclient.a}.
The above @code{mysql_server_xxx} functions are also included in
@code{libmysqld.a} to allow you to change between the embedded and the
client/server version by just linking your application with the right
library. @xref{mysql_server_init}.
@node libmysqld compiling, libmysqld restrictions, libmysqld overview, libmysqld
@subsubsection Compiling Programs with @code{libmysqld} @subsubsection Compiling Programs with @code{libmysqld}
Currently, all of the support libraries must be explicitly When you link your program with @code{libmysqld}, you must also include
listed when linking with @code{-lmysqld}. In the future, the system specific @code{pthread} libraries and some libraries that
@code{mysql_config --libmysqld-libs} will name the libraries to @code{mysqld} uses. You can get the full list of libraries by executing
make this easier. Also, all of the supporting libraries will @code{mysql_config --libmysqld-libs}.
probably be incorporated into libmysqld at some time to simplify
this even more.
The correct flags for compiling and linking a threaded program The correct flags for compiling and linking a threaded program
must be used, even if you do not directly call any thread must be used, even if you do not directly call any thread
functions in your code. functions in your code.
@node libmysqld example, libmysqld licensing, libmysqld compiling, libmysqld @node libmysqld restrictions, libmysqld options, libmysqld compiling, libmysqld
@subsubsection Restrictions when using the Embedded MySQL Server
The embedded server has the following limitations:
(Some of these limitations can be changed by editing the @code{mysql_embed.h}
include files and recompiling MySQL)
@itemize @bullet
@item
No support for ISAM tables. (This is mainly done to make the library smaller)
@item
No UDF functions.
@item
No stack trace on core dump.
@item
No internal RAID support.
@end itemize
@node libmysqld options, libmysqld TODO, libmysqld restrictions, libmysqld
@subsubsection Using option files with the embedded server
The following is the recommended way to use option files to make it easy
to switch between a client/server application and one where MySQL is
embedded. @xref{Option files}.
@itemize @bullet
@item
Put common options in the @code{[server]} section. These will be read by
both MySQL versions.
@item
Put client/server specific options in the @code{[mysqld]} section.
@item
Put embedded MySQL specific options in the @code{[embedded]} section.
@item
Put application specific options in a @code{[ApplicationName_SERVER]}
section.
@end itemize
@node libmysqld TODO, libmysqld example, libmysqld options, libmysqld
@subsubsection Things left to do in Embedded Server (TODO)
@cindex TODO, embedded server
@itemize @bullet
@item
Currently we only provide a static version of the @code{mysqld} library,
in the future we will also provide a shared library for this.
@item
We are going to provide options to leave out some parts of MySQL to make
the library smaller.
@item
There is still a lot of speed optimization to do.
@item
Errors are written to stderr. We will add an option to specify a
filename for these.
@item
We have to change InnoDB to not be so verbose when using in the embedded
version.
@end itemize
@node libmysqld example, libmysqld licensing, libmysqld TODO, libmysqld
@subsubsection A Simple Embedded Server Example @subsubsection A Simple Embedded Server Example
This example program and makefile should work without any This example program and makefile should work without any
...@@ -42449,7 +42534,7 @@ main(int argc, char **argv) ...@@ -42449,7 +42534,7 @@ main(int argc, char **argv)
/* This must be called before any other mysql functions. /* This must be called before any other mysql functions.
* *
* You can use mysql_server_init(0, NULL, NULL), and it will * You can use mysql_server_init(0, NULL, NULL), and it will
* initialize the server using groups = @{ "server", NULL @}. * initialize the server using groups = @{ "server", "embedded", NULL @}.
* *
* In your $HOME/.my.cnf file, you probably want to put: * In your $HOME/.my.cnf file, you probably want to put:
...@@ -42647,79 +42732,9 @@ else ...@@ -42647,79 +42732,9 @@ else
LDLIBS += -lpthread LDLIBS += -lpthread
endif endif
# Standard libraries. This example assumes MySQL is in /usr/local/mysql
# Standard libraries embed_libs := -L/usr/local/mysql/lib/mysql/ -lmysqld
embed_libs := \
$m/libmysqld/.libs/libmysqld.a \
$m/isam/libnisam.a \
$m/myisam/libmyisam.a \
$m/heap/libheap.a \
$m/merge/libmerge.a \
$m/myisammrg/libmyisammrg.a
# Optionally-built libraries
ifneq (,$(shell test -r $m/innobase/usr/libusr.a && echo "yes"))
embed_libs += \
$m/innobase/usr/libusr.a \
$m/innobase/odbc/libodbc.a \
$m/innobase/srv/libsrv.a \
$m/innobase/que/libque.a \
$m/innobase/srv/libsrv.a \
$m/innobase/dict/libdict.a \
$m/innobase/ibuf/libibuf.a \
$m/innobase/row/librow.a \
$m/innobase/pars/libpars.a \
$m/innobase/btr/libbtr.a \
$m/innobase/trx/libtrx.a \
$m/innobase/read/libread.a \
$m/innobase/usr/libusr.a \
$m/innobase/buf/libbuf.a \
$m/innobase/ibuf/libibuf.a \
$m/innobase/eval/libeval.a \
$m/innobase/log/liblog.a \
$m/innobase/fsp/libfsp.a \
$m/innobase/fut/libfut.a \
$m/innobase/fil/libfil.a \
$m/innobase/lock/liblock.a \
$m/innobase/mtr/libmtr.a \
$m/innobase/page/libpage.a \
$m/innobase/rem/librem.a \
$m/innobase/thr/libthr.a \
$m/innobase/com/libcom.a \
$m/innobase/sync/libsync.a \
$m/innobase/data/libdata.a \
$m/innobase/mach/libmach.a \
$m/innobase/ha/libha.a \
$m/innobase/dyn/libdyn.a \
$m/innobase/mem/libmem.a \
$m/innobase/sync/libsync.a \
$m/innobase/ut/libut.a \
$m/innobase/os/libos.a \
$m/innobase/ut/libut.a
endif
ifneq (,$(shell test -r $m/bdb/build_unix/libdb.a && echo "yes"))
embed_libs += $m/bdb/build_unix/libdb.a
endif
# Support libraries
embed_libs += \
$m/mysys/libmysys.a \
$m/strings/libmystrings.a \
$m/dbug/libdbug.a \
$m/regex/libregex.a
# Optionally built support libraries
ifneq (,$(shell test -r $m/readline/libreadline.a && echo "yes"))
embed_libs += $m/readline/libreadline.a
endif
# This works for simple one-file test programs # This works for simple one-file test programs
sources := $(wildcard *.c) sources := $(wildcard *.c)
...@@ -47449,6 +47464,8 @@ Changed @code{WEEK(#,0)} to match the calender in the USA. ...@@ -47449,6 +47464,8 @@ Changed @code{WEEK(#,0)} to match the calender in the USA.
@item @item
Speed up all internal list handling. Speed up all internal list handling.
@item @item
Speed up @code{IS NULL()} and some other internal primitives.
@item
Creating full text indexes are now much faster. Creating full text indexes are now much faster.
@item @item
Tree-like cache to speed up bulk inserts and Tree-like cache to speed up bulk inserts and
...@@ -47496,6 +47513,12 @@ Allow ANSI SQL syntax @code{X'hexadecimal-number'} ...@@ -47496,6 +47513,12 @@ Allow ANSI SQL syntax @code{X'hexadecimal-number'}
Cleaned up global lock handling for @code{FLUSH TABLES WITH READ LOCK} Cleaned up global lock handling for @code{FLUSH TABLES WITH READ LOCK}
@item @item
Fixed problem with @code{DATETIME = constant} in @code{WHERE} optimization. Fixed problem with @code{DATETIME = constant} in @code{WHERE} optimization.
@item
Added options @code{--master-data} and @code{--no-autocommit} to
@code{mysqldump} (Thanks to Brian Aker for this).
@item
Added script @code{mysql_explain_log.sh} to distribution.
(Thanks to mobile.de).
@end itemize @end itemize
...@@ -880,6 +880,7 @@ dnl echo "DBG2: [$mode] bdb='$bdb'; incl='$bdb_includes'; lib='$bdb_libs'" ...@@ -880,6 +880,7 @@ dnl echo "DBG2: [$mode] bdb='$bdb'; incl='$bdb_includes'; lib='$bdb_libs'"
no ) no )
bdb_includes= bdb_includes=
bdb_libs= bdb_libs=
bdb_libs_with_path=
;; ;;
supplied-two ) supplied-two )
MYSQL_CHECK_INSTALLED_BDB([$bdb_includes], [$bdb_libs]) MYSQL_CHECK_INSTALLED_BDB([$bdb_includes], [$bdb_libs])
...@@ -909,6 +910,7 @@ dnl echo "DBG2: [$mode] bdb='$bdb'; incl='$bdb_includes'; lib='$bdb_libs'" ...@@ -909,6 +910,7 @@ dnl echo "DBG2: [$mode] bdb='$bdb'; incl='$bdb_includes'; lib='$bdb_libs'"
esac esac
bdb_includes= bdb_includes=
bdb_libs= bdb_libs=
bdb_libs_with_path=
;; ;;
esac esac
;; ;;
...@@ -937,6 +939,7 @@ dnl echo "DBG3: [$mode] bdb='$bdb'; incl='$bdb_includes'; lib='$bdb_libs'" ...@@ -937,6 +939,7 @@ dnl echo "DBG3: [$mode] bdb='$bdb'; incl='$bdb_includes'; lib='$bdb_libs'"
AC_SUBST(bdb_includes) AC_SUBST(bdb_includes)
AC_SUBST(bdb_libs) AC_SUBST(bdb_libs)
AC_SUBST(bdb_libs_with_path)
]) ])
AC_DEFUN([MYSQL_CHECK_INSTALLED_BDB], [ AC_DEFUN([MYSQL_CHECK_INSTALLED_BDB], [
...@@ -957,6 +960,7 @@ dnl echo ["MYSQL_CHECK_INSTALLED_BDB ($1) ($2)"] ...@@ -957,6 +960,7 @@ dnl echo ["MYSQL_CHECK_INSTALLED_BDB ($1) ($2)"]
MYSQL_TOP_BUILDDIR([lib]) MYSQL_TOP_BUILDDIR([lib])
bdb_includes="-I$inc" bdb_includes="-I$inc"
bdb_libs="-L$lib -ldb" bdb_libs="-L$lib -ldb"
bdb_libs_with_path="$lib/libdb.a"
]) ])
LDFLAGS="$save_LDFLAGS" LDFLAGS="$save_LDFLAGS"
else else
...@@ -985,6 +989,7 @@ dnl echo ["MYSQL_CHECK_BDB_DIR ($1)"] ...@@ -985,6 +989,7 @@ dnl echo ["MYSQL_CHECK_BDB_DIR ($1)"]
MYSQL_TOP_BUILDDIR([dir]) MYSQL_TOP_BUILDDIR([dir])
bdb_includes="-I$dir/build_unix" bdb_includes="-I$dir/build_unix"
bdb_libs="-L$dir/build_unix -ldb" bdb_libs="-L$dir/build_unix -ldb"
bdb_libs_with_path="$dir/build_unix/libdb.a"
else else
bdb_dir_ok="$bdb_version_ok" bdb_dir_ok="$bdb_version_ok"
fi fi
...@@ -1096,6 +1101,7 @@ AC_DEFUN([MYSQL_CHECK_INNODB], [ ...@@ -1096,6 +1101,7 @@ AC_DEFUN([MYSQL_CHECK_INNODB], [
AC_DEFINE(HAVE_INNOBASE_DB) AC_DEFINE(HAVE_INNOBASE_DB)
have_innodb="yes" have_innodb="yes"
innodb_includes="-I../innobase/include" innodb_includes="-I../innobase/include"
innodb_system_libs=""
dnl Some libs are listed several times, in order for gcc to sort out dnl Some libs are listed several times, in order for gcc to sort out
dnl circular references. dnl circular references.
innodb_libs="\ innodb_libs="\
...@@ -1136,7 +1142,7 @@ dnl circular references. ...@@ -1136,7 +1142,7 @@ dnl circular references.
\$(top_builddir)/innobase/os/libos.a\ \$(top_builddir)/innobase/os/libos.a\
\$(top_builddir)/innobase/ut/libut.a" \$(top_builddir)/innobase/ut/libut.a"
AC_CHECK_LIB(rt, aio_read, [innodb_libs="$innodb_libs -lrt"]) AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"])
;; ;;
* ) * )
AC_MSG_RESULT([Not using Innodb]) AC_MSG_RESULT([Not using Innodb])
...@@ -1145,6 +1151,7 @@ dnl circular references. ...@@ -1145,6 +1151,7 @@ dnl circular references.
AC_SUBST(innodb_includes) AC_SUBST(innodb_includes)
AC_SUBST(innodb_libs) AC_SUBST(innodb_libs)
AC_SUBST(innodb_system_libs)
]) ])
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
......
...@@ -47,10 +47,12 @@ int completion_hash_init(HashTable *ht, uint nSize) ...@@ -47,10 +47,12 @@ int completion_hash_init(HashTable *ht, uint nSize)
ht->arBuckets = (Bucket **) my_malloc(nSize* sizeof(Bucket *), ht->arBuckets = (Bucket **) my_malloc(nSize* sizeof(Bucket *),
MYF(MY_ZEROFILL | MY_WME)); MYF(MY_ZEROFILL | MY_WME));
if (!ht->arBuckets) { if (!ht->arBuckets)
{
ht->initialized = 0; ht->initialized = 0;
return FAILURE; return FAILURE;
} }
init_alloc_root(&ht->mem_root, 8192, 0);
ht->pHashFunction = hashpjw; ht->pHashFunction = hashpjw;
ht->nTableSize = nSize; ht->nTableSize = nSize;
ht->initialized = 1; ht->initialized = 1;
...@@ -78,8 +80,7 @@ int completion_hash_update(HashTable *ht, char *arKey, uint nKeyLength, ...@@ -78,8 +80,7 @@ int completion_hash_update(HashTable *ht, char *arKey, uint nKeyLength,
if (!memcmp(p->arKey, arKey, nKeyLength)) { if (!memcmp(p->arKey, arKey, nKeyLength)) {
entry *n; entry *n;
n = (entry *) my_malloc(sizeof(entry), n = (entry *) alloc_root(&ht->mem_root,sizeof(entry));
MYF(MY_WME));
n->pNext = p->pData; n->pNext = p->pData;
n->str = str; n->str = str;
p->pData = n; p->pData = n;
...@@ -91,20 +92,16 @@ int completion_hash_update(HashTable *ht, char *arKey, uint nKeyLength, ...@@ -91,20 +92,16 @@ int completion_hash_update(HashTable *ht, char *arKey, uint nKeyLength,
p = p->pNext; p = p->pNext;
} }
p = (Bucket *) my_malloc(sizeof(Bucket),MYF(MY_WME)); if (!(p = (Bucket *) alloc_root(&ht->mem_root, sizeof(Bucket))))
if (!p) {
return FAILURE; return FAILURE;
}
p->arKey = arKey; p->arKey = arKey;
p->nKeyLength = nKeyLength; p->nKeyLength = nKeyLength;
p->h = h; p->h = h;
p->pData = (entry*) my_malloc(sizeof(entry),MYF(MY_WME)); if (!(p->pData = (entry*) alloc_root(&ht->mem_root, sizeof(entry))))
if (!p->pData) {
my_free((gptr) p,MYF(0));
return FAILURE; return FAILURE;
}
p->pData->str = str; p->pData->str = str;
p->pData->pNext = 0; p->pData->pNext = 0;
p->count = 1; p->count = 1;
...@@ -209,24 +206,7 @@ Bucket *find_longest_match(HashTable *ht, char *str, uint length, ...@@ -209,24 +206,7 @@ Bucket *find_longest_match(HashTable *ht, char *str, uint length,
void completion_hash_clean(HashTable *ht) void completion_hash_clean(HashTable *ht)
{ {
uint i; free_root(&ht->mem_root,MYF(0));
entry *e, *t;
Bucket *b, *tmp;
for (i=0; i<ht->nTableSize; i++) {
b = ht->arBuckets[i];
while (b) {
e = b->pData;
while (e) {
t = e;
e = e->pNext;
my_free((gptr) t,MYF(0));
}
tmp = b;
b = b->pNext;
my_free((gptr) tmp,MYF(0));
}
}
bzero((char*) ht->arBuckets,ht->nTableSize*sizeof(Bucket *)); bzero((char*) ht->arBuckets,ht->nTableSize*sizeof(Bucket *));
} }
...@@ -241,9 +221,7 @@ void completion_hash_free(HashTable *ht) ...@@ -241,9 +221,7 @@ void completion_hash_free(HashTable *ht)
void add_word(HashTable *ht,char *str) void add_word(HashTable *ht,char *str)
{ {
int i; int i;
int length= (int) strlen(str); char *pos=str;
for (i=1; *pos; i++, pos++)
for (i=1; i<=length; i++) {
completion_hash_update(ht, str, i, str); completion_hash_update(ht, str, i, str);
}
} }
...@@ -22,13 +22,15 @@ ...@@ -22,13 +22,15 @@
#define FAILURE 1 #define FAILURE 1
#include <sys/types.h> #include <sys/types.h>
#include <my_sys.h>
typedef struct _entry { typedef struct _entry {
char *str; char *str;
struct _entry *pNext; struct _entry *pNext;
} entry; } entry;
typedef struct bucket { typedef struct bucket
{
uint h; /* Used for numeric indexing */ uint h; /* Used for numeric indexing */
char *arKey; char *arKey;
uint nKeyLength; uint nKeyLength;
...@@ -40,6 +42,7 @@ typedef struct bucket { ...@@ -40,6 +42,7 @@ typedef struct bucket {
typedef struct hashtable { typedef struct hashtable {
uint nTableSize; uint nTableSize;
uint initialized; uint initialized;
MEM_ROOT mem_root;
uint(*pHashFunction) (char *arKey, uint nKeyLength); uint(*pHashFunction) (char *arKey, uint nKeyLength);
Bucket **arBuckets; Bucket **arBuckets;
} HashTable; } HashTable;
......
...@@ -137,6 +137,7 @@ static const char *xmlmeta[] = { ...@@ -137,6 +137,7 @@ static const char *xmlmeta[] = {
static char default_pager[FN_REFLEN]; static char default_pager[FN_REFLEN];
char pager[FN_REFLEN], outfile[FN_REFLEN]; char pager[FN_REFLEN], outfile[FN_REFLEN];
FILE *PAGER, *OUTFILE; FILE *PAGER, *OUTFILE;
MEM_ROOT hash_mem_root;
#include "sslopt-vars.h" #include "sslopt-vars.h"
...@@ -302,8 +303,9 @@ int main(int argc,char *argv[]) ...@@ -302,8 +303,9 @@ int main(int argc,char *argv[])
!(status.line_buff=batch_readline_init(max_allowed_packet+512,stdin))) !(status.line_buff=batch_readline_init(max_allowed_packet+512,stdin)))
exit(1); exit(1);
glob_buffer.realloc(512); glob_buffer.realloc(512);
mysql_server_init(0, NULL, server_default_groups); mysql_server_init(0, NULL, (char**) server_default_groups);
completion_hash_init(&ht,50); completion_hash_init(&ht, 128);
init_alloc_root(&hash_mem_root, 16384, 0);
bzero((char*) &mysql, sizeof(mysql)); bzero((char*) &mysql, sizeof(mysql));
if (sql_connect(current_host,current_db,current_user,opt_password, if (sql_connect(current_host,current_db,current_user,opt_password,
opt_silent)) opt_silent))
...@@ -387,6 +389,8 @@ sig_handler mysql_end(int sig) ...@@ -387,6 +389,8 @@ sig_handler mysql_end(int sig)
} }
batch_readline_end(status.line_buff); batch_readline_end(status.line_buff);
completion_hash_free(&ht); completion_hash_free(&ht);
free_root(&hash_mem_root,MYF(0));
#endif #endif
if (sig >= 0) if (sig >= 0)
put_info(sig ? "Aborted" : "Bye", INFO_RESULT); put_info(sig ? "Aborted" : "Bye", INFO_RESULT);
...@@ -1170,7 +1174,8 @@ static char *new_command_generator(char *text,int state) ...@@ -1170,7 +1174,8 @@ static char *new_command_generator(char *text,int state)
static void build_completion_hash(bool skip_rehash,bool write_info) static void build_completion_hash(bool skip_rehash,bool write_info)
{ {
COMMANDS *cmd=commands; COMMANDS *cmd=commands;
static MYSQL_RES *databases=0,*tables=0,*fields; MYSQL_RES *databases=0,*tables=0;
MYSQL_RES *fields;
static char ***field_names= 0; static char ***field_names= 0;
MYSQL_ROW database_row,table_row; MYSQL_ROW database_row,table_row;
MYSQL_FIELD *sql_field; MYSQL_FIELD *sql_field;
...@@ -1181,16 +1186,11 @@ static void build_completion_hash(bool skip_rehash,bool write_info) ...@@ -1181,16 +1186,11 @@ static void build_completion_hash(bool skip_rehash,bool write_info)
if (status.batch || quick || !current_db) if (status.batch || quick || !current_db)
DBUG_VOID_RETURN; // We don't need completion in batches DBUG_VOID_RETURN; // We don't need completion in batches
completion_hash_clean(&ht);
if (tables) if (tables)
{ {
mysql_free_result(tables); mysql_free_result(tables);
tables=0; tables=0;
} }
if (databases) {
mysql_free_result(databases);
databases=0;
}
/* hash SQL commands */ /* hash SQL commands */
while (cmd->name) { while (cmd->name) {
...@@ -1200,16 +1200,28 @@ static void build_completion_hash(bool skip_rehash,bool write_info) ...@@ -1200,16 +1200,28 @@ static void build_completion_hash(bool skip_rehash,bool write_info)
if (skip_rehash) if (skip_rehash)
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
/* Free old used memory */
if (field_names)
field_names=0;
completion_hash_clean(&ht);
free_root(&hash_mem_root,MYF(0));
/* hash MySQL functions (to be implemented) */ /* hash MySQL functions (to be implemented) */
/* hash all database names */ /* hash all database names */
if (mysql_query(&mysql,"show databases")==0) { if (mysql_query(&mysql,"show databases") == 0)
{
if (!(databases = mysql_store_result(&mysql))) if (!(databases = mysql_store_result(&mysql)))
put_info(mysql_error(&mysql),INFO_INFO); put_info(mysql_error(&mysql),INFO_INFO);
else else
{ {
while ((database_row=mysql_fetch_row(databases))) while ((database_row=mysql_fetch_row(databases)))
add_word(&ht,(char*) database_row[0]); {
char *str=strdup_root(&hash_mem_root, (char*) database_row[0]);
if (str)
add_word(&ht,(char*) str);
}
mysql_free_result(databases);
} }
} }
/* hash all table names */ /* hash all table names */
...@@ -1227,23 +1239,13 @@ You can turn off this feature to get a quicker startup with -A\n\n"); ...@@ -1227,23 +1239,13 @@ You can turn off this feature to get a quicker startup with -A\n\n");
} }
while ((table_row=mysql_fetch_row(tables))) while ((table_row=mysql_fetch_row(tables)))
{ {
if (!completion_hash_exists(&ht,(char*) table_row[0], char *str=strdup_root(&hash_mem_root, (char*) table_row[0]);
(uint) strlen((const char*) table_row[0]))) if (str &&
add_word(&ht,table_row[0]); !completion_hash_exists(&ht,(char*) str, (uint) strlen(str)))
} add_word(&ht,str);
} }
} }
/* FIXME: free() on small chunks is sloooowwww. glibc bug */
if (field_names) {
for (i=0; field_names[i]; i++) {
for (j=0; field_names[i][j]; j++) {
my_free(field_names[i][j],MYF(0));
} }
my_free((gptr) field_names[i],MYF(0));
}
my_free((gptr) field_names,MYF(0));
}
field_names=0;
/* hash all field names, both with the table prefix and without it */ /* hash all field names, both with the table prefix and without it */
if (!tables) /* no tables */ if (!tables) /* no tables */
...@@ -1251,36 +1253,37 @@ You can turn off this feature to get a quicker startup with -A\n\n"); ...@@ -1251,36 +1253,37 @@ You can turn off this feature to get a quicker startup with -A\n\n");
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
mysql_data_seek(tables,0); mysql_data_seek(tables,0);
field_names = (char ***) my_malloc(sizeof(char **) * if (!(field_names= (char ***) alloc_root(&hash_mem_root,sizeof(char **) *
(uint) (mysql_num_rows(tables)+1), (uint) (mysql_num_rows(tables)+1))))
MYF(MY_WME)); {
if (!field_names) mysql_free_result(tables);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
}
i=0; i=0;
while ((table_row=mysql_fetch_row(tables))) while ((table_row=mysql_fetch_row(tables)))
{ {
if ((fields=mysql_list_fields(&mysql,(const char*) table_row[0],NullS))) if ((fields=mysql_list_fields(&mysql,(const char*) table_row[0],NullS)))
{ {
num_fields=mysql_num_fields(fields); num_fields=mysql_num_fields(fields);
field_names[i] = (char **) my_malloc(sizeof(char *)*(num_fields*2+1), if (!(field_names[i] = (char **) alloc_root(&hash_mem_root,
MYF(0)); sizeof(char *) *
if (!field_names[i]) (num_fields*2+1))))
{ break;
continue;
}
field_names[i][num_fields*2]='\0'; field_names[i][num_fields*2]='\0';
j=0; j=0;
while ((sql_field=mysql_fetch_field(fields))) while ((sql_field=mysql_fetch_field(fields)))
{ {
sprintf(buf,"%s.%s",table_row[0],sql_field->name); sprintf(buf,"%s.%s",table_row[0],sql_field->name);
field_names[i][j] = my_strdup(buf,MYF(0)); field_names[i][j] = strdup_root(&hash_mem_root,buf);
add_word(&ht,field_names[i][j]); add_word(&ht,field_names[i][j]);
field_names[i][num_fields+j] = my_strdup(sql_field->name,MYF(0)); field_names[i][num_fields+j] = strdup_root(&hash_mem_root,
sql_field->name);
if (!completion_hash_exists(&ht,field_names[i][num_fields+j], if (!completion_hash_exists(&ht,field_names[i][num_fields+j],
(uint) strlen(field_names[i][num_fields+j]))) (uint) strlen(field_names[i][num_fields+j])))
add_word(&ht,field_names[i][num_fields+j]); add_word(&ht,field_names[i][num_fields+j]);
j++; j++;
} }
mysql_free_result(fields);
} }
else else
{ {
...@@ -1290,6 +1293,7 @@ You can turn off this feature to get a quicker startup with -A\n\n"); ...@@ -1290,6 +1293,7 @@ You can turn off this feature to get a quicker startup with -A\n\n");
} }
i++; i++;
} }
mysql_free_result(tables);
field_names[i]=0; // End pointer field_names[i]=0; // End pointer
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
......
...@@ -643,8 +643,7 @@ static uint getTableStructure(char *table, char* db) ...@@ -643,8 +643,7 @@ static uint getTableStructure(char *table, char* db)
if (path) if (path)
{ {
char filename[FN_REFLEN], tmp_path[FN_REFLEN]; char filename[FN_REFLEN], tmp_path[FN_REFLEN];
strmov(tmp_path,path); convert_dirname(tmp_path,path,NullS);
convert_dirname(tmp_path);
sql_file= my_fopen(fn_format(filename, table, tmp_path, ".sql", 4), sql_file= my_fopen(fn_format(filename, table, tmp_path, ".sql", 4),
O_WRONLY, MYF(MY_WME)); O_WRONLY, MYF(MY_WME));
if (!sql_file) /* If file couldn't be opened */ if (!sql_file) /* If file couldn't be opened */
...@@ -716,8 +715,7 @@ static uint getTableStructure(char *table, char* db) ...@@ -716,8 +715,7 @@ static uint getTableStructure(char *table, char* db)
if (path) if (path)
{ {
char filename[FN_REFLEN], tmp_path[FN_REFLEN]; char filename[FN_REFLEN], tmp_path[FN_REFLEN];
strmov(tmp_path,path); convert_dirname(tmp_path,path,NullS);
convert_dirname(tmp_path);
sql_file= my_fopen(fn_format(filename, table, tmp_path, ".sql", 4), sql_file= my_fopen(fn_format(filename, table, tmp_path, ".sql", 4),
O_WRONLY, MYF(MY_WME)); O_WRONLY, MYF(MY_WME));
if (!sql_file) /* If file couldn't be opened */ if (!sql_file) /* If file couldn't be opened */
...@@ -949,8 +947,7 @@ static void dumpTable(uint numFields, char *table) ...@@ -949,8 +947,7 @@ static void dumpTable(uint numFields, char *table)
if (path) if (path)
{ {
char filename[FN_REFLEN], tmp_path[FN_REFLEN]; char filename[FN_REFLEN], tmp_path[FN_REFLEN];
strmov(tmp_path, path); convert_dirname(tmp_path,path,NullS);
convert_dirname(tmp_path);
my_load_path(tmp_path, tmp_path, NULL); my_load_path(tmp_path, tmp_path, NULL);
fn_format(filename, table, tmp_path, ".txt", 4); fn_format(filename, table, tmp_path, ".txt", 4);
my_delete(filename, MYF(0)); /* 'INTO OUTFILE' doesn't work, if my_delete(filename, MYF(0)); /* 'INTO OUTFILE' doesn't work, if
......
This diff is collapsed.
...@@ -453,8 +453,7 @@ typedef SOCKET_SIZE_TYPE size_socket; ...@@ -453,8 +453,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
/* Some things that this system doesn't have */ /* Some things that this system doesn't have */
#define ONLY_OWN_DATABASES /* We are using only databases by monty */ #define ONLY_OWN_DATABASES /* We are using only databases by monty */
#define NO_PISAM /* Not needed anymore */ #define HAVE_ISAM /* TO BE DELETED */
#define NO_MISAM /* Not needed anymore */
#define NO_HASH /* Not needed anymore */ #define NO_HASH /* Not needed anymore */
#ifdef __WIN__ #ifdef __WIN__
#define NO_DIR_LIBRARY /* Not standar dir-library */ #define NO_DIR_LIBRARY /* Not standar dir-library */
......
...@@ -93,6 +93,16 @@ extern int NEAR my_errno; /* Last error in mysys */ ...@@ -93,6 +93,16 @@ extern int NEAR my_errno; /* Last error in mysys */
#define ME_COLOUR2 ((2 << ME_HIGHBYTE)) #define ME_COLOUR2 ((2 << ME_HIGHBYTE))
#define ME_COLOUR3 ((3 << ME_HIGHBYTE)) #define ME_COLOUR3 ((3 << ME_HIGHBYTE))
/* Bits in last argument to fn_format */
#define MY_REPLACE_DIR 1 /* replace dir in name with 'dir' */
#define MY_REPLACE_EXT 2 /* replace extension with 'ext' */
#define MY_UNPACK_FILENAME 4 /* Unpack name (~ -> home) */
#define MY_PACK_FILENAME 8 /* Pack name (home -> ~) */
#define MY_RESOLVE_SYMLINKS 16 /* Resolve all symbolic links */
#define MY_RETURN_REAL_PATH 32 /* return full path for file */
#define MY_SAFE_PATH 64 /* Return NULL if too long path */
#define MY_RELATIVE_PATH 128 /* name is relative to 'dir' */
/* My seek flags */ /* My seek flags */
#define MY_SEEK_SET 0 #define MY_SEEK_SET 0
#define MY_SEEK_CUR 1 #define MY_SEEK_CUR 1
...@@ -472,12 +482,12 @@ extern uint dirname_part(my_string to,const char *name); ...@@ -472,12 +482,12 @@ extern uint dirname_part(my_string to,const char *name);
extern uint dirname_length(const char *name); extern uint dirname_length(const char *name);
#define base_name(A) (A+dirname_length(A)) #define base_name(A) (A+dirname_length(A))
extern int test_if_hard_path(const char *dir_name); extern int test_if_hard_path(const char *dir_name);
extern char *convert_dirname(my_string name); extern char *convert_dirname(char *to, const char *from, const char *from_end);
extern void to_unix_path(my_string name); extern void to_unix_path(my_string name);
extern my_string fn_ext(const char *name); extern my_string fn_ext(const char *name);
extern my_string fn_same(my_string toname,const char *name,int flag); extern my_string fn_same(my_string toname,const char *name,int flag);
extern my_string fn_format(my_string to,const char *name,const char *dsk, extern my_string fn_format(my_string to,const char *name,const char *dir,
const char *form,int flag); const char *form, uint flag);
extern size_s strlength(const char *str); extern size_s strlength(const char *str);
extern void pack_dirname(my_string to,const char *from); extern void pack_dirname(my_string to,const char *from);
extern uint unpack_dirname(my_string to,const char *from); extern uint unpack_dirname(my_string to,const char *from);
......
...@@ -71,6 +71,8 @@ extern char *mysql_unix_port; ...@@ -71,6 +71,8 @@ extern char *mysql_unix_port;
typedef struct st_mysql_field { typedef struct st_mysql_field {
char *name; /* Name of column */ char *name; /* Name of column */
char *table; /* Table of column if column was a field */ char *table; /* Table of column if column was a field */
char *org_table; /* Org table name if table was an alias */
char *db; /* Database for table */
char *def; /* Default value (set by mysql_list_fields) */ char *def; /* Default value (set by mysql_list_fields) */
unsigned long length; /* Width of column */ unsigned long length; /* Width of column */
unsigned long max_length; /* Max width of selected set */ unsigned long max_length; /* Max width of selected set */
...@@ -251,7 +253,7 @@ typedef struct st_mysql_manager ...@@ -251,7 +253,7 @@ typedef struct st_mysql_manager
/* Set up and bring down the server; to ensure that applications will /* Set up and bring down the server; to ensure that applications will
* work when linked against either the standard client library or the * work when linked against either the standard client library or the
* embedded server library, these functions should be called. */ * embedded server library, these functions should be called. */
int mysql_server_init(int argc, const char **argv, const char **groups); int mysql_server_init(int argc, char **argv, char **groups);
void mysql_server_end(void); void mysql_server_end(void);
/* Set up and bring down a thread; these function should be called /* Set up and bring down a thread; these function should be called
...@@ -421,8 +423,8 @@ int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB); ...@@ -421,8 +423,8 @@ int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
*/ */
int simple_command(MYSQL *mysql,enum enum_server_command command, int simple_command(MYSQL *mysql,enum enum_server_command command,
const char *arg, ulong length, my_bool skipp_check); const char *arg, unsigned long length, my_bool skipp_check);
ulong net_safe_read(MYSQL* mysql); unsigned long net_safe_read(MYSQL* mysql);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#undef HAVE_DLOPEN /* No udf functions */ #undef HAVE_DLOPEN /* No udf functions */
#undef HAVE_OPENSSL #undef HAVE_OPENSSL
#undef HAVE_VIO #undef HAVE_VIO
#undef HAVE_ISAM
#define DONT_USE_RAID #define DONT_USE_RAID
#endif /* EMBEDDED_LIBRARY */ #endif /* EMBEDDED_LIBRARY */
...@@ -70,6 +70,7 @@ extern ulint srv_n_rows_read; ...@@ -70,6 +70,7 @@ extern ulint srv_n_rows_read;
extern ibool srv_print_innodb_monitor; extern ibool srv_print_innodb_monitor;
extern ibool srv_print_innodb_lock_monitor; extern ibool srv_print_innodb_lock_monitor;
extern ibool srv_print_innodb_tablespace_monitor; extern ibool srv_print_innodb_tablespace_monitor;
extern ibool srv_print_verbose_log;
extern ulint srv_n_spin_wait_rounds; extern ulint srv_n_spin_wait_rounds;
extern ulint srv_spin_wait_delay; extern ulint srv_spin_wait_delay;
......
...@@ -2641,9 +2641,11 @@ logs_empty_and_mark_files_at_shutdown(void) ...@@ -2641,9 +2641,11 @@ logs_empty_and_mark_files_at_shutdown(void)
dulint lsn; dulint lsn;
ulint arch_log_no; ulint arch_log_no;
if (srv_print_verbose_log)
{
ut_print_timestamp(stderr); ut_print_timestamp(stderr);
fprintf(stderr, " InnoDB: Starting shutdown...\n"); fprintf(stderr, " InnoDB: Starting shutdown...\n");
}
/* Wait until the master thread and all other operations are idle: our /* Wait until the master thread and all other operations are idle: our
algorithm only works if the server is idle at shutdown */ algorithm only works if the server is idle at shutdown */
loop: loop:
...@@ -2732,8 +2734,11 @@ loop: ...@@ -2732,8 +2734,11 @@ loop:
fil_flush_file_spaces(FIL_TABLESPACE); fil_flush_file_spaces(FIL_TABLESPACE);
if (srv_print_verbose_log)
{
ut_print_timestamp(stderr); ut_print_timestamp(stderr);
fprintf(stderr, " InnoDB: Shutdown completed\n"); fprintf(stderr, " InnoDB: Shutdown completed\n");
}
} }
/********************************************************** /**********************************************************
......
...@@ -120,6 +120,12 @@ ibool srv_print_innodb_monitor = FALSE; ...@@ -120,6 +120,12 @@ ibool srv_print_innodb_monitor = FALSE;
ibool srv_print_innodb_lock_monitor = FALSE; ibool srv_print_innodb_lock_monitor = FALSE;
ibool srv_print_innodb_tablespace_monitor = FALSE; ibool srv_print_innodb_tablespace_monitor = FALSE;
/*
Set the following to 0 if you want InnoDB to write messages on
stderr on startup/shutdown
*/
ibool srv_print_verbose_log = TRUE;
/* The parameters below are obsolete: */ /* The parameters below are obsolete: */
ibool srv_print_parsed_sql = FALSE; ibool srv_print_parsed_sql = FALSE;
......
...@@ -888,9 +888,11 @@ innobase_start_or_create_for_mysql(void) ...@@ -888,9 +888,11 @@ innobase_start_or_create_for_mysql(void)
/* buf_debug_prints = TRUE; */ /* buf_debug_prints = TRUE; */
if (srv_print_verbose_log)
{
ut_print_timestamp(stderr); ut_print_timestamp(stderr);
fprintf(stderr, " InnoDB: Started\n"); fprintf(stderr, " InnoDB: Started\n");
}
return((int) DB_SUCCESS); return((int) DB_SUCCESS);
} }
......
...@@ -400,11 +400,7 @@ static int examine_log(my_string file_name, char **table_names) ...@@ -400,11 +400,7 @@ static int examine_log(my_string file_name, char **table_names)
} }
to=isam_file_name; to=isam_file_name;
if (filepath) if (filepath)
{ to=convert_dirname(isam_file_name, filepath, NullS);
strmov(isam_file_name,filepath);
convert_dirname(isam_file_name);
to=strend(isam_file_name);
}
strmov(to,pos); strmov(to,pos);
fn_ext(isam_file_name)[0]=0; /* Remove extension */ fn_ext(isam_file_name)[0]=0; /* Remove extension */
} }
......
...@@ -92,8 +92,8 @@ static ulong mysql_sub_escape_string(CHARSET_INFO *charset_info, char *to, ...@@ -92,8 +92,8 @@ static ulong mysql_sub_escape_string(CHARSET_INFO *charset_info, char *to,
const char *from, ulong length); const char *from, ulong length);
int mysql_server_init(int argc __attribute__((unused)), int mysql_server_init(int argc __attribute__((unused)),
const char **argv __attribute__((unused)), char **argv __attribute__((unused)),
const char **groups __attribute__((unused))) char **groups __attribute__((unused)))
{ {
return 0; return 0;
} }
...@@ -873,7 +873,7 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields, ...@@ -873,7 +873,7 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
for (row=data->data; row ; row = row->next,field++) for (row=data->data; row ; row = row->next,field++)
{ {
field->table= strdup_root(alloc,(char*) row->data[0]); field->org_table= field->table= strdup_root(alloc,(char*) row->data[0]);
field->name= strdup_root(alloc,(char*) row->data[1]); field->name= strdup_root(alloc,(char*) row->data[1]);
field->length= (uint) uint3korr(row->data[2]); field->length= (uint) uint3korr(row->data[2]);
field->type= (enum enum_field_types) (uchar) row->data[3][0]; field->type= (enum enum_field_types) (uchar) row->data[3][0];
......
...@@ -25,19 +25,15 @@ DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \ ...@@ -25,19 +25,15 @@ 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 -I../include \ INCLUDES= @MT_INCLUDES@ @bdb_includes@ -I$(srcdir)/../include \
-I$(srcdir)/.. -I$(top_srcdir) -I.. -I../sql -I../regex -I../include -I$(srcdir)/.. -I$(top_srcdir) -I.. \
-I../sql -I../regex
noinst_LIBRARIES = libmysqld_int.a
## XXX: should we use client or server LDFLAGS for libmysqld? pkglib_LIBRARIES = libmysqld.a
LDADD = @CLIENT_EXTRA_LDFLAGS@ libmysqld.la
pkglib_LTLIBRARIES = libmysqld.la
SUBDIRS = . examples SUBDIRS = . examples
libmysqld_la_SOURCES= libmysqld.c lib_sql.cc lib_load.cc libmysqld_sources= libmysqld.c lib_sql.cc lib_load.cc
libmysqlsources = errmsg.c get_password.c password.c libmysqlsources = errmsg.c get_password.c password.c
## XXX: we should not have to duplicate info from the sources list
libmysqlobjects = errmsg.lo get_password.lo password.lo
noinst_HEADERS = embedded_priv.h noinst_HEADERS = embedded_priv.h
...@@ -47,7 +43,7 @@ sqlsources = convert.cc derror.cc field.cc field_conv.cc filesort.cc \ ...@@ -47,7 +43,7 @@ sqlsources = convert.cc derror.cc field.cc field_conv.cc filesort.cc \
hostname.cc init.cc \ hostname.cc init.cc \
item.cc item_buff.cc item_cmpfunc.cc item_create.cc \ item.cc item_buff.cc item_cmpfunc.cc item_create.cc \
item_func.cc item_strfunc.cc item_sum.cc item_timefunc.cc \ item_func.cc item_strfunc.cc item_sum.cc item_timefunc.cc \
item_uniq.cc key.cc lock.cc log.cc log_event.cc \ item_uniq.cc key.cc lock.cc log.cc log_event.cc md5.c \
mini_client.cc net_pkg.cc net_serv.cc opt_ft.cc opt_range.cc \ mini_client.cc net_pkg.cc net_serv.cc opt_ft.cc opt_range.cc \
opt_sum.cc procedure.cc records.cc slave.cc sql_acl.cc \ opt_sum.cc procedure.cc records.cc slave.cc sql_acl.cc \
sql_analyse.cc sql_base.cc sql_cache.cc sql_class.cc \ sql_analyse.cc sql_base.cc sql_cache.cc sql_class.cc \
...@@ -58,37 +54,52 @@ sqlsources = convert.cc derror.cc field.cc field_conv.cc filesort.cc \ ...@@ -58,37 +54,52 @@ sqlsources = convert.cc derror.cc field.cc field_conv.cc filesort.cc \
sql_update.cc sql_yacc.cc table.cc thr_malloc.cc time.cc \ sql_update.cc sql_yacc.cc table.cc thr_malloc.cc time.cc \
unireg.cc uniques.cc stacktrace.c sql_union.cc hash_filo.cc unireg.cc uniques.cc stacktrace.c sql_union.cc hash_filo.cc
## XXX: we should not have to duplicate info from the sources list
sqlobjects = convert.lo derror.lo field.lo field_conv.lo filesort.lo \
ha_innobase.lo ha_berkeley.lo ha_heap.lo ha_isam.lo ha_isammrg.lo \
ha_myisam.lo ha_myisammrg.lo handler.lo sql_handler.lo \
hostname.lo init.lo \
item.lo item_buff.lo item_cmpfunc.lo item_create.lo \
item_func.lo item_strfunc.lo item_sum.lo item_timefunc.lo \
item_uniq.lo key.lo lock.lo log.lo log_event.lo \
mini_client.lo net_pkg.lo net_serv.lo opt_ft.lo opt_range.lo \
opt_sum.lo procedure.lo records.lo slave.lo sql_acl.lo \
sql_analyse.lo sql_base.lo sql_cache.lo sql_class.lo \
sql_crypt.lo sql_db.lo sql_delete.lo sql_insert.lo sql_lex.lo \
sql_list.lo sql_manager.lo sql_map.lo sql_parse.lo \
sql_rename.lo sql_repl.lo sql_select.lo sql_show.lo \
sql_string.lo sql_table.lo sql_test.lo sql_udf.lo \
sql_update.lo sql_yacc.lo table.lo thr_malloc.lo time.lo \
unireg.lo uniques.lo stacktrace.lo sql_union.lo hash_filo.lo
EXTRA_DIST = lib_vio.c EXTRA_DIST = lib_vio.c
libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources)
# automake misses these # automake misses these
sql_yacc.cc sql_yacc.h: $(top_srcdir)/sql/sql_yacc.yy sql_yacc.cc sql_yacc.h: $(top_srcdir)/sql/sql_yacc.yy
libmysqld_la_LIBADD = $(sqlobjects) $(libmysqlobjects) # The following libraries should be included in libmysqld.a
INC_LIB= $(top_builddir)/regex/libregex.a \
$(top_builddir)/myisam/libmyisam.a \
$(top_builddir)/myisammrg/libmyisammrg.a \
$(top_builddir)/heap/libheap.a \
@innodb_libs@ @bdb_libs_with_path@ \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/regex/libregex.a
#
# To make it easy for the end user to use the embedded library we
# generate a total libmysqld.a from all library files,
libmysqld.a: libmysqld_int.a $(INC_LIB)
if test ! -d tmp ; then mkdir tmp ; fi
rm -f $@ libmysqld_int2.a tmp/*.o tmp/*.a
cp $(INC_LIB) tmp
cp libmysqld_int.a libmysqld_int2.a ; \
cd tmp ; \
for file in *.a ; do \
bfile=`basename $$file .a` ; \
ar x $$file; \
for obj in *.o ; do mv $$obj $${bfile}_$$obj ; done ; \
ar q ../libmysqld_int2.a *.o ; \
rm *.o ; \
done
mv libmysqld_int2.a libmysqld.a
rm tmp/*
$(RANLIB) libmysqld.a
## XXX: any time the client interface changes, we'll need to bump ## XXX: any time the client interface changes, we'll need to bump
## the version info for libmysqld; however, it's possible for the ## the version info for libmysqld; however, it's possible for the
## libmysqld interface to change without affecting the standard ## libmysqld interface to change without affecting the standard
## libmysqlclient interface. Should we make a separate version ## libmysqlclient interface. Should we make a separate version
## string for the two? ## string for the two?
libmysqld_la_LDFLAGS = -version-info @SHARED_LIB_VERSION@ #libmysqld_la_LDFLAGS = -version-info @SHARED_LIB_VERSION@
CLEANFILES = $(libmysqld_la_LIBADD) libmysqld.la #CLEANFILES = $(libmysqld_la_LIBADD) libmysqld.la
# This is called from the toplevel makefile # This is called from the toplevel makefile
link_sources: link_sources:
......
...@@ -11,19 +11,8 @@ DEFS = -DEMBEDDED_LIBRARY ...@@ -11,19 +11,8 @@ DEFS = -DEMBEDDED_LIBRARY
INCLUDES = -I$(top_srcdir)/include $(openssl_includes) \ INCLUDES = -I$(top_srcdir)/include $(openssl_includes) \
-I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/client -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/client
LIBS = @LIBS@ LIBS = @LIBS@
LDADD = $(top_builddir)/libmysqld/libmysqld.la \ LDADD = ../libmysqld.a @innodb_system_libs@ @LIBDL@
$(top_builddir)/isam/libnisam.a \
$(top_builddir)/myisam/libmyisam.a \
$(top_builddir)/heap/libheap.a \
$(top_builddir)/merge/libmerge.a \
$(top_builddir)/myisammrg/libmyisammrg.a \
@innodb_libs@ @bdb_libs@ @pstack_libs@ \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/regex/libregex.a @LIBDL@
mysqltest_DEPENDENCIES = ../libmysqld.la
mysqltest_SOURCES = mysqltest.c mysqltest_SOURCES = mysqltest.c
mysql_SOURCES = mysql.cc readline.cc completion_hash.cc \ mysql_SOURCES = mysql.cc readline.cc completion_hash.cc \
......
...@@ -6,26 +6,19 @@ ...@@ -6,26 +6,19 @@
# that will run on all platforms (or incorporate it into the # that will run on all platforms (or incorporate it into the
# standard mysql-test-run). # standard mysql-test-run).
#test_data_dir=/tmp/mysql-data
test_data_dir=../../mysql-test/var/master-data
cd "$test_data_dir" || {
echo "can't cd to $test_data_dir" >&2
exit 1
}
# All paths below must be relative to $test_data_dir # All paths below must be relative to $test_data_dir
#top_builddir=/home/tim/my/4 top_builddir=../..
top_builddir=../../..
mysql_test_dir=$top_builddir/mysql-test mysql_test_dir=$top_builddir/mysql-test
examples=$top_builddir/libmysqld/examples examples=$top_builddir/libmysqld/examples
mysqltest=$examples/mysqltest mysqltest=$examples/mysqltest
testdir=./test datadir=$mysql_test_dir/var/master-data
test_data_dir=test
gdb=0 gdb=0
list=0 list=0
run= run=
tests= tests=
start= start=
clean=1
cr=" cr="
" "
...@@ -35,6 +28,7 @@ usage () { ...@@ -35,6 +28,7 @@ usage () {
cat <<EOF cat <<EOF
usage: $0 [-g|-h|-r] [test-name ...] usage: $0 [-g|-h|-r] [test-name ...]
-C | --noclean Do not remove old innodb and bdb files at start.
-g | --gdb run $mysqltest in gdb -g | --gdb run $mysqltest in gdb
-h | --help show this help -h | --help show this help
-l | --list ) list all available tests -l | --list ) list all available tests
...@@ -58,6 +52,7 @@ do ...@@ -58,6 +52,7 @@ do
-l | --list ) list=1 ; shift ;; -l | --list ) list=1 ; shift ;;
-r | --run ) run="${cr}run"; shift;; -r | --run ) run="${cr}run"; shift;;
--debug) init_args="$init_args --debug" ; shift ;; --debug) init_args="$init_args --debug" ; shift ;;
-C | --noclean) clean=0 ; shift ;;
-s | --start=* ) -s | --start=* )
test $argset -eq 0 && { shift; arg="$1"; } test $argset -eq 0 && { shift; arg="$1"; }
start="$arg" start="$arg"
...@@ -68,25 +63,30 @@ do ...@@ -68,25 +63,30 @@ do
esac esac
done done
test -d "$mysql_test_dir/t" -a -d "$mysql_test_dir/r" -a \ if test ! -d "$datadir/$test_data_dir"
-f $mysqltest -a -d $testdir || { then
echo "bad setup (is '$testdir', from '$test_data_dir', missing?)" >&2 echo "bad setup (is '$datadir/$test_data_dir'', missing ?)" >&2
exit 1 exit 1
} fi
test -n "$tests" || test -n "$tests" ||
tests=`/bin/ls -1 "$mysql_test_dir"/t/*.test | grep -v '^.*/rpl[^/]*$' | \ tests=`/bin/ls -1 "$mysql_test_dir"/t/*.test | grep -v '^.*/rpl[^/]*$' | \
sed -e 's,^.*/,,' -e 's,.test$,,'` sed -e 's,^.*/,,' -e 's,.test$,,'`
echo "cleaning data directory '$test_data_dir'" echo "cleaning data directory '$datadir/$test_data_dir'"
rm -f $test_data_dir/ib_* $test_data_dir/ibdata* log.* if test $clean = 1
echo "cleaning test directory '$testdir'" then
rm -f $testdir/* rm -f $datadir/ib_* $datadir/ibdata*
rm -f $datadir/log.00*
fi
rm -f $datadir/../tmp/*
rm -f test-gdbinit rm -f test-gdbinit
TZ=GMT-3; export TZ TZ=GMT-3; export TZ
# At least one of the tests needs the following environment variable
MYSQL_TEST_DIR=`( cd $mysql_test_dir ; pwd )` ; export MYSQL_TEST_DIR
skip=1 skip=1
test -z "$start" && skip=0 test -z "$start" && skip=0
...@@ -96,16 +96,20 @@ do ...@@ -96,16 +96,20 @@ do
test $skip -eq 1 && test -n "$start" && test "$start" = "$b" && skip=0 test $skip -eq 1 && test -n "$start" && test "$start" = "$b" && skip=0
test $skip -eq 1 && { echo "skipping '$b'"; continue; } test $skip -eq 1 && { echo "skipping '$b'"; continue; }
t="$mysql_test_dir/t/$b.test" t="t/$b.test"
r="$mysql_test_dir/r/$b.result" r="r/$b.result"
c="$mysql_test_dir/r/$b.reject"
# Only test if $t exists; there is no $r for some tests # Only test if $t exists; there is no $r for some tests
test -f $t || { test -f $mysql_test_dir/$t || {
echo "test '$b' doesn't exist" >&2 echo "test '$mysql_test_dir/$t' doesn't exist" >&2
continue continue
} }
args="$init_args -v -S /tmp/mysql.sock -R $r -x $t test" args="$init_args -v --basedir=$mysql_test_dir/ -R $r -x $t --server-arg=--datadir=$datadir"
if test -f "$mysql_test_dir/t/$b-master.opt" ; then
args="$args --server-file=t/$b-master.opt"
fi
args="$args $test_data_dir" # Add database last
echo "set args $args$run" > test-gdbinit echo "set args $args$run" > test-gdbinit
#if false && test -n "$run" #if false && test -n "$run"
if test -n "$run" -o $gdb -eq 1 if test -n "$run" -o $gdb -eq 1
...@@ -129,5 +133,5 @@ do ...@@ -129,5 +133,5 @@ do
res=$? res=$?
fi fi
test $res -eq 0 || echo "!!! error: $res" test $res -eq 0 -o $res -eq 2 || echo "!!! error: $res"
done done
...@@ -296,7 +296,7 @@ extern "C" ...@@ -296,7 +296,7 @@ extern "C"
static my_bool inited, org_my_init_done; static my_bool inited, org_my_init_done;
int mysql_server_init(int argc, const char **argv, const char **groups) int mysql_server_init(int argc, char **argv, char **groups)
{ {
char glob_hostname[FN_REFLEN]; char glob_hostname[FN_REFLEN];
...@@ -306,7 +306,7 @@ int mysql_server_init(int argc, const char **argv, const char **groups) ...@@ -306,7 +306,7 @@ int mysql_server_init(int argc, const char **argv, const char **groups)
char ***argvp; char ***argvp;
int fake_argc = 1; int fake_argc = 1;
char *fake_argv[] = { (char *)"", 0 }; char *fake_argv[] = { (char *)"", 0 };
const char *fake_groups[] = { "server", 0 }; const char *fake_groups[] = { "server", "embedded", 0 };
if (argc) if (argc)
{ {
argcp = &argc; argcp = &argc;
...@@ -318,7 +318,7 @@ int mysql_server_init(int argc, const char **argv, const char **groups) ...@@ -318,7 +318,7 @@ int mysql_server_init(int argc, const char **argv, const char **groups)
argvp = (char ***) &fake_argv; argvp = (char ***) &fake_argv;
} }
if (!groups) if (!groups)
groups = fake_groups; groups = (char**) fake_groups;
my_umask=0660; // Default umask for new files my_umask=0660; // Default umask for new files
my_umask_dir=0700; // Default umask for new directories my_umask_dir=0700; // Default umask for new directories
...@@ -330,7 +330,9 @@ int mysql_server_init(int argc, const char **argv, const char **groups) ...@@ -330,7 +330,9 @@ int mysql_server_init(int argc, const char **argv, const char **groups)
org_my_init_done=my_init_done; org_my_init_done=my_init_done;
} }
if (!org_my_init_done) if (!org_my_init_done)
{
MY_INIT((char *)"mysql_embedded"); // init my_sys library & pthreads MY_INIT((char *)"mysql_embedded"); // init my_sys library & pthreads
}
tzset(); // Set tzname tzset(); // Set tzname
...@@ -357,7 +359,7 @@ int mysql_server_init(int argc, const char **argv, const char **groups) ...@@ -357,7 +359,7 @@ int mysql_server_init(int argc, const char **argv, const char **groups)
strcat(server_version,"-debug"); strcat(server_version,"-debug");
#endif #endif
strcat(server_version,"-embedded"); strcat(server_version,"-embedded");
load_defaults("my", groups, argcp, argvp); load_defaults("my", (const char **) groups, argcp, argvp);
defaults_argv=*argvp; defaults_argv=*argvp;
mysql_tmpdir=getenv("TMPDIR"); /* Use this if possible */ mysql_tmpdir=getenv("TMPDIR"); /* Use this if possible */
#if defined( __WIN__) || defined(OS2) #if defined( __WIN__) || defined(OS2)
......
...@@ -79,11 +79,6 @@ static ulong mysql_sub_escape_string(CHARSET_INFO *charset_info, char *to, ...@@ -79,11 +79,6 @@ static ulong mysql_sub_escape_string(CHARSET_INFO *charset_info, char *to,
#define set_sigpipe(mysql) #define set_sigpipe(mysql)
#define reset_sigpipe(mysql) #define reset_sigpipe(mysql)
static MYSQL* spawn_init(MYSQL* parent, const char* host,
unsigned int port,
const char* user,
const char* passwd);
/***************************************************************************** /*****************************************************************************
** read a packet from server. Give error message if socket was down ** read a packet from server. Give error message if socket was down
** or packet is an error message ** or packet is an error message
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include
pkglib_LIBRARIES = libmerge.a pkglib_LIBRARIES = libmerge.a
noinst_HEADERS = mrgdef.h noinst_HEADERS = mrg_def.h
libmerge_a_SOURCES = open.c extra.c info.c _locking.c \ libmerge_a_SOURCES = mrg_open.c mrg_extra.c mrg_info.c mrg_locking.c \
rrnd.c update.c delete.c rsame.c panic.c \ mrg_rrnd.c mrg_update.c mrg_delete.c mrg_rsame.c \
close.c create.c static.c mrg_panic.c mrg_close.c mrg_create.c mrg_static.c
OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\
__math.h time.h __time.h unistd.h __unistd.h types.h \ __math.h time.h __time.h unistd.h __unistd.h types.h \
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/* close a isam-database */ /* close a isam-database */
#include "mrgdef.h" #include "mrg_def.h"
int mrg_close(register MRG_INFO *info) int mrg_close(register MRG_INFO *info)
{ {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/* Create a MERGE-file */ /* Create a MERGE-file */
#include "mrgdef.h" #include "mrg_def.h"
/* create file named 'name' and save filenames in it /* create file named 'name' and save filenames in it
table_names should be NULL or a vector of string-pointers with table_names should be NULL or a vector of string-pointers with
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/* Delete last read record */ /* Delete last read record */
#include "mrgdef.h" #include "mrg_def.h"
int mrg_delete(MRG_INFO *info,const byte *record) int mrg_delete(MRG_INFO *info,const byte *record)
{ {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
record-cache-flags are set in mrg_rrnd when we are changing database. record-cache-flags are set in mrg_rrnd when we are changing database.
*/ */
#include "mrgdef.h" #include "mrg_def.h"
int mrg_extra( int mrg_extra(
MRG_INFO *info, MRG_INFO *info,
......
...@@ -14,7 +14,7 @@ ...@@ -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 */
#include "mrgdef.h" #include "mrg_def.h"
ulong mrg_position(MRG_INFO *info) ulong mrg_position(MRG_INFO *info)
{ {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
Lock databases against read or write. Lock databases against read or write.
*/ */
#include "mrgdef.h" #include "mrg_def.h"
int mrg_lock_database(MRG_INFO *info,int lock_type) int mrg_lock_database(MRG_INFO *info,int lock_type)
{ {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/* open a MERGE-database */ /* open a MERGE-database */
#include "mrgdef.h" #include "mrg_def.h"
#include <stddef.h> #include <stddef.h>
#include <errno.h> #include <errno.h>
#ifdef VMS #ifdef VMS
......
...@@ -14,7 +14,7 @@ ...@@ -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 */
#include "mrgdef.h" #include "mrg_def.h"
/* if flag == HA_PANIC_CLOSE then all misam files are closed */ /* if flag == HA_PANIC_CLOSE then all misam files are closed */
/* if flag == HA_PANIC_WRITE then all misam files are unlocked and /* if flag == HA_PANIC_WRITE then all misam files are unlocked and
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
get by mrg_info(). The next record can be read with pos= -1 */ get by mrg_info(). The next record can be read with pos= -1 */
#include "mrgdef.h" #include "mrg_def.h"
static MRG_TABLE *find_table(MRG_TABLE *start,MRG_TABLE *end,mrg_off_t pos); static MRG_TABLE *find_table(MRG_TABLE *start,MRG_TABLE *end,mrg_off_t pos);
......
...@@ -14,7 +14,7 @@ ...@@ -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 */
#include "mrgdef.h" #include "mrg_def.h"
int mrg_rsame( int mrg_rsame(
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
*/ */
#ifndef stdin #ifndef stdin
#include "mrgdef.h" #include "mrg_def.h"
#endif #endif
LIST *mrg_open_list=0; LIST *mrg_open_list=0;
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/* Update last read record */ /* Update last read record */
#include "mrgdef.h" #include "mrg_def.h"
int mrg_update( int mrg_update(
register MRG_INFO *info, register MRG_INFO *info,
......
...@@ -404,11 +404,7 @@ static int examine_log(my_string file_name, char **table_names) ...@@ -404,11 +404,7 @@ static int examine_log(my_string file_name, char **table_names)
} }
to=isam_file_name; to=isam_file_name;
if (filepath) if (filepath)
{ to=convert_dirname(isam_file_name,filepath,NullS);
strmov(isam_file_name,filepath);
convert_dirname(isam_file_name);
to=strend(isam_file_name);
}
strmov(to,pos); strmov(to,pos);
fn_ext(isam_file_name)[0]=0; /* Remove extension */ fn_ext(isam_file_name)[0]=0; /* Remove extension */
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include
pkglib_LIBRARIES = libmyisammrg.a pkglib_LIBRARIES = libmyisammrg.a
noinst_HEADERS = mymrgdef.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 \
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/* close a isam-database */ /* close a isam-database */
#include "mymrgdef.h" #include "myrg_def.h"
int myrg_close(MYRG_INFO *info) int myrg_close(MYRG_INFO *info)
{ {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/* Create a MYMERGE_-file */ /* Create a MYMERGE_-file */
#include "mymrgdef.h" #include "myrg_def.h"
/* create file named 'name' and save filenames in it /* create file named 'name' and save filenames in it
table_names should be NULL or a vector of string-pointers with table_names should be NULL or a vector of string-pointers with
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/* Delete last read record */ /* Delete last read record */
#include "mymrgdef.h" #include "myrg_def.h"
int myrg_delete( int myrg_delete(
MYRG_INFO *info, MYRG_INFO *info,
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
record-cache-flags are set in myrg_rrnd when we are changing database. record-cache-flags are set in myrg_rrnd when we are changing database.
*/ */
#include "mymrgdef.h" #include "myrg_def.h"
int myrg_extra(MYRG_INFO *info,enum ha_extra_function function) int myrg_extra(MYRG_INFO *info,enum ha_extra_function function)
{ {
......
...@@ -14,7 +14,7 @@ ...@@ -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 */
#include "mymrgdef.h" #include "myrg_def.h"
ulonglong myrg_position(MYRG_INFO *info) ulonglong myrg_position(MYRG_INFO *info)
{ {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
Lock databases against read or write. Lock databases against read or write.
*/ */
#include "mymrgdef.h" #include "myrg_def.h"
int myrg_lock_database( int myrg_lock_database(
MYRG_INFO *info, MYRG_INFO *info,
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/* open a MyISAM MERGE table */ /* open a MyISAM MERGE table */
#include "mymrgdef.h" #include "myrg_def.h"
#include <stddef.h> #include <stddef.h>
#include <errno.h> #include <errno.h>
#ifdef VMS #ifdef VMS
......
...@@ -14,7 +14,7 @@ ...@@ -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 */
#include "mymrgdef.h" #include "myrg_def.h"
/* if flag == HA_PANIC_CLOSE then all misam files are closed */ /* if flag == HA_PANIC_CLOSE then all misam files are closed */
/* if flag == HA_PANIC_WRITE then all misam files are unlocked and /* if flag == HA_PANIC_WRITE then all misam files are unlocked and
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/* Read record based on a key */ /* Read record based on a key */
#include "mymrgdef.h" #include "myrg_def.h"
static int queue_key_cmp(void *keyseg, byte *a, byte *b) static int queue_key_cmp(void *keyseg, byte *a, byte *b)
{ {
......
...@@ -14,7 +14,7 @@ ...@@ -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 */
#include "mymrgdef.h" #include "myrg_def.h"
/* Read first row according to specific key */ /* Read first row according to specific key */
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
*/ */
#include "mymrgdef.h" #include "myrg_def.h"
/* todo: we could store some additional info to speedup lookups: /* todo: we could store some additional info to speedup lookups:
column (key, keyseg) can be constant per table column (key, keyseg) can be constant per table
......
...@@ -14,7 +14,7 @@ ...@@ -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 */
#include "mymrgdef.h" #include "myrg_def.h"
/* Read last row with the same key as the previous read. */ /* Read last row with the same key as the previous read. */
......
...@@ -14,7 +14,7 @@ ...@@ -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 */
#include "mymrgdef.h" #include "myrg_def.h"
/* /*
Read next row with the same key as previous read Read next row with the same key as previous read
......
...@@ -14,7 +14,7 @@ ...@@ -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 */
#include "mymrgdef.h" #include "myrg_def.h"
/* /*
Read previous row with the same key as previous read Read previous row with the same key as previous read
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
get by myrg_info(). The next record can be read with pos= -1 */ get by myrg_info(). The next record can be read with pos= -1 */
#include "mymrgdef.h" #include "myrg_def.h"
static MYRG_TABLE *find_table(MYRG_TABLE *start,MYRG_TABLE *end,ulonglong pos); static MYRG_TABLE *find_table(MYRG_TABLE *start,MYRG_TABLE *end,ulonglong pos);
......
...@@ -14,7 +14,7 @@ ...@@ -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 */
#include "mymrgdef.h" #include "myrg_def.h"
int myrg_rsame(MYRG_INFO *info,byte *record,int inx) int myrg_rsame(MYRG_INFO *info,byte *record,int inx)
{ {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
*/ */
#ifndef stdin #ifndef stdin
#include "mymrgdef.h" #include "myrg_def.h"
#endif #endif
LIST *myrg_open_list=0; LIST *myrg_open_list=0;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/* Update last read record */ /* Update last read record */
#include "mymrgdef.h" #include "myrg_def.h"
int myrg_update(register MYRG_INFO *info,const byte *oldrec, byte *newrec) int myrg_update(register MYRG_INFO *info,const byte *oldrec, byte *newrec)
{ {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/* Write a row to a MyISAM MERGE table */ /* Write a row to a MyISAM MERGE table */
#include "mymrgdef.h" #include "myrg_def.h"
int myrg_write(register MYRG_INFO *info, byte *rec) int myrg_write(register MYRG_INFO *info, byte *rec)
{ {
......
connect (master,localhost,root,,test,0,mysql-master.sock); connect (master,localhost,root,,test,0,master.sock);
connect (master1,localhost,root,,test,0,mysql-master.sock); connect (master1,localhost,root,,test,0,master.sock);
connect (slave,localhost,root,,test,0,mysql-slave.sock); connect (slave,localhost,root,,test,0,slave.sock);
connect (slave1,localhost,root,,test,0,mysql-slave.sock); connect (slave1,localhost,root,,test,0,slave.sock);
connection slave; connection slave;
!slave stop; !slave stop;
@r/slave-stopped.result show status like 'Slave_running'; @r/slave-stopped.result show status like 'Slave_running';
......
-- require r/not_embedded.require
select version() like "%embedded%" as "have_embedded";
...@@ -249,13 +249,13 @@ done ...@@ -249,13 +249,13 @@ done
MYRUN_DIR=$MYSQL_TEST_DIR/var/run MYRUN_DIR=$MYSQL_TEST_DIR/var/run
MASTER_MYDDIR="$MYSQL_TEST_DIR/var/master-data" MASTER_MYDDIR="$MYSQL_TEST_DIR/var/master-data"
MASTER_MYSOCK="$MYSQL_TMP_DIR/mysql-master.sock" MASTER_MYSOCK="$MYSQL_TMP_DIR/master.sock"
MASTER_MYPID="$MYRUN_DIR/mysqld.pid" MASTER_MYPID="$MYRUN_DIR/mysqld.pid"
MASTER_MYLOG="$MYSQL_TEST_DIR/var/log/mysqld.log" MASTER_MYLOG="$MYSQL_TEST_DIR/var/log/mysqld.log"
MASTER_MYERR="$MYSQL_TEST_DIR/var/log/mysqld.err" MASTER_MYERR="$MYSQL_TEST_DIR/var/log/mysqld.err"
SLAVE_MYDDIR="$MYSQL_TEST_DIR/var/slave-data" SLAVE_MYDDIR="$MYSQL_TEST_DIR/var/slave-data"
SLAVE_MYSOCK="$MYSQL_TMP_DIR/mysql-slave.sock" SLAVE_MYSOCK="$MYSQL_TMP_DIR/slave.sock"
SLAVE_MYPID="$MYRUN_DIR/mysqld-slave.pid" SLAVE_MYPID="$MYRUN_DIR/mysqld-slave.pid"
SLAVE_MYLOG="$MYSQL_TEST_DIR/var/log/mysqld-slave.log" SLAVE_MYLOG="$MYSQL_TEST_DIR/var/log/mysqld-slave.log"
SLAVE_MYERR="$MYSQL_TEST_DIR/var/log/mysqld-slave.err" SLAVE_MYERR="$MYSQL_TEST_DIR/var/log/mysqld-slave.err"
......
...@@ -23,30 +23,6 @@ a b c ...@@ -23,30 +23,6 @@ a b c
8 8 8 8 8 8
9 9 9 9 9 9
drop table t1; drop table t1;
create table t1 (a int not null auto_increment,b int, primary key (a)) type=isam;
insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4);
delete from t1 where a=4 or a=2;
insert into t1 values (NULL,4),(NULL,5),(6,6);
select * from t1;
a b
1 1
5 5
3 3
4 4
6 6
delete from t1 where a=6;
replace t1 values (3,1);
replace t1 values (3,3);
ALTER TABLE t1 add c int;
insert into t1 values (NULL,6,6);
select * from t1;
a b c
1 1 NULL
5 5 NULL
3 3 NULL
4 4 NULL
6 6 6
drop table t1;
create table t1 ( create table t1 (
skey tinyint unsigned NOT NULL auto_increment PRIMARY KEY, skey tinyint unsigned NOT NULL auto_increment PRIMARY KEY,
sval char(20) sval char(20)
......
select database(),user(); select database(),user() like "%@%";
database() user() database() user()
test root@localhost test 1
select version()>="3.23.29"; select version()>="3.23.29";
version()>="3.23.29" version()>="3.23.29"
1 1
...@@ -15,4 +15,42 @@ test.t1 repair status OK ...@@ -15,4 +15,42 @@ test.t1 repair status OK
check table t1; check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
a b
1 1
5 5
3 3
4 4
6 6
a b c
1 1 NULL
5 5 NULL
3 3 NULL
4 4 NULL
6 6 6
Table Op Msg_type Msg_text
test.t1 optimize status OK
Table Op Msg_type Msg_text
test.t1 check status OK
test.t2 check error The handler for the table doesn't support check/repair
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t2 repair error The handler for the table doesn't support check/repair
Table Op Msg_type Msg_text
test.t2 check error The handler for the table doesn't support check/repair
test.t1 check status OK
Table Op Msg_type Msg_text
test.t2 check error Table 't2' was not locked with LOCK TABLES
test.t1 check status OK
Field Type Null Key Default Extra
a int(11) PRI 0
b int(11) MUL 0
c int(11) 0
Field Type Null Key Default Extra Privileges
a int(11) PRI 0 select,insert,update,references
b int(11) MUL 0 select,insert,update,references
c int(11) 0 select,insert,update,references
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment
t1 0 PRIMARY 1 a A 4 NULL NULL
t1 1 b 1 b A 1 NULL NULL
t1 1 b 2 c A 4 NULL NULL
drop table t1; drop table t1;
drop table if exists t1,t2; drop table if exists t1,t2;
create table t1 (a int not null primary key, b int not null,c int not null, key(b,c)); create table t1 (a int not null primary key, b int not null,c int not null, key(b,c));
insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4); insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4);
create table t2 type=isam select * from t1;
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
check table t1,t2;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t2 check error The handler for the table doesn't support check/repair
repair table t1,t2;
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t2 repair error The handler for the table doesn't support check/repair
check table t2,t1;
Table Op Msg_type Msg_text
test.t2 check error The handler for the table doesn't support check/repair
test.t1 check status OK
lock tables t1 write;
check table t2,t1;
Table Op Msg_type Msg_text
test.t2 check error Table 't2' was not locked with LOCK TABLES
test.t1 check status OK
show columns from t1;
Field Type Null Key Default Extra
a int(11) PRI 0
b int(11) MUL 0
c int(11) 0
show full columns from t1;
Field Type Null Key Default Extra Privileges
a int(11) PRI 0 select,insert,update,references
b int(11) MUL 0 select,insert,update,references
c int(11) 0 select,insert,update,references
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment
t1 0 PRIMARY 1 a A 4 NULL NULL
t1 1 b 1 b A 1 NULL NULL
t1 1 b 2 c A 4 NULL NULL
drop table t1,t2;
create table t1 (a int not null primary key, b int not null,c int not null, key(b,c));
insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4);
check table t1 type=fast; check table t1 type=fast;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status Table is already up to date test.t1 check status Table is already up to date
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# Test of auto_increment; The test for BDB tables is in bdb.test # Test of auto_increment; The test for BDB tables is in bdb.test
# #
drop table if exists t1;
create table t1 (a int not null auto_increment,b int, primary key (a)) type=myisam auto_increment=3; create table t1 (a int not null auto_increment,b int, primary key (a)) type=myisam auto_increment=3;
insert into t1 values (1,1),(NULL,3),(NULL,4); insert into t1 values (1,1),(NULL,3),(NULL,4);
delete from t1 where a=4; delete from t1 where a=4;
...@@ -18,20 +19,6 @@ insert into t1 values (NULL,9,9); ...@@ -18,20 +19,6 @@ insert into t1 values (NULL,9,9);
select * from t1; select * from t1;
drop table t1; drop table t1;
create table t1 (a int not null auto_increment,b int, primary key (a)) type=isam;
insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4);
delete from t1 where a=4 or a=2;
insert into t1 values (NULL,4),(NULL,5),(6,6);
select * from t1;
delete from t1 where a=6;
#show table status like "t1";
replace t1 values (3,1);
replace t1 values (3,3);
ALTER TABLE t1 add c int;
insert into t1 values (NULL,6,6);
select * from t1;
drop table t1;
create table t1 ( create table t1 (
skey tinyint unsigned NOT NULL auto_increment PRIMARY KEY, skey tinyint unsigned NOT NULL auto_increment PRIMARY KEY,
sval char(20) sval char(20)
......
...@@ -39,9 +39,3 @@ reap; ...@@ -39,9 +39,3 @@ reap;
unlock tables; unlock tables;
connection con1; connection con1;
reap; reap;
-O max_heap_table_size=16384 --set-variable=max_heap_table_size=16384
drop table if exists t1;
create table t1(n1 int, n2 int, s char(20), vs varchar(20), t text); create table t1(n1 int, n2 int, s char(20), vs varchar(20), t text);
insert into t1 values (1,11, 'one','eleven', 'eleven'), insert into t1 values (1,11, 'one','eleven', 'eleven'),
(1,11, 'one','eleven', 'eleven'), (1,11, 'one','eleven', 'eleven'),
...@@ -44,7 +46,7 @@ select count(distinct n1), count(distinct n2) from t1; ...@@ -44,7 +46,7 @@ select count(distinct n1), count(distinct n2) from t1;
select count(distinct n2), n1 from t1 group by n1; select count(distinct n2), n1 from t1 group by n1;
drop table t1; drop table t1;
# test the converstion from tree to MyISAM # test the conversion from tree to MyISAM
create table t1 (n int default NULL); create table t1 (n int default NULL);
let $1=5000; let $1=5000;
disable_query_log; disable_query_log;
......
...@@ -25,14 +25,10 @@ drop table if exists t1,t2; ...@@ -25,14 +25,10 @@ drop table if exists t1,t2;
!$1164 create table t1 (a int not null auto_increment,primary key (a)) type=heap; !$1164 create table t1 (a int not null auto_increment,primary key (a)) type=heap;
!$1163 create table t1 (a int not null,b text) type=heap; !$1163 create table t1 (a int not null,b text) type=heap;
!$1171 create table t1 (a int ,primary key(a)) type=heap; !$1171 create table t1 (a int ,primary key(a)) type=heap;
!$1121 create table t1 (a int,b text, index(a)) type=isam;
!$1073 create table t1 (a int,b text, index(b)) type=isam;
drop table if exists t1; drop table if exists t1;
!$1075 create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) type=isam;
!$1164 create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) type=heap; !$1164 create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) type=heap;
!$1171 create table t1 (ordid int(8), primary key (ordid)); !$1171 create table t1 (ordid int(8), primary key (ordid));
!$1121 create table t1 (ordid int(8), unique (ordid)) type=isam;
-- error 1044,1 -- error 1044,1
create table not_existing_database.test (a int); create table not_existing_database.test (a int);
......
# This test doesn't work with the embedded version as this code
# assumes that one query is running while we are doing queries on
# a second connection.
# This would work if mysqltest run would be threaded and handle each
# connection in a separate thread.
#
-- source include/not_embedded.inc
connect (con1,localhost,root,,); connect (con1,localhost,root,,);
connect (con2,localhost,root,,); connect (con2,localhost,root,,);
connection con1; connection con1;
......
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
# system functions # system functions
# #
select database(),user(); select database(),user() like "%@%";
select version()>="3.23.29"; select version()>="3.23.29";
-- source include/have_isam.inc
drop table if exists t1,t2;
# #
# Test possible problem with rows that are about 65535 bytes long # Test possible problem with rows that are about 65535 bytes long
# #
...@@ -20,3 +24,47 @@ repair table t1; ...@@ -20,3 +24,47 @@ repair table t1;
check table t1; check table t1;
drop table t1; drop table t1;
#
# Test of auto_increment; The test for BDB tables is in bdb.test
#
create table t1 (a int not null auto_increment,b int, primary key (a)) type=isam;
insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4);
delete from t1 where a=4 or a=2;
insert into t1 values (NULL,4),(NULL,5),(6,6);
select * from t1;
delete from t1 where a=6;
#show table status like "t1";
replace t1 values (3,1);
replace t1 values (3,3);
ALTER TABLE t1 add c int;
insert into t1 values (NULL,6,6);
select * from t1;
drop table t1;
#
# Test of some CREATE TABLE's that should fail
#
!$1121 create table t1 (a int,b text, index(a)) type=isam;
!$1073 create table t1 (a int,b text, index(b)) type=isam;
!$1075 create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) type=isam;
!$1121 create table t1 (ordid int(8), unique (ordid)) type=isam;
drop table if exists t1;
#
# Test of some show commands
#
create table t1 (a int not null primary key, b int not null,c int not null, key(b,c));
insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4);
create table t2 type=isam select * from t1;
optimize table t1;
check table t1,t2;
repair table t1,t2;
check table t2,t1;
lock tables t1 write;
check table t2,t1;
show columns from t1;
show full columns from t1;
show index from t1;
drop table t1,t2;
# This test doesn't work with the embedded version as this code
# assumes that one query is running while we are doing queries on
# a second connection.
# This would work if mysqltest run would be threaded and handle each
# connection in a separate thread.
#
-- source include/not_embedded.inc
connect (con1, localhost, root,,); connect (con1, localhost, root,,);
connect (con2, localhost, root,,); connect (con2, localhost, root,,);
......
...@@ -53,45 +53,3 @@ lock tables t1 write; ...@@ -53,45 +53,3 @@ lock tables t1 write;
check table t2; check table t2;
unlock tables; unlock tables;
drop table t1,t2; drop table t1,t2;
#test to see if select will get the lock ahead of low priority update
connect (locker,localhost,root,,);
connect (reader,localhost,root,,);
connect (writer,localhost,root,,);
connection locker;
create table t1(n int);
insert into t1 values (1);
lock tables t1 write;
connection writer;
send update low_priority t1 set n = 4;
connection reader;
--sleep 2
send select n from t1;
connection locker;
--sleep 2
unlock tables;
connection writer;
reap;
connection reader;
reap;
drop table t1;
connection locker;
create table t1(n int);
insert into t1 values (1);
lock tables t1 read;
connection writer;
send update low_priority t1 set n = 4;
connection reader;
--sleep 2
send select n from t1;
connection locker;
--sleep 2
unlock tables;
connection writer;
reap;
connection reader;
reap;
drop table t1;
# This test doesn't work with the embedded version as this code
# assumes that one query is running while we are doing queries on
# a second connection.
# This would work if mysqltest run would be threaded and handle each
# connection in a separate thread.
#
-- source include/not_embedded.inc
#test to see if select will get the lock ahead of low priority update
connect (locker,localhost,root,,);
connect (reader,localhost,root,,);
connect (writer,localhost,root,,);
connection locker;
create table t1(n int);
insert into t1 values (1);
lock tables t1 write;
connection writer;
send update low_priority t1 set n = 4;
connection reader;
--sleep 2
send select n from t1;
connection locker;
--sleep 2
unlock tables;
connection writer;
reap;
connection reader;
reap;
drop table t1;
connection locker;
create table t1(n int);
insert into t1 values (1);
lock tables t1 read;
connection writer;
send update low_priority t1 set n = 4;
connection reader;
--sleep 2
send select n from t1;
connection locker;
--sleep 2
unlock tables;
connection writer;
reap;
connection reader;
reap;
drop table t1;
-O sort_buffer=0 --set-variable=sort_buffer=0
connect (master,localhost,root,,test,0,mysql-master.sock); connect (master,localhost,root,,test,0,master.sock);
connect (slave,localhost,root,,test,0, mysql-slave.sock); connect (slave,localhost,root,,test,0, slave.sock);
eval_result; eval_result;
connection master; connection master;
reset master; reset master;
...@@ -32,4 +32,3 @@ drop table t1; ...@@ -32,4 +32,3 @@ drop table t1;
save_master_pos; save_master_pos;
connection slave; connection slave;
sync_with_master; sync_with_master;
connect (master,localhost,root,,test,0,mysql-master.sock); connect (master,localhost,root,,test,0,master.sock);
connect (slave,localhost,root,,test,0,mysql-slave.sock); connect (slave,localhost,root,,test,0,slave.sock);
eval_result; eval_result;
system cat /dev/null > var/slave-data/master.info; system cat /dev/null > var/slave-data/master.info;
system chmod 000 var/slave-data/master.info; system chmod 000 var/slave-data/master.info;
......
connect (master,localhost,root,,test,0,mysql-master.sock); connect (master,localhost,root,,test,0,master.sock);
connect (slave,localhost,root,,test,0,mysql-slave.sock); connect (slave,localhost,root,,test,0,slave.sock);
connection master; connection master;
reset master; reset master;
grant file on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab'; grant file on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab';
......
connect (master,localhost,root,,test,0,mysql-master.sock); connect (master,localhost,root,,test,0,master.sock);
connect (slave,localhost,root,,test,0,mysql-slave.sock); connect (slave,localhost,root,,test,0,slave.sock);
server_stop master; server_stop master;
server_start master; server_start master;
connection slave; connection slave;
......
# #
# Test of some show commands # Test of some show commands
# #
drop table if exists t1,t2;
create table t1 (a int not null primary key, b int not null,c int not null, key(b,c));
insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4);
create table t2 type=isam select * from t1;
optimize table t1;
check table t1,t2;
repair table t1,t2;
check table t2,t1;
lock tables t1 write;
check table t2,t1;
show columns from t1;
show full columns from t1;
show index from t1;
drop table t1,t2;
drop table if exists t1,t2;
create table t1 (a int not null primary key, b int not null,c int not null, key(b,c)); create table t1 (a int not null primary key, b int not null,c int not null, key(b,c));
insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4); insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4);
check table t1 type=fast; check table t1 type=fast;
......
# This test doesn't work with the embedded version as this code
# assumes that one query is running while we are doing queries on
# a second connection.
# This would work if mysqltest run would be threaded and handle each
# connection in a separate thread.
#
-- source include/not_embedded.inc
connect (con1,localhost,root,,); connect (con1,localhost,root,,);
connect (con2,localhost,root,,); connect (con2,localhost,root,,);
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# Test of lock tables # Test of lock tables
# #
drop table if exists t1,t2;
create table t1 ( n int auto_increment primary key); create table t1 ( n int auto_increment primary key);
lock tables t1 write; lock tables t1 write;
insert into t1 values(NULL); insert into t1 values(NULL);
...@@ -36,12 +37,10 @@ drop table t1; ...@@ -36,12 +37,10 @@ drop table t1;
CREATE TABLE t1 (a int); CREATE TABLE t1 (a int);
CREATE TABLE t2 (a int); CREATE TABLE t2 (a int);
lock tables t1 write,t1 as b write, t2 write, t2 as c read; lock tables t1 write,t1 as b write, t2 write, t2 as c read;
drop table t1; drop table t1,t2;
drop table t2;
CREATE TABLE t1 (a int); CREATE TABLE t1 (a int);
CREATE TABLE t2 (a int); CREATE TABLE t2 (a int);
lock tables t1 write,t1 as b write, t2 write, t2 as c read; lock tables t1 write,t1 as b write, t2 write, t2 as c read;
drop table t2; drop table t2,t1;
drop table t1;
unlock tables; unlock tables;
...@@ -34,7 +34,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c\ ...@@ -34,7 +34,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c\
my_error.c errors.c my_div.c my_messnc.c \ my_error.c errors.c my_div.c my_messnc.c \
mf_format.c mf_same.c mf_dirname.c mf_fn_ext.c \ mf_format.c mf_same.c mf_dirname.c mf_fn_ext.c \
my_symlink.c my_symlink2.c \ my_symlink.c my_symlink2.c \
mf_pack.c mf_pack2.c mf_unixpath.c mf_stripp.c \ mf_pack.c mf_unixpath.c mf_stripp.c \
mf_casecnv.c mf_soundex.c mf_wcomp.c mf_wfile.c \ mf_casecnv.c mf_soundex.c mf_wcomp.c mf_wfile.c \
mf_qsort.c mf_qsort2.c mf_sort.c \ mf_qsort.c mf_qsort2.c mf_sort.c \
ptr_cmp.c mf_radix.c queues.c \ ptr_cmp.c mf_radix.c queues.c \
......
...@@ -103,7 +103,7 @@ char *get_charsets_dir(char *buf) ...@@ -103,7 +103,7 @@ char *get_charsets_dir(char *buf)
strxmov(buf, DEFAULT_CHARSET_HOME, "/", sharedir, "/", CHARSET_DIR, strxmov(buf, DEFAULT_CHARSET_HOME, "/", sharedir, "/", CHARSET_DIR,
NullS); NullS);
} }
convert_dirname(buf); convert_dirname(buf,buf,NullS);
DBUG_PRINT("info",("charsets dir='%s'", buf)); DBUG_PRINT("info",("charsets dir='%s'", buf));
DBUG_RETURN(strend(buf)); DBUG_RETURN(strend(buf));
} }
......
...@@ -231,11 +231,10 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc, ...@@ -231,11 +231,10 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
return 0; /* Ignore wrong paths */ return 0; /* Ignore wrong paths */
if (dir) if (dir)
{ {
strmov(name,dir); end=convert_dirname(name, dir, NullS);
convert_dirname(name);
if (dir[0] == FN_HOMELIB) /* Add . to filenames in home */ if (dir[0] == FN_HOMELIB) /* Add . to filenames in home */
strcat(name,"."); *end++='.';
strxmov(strend(name),config_file,ext,NullS); strxmov(end,config_file,ext,NullS);
} }
else else
{ {
...@@ -369,16 +368,18 @@ void print_defaults(const char *conf_file, const char **groups) ...@@ -369,16 +368,18 @@ void print_defaults(const char *conf_file, const char **groups)
#endif #endif
for (dirs=default_directories ; *dirs; dirs++) for (dirs=default_directories ; *dirs; dirs++)
{ {
const char *pos;
char *end;
if (**dirs) if (**dirs)
strmov(name,*dirs); pos= *dirs;
else if (defaults_extra_file) else if (defaults_extra_file)
strmov(name,defaults_extra_file); pos= defaults_extra_file;
else else
continue; continue;
convert_dirname(name); end=convert_dirname(name, pos, NullS);
if (name[0] == FN_HOMELIB) /* Add . to filenames in home */ if (name[0] == FN_HOMELIB) /* Add . to filenames in home */
strcat(name,"."); *end++='.';
strxmov(strend(name),conf_file,default_ext," ",NullS); strxmov(end,conf_file,default_ext," ",NullS);
fputs(name,stdout); fputs(name,stdout);
} }
puts(""); puts("");
......
...@@ -50,57 +50,69 @@ uint dirname_part(my_string to, const char *name) ...@@ -50,57 +50,69 @@ uint dirname_part(my_string to, const char *name)
DBUG_PRINT("enter",("'%s'",name)); DBUG_PRINT("enter",("'%s'",name));
length=dirname_length(name); length=dirname_length(name);
(void) strmake(to,(char*) name,min(length,FN_REFLEN-2)); convert_dirname(to, name, name+length);
convert_dirname(to); /* Convert chars */
DBUG_RETURN(length); DBUG_RETURN(length);
} /* dirname */ } /* dirname */
/* convert dirname to use under this system */ /*
/* If MSDOS converts '/' to '\' */ Convert directory name to use under this system
/* If VMS converts '<' to '[' and '>' to ']' */ If MSDOS converts '/' to '\'
/* Adds a '/' to end if there isn't one and the last isn't a dev_char */ If VMS converts '<' to '[' and '>' to ']'
/* ARGSUSED */ Adds a FN_LIBCHAR to end if the result string if there isn't one
and the last isn't dev_char.
Copies data from 'from' until ASCII(0) for until from == from_end
If you want to use the whole 'from' string, just send NullS as the
last argument.
If the result string is larger than FN_REFLEN -1, then it's cut.
Returns pointer to end \0
*/
#ifndef FN_DEVCHAR #ifndef FN_DEVCHAR
#define FN_DEVCHAR '\0' /* For easier code */ #define FN_DEVCHAR '\0' /* For easier code */
#endif #endif
char *convert_dirname(my_string to) char *convert_dirname(char *to, const char *from, const char *from_end)
{ {
reg1 char *pos; char *to_org=to;
#ifdef FN_UPPER_CASE
caseup_str(to); /* We use -2 here, becasue we need place for the last FN_LIBCHAR */
#endif if (!from_end || (from_end - from) > FN_REFLEN-2)
#ifdef FN_LOWER_CASE from_end=from+FN_REFLEN -2;
casedn_str(to);
#endif #if FN_LIBCHAR != '/' || defined(FN_C_BEFORE_DIR_2)
#if FN_LIBCHAR != '/'
{
pos=to-1; /* Change from '/' */
while ((pos=strchr(pos+1,'/')) != 0)
*pos=FN_LIBCHAR;
}
#endif
#ifdef FN_C_BEFORE_DIR_2
{ {
for (pos=to ; *pos ; pos++) while (*from && *from != end)
{ {
if (*pos == FN_C_BEFORE_DIR_2) if (*from == '/')
*pos=FN_C_BEFORE_DIR; *to++= FN_LIBCHAR;
if (*pos == FN_C_AFTER_DIR_2) #ifdef FN_C_BEFORE_DIR_2
*pos=FN_C_AFTER_DIR; else if (*from == FN_C_BEFORE_DIR_2)
*to++= FN_C_BEFORE_DIR;
else if (*from == FN_C_AFTER_DIR_2)
*to++= FN_C_AFTER_DIR;
#endif
else
*to++= *from++;
} }
} }
#else #else
{ /* Append FN_LIBCHAR if not there */ /* This is ok even if to == from, becasue we need to cut the string */
pos=strend(to); to= strmake(to, from, (uint) (from_end-from));
if (pos != to && (pos[-1] != FN_LIBCHAR && pos[-1] != FN_DEVCHAR)) #endif
/* Add FN_LIBCHAR to the end of directory path */
if (to != to_org && (to[-1] != FN_LIBCHAR && to[-1] != FN_DEVCHAR))
{ {
*pos++=FN_LIBCHAR; *to++=FN_LIBCHAR;
*pos=0; *to=0;
}
} }
#ifdef FN_UPPER_CASE
caseup_str(to_org);
#endif
#ifdef FN_LOWER_CASE
casedn_str(to_org);
#endif #endif
return pos; /* Pointer to end of dir */ return to; /* Pointer to end of dir */
} /* convert_dirname */ } /* convert_dirname */
...@@ -18,64 +18,68 @@ ...@@ -18,64 +18,68 @@
#include "mysys_priv.h" #include "mysys_priv.h"
#include <m_string.h> #include <m_string.h>
/* format a filename with replace of library and extension */ /*
/* params to and name may be identicall */ Formats a filename with possible replace of directory of extension
/* function doesn't change name if name != to */ Function can handle the case where 'to' == 'name'
/* Flag may be: 1 replace filenames library with 'dsk' */ For a description of the flag values, consult my_sys.h
/* 2 replace extension with 'form' */ The arguments should be in unix format.
/* 4 Unpack filename (replace ~ with home) */ */
/* 8 Pack filename as short as possibly */
/* 16 Resolve symbolic links for filename */
/* 32 Resolve filename to full path */
/* 64 Return NULL if too long path */
my_string fn_format(my_string to, const char *name, const char *dsk, my_string fn_format(my_string to, const char *name, const char *dir,
const char *form, int flag) const char *extension, uint flag)
{ {
reg1 uint length; reg1 uint length;
char dev[FN_REFLEN], buff[FN_REFLEN], *pos, *startpos; char dev[FN_REFLEN], buff[FN_REFLEN], *pos, *startpos;
const char *ext; const char *ext;
DBUG_ENTER("fn_format"); DBUG_ENTER("fn_format");
DBUG_PRINT("enter",("name: %s dsk: %s form: %s flag: %d", DBUG_PRINT("enter",("name: %s dir: %s extension: %s flag: %d",
name,dsk,form,flag)); name,dir,extension,flag));
/* Kopiera & skippa enheten */ /* Copy and skip directory */
name+=(length=dirname_part(dev,(startpos=(my_string) name))); name+=(length=dirname_part(dev,(startpos=(my_string) name)));
if (length == 0 || flag & 1) if (length == 0 || (flag & MY_REPLACE_DIR))
{ {
(void) strmake(dev,dsk, sizeof(dev) - 2);
/* Use given directory */ /* Use given directory */
convert_dirname(dev); /* Fix to this OS */ convert_dirname(dev,dir,NullS); /* Fix to this OS */
}
else if ((flag & MY_RELATIVE_PATH) && !test_if_hard_path(name))
{
/* Put 'dir' before the given path */
strmake(buff,dev,sizeof(buff)-1);
pos=convert_dirname(dev,dir,NullS);
strmake(pos,buff,sizeof(buff)-1- (int) (pos-dev));
} }
if (flag & 8)
if (flag & MY_PACK_FILENAME)
pack_dirname(dev,dev); /* Put in ./.. and ~/.. */ pack_dirname(dev,dev); /* Put in ./.. and ~/.. */
if (flag & 4) if (flag & MY_UNPACK_FILENAME)
(void) unpack_dirname(dev,dev); /* Replace ~/.. with dir */ (void) unpack_dirname(dev,dev); /* Replace ~/.. with dir */
if ((pos=(char*)strchr(name,FN_EXTCHAR)) != NullS) if ((pos= (char*) strchr(name,FN_EXTCHAR)) != NullS)
{ {
if ((flag & 2) == 0) /* Skall vi byta extension ? */ if ((flag & MY_REPLACE_EXT) == 0) /* If we should keep old ext */
{ {
length=strlength(name); /* Old extension */ length=strlength(name); /* Use old extension */
ext = ""; ext = "";
} }
else else
{ {
length=(uint) (pos-(char*) name); /* Change extension */ length=(uint) (pos-(char*) name); /* Change extension */
ext= form; ext= extension;
} }
} }
else else
{ {
length=strlength(name); /* Har ingen ext- tag nya */ length=strlength(name); /* No ext, use the now one */
ext=form; ext=extension;
} }
if (strlen(dev)+length+strlen(ext) >= FN_REFLEN || length >= FN_LEN ) if (strlen(dev)+length+strlen(ext) >= FN_REFLEN || length >= FN_LEN )
{ /* To long path, return original */ {
/* To long path, return original or NULL */
uint tmp_length; uint tmp_length;
if (flag & 64) if (flag & MY_SAFE_PATH)
return 0; return NullS;
tmp_length=strlength(startpos); tmp_length=strlength(startpos);
DBUG_PRINT("error",("dev: '%s' ext: '%s' length: %d",dev,ext,length)); DBUG_PRINT("error",("dev: '%s' ext: '%s' length: %d",dev,ext,length));
(void) strmake(to,startpos,min(tmp_length,FN_REFLEN-1)); (void) strmake(to,startpos,min(tmp_length,FN_REFLEN-1));
...@@ -96,9 +100,14 @@ my_string fn_format(my_string to, const char *name, const char *dsk, ...@@ -96,9 +100,14 @@ my_string fn_format(my_string to, const char *name, const char *dsk,
#endif #endif
(void) strmov(pos,ext); /* Don't convert extension */ (void) strmov(pos,ext); /* Don't convert extension */
} }
if (flag & 32) /*
(void) my_realpath(to, to, MYF(flag & 32 ? 0 : MY_RESOLVE_LINK)); If MY_RETURN_REAL_PATH and MY_RESOLVE_SYMLINK is given, only do
else if (flag & 16) realpath if the file is a symbolic link
*/
if (flag & MY_RETURN_REAL_PATH)
(void) my_realpath(to, to, MYF(flag & MY_RESOLVE_SYMLINKS ?
MY_RESOLVE_LINK: 0));
else if (flag & MY_RESOLVE_SYMLINKS)
{ {
strmov(buff,to); strmov(buff,to);
(void) my_readlink(to, buff, MYF(0)); (void) my_readlink(to, buff, MYF(0));
......
...@@ -459,8 +459,7 @@ my_string intern_filename(my_string to, const char *from) ...@@ -459,8 +459,7 @@ my_string intern_filename(my_string to, const char *from)
my_string pos,from_pos,to_pos,end_pos; my_string pos,from_pos,to_pos,end_pos;
char buff[FN_REFLEN]; char buff[FN_REFLEN];
(void) strmov(buff,from); convert_dirname(buff,from,NullS); /* change '<>' to '[]' */
convert_dirname(buff); /* change '<>' to '[]' */
from_pos=buff; from_pos=buff;
if ((pos=strrchr(from_pos,FN_DEVCHAR))) /* Skipp device part */ if ((pos=strrchr(from_pos,FN_DEVCHAR))) /* Skipp device part */
{ {
......
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA */
#include "mysys_priv.h"
#include <m_string.h>
/* Pack a filename for output on screen */
/* Changes long paths to .../ */
/* Removes pathname and extension */
/* If not possibly to pack returns '?' in to and returns 1*/
int pack_filename(my_string to, const char *name, size_s max_length)
/* to may be name */
{
int i;
char buff[FN_REFLEN];
if (strlen(fn_format(to,name,"","",0)) <= max_length)
return 0;
if (strlen(fn_format(to,name,"","",8)) <= max_length)
return 0;
if (strlen(fn_format(buff,name,".../","",1)) <= max_length)
{
VOID(strmov(to,buff));
return 0;
}
for (i= 0 ; i < 3 ; i++)
{
if (strlen(fn_format(buff,to,"","", i == 0 ? 2 : i == 1 ? 1 : 3 ))
<= max_length)
{
VOID(strmov(to,buff));
return 0;
}
}
to[0]='?'; to[1]=0; /* Can't pack filename */
return 1;
} /* pack_filename */
...@@ -101,8 +101,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix, ...@@ -101,8 +101,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
errno=my_errno= ENAMETOOLONG; errno=my_errno= ENAMETOOLONG;
return 1; return 1;
} }
strmov(to,dir); strmov(convert_dirname(to,dir,NullS),prefix_buff);
strmov(convert_dirname(to),prefix_buff);
org_file=mkstemp(to); org_file=mkstemp(to);
file=my_register_filename(org_file, to, FILE_BY_MKSTEMP, file=my_register_filename(org_file, to, FILE_BY_MKSTEMP,
EE_CANTCREATEFILE, MyFlags); EE_CANTCREATEFILE, MyFlags);
......
...@@ -28,6 +28,7 @@ bin_SCRIPTS = @server_scripts@ \ ...@@ -28,6 +28,7 @@ bin_SCRIPTS = @server_scripts@ \
mysql_find_rows \ mysql_find_rows \
mysqlhotcopy \ mysqlhotcopy \
mysqldumpslow \ mysqldumpslow \
mysql_explain_log \
mysqld_multi mysqld_multi
EXTRA_SCRIPTS = make_binary_distribution.sh \ EXTRA_SCRIPTS = make_binary_distribution.sh \
...@@ -43,6 +44,7 @@ EXTRA_SCRIPTS = make_binary_distribution.sh \ ...@@ -43,6 +44,7 @@ EXTRA_SCRIPTS = make_binary_distribution.sh \
mysql_find_rows.sh \ mysql_find_rows.sh \
mysqlhotcopy.sh \ mysqlhotcopy.sh \
mysqldumpslow.sh \ mysqldumpslow.sh \
mysql_explain_log.sh \
mysqld_multi.sh \ mysqld_multi.sh \
mysqld_safe.sh mysqld_safe.sh
...@@ -95,6 +97,8 @@ SUFFIXES = .sh ...@@ -95,6 +97,8 @@ SUFFIXES = .sh
-e 's!@''CXXFLAGS''@!@SAVE_CXXFLAGS@!'\ -e 's!@''CXXFLAGS''@!@SAVE_CXXFLAGS@!'\
-e 's!@''LDFLAGS''@!@SAVE_LDFLAGS@!'\ -e 's!@''LDFLAGS''@!@SAVE_LDFLAGS@!'\
-e 's!@''CLIENT_LIBS''@!@CLIENT_LIBS@!' \ -e 's!@''CLIENT_LIBS''@!@CLIENT_LIBS@!' \
-e 's!@''LIBS''@!@LIBS@!' \
-e 's!@''innodb_system_libs''@!@innodb_system_libs@!' \
-e 's!@''VERSION''@!@VERSION@!' \ -e 's!@''VERSION''@!@VERSION@!' \
-e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \ -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \
-e 's!@''COMPILATION_COMMENT''@!@COMPILATION_COMMENT@!' \ -e 's!@''COMPILATION_COMMENT''@!@COMPILATION_COMMENT@!' \
......
This diff is collapsed.
...@@ -31,6 +31,7 @@ client_libs='@CLIENT_LIBS@' ...@@ -31,6 +31,7 @@ client_libs='@CLIENT_LIBS@'
libs="$ldflags -L'$pkglibdir' -lmysqlclient $client_libs" libs="$ldflags -L'$pkglibdir' -lmysqlclient $client_libs"
cflags="-I'$pkgincludedir'" cflags="-I'$pkgincludedir'"
embedded_libs="$ldflags -L'$pkglibdir' -lmysqld @LIBS@ @innodb_system_libs@"
usage () { usage () {
cat <<EOF cat <<EOF
...@@ -41,6 +42,7 @@ Options: ...@@ -41,6 +42,7 @@ Options:
--socket [$socket] --socket [$socket]
--port [$port] --port [$port]
--version [$version] --version [$version]
--libmysqld-libs [$embedded_libs]
EOF EOF
exit 1 exit 1
} }
...@@ -54,6 +56,7 @@ while test $# -gt 0; do ...@@ -54,6 +56,7 @@ while test $# -gt 0; do
--socket) echo "$socket" ;; --socket) echo "$socket" ;;
--port) echo "$port" ;; --port) echo "$port" ;;
--version) echo "$version" ;; --version) echo "$version" ;;
--embedded-libs | --embedded | libmysqld-libs) echo "$embedded_libs" ;;
*) usage ;; *) usage ;;
esac esac
......
This diff is collapsed.
...@@ -43,7 +43,7 @@ LDADD = ../isam/libnisam.a \ ...@@ -43,7 +43,7 @@ LDADD = ../isam/libnisam.a \
mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \ mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \
@bdb_libs@ @innodb_libs@ @pstack_libs@ \ @bdb_libs@ @innodb_libs@ @pstack_libs@ \
@gemini_libs@ \ @gemini_libs@ @innodb_system_libs@ \
$(LDADD) $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ @openssl_libs@ $(LDADD) $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ @openssl_libs@
noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
item_strfunc.h item_timefunc.h item_uniq.h \ item_strfunc.h item_timefunc.h item_uniq.h \
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment