1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-05 12:42:17 +03:00

Resolve merge colflict

This commit is contained in:
venu@myvenu.com
2003-05-21 00:12:09 -07:00
132 changed files with 1238 additions and 39342 deletions

View File

@ -607,3 +607,7 @@ vio/test-ssl
vio/test-sslclient
vio/test-sslserver
vio/viotest-ssl
client_test
thread_test
select_test
insert_test

View File

@ -8,6 +8,6 @@ c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs"
extra_configs="$extra_configs --with-berkeley-db --with-innodb --with-embedded-server --with-openssl"
extra_configs="$extra_configs --with-berkeley-db --with-innodb --without-isam --with-embedded-server --with-openssl"
. "$path/FINISH.sh"

View File

@ -8,6 +8,6 @@ c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs"
extra_configs="$extra_configs --with-berkeley-db --with-innodb --with-embedded-server --with-openssl"
extra_configs="$extra_configs --with-berkeley-db --with-innodb --without-isam --with-embedded-server --with-openssl"
. "$path/FINISH.sh"

View File

@ -87,6 +87,7 @@ salle@geopard.(none)
salle@geopard.online.bg
sasha@mysql.sashanet.com
serg@build.mysql2.com
serg@serg.mylan
serg@serg.mysql.com
serg@sergbook.mysql.com
sinisa@rhols221.adsl.netsonic.fi

View File

@ -22,7 +22,6 @@ LIBS = @CLIENT_LIBS@
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la
bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \
mysqldump mysqlimport mysqltest mysqlbinlog mysqlmanagerc mysqlmanager-pwgen
noinst_PROGRAMS = insert_test select_test thread_test ssl_test
noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \
client_priv.h
mysql_SOURCES = mysql.cc readline.cc sql_string.cc completion_hash.cc
@ -34,11 +33,9 @@ mysqlcheck_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
mysqlshow_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
mysqldump_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
mysqlimport_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
insert_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
select_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
mysqltest_SOURCES= mysqltest.c
mysqltest_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
mysqlbinlog_SOURCES = mysqlbinlog.cc
mysqlbinlog_SOURCES = mysqlbinlog.cc ../mysys/mf_tempdir.c
mysqlbinlog_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
mysqlmanagerc_SOURCES = mysqlmanagerc.c
mysqlmanagerc_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
@ -53,8 +50,5 @@ link_sources:
@LN_CP_F@ $(top_srcdir)/sql/$$f $(srcdir)/$$f; \
done;
thread_test.o: thread_test.c
$(COMPILE) -c @MT_INCLUDES@ $(INCLUDES) $<
# Don't update the files from bitkeeper
%::SCCS/s.%

View File

@ -520,7 +520,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
}
case ADMIN_FLUSH_PRIVILEGES:
case ADMIN_RELOAD:
if (mysql_refresh(mysql,REFRESH_GRANT) < 0)
if (mysql_query(mysql,"flush privileges"))
{
my_printf_error(0,"reload failed; error: '%s'",MYF(ME_BELL),
mysql_error(mysql));
@ -531,7 +531,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
if (mysql_refresh(mysql,
(uint) ~(REFRESH_GRANT | REFRESH_STATUS |
REFRESH_READ_LOCK | REFRESH_SLAVE |
REFRESH_MASTER)) < 0)
REFRESH_MASTER)))
{
my_printf_error(0,"refresh failed; error: '%s'",MYF(ME_BELL),
mysql_error(mysql));
@ -539,7 +539,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
}
break;
case ADMIN_FLUSH_THREADS:
if (mysql_refresh(mysql,(uint) REFRESH_THREADS) < 0)
if (mysql_refresh(mysql,(uint) REFRESH_THREADS))
{
my_printf_error(0,"refresh failed; error: '%s'",MYF(ME_BELL),
mysql_error(mysql));
@ -726,7 +726,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
}
case ADMIN_FLUSH_HOSTS:
{
if (mysql_refresh(mysql,REFRESH_HOSTS))
if (mysql_query(mysql,"flush hosts"))
{
my_printf_error(0,"refresh failed; error: '%s'",MYF(ME_BELL),
mysql_error(mysql));
@ -736,7 +736,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
}
case ADMIN_FLUSH_TABLES:
{
if (mysql_refresh(mysql,REFRESH_TABLES))
if (mysql_query(mysql,"flush tables"))
{
my_printf_error(0,"refresh failed; error: '%s'",MYF(ME_BELL),
mysql_error(mysql));
@ -746,7 +746,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
}
case ADMIN_FLUSH_STATUS:
{
if (mysql_refresh(mysql,REFRESH_STATUS))
if (mysql_query(mysql,"flush status"))
{
my_printf_error(0,"refresh failed; error: '%s'",MYF(ME_BELL),
mysql_error(mysql));
@ -793,7 +793,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
}
case ADMIN_START_SLAVE:
if (mysql_query(mysql, "SLAVE START"))
if (mysql_query(mysql, "START SLAVE"))
{
my_printf_error(0, "Error starting slave: %s", MYF(ME_BELL),
mysql_error(mysql));
@ -803,7 +803,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
puts("Slave started");
break;
case ADMIN_STOP_SLAVE:
if (mysql_query(mysql, "SLAVE STOP"))
if (mysql_query(mysql, "STOP SLAVE"))
{
my_printf_error(0, "Error stopping slave: %s", MYF(ME_BELL),
mysql_error(mysql));

View File

@ -20,6 +20,7 @@
#include <time.h>
#include <assert.h>
#include "log_event.h"
#include "include/my_sys.h"
#define BIN_LOG_HEADER_SIZE 4
#define PROBE_HEADER_LEN (EVENT_LEN_OFFSET+4)
@ -57,7 +58,6 @@ static short binlog_flags = 0;
static MYSQL* mysql = NULL;
static const char* table = 0;
static bool use_local_load= 0;
static const char* dirname_for_local_load= 0;
static void dump_local_log_entries(const char* logname);
@ -106,7 +106,7 @@ class Load_log_processor
gptr data, uint size)
{
File file;
if ((file= my_open(fname,flags,MYF(MY_WME)) < 0) ||
if (((file= my_open(fname,flags,MYF(MY_WME))) < 0) ||
my_write(file,(byte*) data,size,MYF(MY_WME|MY_NABP)) ||
my_close(file,MYF(MY_WME)))
exit(1);
@ -149,7 +149,9 @@ public:
}
void init_by_cur_dir()
{
target_dir_name_len= 0;
if (my_getwd(target_dir_name,sizeof(target_dir_name),MYF(MY_WME)))
exit(1);
target_dir_name_len= strlen(target_dir_name);
}
void destroy()
{
@ -176,7 +178,7 @@ public:
void process(Create_file_log_event *ce)
{
const char *fname= create_file(ce);
append_to_file(fname,O_CREAT|O_BINARY,ce->block,ce->block_len);
append_to_file(fname,O_CREAT|O_EXCL|O_BINARY|O_WRONLY,ce->block,ce->block_len);
}
void process(Append_block_log_event *ae)
{
@ -184,7 +186,7 @@ public:
die("Skiped CreateFile event for file_id: %u",ae->file_id);
Create_file_log_event* ce=
*((Create_file_log_event**)file_names.buffer + ae->file_id);
append_to_file(ce->fname,O_APPEND|O_BINARY,ae->block,ae->block_len);
append_to_file(ce->fname,O_APPEND|O_BINARY|O_WRONLY,ae->block,ae->block_len);
}
};
@ -338,9 +340,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case 'V':
print_version();
exit(0);
case 'l':
use_local_load= 1;
break;
case '?':
usage();
exit(0);
@ -552,8 +551,6 @@ static void dump_local_log_entries(const char* logname)
MYF(MY_WME | MY_NABP)))
exit(1);
old_format = check_header(file);
if (use_local_load && !dirname_for_local_load)
load_processor.init_by_file_name(logname);
}
else
{
@ -575,8 +572,6 @@ static void dump_local_log_entries(const char* logname)
}
file->pos_in_file=position;
file->seek_not_done=0;
if (use_local_load && !dirname_for_local_load)
load_processor.init_by_cur_dir();
}
if (!position)
@ -632,12 +627,7 @@ Could not read entry at offset %s : Error in log format or read error",
if (!short_form)
fprintf(result_file, "# at %s\n",llstr(old_off,llbuff));
if (!use_local_load)
ev->print(result_file, short_form, last_db);
else
{
switch(ev->get_type_code())
{
switch (ev->get_type_code()) {
case CREATE_FILE_EVENT:
{
Create_file_log_event* ce= (Create_file_log_event*)ev;
@ -664,7 +654,6 @@ Could not read entry at offset %s : Error in log format or read error",
ev->print(result_file, short_form, last_db);
}
}
}
rec_count++;
if (ev)
delete ev;
@ -688,8 +677,20 @@ int main(int argc, char** argv)
if (use_remote)
mysql = safe_connect();
MY_TMPDIR tmpdir;
tmpdir.list= 0;
if (!dirname_for_local_load)
{
if (init_tmpdir(&tmpdir, 0))
exit(1);
dirname_for_local_load= my_tmpdir(&tmpdir);
}
if (dirname_for_local_load)
load_processor.init_by_dir_name(dirname_for_local_load);
else
load_processor.init_by_cur_dir();
if (table)
{
@ -707,6 +708,8 @@ int main(int argc, char** argv)
while (--argc >= 0)
dump_log_entries(*(argv++));
}
if (tmpdir.list)
free_tmpdir(&tmpdir);
if (result_file != stdout)
my_fclose(result_file, MYF(0));
if (use_remote)

View File

@ -1,107 +0,0 @@
/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "my_my_global.h"
static void spawn_stern_thread(pthread_t *t);
static int act_goofy(void);
static void *be_stern(void *);
static struct {
pthread_mutex_t lock;
pthread_cond_t cond;
int msg;
} comm = { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, 0 };
int
main(void)
{
pthread_t t;
spawn_stern_thread(&t);
while (act_goofy() != 0)
/* do nothing */;
pthread_exit(NULL);
/* notreached */
return EXIT_SUCCESS;
}
static void spawn_stern_thread(pthread_t *t)
{
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
if (pthread_create(t, &attr, be_stern, NULL) != 0)
exit(EXIT_FAILURE);
pthread_attr_destroy(&attr);
}
static int act_goofy(void)
{
int ret;
char buf[30];
fputs("Are you ready to act goofy (Y/n)? ", stdout); fflush(stdout);
fgets(buf, sizeof(buf), stdin);
pthread_mutex_lock(&comm.lock);
if (buf[0] == 'y' || buf[0] == '\n') {
fputs("** Waawlwalkwwwaa!!\n", stdout); fflush(stdout);
++comm.msg;
ret = 1;
}
else {
fputs("OK, I hate you. Let me go.\n", stdout); fflush(stdout);
comm.msg = -1;
ret = 0;
}
pthread_mutex_unlock(&comm.lock);
pthread_cond_signal(&comm.cond);
return ret;
}
static void *be_stern(void *v __attribute__((unused)))
{
int msg;
for (;;) {
pthread_mutex_lock(&comm.lock);
while (comm.msg == 0)
pthread_cond_wait(&comm.cond, &comm.lock);
msg = comm.msg;
comm.msg = 0;
pthread_mutex_unlock(&comm.lock);
if (msg < 0)
break; /* the goofy one learned a lesson! */
fputs("I HAVE TO BE STERN WITH YOU!\n", stderr);
fprintf(stderr, "I should give you %d lashes.\n", msg);
sleep(msg);
}
fputs("You are NOTHING!\n", stderr);
return NULL;
}

View File

@ -2272,7 +2272,7 @@ else
CHARSETS=`echo $extra_charsets | sed -e 's/,/ /g'`
fi
CHARSETS="$DEFAULT_CHARSET $CHARSETS"
CHARSETS="$default_charset $CHARSETS"
use_mb="no"

View File

@ -18,7 +18,7 @@ INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \
../dbug/libdbug.a ../strings/libmystrings.a
bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \
resolve_stack_dump mysql_install mysql_waitpid
resolve_stack_dump mysql_waitpid
# Don't update the files from bitkeeper
%::SCCS/s.%

View File

@ -1,258 +0,0 @@
/* 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 */
/* Install or upgrade MySQL server. By Sasha Pachev <sasha@mysql.com>
*/
#define INSTALL_VERSION "1.2"
#define DONT_USE_RAID
#include <my_global.h>
#include <m_ctype.h>
#include <my_sys.h>
#include <m_string.h>
#include <mysql_version.h>
#include <errno.h>
#include <my_getopt.h>
#define ANSWERS_CHUNCK 32
int have_gui=0;
static struct my_option my_long_options[] =
{
{"help", '?', "Display this help and exit.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
/* For now, not much exciting here, but we'll add more once
we add GUI support
*/
typedef struct
{
FILE* out;
FILE* in;
const char* question;
int default_ind;
DYNAMIC_ARRAY answers;
} QUESTION_WIDGET;
static void usage();
static void die(const char* fmt, ...);
static void print_version(void);
static char get_answer_char(int ans_ind);
static int ask_user(const char* question,int default_ind, ...);
static void add_answer(QUESTION_WIDGET* w, const char* ans);
static void display_question(QUESTION_WIDGET* w);
static int init_question_widget(QUESTION_WIDGET* w, const char* question,
int default_ind);
static void end_question_widget(QUESTION_WIDGET* w);
static int get_answer(QUESTION_WIDGET* w);
static char answer_from_char(char c);
static void invalid_answer(QUESTION_WIDGET* w);
enum {IMODE_STANDARD=0,IMODE_CUSTOM,IMODE_UPGRAGE} install_mode
= IMODE_STANDARD;
static char get_answer_char(int ans_ind)
{
return 'a' + ans_ind;
}
static void invalid_answer(QUESTION_WIDGET* w)
{
if (!have_gui)
{
fprintf(w->out, "ERROR: invalid answer, try again...\a\n");
}
}
static char answer_from_char(char c)
{
return c - 'a';
}
static void die(const char* fmt, ...)
{
va_list args;
va_start(args, fmt);
fprintf(stderr, "%s: ", my_progname);
vfprintf(stderr, fmt, args);
fprintf(stderr, "\n");
va_end(args);
exit(1);
}
static void display_question(QUESTION_WIDGET* w)
{
if (!have_gui)
{
uint i,num_answers=w->answers.elements;
DYNAMIC_ARRAY* answers = &w->answers;
fprintf(w->out,"\n%s\n\n",w->question);
for (i=0; i<num_answers; i++)
{
char* ans;
get_dynamic(answers,(gptr)&ans,i);
fprintf(w->out,"%c - %s\n",get_answer_char(i),ans);
}
fprintf(w->out,"q - Abort Install/Upgrade\n\n");
}
}
static void add_answer(QUESTION_WIDGET* w, const char* ans)
{
insert_dynamic(&w->answers,(gptr)&ans);
}
static int init_question_widget(QUESTION_WIDGET* w, const char* question,
int default_ind)
{
if (have_gui)
{
w->in = w->out = 0;
}
else
{
w->out = stdout;
w->in = stdin;
}
w->question = question;
w->default_ind = default_ind;
if (my_init_dynamic_array(&w->answers,sizeof(char*),
ANSWERS_CHUNCK,ANSWERS_CHUNCK))
die("Out of memory");
return 0;
}
static void end_question_widget(QUESTION_WIDGET* w)
{
delete_dynamic(&w->answers);
}
static int get_answer(QUESTION_WIDGET* w)
{
if (!have_gui)
{
char buf[32];
int ind;
char c;
if (!fgets(buf,sizeof(buf),w->in))
die("Failed fgets on input stream");
switch ((c=my_tolower(&my_charset_latin1,*buf)))
{
case '\n':
return w->default_ind;
case 'q':
die("Install/Upgrade aborted");
default:
ind = answer_from_char(c);
if (ind >= 0 && ind < (int)w->answers.elements)
return ind;
}
}
return -1;
}
static int ask_user(const char* question,int default_ind, ...)
{
va_list args;
char* opt;
QUESTION_WIDGET w;
int ans;
va_start(args,default_ind);
init_question_widget(&w,question,default_ind);
for (;(opt=va_arg(args,char*));)
{
add_answer(&w,opt);
}
for (;;)
{
display_question(&w);
if ((ans = get_answer(&w)) >= 0)
break;
invalid_answer(&w);
}
end_question_widget(&w);
va_end(args);
return ans;
}
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument __attribute__((unused)))
{
switch(optid) {
case 'V':
print_version();
exit(0);
case '?':
usage();
exit(0);
}
return 0;
}
static int parse_args(int argc, char **argv)
{
int ho_error;
if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option)))
exit(ho_error);
return 0;
}
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,INSTALL_VERSION,
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
}
static void usage()
{
print_version();
printf("MySQL AB, by Sasha Pachev\n");
printf("This software comes with ABSOLUTELY NO WARRANTY\n\n");
printf("Install or upgrade MySQL server.\n\n");
printf("Usage: %s [OPTIONS] \n", my_progname);
my_print_help(my_long_options);
my_print_variables(my_long_options);
}
int main(int argc, char** argv)
{
MY_INIT(argv[0]);
parse_args(argc,argv);
install_mode = ask_user("Please select install/upgrade mode",
install_mode, "Standard Install",
"Custom Install", "Upgrade",0);
printf("mode=%d\n", install_mode);
return 0;
}

View File

@ -1,38 +0,0 @@
// -----------------------------------------------------------------------------
// CorbaDS Module - Implement Kernel functionality in korbit
// -----------------------------------------------------------------------------
//
// Main source of information:
// http://www.cse.unsw.edu.au/~neilb/oss/linux-commentary/vfs.html
//
module CorbaFS {
struct dirent
{
long inode; // inode number
string name; // file name (null-terminated)
};
typedef sequence<dirent> DirEntSeq;
typedef sequence<octet> Buffer;
interface Inode {
void getStatus(out unsigned short mode, out unsigned long uid, out unsigned long gid,
out unsigned long size, out unsigned long inodeNum, out unsigned short numLinks,
out long atime, out long mtime, out long ctime);
void readpage(out Buffer buffer, in long size, in long offset);
void release();
};
interface FileSystem {
Inode getInode(in string path);
// DirectoryInode getStatus implementation must have S_IFDIR in the S_IFMT
// field of the mode value.
DirEntSeq readdir(in string path);
// SymlinkInode getStatus implementation must have S_IFLNK in the S_IFMT
// field of the mode value.
string readlink(in string filename);
};
};

View File

@ -1,90 +0,0 @@
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#called from the top level Makefile
CFLAGS = $(ORBIT_CFLAGS) -g
LFLAGS = $(ORBIT_LIBS)
orbit_idl = @orbit_idl@
orbit_includes = @orbit_includes@
orbit_libs = @orbit_libs@
DISTCLEANFILES = CorbaFS-common.* CorbaFS-stubs.* CorbaFS-skels.* CorbaFS.h
MYSQLDATAdir = $(localstatedir)
MYSQLSHAREdir = $(pkgdatadir)
MYSQLBASEdir= $(prefix)
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include \
-I$(top_srcdir)/regex $(orbit_includes)
WRAPLIBS= @WRAPLIBS@
libexec_PROGRAMS = mysqlcorbafsd
noinst_PROGRAMS =mysqlfs_test
LDADD = ../libmysql/libmysqlclient.la $(orbit_libs)
mysqlcorbafsd_LDADD = $(LDADD) $(CXXLDFLAGS)
noinst_HEADERS =
mysqlfs_test_SOURCES = mysqlcorbafs_test.c CorbaFS-common.c CorbaFS-stubs.c libmysqlfs.c
mysqlcorbafsd_SOURCES = mysqlcorbafs.c CorbaFS-skels.c database.c CorbaFS-common.c libmysqlfs.c
DEFS = -DMYSQL_SERVER \
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
-DDATADIR="\"$(MYSQLDATAdir)\"" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
@DEFS@
# Don't put lex_hash.h in BUILT_SOURCES as this will give infinite recursion
BUILT_SOURCES = CorbaFS-common.c CorbaFS-stubs.c CorbaFS-skels.c CorbaFS.h
EXTRA_DIST = $(BUILT_SOURCES)
#YFLAGS = -d
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 \
xtypes.h ac-types.h posix.h string.h __string.h \
errno.h socket.h inet.h dirent.h netdb.h \
cleanup.h cond.h debug_out.h fd.h kernel.h mutex.h \
prio_queue.h pthread_attr.h pthread_once.h queue.h\
sleep.h specific.h version.h pwd.h timers.h uio.h \
cdefs.h machdep.h signal.h __signal.h util.h lex.h \
wait.h
link_sources:
rm -f mini_client_errors.c
@LN_CP_F@ ../libmysql/errmsg.c mini_client_errors.c
# Don't update the files from bitkeeper
%::SCCS/s.%
idltargets : CorbaFS.idl
$(ORBIT_IDL) CorbaFS.idl
$(orbit_idl) CorbaFS.idl
# individual rules
CorbaFS-stubs.c : CorbaFS.idl
$(orbit_idl) CorbaFS.idl
CorbaFS-common.c : CorbaFS.idl
$(orbit_idl) CorbaFS.idl
CorbaFS-skels.c : CorbaFS.idl
$(orbit_idl) CorbaFS.idl
#CorbaFS-client.c : CorbaFS.h
#CorbaFS-server.c : CorbaFS.h
CorbaFS.h : CorbaFS.idl
$(orbit_idl) CorbaFS.idl

View File

@ -1,58 +0,0 @@
MySQL Filesystem
T<EFBFBD>nu Samuel - tonu@mysql.com
Some additional information is available on http://no.spam.ee/~tonu/mysqlfs.html
WARNING: Experimental code and known to crash computer.
Instructions, how to get this stuff working:
1. Make sure you have ORBit, includeing development libraries installed. They should be version 0.5.3 or later.
- I am lazy man and use default ones included with my RedHat:
[root@localhost /root]# rpm -qa | grep ORBit
ORBit-0.5.3-2
ORBit-devel-0.5.3-2
[root@localhost /root]#
2. Prepare kernel to include korbit:
- Get Linux 2.4.1 kernel source. (very possibly this patch works on 2.4.0 without modifications too)
- unpack it
- apply patch named "korbit-kernel-2.4.1-patch" on it.
- make menuconfig
- In section "Networking options":
...
[*] Kernel ORB (EXPERIMENTAL)
...
<M> CORBA User-space FileSystem (EXPERIMENTAL)
...
- make dep ; make bzlilo ; make modules ; make modules_install
- reboot
- Execute: insmod /lib/modules/$(uname -r)/kernel/net/korbit/modules/CorbaFS/client/corba-corbafs-client.o
You should see "gethostname() = localhost". Look at known bug 3 in the end of this doc.
3. Make sure MySQL server is working on your system
- On my RedHat 7.0 I execute "/etc/init.d/mysqld start"
4. Prepare MySQL FS daemon
- Get MySQL 4.0 from repository OR get MySQL FS source from http://no.spam.ee/~tonu/mysqlfs.html
- unpack it. In MySQL 4.0 source this is located in directory named "fs". cd into it.
- make
- Execute command "./RunServer"
5. mount MySQL server to disk tree
- Execute command "mkdir /mnt/mysql"
- Execute command "mount -t corbafs -o `cat /tmp/mysqlcorbafs.ior` none /mnt/mysql/"
- Check you SQL server content by executing "ls -la /mnt/mysql/"
Known bugs:
1. User bugs. fix user ;)
2. MySQL FS daemon will crash or will be stopped when cobrafs is mounted, then there is no way
to unmount disks anymore. This is korbit business to handle such cases and I had no time to dig
into korbit code.
3. host name returned by gethostname() should be "localhost" or korbit will crash. Also "localhost"
must be first string after 127.0.0.1 in /etc/hosts

View File

@ -1,2 +0,0 @@
.libs/mysqlcorbafsd -ORBIIOPUSock=0 -ORBIIOPIPv4=1 --debug='d:t:o,~/mysqlfsd.trace' $*
#.libs/mysqlcorbafsd -ORBIIOPUSock=0 -ORBIIOPIPv4=1 $*

View File

@ -1,628 +0,0 @@
/* Copyright (C) 2000 db AB & db Finland AB & TCX DataKonsult AB
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
* Database functions
*
* Using these functions we emulate filesystem behaviour on top of SQL
* database.
* Written by T<>nu Samuel <tonu@please.do.not.remove.this.spam.ee>
*
* FIXME:
* - Direct handling of database handlers without SQL parsing overhead
* - connection pool
* - configurable function name/file name mappings
*/
#include "libmysqlfs.h"
#include "mysqlcorbafs.h"
#include <unistd.h>
#include <string.h>
#include <my_sys.h>
DYNAMIC_ARRAY field_array;
/*
* ** dbConnect -- connects to the host and selects DB.
* ** Also checks whether the tablename is a valid table name.
* */
int db_connect(char *host, char *user,char *passwd)
{
DBUG_ENTER("db_connect");
DBUG_PRINT("enter",("host: '%s', user: '%s', passwd: '%s'", host, user, passwd));
if (verbose)
{
fprintf(stderr, "# Connecting to %s...\n", host ? host : "localhost");
}
mysql_init(&connection);
if (opt_compress)
mysql_options(&connection,MYSQL_OPT_COMPRESS,NullS);
#ifdef HAVE_OPENSSL
if (opt_use_ssl)
mysql_ssl_set(&connection, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
opt_ssl_capath);
#endif
if (!(sock= mysql_real_connect(&connection,host,user,passwd,
NULL,opt_mysql_port,opt_mysql_unix_port,0)))
{
DBerror(&connection, "when trying to connect");
DBUG_RETURN(1);
}
DBUG_RETURN(0);
} /* dbConnect */
/*
* ** dbDisconnect -- disconnects from the host.
* */
void db_disconnect(char *host)
{
DBUG_ENTER("db_disconnect");
DBUG_PRINT("enter",("host: '%s'", host));
if (verbose)
fprintf(stderr, "# Disconnecting from %s...\n", host ? host : "localhost");
mysql_close(sock);
DBUG_VOID_RETURN;
} /* dbDisconnect */
#define OUTPUT(x) strcpy(buffptr,x); buffptr+=strlen(x);
#define OUTPUT_TOP(x) strcpy(topptr,x); topptr+=strlen(x);
#define OUTPUT_MIDDLE(x) strcpy(midptr,x); midptr+=strlen(x);
#define OUTPUT_BOTTOM(x) strcpy(botptr,x); botptr+=strlen(x);
#define OUTPUT_HEADER(x) strcpy(hdrptr,x); hdrptr+=strlen(x);
void db_show_result(MYSQL* sock, char *b, struct format *f)
{
MYSQL_ROW row;
MYSQL_RES *result;
MYSQL_FIELD *field;
char *buffptr;
char topseparator[BUFLEN]="";
char middleseparator[BUFLEN]="";
char bottomseparator[BUFLEN]="";
char header[BUFLEN]="";
char *topptr=topseparator;
char *midptr=middleseparator;
char *botptr=bottomseparator;
char *hdrptr=header;
uint i,count, length;
DBUG_ENTER("db_show_result");
DBUG_PRINT("enter",("b: '%s', f '%x'", b, f));
result=mysql_store_result(sock);
buffptr=b;
OUTPUT(f->tablestart)
OUTPUT_TOP(f->leftuppercorner);
OUTPUT_MIDDLE(f->leftcross);
OUTPUT_BOTTOM(f->leftdowncorner);
OUTPUT_HEADER(f->headerrowstart);
count=mysql_num_fields(result);
// while ((field = mysql_fetch_field(result)))
for(i=0 ; i < count ; ++i)
{
field = mysql_fetch_field(result);
length=(uint) strlen(field->name);
OUTPUT_HEADER(f->headercellstart);
length=max(length,field->max_length);
if (length < 4 && !IS_NOT_NULL(field->flags))
length=4; // Room for "NULL"
field->max_length=length;
memset(topptr,'=',field->max_length);
memset(midptr,'-',field->max_length);
memset(botptr,'=',field->max_length);
sprintf(hdrptr,"%-*s",field->max_length,field->name);
//num_flag[off]= IS_NUM(field->type);
topptr+=field->max_length;
midptr+=field->max_length;
botptr+=field->max_length;
hdrptr+=field->max_length;
if(i<count-1) {
OUTPUT_TOP(f->topcross);
OUTPUT_MIDDLE(f->middlecross);
OUTPUT_BOTTOM(f->bottomcross);
OUTPUT_HEADER(f->headercellseparator);
}
}
OUTPUT_TOP(f->rightuppercorner);
OUTPUT_MIDDLE(f->rightcross);
OUTPUT_BOTTOM(f->rightdowncorner);
OUTPUT_HEADER(f->headercellend);
OUTPUT_HEADER(f->headerrowend);
OUTPUT(topseparator);
OUTPUT(header);
OUTPUT(middleseparator);
while(row=mysql_fetch_row(result)) {
mysql_field_seek(result,0);
OUTPUT(f->contentrowstart);
for(i=0 ; i < mysql_field_count(sock); ++i) {
field = mysql_fetch_field(result);
OUTPUT(f->contentcellstart);
sprintf(buffptr,"%-*s",field->max_length,row[i]);
buffptr+=field->max_length;
if(i==mysql_field_count(sock))
{
OUTPUT(f->contentcellend);
} else {
OUTPUT(f->contentcellseparator);
}
}
OUTPUT(f->contentrowend);
}
OUTPUT(bottomseparator);
OUTPUT(f->tableend);
mysql_free_result(result);
DBUG_VOID_RETURN;
}
int db_function(char *b,const char *server, const char *database,const char *table,const char *field, const char *value, const char* path, struct func_st *function)
{
char buff[BUFLEN];
int i;
DBUG_ENTER("db_function");
DBUG_PRINT("enter",("buffer: '%s', database: '%s', table: '%s', field: '%s', path: '%s'", b, database, table, field,path));
if(*database) {
if (mysql_select_db(sock,database))
{
printf("error when changing database to'%s'\n",database);
DBUG_RETURN(-1);
}
}
sprintf(buff,"%s",function->function);
search_and_replace("$database",database,buff);
search_and_replace("$table",table,buff);
search_and_replace("$field",field,buff);
search_and_replace("$value",value,buff);
DBUG_PRINT("info",("path: '%s'",path));
DBUG_PRINT("info",("sum: '%d'",(database[0] ? strlen(database)+1 : 0) +(table[0] ? strlen(table)+1 : 0) +(field[0] ? strlen(field)+1 : 0) +(value[0] ? strlen(value)+1 : 0) +1));
search_and_replace("$*",path+
(server[0] ? strlen(server)+1 : 0) +
(database[0] ? strlen(database)+1 : 0) +
(table[0] ? strlen(table)+1 : 0) +
(field[0] ? strlen(field)+1 : 0) +
(value[0] ? strlen(value)+1 : 0) +
function->length +
1,buff);
DBUG_PRINT("info",("Executing constructed function query: '%s'", buff));
if (mysql_query(sock, buff))
{
printf("error when executing '%s'\n",buff);
sprintf(b,"ERROR %d: %s",mysql_error(sock),mysql_error(sock));
DBUG_VOID_RETURN;
}
db_show_result(sock, b, &Human);
DBUG_PRINT("info",("Returning: %s", b));
DBUG_RETURN(1);
}
int db_show_field(char *b,const char *database,const char *table, const char *field,const char *value, const char *param)
{
MYSQL_RES *result;
MYSQL_ROW row;
char buff[BUFLEN];
int i=0;
my_string *ptr;
DBUG_ENTER("db_show_field");
DBUG_PRINT("enter",("buffer: '%s', database: '%s', table: '%s', field: '%s' value: '%s'", b, database, table, field, value));
/* We cant output fields when one of these variables is missing */
if (!(database[0] && table[0] && field[0]))
DBUG_RETURN(-1);
my_init_dynamic_array(&field_array, sizeof(buff), 4096, 1024);
if (mysql_select_db(sock,database))
{
printf("error when changing database to'%s'\n",database);
delete_dynamic(&field_array);
DBUG_RETURN(-1);
}
if(param) {
sprintf(buff,"%s",param);
} else {
sprintf(buff,"select %s from %s where %s='%s' LIMIT 1",field,table,field,value);
}
if (mysql_query(sock, buff))
{
printf("error when executing '%s'\n",buff);
delete_dynamic(&field_array);
DBUG_RETURN(-1);
}
db_show_result(sock,b,&Human);
/* if(result=mysql_use_result(sock)) {
while(row=mysql_fetch_row(result))
{
strcpy(&b[i][BUFLEN],row[0]);
DBUG_PRINT("info",("field %s at %x", &b[i*BUFLEN],&b[i*BUFLEN]));
// ptr = (*dynamic_element(&field_array,i,row[0]));
i++;
}
}
// fix_filenames((char *)b);
mysql_free_result(result);
*/
delete_dynamic(&field_array);
DBUG_RETURN(i);
}
int db_show_fields(char *b,const char *database,const char *table)
{
MYSQL_RES *result;
MYSQL_ROW row;
MYSQL_FIELD *field;
char buff[BUFLEN];
int i=0;
DBUG_ENTER("show_fields");
DBUG_PRINT("enter",("buffer: '%s', database: '%s', table: '%s'", b, database, table));
if (mysql_select_db(sock,database))
{
printf("error when changing database to'%s'\n",database);
DBUG_RETURN(-1);
}
if(result=mysql_list_fields(sock,buff,NULL)) {
while(row=mysql_fetch_row(result))
{
strcpy(&b[i*BUFLEN],row[0]);
DBUG_PRINT("info",("field %s at %x", &b[i*BUFLEN],&b[i*BUFLEN]));
i++;
}
}
mysql_free_result(result);
DBUG_RETURN(i);
}
int db_show_primary_keys(char *b,const char *database, const char *table)
{
MYSQL_RES *result;
MYSQL_ROW row;
char buff[BUFLEN];
char buff2[BUFLEN];
unsigned int i;
DBUG_ENTER("db_show_primary_keys");
DBUG_PRINT("enter",("buffer: '%s', database: '%s', table: '%s'", b, database, table));
if (mysql_select_db(sock,database))
{
printf("error when changing database to '%s'\n",database);
DBUG_RETURN(-1);
}
sprintf(buff,"show keys from %s",table);
if (mysql_query(sock, buff))
{
printf("error when executing '%s'\n",buff);
DBUG_RETURN(0);
}
buff2[0]='\0';
if(result=mysql_use_result(sock)) {
while(row=mysql_fetch_row(result)) {
if(!strcasecmp(row[2],"PRIMARY")) {
strcat(buff2,row[4]);
strcat(buff2,",\"_\",");
}
}
buff2[strlen(buff2)-5]='\0';
if(!buff2[0])
DBUG_RETURN(-1); // No PRIMARY keys in table
DBUG_PRINT("info",("Keys: %s<- \n", buff2));
} else
DBUG_RETURN(-1); // No keys in table
sprintf(buff,"SELECT CONCAT(%s) AS X FROM %s LIMIT 256",buff2,table);
if (mysql_query(sock, buff))
{
printf("error when executing '%s'\n",buff);
DBUG_RETURN(0);
}
i=0;
if(result=mysql_use_result(sock)) {
while(row=mysql_fetch_row(result))
{
strcpy(&b[i*BUFLEN],row[0]);
fix_filenames(&b[i*BUFLEN]);
DBUG_PRINT("info",("primarykey %s at %x, %i", &b[i*BUFLEN],&b[i*BUFLEN],i));
if(i++ >= MAXDIRS)
break;
}
}
mysql_free_result(result);
DBUG_RETURN(i);
}
int db_show_keys(char *b,const char *database, const char *table)
{
MYSQL_RES *result;
MYSQL_ROW row;
char buff[BUFLEN];
int i=0;
DBUG_ENTER("show_keys");
DBUG_PRINT("enter",("buffer: '%s', database: '%s', table: '%s'", b, database, table));
if (mysql_select_db(sock,database))
{
printf("error when changing database to'%s'\n",database);
DBUG_RETURN(-1);
}
sprintf(buff,"show keys from %s",table);
if (mysql_query(sock, buff))
{
printf("error when executing '%s'\n",buff);
DBUG_RETURN(0);
}
if(result=mysql_use_result(sock)) {
while(row=mysql_fetch_row(result))
{
strcpy(&b[i*BUFLEN],row[0]);
DBUG_PRINT("info",("Key %s at %x", &b[i*BUFLEN],&b[i*BUFLEN]));
i++;
}
}
mysql_free_result(result);
DBUG_RETURN(i);
}
int db_show_tables(char *b,const char *database)
{
MYSQL_RES *result;
MYSQL_ROW row;
char buff[BUFLEN];
int i=0;
DBUG_ENTER("db_show_tables");
DBUG_PRINT("enter",("buffer: '%s', database: '%s'", b, database));
if (mysql_select_db(sock,database))
{
printf("error when changing database to '%s'\n",database);
DBUG_RETURN(-1);
}
if(result=mysql_list_tables(sock,NULL)) {
while(row=mysql_fetch_row(result))
{
strcpy(&b[i*BUFLEN],row[0]);
DBUG_PRINT("info",("table %s at %x", &b[i*BUFLEN],&b[i*BUFLEN]));
i++;
}
}
mysql_free_result(result);
DBUG_RETURN(i);
}
/*
* Finds all servers we are connected to
* and stores them in array supplied.
* returns count of servers
*/
int
db_show_servers(char *b,int size)
{
char* bufptr;
char* buff[BUFLEN*2];
DBUG_ENTER("db_show_servers");
DBUG_PRINT("enter",("buffer: '%s', size: '%d'", b, size));
bufptr=mysql_get_host_info(sock);
// FIXME: Actually we need to escape prohibited symbols in filenames
fix_filenames(bufptr);
strcpy(b,bufptr);
DBUG_RETURN(1);
}
/*
* Finds all databases in server
* and stores them in array supplied.
* returns count of databases
*/
int
db_show_databases(char *b,int size)
{
MYSQL_RES *result;
MYSQL_ROW row;
char buff[BUFLEN];
int i=0;
DBUG_ENTER("db_show_databases");
DBUG_PRINT("enter",("buffer: '%s', size: '%d'", b, size));
result=mysql_list_dbs(sock,NULL);
while(row=mysql_fetch_row(result))
{
strcpy(&b[i*BUFLEN],row[0]);
DBUG_PRINT("info",("database %s at %x", &b[i*BUFLEN],&b[i*BUFLEN]));
i++;
}
mysql_free_result(result);
DBUG_RETURN(i);
}
void db_load_formats()
{
/* In future we should read these variables
* from configuration file/database here */
/* HTML output */
HTML.tablestart="<table>\n";
HTML.headerrowstart="<tr>";
HTML.headercellstart="<th>";
HTML.headercellseparator="</th><th>";
HTML.headercellend="</th>";
HTML.headerrowend="</tr>\n";
HTML.headerformat=0;
HTML.leftuppercorner="";
HTML.rightuppercorner="";
HTML.leftdowncorner="";
HTML.rightdowncorner="";
HTML.topcross="";
HTML.middlecross="";
HTML.bottomcross="";
HTML.leftcross="";
HTML.rightcross="";
HTML.bottomcross="";
HTML.contentrowstart="<tr>";
HTML.contentcellstart="<td>";
HTML.contentcellseparator="</td><td>";
HTML.contentcellend="</td>";
HTML.contentrowend="</tr>\n";
HTML.headerformat=0;
HTML.footerrowstart="";
HTML.footercellstart="";
HTML.footercellseparator="";
HTML.footercellend="";
HTML.footerrowend="\n";
HTML.footerformat=0;
HTML.tableend="</table>\n";
/* Nice to look mysql client like output */
Human.tablestart="\n";
Human.headerrowstart="| ";
Human.headercellstart="";
Human.headercellseparator=" | ";
Human.headercellend=" |";
Human.headerrowend="\n";
Human.headerformat=1;
Human.leftuppercorner="/=";
Human.rightuppercorner="=\\\n";
Human.leftdowncorner="\\=";
Human.rightdowncorner="=/\n";
Human.leftcross="+-";
Human.rightcross="-+\n";
Human.topcross="=T=";
Human.middlecross="-+-";
Human.bottomcross="=`=";
Human.contentrowstart="| ";
Human.contentcellstart="";
Human.contentcellseparator=" | ";
Human.contentcellend=" |";
Human.contentrowend="\n";
Human.contentformat=1;
Human.footerrowstart="";
Human.footercellstart="";
Human.footercellseparator="";
Human.footercellend="";
Human.footerrowend="\n";
Human.footerformat=1;
Human.tableend="\n";
/* Comma-separated format. For machine reading */
/* XML */
/*
tee_fprintf(PAGER,"<?xml version=\"1.0\"?>\n\n<resultset statement=\"%s\">", statement);
(void) tee_fputs("\n <row>\n", PAGER);
data=(char*) my_malloc(lengths[i]*5+1, MYF(MY_WME));
tee_fprintf(PAGER, "\t<%s>", (fields[i].name ?
(fields[i].name[0] ? fields[i].name :
" &nbsp; ") : "NULL"));
xmlencode(data, cur[i]);
tee_fprintf(PAGER, "</%s>\n", (fields[i].name ?
(fields[i].name[0] ? fields[i].name :
" &nbsp; ") : "NULL"));
</row>\n" </resultset>\n*/
}
gptr db_load_functions()
{
char *functions[]={
"database",".tables","SHOW TABLES","0",
"table",".status","SHOW TABLE STATUS FROM $table","0",
"table",".count","SELECT COUNT(*) FROM $table","0",
"table",".table","SELECT * FROM $table","0",
"table",".check","CHECK TABLE $table","0",
"table",".repair","REPAIR TABLE $table","0",
"key",".min","SELECT MIN($key) FROM $table","0",
"key",".max","SELECT MAX($key) FROM $table","0",
"key",".avg","SELECT AVG($key) FROM $table","0",
"server",".uptime","SHOW STATUS like 'Uptime'","0",
"server",".version","SELECT VERSION()","0",
"server",".execute","$*","1",
"root",".connect","CONNECT $*","0",
NULL,NULL,NULL,NULL
};
char buff[BUFLEN];
int i=0;
struct func_st func;
DBUG_ENTER("db_load_functions");
my_init_dynamic_array(&functions_array, sizeof(struct func_st), 4096, 1024);
while(functions[i]) {
strcpy(func.type_s, functions[i]); /* Type in string: "table"` */
strcpy(func.filename, functions[i+1]); /* Name like it appears on FS: "count" */
strcpy(func.function, functions[i+2]); /* Query: "SELECT COUNT(*) FROM `%table`" */
func.continuous= atoi(functions[i+3]); /* Query: "If command can be continued" */
if(!strcasecmp(func.type_s,"server"))
func.type=SERVER_FUNCTION;
else if(!strcasecmp(func.type_s,"table"))
func.type=TABLE_FUNCTION;
else if(!strcasecmp(func.type_s,"key"))
func.type=KEY_FUNCTION;
else if(!strcasecmp(func.type_s,"database"))
func.type=DATABASE_FUNCTION;
else if(!strcasecmp(func.type_s,"field"))
func.type=FIELD_FUNCTION;
else if(!strcasecmp(func.type_s,"root"))
func.type=ROOT_FUNCTION;
else func.type=NONE_FUNCTION;
func.length=strlen(func.filename); /* Filename length */
DBUG_PRINT("info",("func.type_s: %s",func.type_s));
DBUG_PRINT("info",("func.filename: %s",func.filename));
DBUG_PRINT("info",("func.function: %s",func.function));
DBUG_PRINT("info",("func.type: %d",func.type));
DBUG_PRINT("info",("func.continuous: %d",func.continuous));
DBUG_PRINT("info",("i: %d",i));
insert_dynamic(&functions_array,(gptr)&func);
i+=4;
}
DBUG_RETURN((gptr)&functions_array);
}

View File

@ -1,28 +0,0 @@
# MySQL dump 8.12
#
# Host: localhost Database: mysqlfs
#--------------------------------------------------------
# Server version 3.23.33
#
# Table structure for table 'functions'
#
CREATE TABLE functions (
type enum('server','database','table','field','key') NOT NULL default 'server',
name char(20) NOT NULL default '',
sql char(128) NOT NULL default '',
PRIMARY KEY (type,name)
) TYPE=MyISAM;
#
# Dumping data for table 'functions'
#
INSERT INTO functions VALUES ('server','uptime','SHOW STATUS like \'Uptime\'');
INSERT INTO functions VALUES ('server','version','SELECT VERSION()');
INSERT INTO functions VALUES ('table','count','SELECT COUNT(*) FROM `%table`');
INSERT INTO functions VALUES ('key','min','SELECT MIN(%key) FROM `%table`');
INSERT INTO functions VALUES ('key','max','SELECT MAX(%key) FROM `%table`');
INSERT INTO functions VALUES ('key','avg','SELECT AVG(%key) FROM `%table`');

File diff suppressed because it is too large Load Diff

View File

@ -1,151 +0,0 @@
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "libmysqlfs.h"
int search_and_replace(char *search, char* replace, char* string)
{
char buff[1024];
int found=0;
char *ptr1;
const char *ptr2=buff;
char *strptr=string;
DBUG_ENTER("search_and_replace");
DBUG_PRINT("enter",("search: '%s' replace:'%s' string:'%s'",search,replace,string));
strcpy(buff,string);
while(ptr1=strstr(ptr2,search))
{
strncpy(strptr,ptr2,ptr1-buff);
strptr+=ptr1-buff;
ptr2+=ptr1-buff+strlen(search);
strcpy(strptr,replace);
strptr+=strlen(replace);
found++;
}
DBUG_RETURN(found);
}
int show_functions(char *b, function_type type)
{
int i=0,j=0;
struct func_st func;
DBUG_ENTER("show_functions");
get_dynamic(&functions_array,(gptr)&func,i);
while(func.length) {
if (func.type == type)
strcpy(&b[j++*BUFLEN],func.filename);
get_dynamic(&functions_array,(gptr)&func,++i);
}
DBUG_RETURN(j);
}
struct func_st * check_if_function(char *name, function_type type)
{
int pathlen;
int j,i=0, len;
static struct func_st function;
char buffer[BUFLEN];
DBUG_ENTER("check_if_function");
DBUG_PRINT("enter",("name: '%s' type: '%d'", name, type));
pathlen=strlen(name);
/* We try to compare last element in path to function names */
get_dynamic(&functions_array,(gptr)&function,i);
while(function.length) {
function.continuous ?
(j=!strncasecmp(function.filename, name, function.length))
: (j=!strcasecmp(function.filename,name));
if(j) { /* This happens when function was matched */
DBUG_PRINT("info",("Function %s detected!",function.filename));
break;
}
get_dynamic(&functions_array,(gptr)&function,++i);
}
/* Copy path to buffer and trip function name (if found) from it */
if(function.length != 0)
{
DBUG_RETURN(&function);
} else {
DBUG_RETURN(0);
}
}
/*
* parse - splits "path" into different variables
* in way "/server/database/table/(field|key)/(value|function)". If path is shorter,
* then other fields will be NULL. If path is longer than four levels or
* shorter than one level, FS_NOTEXIST is returned.
*/
int parse(const char * path, char *server, char * database, char *table,
char* field, char* value, struct func_st **funce)
{
char buffer[BUFLEN];
char *p=buffer;
char *x;
int len;
DBUG_ENTER("parse");
DBUG_PRINT("enter",("path: '%s'", path));
*server=*database=*table=*field=*value='\0';
/* Search for first slash and drop it */
strcpy(buffer,path);
x=strtok_r(p,"/",&p);
if(x)
{
strcpy(server,x); /* First argument is server name */
if(*p)
strcpy(database,strtok_r(p,"/",&p)); /* Second is database */
if(p && *p)
strcpy(table ,strtok_r(p,"/",&p)); /* Third is table name */
if(p && *p)
strcpy(field ,strtok_r(p,"/",&p)); /* Fourth is field or key name */
if(p && *p)
strcpy(value ,strtok_r(p,"/",&p)); /* Fifth is field/key value or function */
}
/* We have to find if last argument is function,
* In which case we clear it
*/
if(*value) {
*funce=check_if_function(value,VALUE_FUNCTION);
if(*funce) *value='\0';
} else if (*field) {
*funce=check_if_function(field,FIELD_FUNCTION);
if(*funce) *field='\0';
} else if (*table) {
*funce=check_if_function(table,TABLE_FUNCTION);
if(*funce) *table='\0';
} else if (*database) {
*funce=check_if_function(database,DATABASE_FUNCTION);
if(*funce) *database='\0';
} else if (*server) {
*funce=check_if_function(server,SERVER_FUNCTION);
if(*funce) *server='\0';
} else
*funce=NULL;
DBUG_PRINT("info",("path: '%s', server: '%s', db: '%s', table: '%s', field: '%s', value: '%s', function: '%x'",
buffer, server, database, table, field, value, funce ));
if(p && *p) /* Something is in buffer - too deep in levels */
DBUG_RETURN(-1)
else
DBUG_RETURN(0)
}

View File

@ -1,81 +0,0 @@
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "CorbaFS.h"
#include <my_global.h>
#include <my_sys.h>
#include <m_string.h>
#include <m_ctype.h>
#include "mysql.h"
#define BUFLEN 1024
#define MAXDIRS 1024
typedef enum {
FUNC_NONE,
FUNC_SERVER_UPTIME,
FUNC_SERVER_THREADS,
FUNC_SERVER_VERSION,
FUNC_DATABASE_CREATED,
FUNC_TABLE_COUNT,
FUNC_TABLE_CREATED,
FUNC_FIELD_LENGTH,
FUNC_KEY_AVG,
FUNC_KEY_SUM,
FUNC_KEY_MAX,
FUNC_KEY_MIN
} func_enum;
typedef enum {
NONE_FUNCTION,
ROOT_FUNCTION,
SERVER_FUNCTION,
DATABASE_FUNCTION,
TABLE_FUNCTION,
KEY_FUNCTION,
FIELD_FUNCTION,
VALUE_FUNCTION
} function_type;
struct func_st {
char type_s[20];
char filename[20];
char function[80];
function_type type;
int length;
my_bool continuous;
} ;
int parse(const char* path,
char* root,
char* database,
char* table,
char* key,
char* field,
struct func_st **func
);
gptr db_load_functions();
int db_function(char *b,const char *server, const char *database,const char *table,const char *field,
const char *value, const char *path, struct func_st *function);
int fix_filenames(char *buf);
DYNAMIC_ARRAY functions_array;

View File

@ -1,5 +0,0 @@
[mysqlcorbafs]
socket=/var/lib/mysql/mysql.sock
host=127.0.0.1
user=root
#password=xxxxxx

View File

@ -1,998 +0,0 @@
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
*
* fsck.mysql
*/
#include "libmysqlfs.h"
#include "mysqlcorbafs.h"
#include <my_getopt.h>
#define MAXPATHLEN 256
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <dirent.h>
#include <my_sys.h>
static long inodeNum;
extern DYNAMIC_ARRAY functions_array;
enum options {OPT_FTB=256, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC, OPT_KEYWORDS,
OPT_LOCKS, OPT_DROP, OPT_OPTIMIZE, OPT_DELAYED, OPT_TABLES,
OPT_CHARSETS_DIR, OPT_DEFAULT_CHARSET};
CHANGEABLE_VAR changeable_vars[] = {
{ "max_allowed_packet", (long*) &max_allowed_packet,24*1024*1024,4096,
24*1024L*1024L,MALLOC_OVERHEAD,1024},
{ "net_buffer_length", (long*) &net_buffer_length,1024*1024L-1025,4096,
24*1024L*1024L,MALLOC_OVERHEAD,1024},
{ 0, 0, 0, 0, 0, 0, 0}
};
CORBA_ORB orb;
PortableServer_POA poa;
CORBA_Environment *ev;
PortableServer_ObjectId *objid;
static my_bool verbose=0,opt_compress=0,extended_insert=0, lock_tables=0,
opt_quoted=0, opt_lock=0, opt_delayed=0, ignore_errors=0;
gptr fptr;
static const char *load_default_groups[]= { "mysqlcorbafs","client",0 };
static char *default_charset, *current_host, *current_user, *opt_password,
*path,*fields_terminated=0, *lines_terminated=0, *enclosed=0,
*opt_enclosed=0, *escaped=0;
/* This should be fixed to use my_getopt when the program is ready
static struct option long_options[] =
{
{"add-locks", no_argument, 0,OPT_LOCKS},
{"character-sets-dir",required_argument,0, OPT_CHARSETS_DIR},
{"compress", no_argument, 0, 'C'},
{"database",required_argument, 0, 'D'},
{"debug",optional_argument, 0, '#'},
{"default-character-set", required_argument, 0, OPT_DEFAULT_CHARSET},
{"delayed-insert",no_argument, 0, OPT_DELAYED},
{"fields-terminated-by", required_argument, 0, (int) OPT_FTB},
{"fields-enclosed-by", required_argument,0, (int) OPT_ENC},
{"fields-optionally-enclosed-by", required_argument, 0, (int) OPT_O_ENC},
{"fields-escaped-by", required_argument,0, (int) OPT_ESC},
{"functions",required_argument, 0, 'f'},
{"help", no_argument, 0,'?'},
{"host", required_argument,0, 'h'},
{"lines-terminated-by", required_argument, 0, (int) OPT_LTB},
{"lock-tables", no_argument, 0, 'l'},
{"no-data", no_argument, 0, 'd'},
{"password", optional_argument, 0, 'p'},
#ifdef __WIN__
{"pipe",no_argument,0, 'W'},
#endif
{"port", required_argument,0, 'P'},
// {"quick", no_argument,0, 'q'},
{"quote-names",no_argument,0, 'Q'},
{"set-variable",required_argument,0, 'O'},
{"socket", required_argument,0, 'S'},
#include "sslopt-longopts.h"
#ifndef DONT_ALLOW_USER_CHANGE
{"user", required_argument,0, 'u'},
#endif
{"verbose", no_argument,0, 'v'},
{"version", no_argument,0, 'V'},
{0, 0, 0, 0}
};
*/
/*
void
print_table_data(MYSQL_RES *result)
{
String separator(256);
MYSQL_ROW cur;
MYSQL_FIELD *field;
bool *num_flag;
num_flag=(bool*) my_alloca(sizeof(bool)*mysql_num_fields(result));
if (info_flag)
{
print_field_types(result);
mysql_field_seek(result,0);
}
separator.copy("+",1);
while ((field = mysql_fetch_field(result)))
{
uint length=skip_column_names ? 0 : (uint) strlen(field->name);
if (quick)
length=max(length,field->length);
else
length=max(length,field->max_length);
if (length < 4 && !IS_NOT_NULL(field->flags))
length=4; // Room for "NULL"
field->max_length=length+1;
separator.fill(separator.length()+length+2,'-');
separator.append('+');
}
tee_puts(separator.c_ptr(), PAGER);
if (!skip_column_names)
{
mysql_field_seek(result,0);
(void) tee_fputs("|", PAGER);
for (uint off=0; (field = mysql_fetch_field(result)) ; off++)
{
tee_fprintf(PAGER, " %-*s|",min(field->max_length,MAX_COLUMN_LENGTH),
field->name);
num_flag[off]= IS_NUM(field->type);
}
(void) tee_fputs("\n", PAGER);
tee_puts(separator.c_ptr(), PAGER);
}
while ((cur = mysql_fetch_row(result)))
{
(void) tee_fputs("|", PAGER);
mysql_field_seek(result,0);
for (uint off=0 ; off < mysql_num_fields(result); off++)
{
const char *str=cur[off] ? cur[off] : "NULL";
field = mysql_fetch_field(result);
uint length=field->max_length;
if (length > MAX_COLUMN_LENGTH)
{
tee_fputs(str,PAGER); tee_fputs(" |",PAGER);
}
else
tee_fprintf(PAGER, num_flag[off] ? "%*s |" : " %-*s|",
length, str);
}
(void) tee_fputs("\n", PAGER);
}
tee_puts(separator.c_ptr(), PAGER);
my_afree((gptr) num_flag);
}
void
print_table_data_html(MYSQL_RES *result)
{
MYSQL_ROW cur;
MYSQL_FIELD *field;
mysql_field_seek(result,0);
(void) tee_fputs("<TABLE BORDER=1><TR>", PAGER);
if (!skip_column_names)
{
while((field = mysql_fetch_field(result)))
{
tee_fprintf(PAGER, "<TH>%s</TH>", (field->name ?
(field->name[0] ? field->name :
" &nbsp; ") : "NULL"));
}
(void) tee_fputs("</TR>", PAGER);
}
while ((cur = mysql_fetch_row(result)))
{
(void) tee_fputs("<TR>", PAGER);
for (uint i=0; i < mysql_num_fields(result); i++)
{
ulong *lengths=mysql_fetch_lengths(result);
(void) tee_fputs("<TD>", PAGER);
safe_put_field(cur[i],lengths[i]);
(void) tee_fputs("</TD>", PAGER);
}
(void) tee_fputs("</TR>", PAGER);
}
(void) tee_fputs("</TABLE>", PAGER);
}
void
print_table_data_xml(MYSQL_RES *result)
{
MYSQL_ROW cur;
MYSQL_FIELD *fields;
mysql_field_seek(result,0);
char *statement;
statement=(char*) my_malloc(strlen(glob_buffer.ptr())*5+1, MYF(MY_WME));
xmlencode(statement, (char*) glob_buffer.ptr());
(void) my_chomp(strend(statement));
tee_fprintf(PAGER,"<?xml version=\"1.0\"?>\n\n<resultset statement=\"%s\">", statement);
my_free(statement,MYF(MY_ALLOW_ZERO_PTR));
fields = mysql_fetch_fields(result);
while ((cur = mysql_fetch_row(result)))
{
(void) tee_fputs("\n <row>\n", PAGER);
for (uint i=0; i < mysql_num_fields(result); i++)
{
char *data;
ulong *lengths=mysql_fetch_lengths(result);
data=(char*) my_malloc(lengths[i]*5+1, MYF(MY_WME));
tee_fprintf(PAGER, "\t<%s>", (fields[i].name ?
(fields[i].name[0] ? fields[i].name :
" &nbsp; ") : "NULL"));
xmlencode(data, cur[i]);
safe_put_field(data, strlen(data));
tee_fprintf(PAGER, "</%s>\n", (fields[i].name ?
(fields[i].name[0] ? fields[i].name :
" &nbsp; ") : "NULL"));
my_free(data,MYF(MY_ALLOW_ZERO_PTR));
}
(void) tee_fputs(" </row>\n", PAGER);
}
(void) tee_fputs("</resultset>\n", PAGER);
}
void
print_table_data_vertically(MYSQL_RES *result)
{
MYSQL_ROW cur;
uint max_length=0;
MYSQL_FIELD *field;
while ((field = mysql_fetch_field(result)))
{
uint length=(uint) strlen(field->name);
if (length > max_length)
max_length= length;
field->max_length=length;
}
mysql_field_seek(result,0);
for (uint row_count=1; (cur= mysql_fetch_row(result)); row_count++)
{
mysql_field_seek(result,0);
tee_fprintf(PAGER,
"*************************** %d. row ***************************\n", row_count);
for (uint off=0; off < mysql_num_fields(result); off++)
{
field= mysql_fetch_field(result);
tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name);
tee_fprintf(PAGER, "%s\n",cur[off] ? (char*) cur[off] : "NULL");
}
}
}
*/
static my_bool test_if_special_chars(const char *str)
{
for ( ; *str ; str++)
if (!isvar(*str) && *str != '$')
return 1;
return 0;
} /* test_if_special_chars */
char *quote_name(char *name, char *buff)
{
char *end;
DBUG_ENTER("quote_name");
if (!opt_quoted && !test_if_special_chars(name))
return name;
buff[0]=QUOTE_CHAR;
*end=strmov(buff+1,name);
end[0]=QUOTE_CHAR;
end[1]=0;
DBUG_RETURN(buff);
} /* quote_name */
/*
* Allow the user to specify field terminator strings like:
* "'", "\", "\\" (escaped backslash), "\t" (tab), "\n" (newline)
* This is done by doubleing ' and add a end -\ if needed to avoid
* syntax errors from the SQL parser.
*/
char *field_escape(char *to,const char *from,uint length)
{
const char *end;
uint end_backslashes=0;
DBUG_ENTER("field_escape");
{
*to++= *from;
if (*from == '\\')
end_backslashes^=1; /* find odd number of backslashes */
else {
if (*from == '\'' && !end_backslashes)
*to++= *from; /* We want a duplicate of "'" for MySQL */
end_backslashes=0;
}
}
/* Add missing backslashes if user has specified odd number of backs.*/
if (end_backslashes)
*to++= '\\';
DBUG_RETURN(to);
} /* field_escape */
void safe_exit(int error)
{
if (!first_error)
first_error= error;
if (ignore_errors)
return;
if (sock)
mysql_close(sock);
exit(error);
}
/* safe_exit */
/*
* ** DBerror -- prints mysql error message and exits the program.
*/
void DBerror(MYSQL *mysql, const char *when)
{
DBUG_ENTER("DBerror");
my_printf_error(0,"Got error: %d: %s %s", MYF(0),
mysql_errno(mysql), mysql_error(mysql), when);
safe_exit(EX_MYSQLERR);
DBUG_VOID_RETURN;
} /* DBerror */
void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,CORBAFS_VERSION,
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
} /* print_version */
void usage(void)
{
uint i;
print_version();
puts("By T<>nu Samuel. Some code is partially from other geeks around the world");
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
puts("Dumping definition and data mysql database or table");
printf("Usage: %s [OPTIONS]\n", my_progname);
printf("\n\
-#, --debug=... Output debug log. Often this is 'd:t:o,filename`.\n\
--character-sets-dir=...\n\
Directory where character sets are\n\
-?, --help Display this help message and exit.\n\
-c, --complete-insert Use complete insert statements.\n\
-C, --compress Use compression in server/client protocol.\n\
--default-character-set=...\n\
Set the default character set\n\
-e, --extended-insert Allows utilization of the new, much faster\n\
INSERT syntax.\n\
--add-locks Add locks around insert statements.\n\
--allow-keywords Allow creation of column names that are keywords.\n\
--delayed-insert Insert rows with INSERT DELAYED.\n\
-f, --force Continue even if we get an sql-error.\n\
-h, --host=... Connect to host.\n");
puts("\
-l, --lock-tables Lock all tables for read.\n\
-t, --no-create-info Don't write table creation info.\n\
-d, --no-data No row information.\n\
-O, --set-variable var=option\n\
give a variable a value. --help lists variables\n\
-p, --password[=...] Password to use when connecting to server.\n\
If password is not given it's solicited on the tty.\n");
#ifdef __WIN__
puts("-W, --pipe Use named pipes to connect to server");
#endif
printf("\
-P, --port=... Port number to use for connection.\n\
-q, --quick Don't buffer query, dump directly to stdout.\n\
-S, --socket=... Socket file to use for connection.\n\
--tables Overrides option --databases (-B).\n");
#include "sslopt-usage.h"
#ifndef DONT_ALLOW_USER_CHANGE
printf("\
-u, --user=# User for login if not current user.\n");
#endif
printf("\
-v, --verbose Print info about the various stages.\n\
-V, --version Output version information and exit.\n\
");
print_defaults("my",load_default_groups);
printf("\nPossible variables for option --set-variable (-O) are:\n");
for (i=0 ; changeable_vars[i].name ; i++)
printf("%-20s current value: %lu\n",
changeable_vars[i].name,
(ulong) *changeable_vars[i].varptr);
} /* usage */
static int get_options(int *argc,char ***argv)
{
int c,option_index;
my_bool tty_password=0;
DBUG_ENTER("get_options");
load_defaults("my",load_default_groups,argc,argv);
/* change this to use my_getopt when program is ready */
set_all_changeable_vars(changeable_vars);
while ((c=getopt_long(*argc,*argv,"#::p::h:u:O:P:S:T:EBaAcCdefFlnqtvVw:?Ix",
long_options, &option_index)) != EOF)
{
switch(c) {
case 'e':
extended_insert=1;
break;
case OPT_DEFAULT_CHARSET:
default_charset= optarg;
break;
case OPT_CHARSETS_DIR:
charsets_dir= optarg;
break;
ignore_errors=1;
break;
case 'h':
my_free(current_host,MYF(MY_ALLOW_ZERO_PTR));
current_host=my_strdup(optarg,MYF(MY_WME));
break;
#ifndef DONT_ALLOW_USER_CHANGE
case 'u':
current_user=optarg;
break;
#endif
case 'O':
if (set_changeable_var(optarg, changeable_vars))
{
usage();
return(1);
}
break;
case 'p':
if (optarg)
{
char *start=optarg;
my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR));
opt_password=my_strdup(optarg,MYF(MY_FAE));
while (*optarg) *optarg++= 'x'; /* Destroy argument */
if (*start)
start[1]=0; /* Cut length of argument */
} else
tty_password=1;
break;
case 'P':
opt_mysql_port= (unsigned int) atoi(optarg);
break;
case 'S':
opt_mysql_unix_port= optarg;
break;
case 'W':
#ifdef __WIN__
opt_mysql_unix_port=MYSQL_NAMEDPIPE;
#endif
break;
case 'T':
path= optarg;
break;
case '#':
DBUG_PUSH(optarg ? optarg : "d:t:o");
break;
case 'C':
opt_compress=1;
break;
case 'l': lock_tables=1; break;
case 'Q': opt_quoted=1; break;
case 'v': verbose=1; break;
case 'V': print_version(); exit(0);
default:
fprintf(stderr,"%s: Illegal option character '%c'\n",my_progname,opterr);
/* Fall throught */
case 'I':
case '?':
usage();
exit(0);
case (int) OPT_FTB:
fields_terminated= optarg;
break;
case (int) OPT_LTB:
lines_terminated= optarg;
break;
case (int) OPT_ENC:
enclosed= optarg;
break;
case (int) OPT_O_ENC:
opt_enclosed= optarg;
break;
case (int) OPT_ESC:
escaped= optarg;
break;
case (int) OPT_LOCKS:
opt_lock=1;
break;
case (int) OPT_OPTIMIZE:
extended_insert=opt_lock=lock_tables=1;
break;
case (int) OPT_DELAYED:
opt_delayed=1;
break;
#include "sslopt-case.h"
}
}
if (opt_delayed)
opt_lock=0; /* Can't have lock with delayed */
if (!path && (enclosed || opt_enclosed || escaped || lines_terminated ||
fields_terminated))
{
fprintf(stderr, "%s: You must use option --tab with --fields-...\n", my_progname);
return(1);
}
if (enclosed && opt_enclosed)
{
fprintf(stderr, "%s: You can't use ..enclosed.. and ..optionally-enclosed.. at the same time.\n", my_progname);
return(1);
}
if (default_charset)
{
if (set_default_charset_by_name(default_charset, MYF(MY_WME)))
exit(1);
}
(*argc)-=optind;
(*argv)+=optind;
if (tty_password)
opt_password=get_tty_password(NullS);
DBUG_RETURN(0);
} /* get_options */
/*** epv structures ***/
static PortableServer_ServantBase__epv impl_Inode_base_epv = {
NULL, /* _private data */
NULL, /* finalize routine */
NULL, /* default_POA routine */
};
static POA_CorbaFS_Inode__epv impl_Inode_epv = {
NULL, /* _private */
(gpointer) & impl_Inode_getStatus,
(gpointer) & impl_Inode_readpage,
(gpointer) & impl_Inode_release,
};
static PortableServer_ServantBase__epv impl_FileSystem_base_epv = {
NULL, /* _private data */
NULL, /* finalize routine */
NULL, /* default_POA routine */
};
static POA_CorbaFS_FileSystem__epv impl_FileSystem_epv = {
NULL, /* _private */
(gpointer) & impl_FileSystem_getInode,
(gpointer) & impl_FileSystem_readdir,
(gpointer) & impl_FileSystem_readlink,
};
/*** vepv structures ***/
static POA_CorbaFS_Inode__vepv impl_Inode_vepv = {
&impl_Inode_base_epv,
&impl_Inode_epv,
};
static POA_CorbaFS_FileSystem__vepv impl_FileSystem_vepv = {
&impl_FileSystem_base_epv,
&impl_FileSystem_epv,
};
/*** Stub implementations ***/
static CorbaFS_Inode
impl_Inode__create(PortableServer_POA poa, CORBA_Environment * ev)
{
CorbaFS_Inode retval;
impl_POA_CorbaFS_Inode *newservant;
PortableServer_ObjectId *objid;
DBUG_ENTER("impl_Inode__create");
newservant = g_new0(impl_POA_CorbaFS_Inode, 1);
newservant->servant.vepv = &impl_Inode_vepv;
newservant->poa = poa;
POA_CorbaFS_Inode__init((PortableServer_Servant) newservant, ev);
objid = PortableServer_POA_activate_object(poa, newservant, ev);
CORBA_free(objid);
retval = PortableServer_POA_servant_to_reference(poa, newservant, ev);
DBUG_RETURN(retval);
}
static void
impl_Inode__destroy(impl_POA_CorbaFS_Inode * servant,
CORBA_Environment * ev)
{
PortableServer_ObjectId *objid;
DBUG_ENTER("impl_Inode__destroy");
objid = PortableServer_POA_servant_to_id(servant->poa, servant, ev);
PortableServer_POA_deactivate_object(servant->poa, objid, ev);
CORBA_free(objid);
POA_CorbaFS_Inode__fini((PortableServer_Servant) servant, ev);
g_free(servant);
DBUG_VOID_RETURN;
}
static void
impl_Inode_getStatus(impl_POA_CorbaFS_Inode * servant,
CORBA_unsigned_short * mode,
CORBA_unsigned_long * uid,
CORBA_unsigned_long * gid,
CORBA_unsigned_long * size,
CORBA_unsigned_long * inodeNum,
CORBA_unsigned_short * numLinks,
CORBA_long * atime,
CORBA_long * mtime,
CORBA_long * ctime, CORBA_Environment * ev)
{
struct stat buf;
char
server[BUFLEN],
database[BUFLEN],
table[BUFLEN],
key[BUFLEN],
field[BUFLEN],
value[BUFLEN];
struct func_st *func;
DBUG_ENTER("impl_Inode_getStatus");
DBUG_PRINT("enter",("path: '%s', mode: '%o', uid: '%d', gid: '%d', size: '%d',
inodeNum: '%d', numLinks: '%d', atime: '%d',mtime: '%d', ctime: '%d'",
servant->path, mode, uid, gid, size, inodeNum, numLinks, atime, mtime, ctime));
DBUG_PRINT("info",("func: %x",&func));
if(parse(servant->path, server, database, table, field, value, &func)>0)
{
DBUG_PRINT("info",("ENOENT"));
*mode=0;
} else if (func != NULL){
DBUG_PRINT("info",("func: %x",&func));
DBUG_PRINT("info",("Argument is function at %x, returning S_IFREG",func));
*mode = S_IFREG; // File
} else if (*field){
DBUG_PRINT("info",("Argument is file, returning S_IFREG"));
*mode = S_IFREG; // File
} else {
DBUG_PRINT("info",("Argument is directory, returning S_IFDIR"));
*mode = S_IFDIR | S_IXUSR | S_IXGRP | S_IXOTH ; // Dir
}
*mode |= S_IRUSR | S_IRGRP | S_IROTH;
*uid = 0;
*gid = 0;
*size = 4096;
*inodeNum = servant->inodeNum;
*numLinks = 1;
*atime = 3;
*mtime = 2;
*ctime = 1;
// lstat(servant->path, &buf);
// *mode = buf.st_mode;
/* *uid = buf.st_uid;
*gid = buf.st_gid;
*size = buf.st_size;
*inodeNum = buf.st_ino;
*numLinks = buf.st_nlink;
*atime = buf.st_atime;
*mtime = buf.st_mtime;
*ctime = buf.st_ctime;*/
DBUG_VOID_RETURN;
}
static void
impl_Inode_readpage(impl_POA_CorbaFS_Inode * servant,
CorbaFS_Buffer ** buffer,
CORBA_long size,
CORBA_long offset, CORBA_Environment * ev)
{
int type;
int fd = -1, c = 0;
int res;
char
server[BUFLEN],
database[BUFLEN],
table[BUFLEN],
key[BUFLEN],
field[BUFLEN],
value[BUFLEN];
struct func_st *func;
DBUG_ENTER("impl_Inode_readpage");
DBUG_PRINT("enter",("path: '%s'", servant->path));
*buffer = CorbaFS_Buffer__alloc();
(*buffer)->_maximum = size;
(*buffer)->_buffer = CORBA_octet_allocbuf(size);
printf("requested to read %d bytes\n",size);
memset((*buffer)->_buffer, size, 0);
type = parse(servant->path, server, database, table, field, value, &func);
if (func != NULL)
res=db_function((*buffer)->_buffer, server, database, table, field, value, servant->path, func);
else
res=db_show_field((*buffer)->_buffer, database, table, field, path, value);
if(res>0)
(*buffer)->_length = strlen((*buffer)->_buffer);
else
(*buffer)->_length = 0;
/*
fd = open(servant->path, O_RDONLY);
printf("Inode_readpage : fd = %d\n", fd);
lseek(fd, offset, SEEK_SET);
c = read(fd, (*buffer)->_buffer, size);
printf("Inode_readpage : read %d bytes\n", c);
(*buffer)->_length = c;
close(fd);
*/
DBUG_VOID_RETURN;
}
static void
impl_Inode_release(impl_POA_CorbaFS_Inode * servant,
CORBA_Environment * ev)
{
DBUG_ENTER("impl_Inode_readpage");
DBUG_PRINT("enter",("path: '%s'", servant->path));
DBUG_VOID_RETURN;
}
/*
* This function is called when we get mounted
*/
CorbaFS_FileSystem
impl_FileSystem__create(PortableServer_POA poa,
CORBA_Environment * ev)
{
CorbaFS_FileSystem retval;
impl_POA_CorbaFS_FileSystem *newservant;
PortableServer_ObjectId *objid;
DBUG_ENTER("impl_FileSystem__create");
newservant = g_new0(impl_POA_CorbaFS_FileSystem, 1);
newservant->servant.vepv = &impl_FileSystem_vepv;
newservant->poa = poa;
POA_CorbaFS_FileSystem__init((PortableServer_Servant) newservant, ev);
objid = PortableServer_POA_activate_object(poa, newservant, ev);
CORBA_free(objid);
retval = PortableServer_POA_servant_to_reference(poa, newservant, ev);
DBUG_RETURN(retval);
}
/*
* This function is called when we get unmounted
*/
static void
impl_FileSystem__destroy(impl_POA_CorbaFS_FileSystem * servant,
CORBA_Environment * ev)
{
PortableServer_ObjectId *objid;
DBUG_ENTER("impl_FileSystem__destroy");
objid = PortableServer_POA_servant_to_id(servant->poa, servant, ev);
PortableServer_POA_deactivate_object(servant->poa, objid, ev);
CORBA_free(objid);
POA_CorbaFS_FileSystem__fini((PortableServer_Servant) servant, ev);
g_free(servant);
DBUG_VOID_RETURN;
}
static CorbaFS_Inode
impl_FileSystem_getInode(impl_POA_CorbaFS_FileSystem * servant,
CORBA_char * path, CORBA_Environment * ev)
{
CorbaFS_Inode retval;
impl_POA_CorbaFS_Inode *inode;
char
database[BUFLEN],
table[BUFLEN],
key[BUFLEN],
field[BUFLEN];
char buffer[MAXDIRS][BUFLEN];
int c;
DBUG_ENTER("impl_FileSystem_getInode");
DBUG_PRINT("enter",("path: '%s'", path));
//FIXME: We should verify the existense of file/dir here
//
retval = impl_Inode__create(servant->poa, ev);
inode = PortableServer_POA_reference_to_servant( servant->poa, retval, ev );
inode->path = CORBA_string_dup(path);
//FIXME: inodeNum Generation goes here
//
inode->inodeNum= inodeNum++;
#if 0
inode->mode = 0040777; /* world-readable directory */
inode->uid = 0;
inode->gid = 0;
inode->size = 4096;
inode->inodeNum = inodeNum++;
inode->numLinks = 1;
inode->atime = 0;
inode->mtime = 100;
inode->ctime = 10000;
#endif
DBUG_RETURN(retval);
}
static CorbaFS_DirEntSeq *
impl_FileSystem_readdir(impl_POA_CorbaFS_FileSystem * servant,
CORBA_char * path, CORBA_Environment * ev)
{
CorbaFS_DirEntSeq *retval;
CorbaFS_dirent *dirent;
struct func_st *func;
int c, c2,i;
char
server[BUFLEN],
table[BUFLEN],
field[BUFLEN],
value[BUFLEN],
buffer[MAXDIRS][BUFLEN],
buffer2[MAXDIRS][BUFLEN],
database[BUFLEN];
DBUG_ENTER("impl_FileSystem_readdir");
DBUG_PRINT("enter",("path: '%s'", path));
retval = CorbaFS_DirEntSeq__alloc();
retval->_maximum = 0;
retval->_length = 0;
parse(path, server, database, table, field, value, &func);
if (func != NULL) {
c2 = db_function((char *)buffer, server, database, table, field, value, path, func);
} else if(!*server) {
c2 = db_show_servers(buffer2,MAXDIRS);
c = show_functions((char *)buffer, ROOT_FUNCTION);
} else if(!*database) {
c2 = db_show_databases(buffer2,MAXDIRS);
c = show_functions((char *)buffer, SERVER_FUNCTION);
} else if(!*table){
c2 = db_show_tables(buffer2, database);
c = show_functions((char *)buffer, DATABASE_FUNCTION);
} else if(!*field){
c2 = db_show_primary_keys(buffer2, database,table);
if(c2>=0) {
c = show_functions((char *)buffer, TABLE_FUNCTION);
}
} else {
c2 = db_show_fields(buffer2, database, table, field);
c = show_functions((char *)buffer, FIELD_FUNCTION);
c = show_functions((char *)buffer, KEY_FUNCTION);
}
if(c2 < 0)
c=c2=0; // Error occured in database routines
/* Allocate space to hold all found entries plus "." and ".." */
retval->_maximum = c + c2 + 2;
retval->_buffer = CORBA_sequence_CorbaFS_dirent_allocbuf(retval->_maximum) ;
dirent = retval->_buffer;
i = 0;
while (i < c) {
long inode = 123L;
dirent[i].inode = inode;
dirent[i].name = CORBA_string_dup(buffer[i]);
i++;
}
i = 0;
while (i < c2) {
long inode = 123L;
dirent[c+i].inode = inode;
dirent[c+i].name = CORBA_string_dup(buffer2[i]);
i++;
}
dirent[c+i].inode = 123L;
dirent[c+i].name = CORBA_string_dup(".");
i++;
dirent[c+i].inode = 123L;
dirent[c+i].name = CORBA_string_dup("..");
retval->_length = retval->_maximum;
DBUG_RETURN(retval);
}
static CORBA_char *
impl_FileSystem_readlink(impl_POA_CorbaFS_FileSystem * servant,
CORBA_char * filename,
CORBA_Environment * ev)
{
CORBA_char *retval = CORBA_OBJECT_NIL;
char tmp[MAXPATHLEN + 1];
int len;
DBUG_ENTER("impl_FileSystem_readlink");
DBUG_PRINT("enter",("path: '%s'", filename));
/* len = readlink(filename, tmp, MAXPATHLEN);
if (len != -1)
{
tmp[len] = '\0';
retval = CORBA_string_dup(tmp);
}
printf("%s\n", retval);
*/
DBUG_RETURN(retval);
}
int fix_filenames(char *buf)
{
int i;
for(i=0; i<strlen(buf);i++)
if(buf[i]=='/')
buf[i]='_';
}
int main(int argc, char *argv[]) {
CorbaFS_FileSystem fs;
impl_POA_CorbaFS_FileSystem *fs_impl;
FILE *f;
PortableServer_POAManager pm;
DBUG_ENTER("main");
DBUG_PROCESS(argv[0]);
ev = g_new0(CORBA_Environment,1);
CORBA_exception_init(ev);
orb = CORBA_ORB_init(&argc, argv, "orbit-local-orb", ev);
MY_INIT(argv[0]);
/*
** Check out the args
*/
if (get_options(&argc, &argv))
{
my_end(0);
exit(EX_USAGE);
}
if (db_connect(current_host, current_user, opt_password))
exit(EX_MYSQLERR);
fptr = db_load_functions();
db_load_formats();
poa = (PortableServer_POA)
CORBA_ORB_resolve_initial_references(orb, "RootPOA", ev);
fs = impl_FileSystem__create(poa, ev);
pm = PortableServer_POA__get_the_POAManager(poa, ev);
PortableServer_POAManager_activate(pm, ev);
fs_impl = PortableServer_POA_reference_to_servant( poa, fs, ev );
objid = PortableServer_POA_servant_to_id( poa, fs_impl, ev );
printf("CorbaFS-server:\n%s\n", CORBA_ORB_object_to_string(orb, fs, ev));
f=fopen("/tmp/mysqlcorbafs.ior","w");
fputs(CORBA_ORB_object_to_string(orb, fs, ev),f);
fclose(f);
CORBA_ORB_run(orb, ev);
db_disconnect(current_host);
return 0;
}

View File

@ -1,157 +0,0 @@
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "CorbaFS.h"
#include <my_global.h>
#include <my_sys.h>
#include <m_string.h>
#include <m_ctype.h>
#include "mysql.h"
#define QUOTE_CHAR '`'
/* Exit codes */
#define EX_USAGE 1
#define EX_MYSQLERR 2
#define EX_CONSCHECK 3
#define EX_EOM 4
#define CORBAFS_VERSION "0.01"
typedef struct
{
POA_CorbaFS_Inode servant;
PortableServer_POA poa;
CORBA_char *path;
CORBA_unsigned_long inodeNum;
#if 0
CORBA_unsigned_short mode;
CORBA_unsigned_long uid;
CORBA_unsigned_long gid;
CORBA_unsigned_long size;
CORBA_unsigned_short numLinks;
CORBA_long atime;
CORBA_long mtime;
CORBA_long ctime;
#endif
}
impl_POA_CorbaFS_Inode;
typedef struct
{
POA_CorbaFS_FileSystem servant;
PortableServer_POA poa;
}
impl_POA_CorbaFS_FileSystem;
/*** Implementation stub prototypes ***/
CorbaFS_FileSystem
impl_FileSystem__create(PortableServer_POA poa, CORBA_Environment * ev);
static void
impl_Inode__destroy(impl_POA_CorbaFS_Inode * servant,
CORBA_Environment * ev);
static void
impl_Inode_getStatus(impl_POA_CorbaFS_Inode * servant,
CORBA_unsigned_short * mode,
CORBA_unsigned_long * uid,
CORBA_unsigned_long * gid,
CORBA_unsigned_long * size,
CORBA_unsigned_long * inodeNum,
CORBA_unsigned_short * numLinks,
CORBA_long * atime,
CORBA_long * mtime,
CORBA_long * ctime, CORBA_Environment * ev);
static void
impl_Inode_readpage(impl_POA_CorbaFS_Inode * servant,
CorbaFS_Buffer ** buffer,
CORBA_long size,
CORBA_long offset, CORBA_Environment * ev);
static void
impl_Inode_release(impl_POA_CorbaFS_Inode * servant,
CORBA_Environment * ev);
static void impl_FileSystem__destroy(impl_POA_CorbaFS_FileSystem *
servant, CORBA_Environment * ev);
static CorbaFS_Inode
impl_FileSystem_getInode(impl_POA_CorbaFS_FileSystem * servant,
CORBA_char * path, CORBA_Environment * ev);
static CorbaFS_DirEntSeq *
impl_FileSystem_readdir(impl_POA_CorbaFS_FileSystem * servant,
CORBA_char * path,
CORBA_Environment * ev);
static CORBA_char *
impl_FileSystem_readlink(impl_POA_CorbaFS_FileSystem * servant,
CORBA_char * filename,
CORBA_Environment * ev);
static my_bool verbose,opt_compress;
static uint opt_mysql_port=0;
static my_string opt_mysql_unix_port=0;
static int first_error=0;
static MYSQL connection, *sock=0;
extern uint opt_mysql_port;
extern my_string opt_mysql_unix_port,host,user,password;
static struct format {
char *tablestart;
char *headerrowstart;
char *headercellstart;
char *headercellseparator;
char *headercellend;
char *headerrowend;
int headerformat; /* 0 - simple, 1 - left padded, 2 - right padded */
char *contentrowstart;
char *contentcellstart;
char *contentcellseparator;
char *contentcellend;
char *contentrowend;
int contentformat;
char *footerrowstart;
char *footercellstart;
char *footercellseparator;
char *footercellend;
char *footerrowend;
int footerformat;
char *tableend;
char *leftuppercorner;
char *rightuppercorner;
char *leftdowncorner;
char *rightdowncorner;
char *leftcross;
char *rightcross;
char *topcross;
char *middlecross;
char *bottomcross;
} Human, HTML, CSF, XML;

View File

@ -1,92 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <orb/orbit.h>
#include "CorbaFS.h"
CorbaFS_FileSystem fs;
int
main (int argc, char *argv[])
{
CORBA_Environment ev;
CORBA_ORB orb;
CorbaFS_Inode inode;
CorbaFS_Buffer *buffer;
CorbaFS_DirEntSeq *dirents;
CorbaFS_dirent *dirent;
CORBA_unsigned_short mode;
CORBA_unsigned_long uid;
CORBA_unsigned_long gid;
CORBA_unsigned_long size;
CORBA_unsigned_long inodeNum;
CORBA_unsigned_short numLinks;
CORBA_long atime;
CORBA_long mtime;
CORBA_long ctime;
int i;
int niters = 10;
CORBA_exception_init(&ev);
orb = CORBA_ORB_init(&argc, argv, "orbit-local-orb", &ev);
if(argc < 2)
{
printf("Need a binding ID thing as argv[1]\n");
return 1;
}
fs = CORBA_ORB_string_to_object(orb, argv[1], &ev);
if (!fs) {
printf("Cannot bind to %s\n", argv[1]);
return 1;
}
if (argc >= 3)
inode = CorbaFS_FileSystem_getInode(fs, argv[2], &ev);
else
inode = CorbaFS_FileSystem_getInode(fs, "/proc/cpuinfo", &ev);
if (!inode)
{
printf("Cannot get inode\n");
}
CorbaFS_Inode_getStatus(inode,
&mode,
&uid,
&gid,
&size,
&inodeNum,
&numLinks,
&atime,
&mtime,
&ctime,
&ev);
printf("inode = %x\n", inode);
CorbaFS_Inode_readpage(inode, &buffer, 100000, 100, &ev);
printf("readpage got %d bytes\n", buffer->_length);
printf("readpage returned : %s\n", buffer->_buffer);
if (argc >= 3)
dirents = CorbaFS_FileSystem_readdir(fs, argv[2], &ev);
else
dirents = CorbaFS_FileSystem_readdir(fs, "/", &ev);
dirent = dirents->_buffer;
for (i = 0; i < dirents->_length; i++)
{
printf("%d = %s\n", dirent->inode, dirent->name);
dirent++;
}
CORBA_Object_release(fs, &ev);
CORBA_Object_release((CORBA_Object)orb, &ev);
return 0;
}

View File

@ -1,11 +0,0 @@
#!/bin/sh
mountpoint=$*
if [#($mountpoint) -eq "0"];
then
exit;
fi

View File

@ -280,5 +280,6 @@
#define ER_WARN_NULL_TO_NOTNULL 1261
#define ER_WARN_DATA_OUT_OF_RANGE 1262
#define ER_WARN_DATA_TRUNCATED 1263
#define ER_ERROR_MESSAGES 264
#define ER_WARN_USING_OTHER_HANDLER 1264
#define ER_CANT_AGGREGATE_COLLATIONS 1265
#define ER_ERROR_MESSAGES 266

View File

@ -3117,7 +3117,8 @@ int sort_ft_buf_flush(MI_SORT_PARAM *sort_param)
SORT_INFO *sort_info=sort_param->sort_info;
SORT_KEY_BLOCKS *key_block=sort_info->key_block;
MYISAM_SHARE *share=sort_info->info->s;
uint val_off, val_len, error;
uint val_off, val_len;
int error;
SORT_FT_BUF *ft_buf=sort_info->ft_buf;
uchar *from, *to;
@ -3126,14 +3127,17 @@ int sort_ft_buf_flush(MI_SORT_PARAM *sort_param)
to=ft_buf->lastkey+val_off;
if (ft_buf->buf)
{ /* flushing first-level tree */
error=sort_insert_key(sort_param,key_block,ft_buf->lastkey,HA_OFFSET_ERROR);
{
/* flushing first-level tree */
error=sort_insert_key(sort_param,key_block,ft_buf->lastkey,
HA_OFFSET_ERROR);
for (from=to+val_len;
!error && from < ft_buf->buf;
from+= val_len)
{
memcpy(to, from, val_len);
error=sort_insert_key(sort_param,key_block,ft_buf->lastkey,HA_OFFSET_ERROR);
error=sort_insert_key(sort_param,key_block,ft_buf->lastkey,
HA_OFFSET_ERROR);
}
return error;
}

View File

@ -491,7 +491,7 @@ static int underflow(register MI_INFO *info, register MI_KEYDEF *keyinfo,
if (info->s->keyinfo+info->lastinx == keyinfo)
info->page_changed=1;
if ((keypos < anc_buff+anc_length && (share->rnd++ & 1)) ||
if ((keypos < anc_buff+anc_length && (info->state->records & 1)) ||
keypos == anc_buff+2+key_reflength)
{ /* Use page right of anc-page */
DBUG_PRINT("test",("use right page"));

View File

@ -427,10 +427,6 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
share->kfile=kfile;
share->this_process=(ulong) getpid();
share->rnd= (int) share->this_process; /* rnd-counter for splits */
#ifndef DBUG_OFF
share->rnd=0; /* To make things repeatable */
#endif
share->last_process= share->state.process;
share->base.key_parts=key_parts;
share->base.all_key_parts=key_parts+unique_key_parts;

View File

@ -662,7 +662,8 @@ static int _mi_balance_page(register MI_INFO *info, MI_KEYDEF *keyinfo,
curr_keylength=k_length+nod_flag;
info->page_changed=1;
if ((father_key_pos != father_buff+father_length && (info->s->rnd++ & 1)) ||
if ((father_key_pos != father_buff+father_length &&
(info->state->records & 1)) ||
father_key_pos == father_buff+2+info->s->base.key_reflength)
{
right=1;

View File

@ -193,7 +193,6 @@ typedef struct st_mi_isam_share { /* Shared between opens */
uint w_locks,r_locks,tot_locks; /* Number of read/write locks */
uint blocksize; /* blocksize of keyfile */
myf write_flag;
int rnd; /* rnd-counter */
enum data_file_type data_file_type;
my_bool changed, /* If changed since lock */
global_changed, /* If changed since open */

View File

@ -448,10 +448,6 @@ static int examine_log(my_string file_name, char **table_names)
goto end;
files_open++;
file_info.closed=0;
if (opt_myisam_with_debug)
file_info.isam->s->rnd= 0;
else
file_info.isam->s->rnd= isamlog_process;
}
VOID(tree_insert(&tree, (gptr) &file_info, 0, tree.custom_arg));
if (file_info.used)
@ -806,7 +802,6 @@ static int close_some_file(TREE *tree)
(void*) &access_param,left_root_right));
if (!access_param.found)
return 1; /* No open file that is possibly to close */
access_param.found->rnd=access_param.found->isam->s->rnd;
if (mi_close(access_param.found->isam))
return 1;
access_param.found->closed=1;
@ -826,7 +821,6 @@ static int reopen_closed_file(TREE *tree, struct file_info *fileinfo)
if (!(fileinfo->isam= mi_open(name,O_RDWR,HA_OPEN_WAIT_IF_LOCKED)))
return 1;
fileinfo->closed=0;
fileinfo->isam->s->rnd=fileinfo->rnd;
re_open_count++;
return 0;
}

View File

@ -625,7 +625,9 @@ report_stats () {
$RM -f $MY_LOG_DIR/warnings $MY_LOG_DIR/warnings.tmp
# Remove some non fatal warnings from the log files
$SED -e 's!Warning: Table:.* on delete!!g' \
$MY_LOG_DIR/*.err > $MY_LOG_DIR/warnings.tmp
$MY_LOG_DIR/*.err \
| $SED -e 's!Warning: Table:.* on rename!!g' \
> $MY_LOG_DIR/warnings.tmp
found_error=0
# Find errors

View File

@ -203,7 +203,7 @@ a
2
check table t1;
Table Op Msg_type Msg_text
test.t1 check error The handler for the table doesn't support check
test.t1 check error The storage enginge for the table doesn't support check
drop table t1;
create table t1 (a int,b varchar(20)) type=bdb;
insert into t1 values (1,""), (2,"testing");

View File

@ -25,7 +25,7 @@ Warnings:
Note 1051 Unknown table 't1'
Note 1051 Unknown table 't2'
create table t1 (b char(0) not null, index(b));
The used table handler can't index column 'b'
The used storage engine can't index column 'b'
create table t1 (a int not null auto_increment,primary key (a)) type=heap;
create table t1 (a int not null,b text) type=heap;
The used table type doesn't support BLOB/TEXT columns
@ -271,6 +271,8 @@ SELECT @@table_type;
@@table_type
GEMINI
CREATE TABLE t1 (a int not null);
Warnings:
Warning 1259 Using storage engine MYISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (

View File

@ -165,7 +165,7 @@ level id parent_id
1 1007 101
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize error The handler for the table doesn't support optimize
test.t1 optimize error The storage enginge for the table doesn't support optimize
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 0 PRIMARY 1 id A # NULL NULL BTREE
@ -189,7 +189,7 @@ create table t1 (a int) type=innodb;
insert into t1 values (1), (2);
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize error The handler for the table doesn't support optimize
test.t1 optimize error The storage enginge for the table doesn't support optimize
delete from t1 where a = 1;
select * from t1;
a
@ -208,7 +208,7 @@ create index skr on t1 (a);
insert into t1 values (3,""), (4,"testing");
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze error The handler for the table doesn't support analyze
test.t1 analyze error The storage enginge for the table doesn't support analyze
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 1 skr 1 a A 3 NULL NULL YES BTREE
@ -724,7 +724,7 @@ world 2
hello 1
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize error The handler for the table doesn't support optimize
test.t1 optimize error The storage enginge for the table doesn't support optimize
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 0 PRIMARY 1 a A 2 NULL NULL BTREE
@ -800,7 +800,7 @@ id id3
UNLOCK TABLES;
DROP TABLE t1;
create table t1 (a char(20), unique (a(5))) type=innodb;
Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the table handler doesn't support unique sub keys
Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the store engine doesn't support unique sub keys
create table t1 (a char(20), index (a(5))) type=innodb;
show create table t1;
Table Create Table
@ -1215,3 +1215,32 @@ col1
2
3
drop table t1,t2;
CREATE TABLE t1 (
`id` int(10) unsigned NOT NULL auto_increment,
`id_object` int(10) unsigned default '0',
`id_version` int(10) unsigned NOT NULL default '1',
label varchar(100) NOT NULL default '',
`description` text,
PRIMARY KEY (`id`),
KEY `id_object` (`id_object`),
KEY `id_version` (`id_version`)
) TYPE=InnoDB;
INSERT INTO t1 VALUES("6", "3382", "9", "Test", NULL), ("7", "102", "5", "Le Pekin (Test)", NULL),("584", "1794", "4", "Test de resto", NULL),("837", "1822", "6", "Test 3", NULL),("1119", "3524", "1", "Societe Test", NULL),("1122", "3525", "1", "Fournisseur Test", NULL);
CREATE TABLE t2 (
`id` int(10) unsigned NOT NULL auto_increment,
`id_version` int(10) unsigned NOT NULL default '1',
PRIMARY KEY (`id`),
KEY `id_version` (`id_version`)
) TYPE=InnoDB;
INSERT INTO t2 VALUES("3524", "1"),("3525", "1"),("1794", "4"),("102", "5"),("1822", "6"),("3382", "9");
SELECT t2.id, t1.label FROM t2 INNER JOIN
(SELECT t1.id_object as id_object FROM t1 WHERE t1.label LIKE '%test%') AS lbl
ON (t2.id = lbl.id_object) INNER JOIN t1 ON (t2.id = t1.id_object);
id label
3382 Fournisseur Test
102 Fournisseur Test
1794 Fournisseur Test
1822 Fournisseur Test
3524 Fournisseur Test
3525 Fournisseur Test
drop table t1,t2;

View File

@ -48,4 +48,12 @@ a b c
3 4 120
5 0 30
8 9 60
INSERT t1 VALUES (2,1,11), (7,4,40) ON DUPLICATE KEY UPDATE c=c+VALUES(a);
SELECT *, VALUES(a) FROM t1;
a b c VALUES(a)
1 2 10 NULL
3 4 127 NULL
5 0 30 NULL
8 9 60 NULL
2 1 11 NULL
DROP TABLE t1;

View File

@ -57,14 +57,14 @@ 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
test.t2 check error The storage enginge for the table doesn't support check
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 repair
test.t2 repair error The storage enginge for the table doesn't support repair
check table t2,t1;
Table Op Msg_type Msg_text
test.t2 check error The handler for the table doesn't support check
test.t2 check error The storage enginge for the table doesn't support check
test.t1 check status OK
lock tables t1 write;
check table t2,t1;

View File

@ -0,0 +1,40 @@
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
create table t1 (a int);
insert into t1 values (10);
create table t2 (a int);
create table t3 (a int) type=merge union(t1);
create table t4 (a int);
insert into t4 select * from t3;
rename table t1 to t5, t2 to t1;
flush no_write_to_binlog tables;
show binlog events;
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
master-bin.000001 79 Query 1 79 use `test`; create table t1 (a int)
master-bin.000001 137 Query 1 137 use `test`; insert into t1 values (10)
master-bin.000001 198 Query 1 198 use `test`; create table t2 (a int)
master-bin.000001 256 Query 1 256 use `test`; create table t3 (a int) type=merge union(t1)
master-bin.000001 335 Query 1 335 use `test`; create table t4 (a int)
master-bin.000001 393 Query 1 393 use `test`; insert into t4 select * from t3
master-bin.000001 459 Query 1 459 use `test`; rename table t1 to t5, t2 to t1
select * from t3;
a
flush tables;
show binlog events;
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
master-bin.000001 79 Query 1 79 use `test`; create table t1 (a int)
master-bin.000001 137 Query 1 137 use `test`; insert into t1 values (10)
master-bin.000001 198 Query 1 198 use `test`; create table t2 (a int)
master-bin.000001 256 Query 1 256 use `test`; create table t3 (a int) type=merge union(t1)
master-bin.000001 335 Query 1 335 use `test`; create table t4 (a int)
master-bin.000001 393 Query 1 393 use `test`; insert into t4 select * from t3
master-bin.000001 459 Query 1 459 use `test`; rename table t1 to t5, t2 to t1
master-bin.000001 525 Query 1 525 use `test`; flush tables
select * from t3;
a

View File

@ -7,7 +7,7 @@ start slave;
create table t1(a int not null auto_increment, b int, primary key(a) );
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' ignore 1 lines;
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;
create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
insert into t3 select * from t2;
select * from t1;

View File

@ -0,0 +1,21 @@
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
create table t1(id int, i int, r1 int, r2 int, p varchar(100));
insert into t1 values(1, connection_id(), 0, 0, "");
insert into t1 values(2, 0, rand()*1000, rand()*1000, "");
set sql_log_bin=0;
insert into t1 values(6, 0, rand(), rand(), "");
delete from t1 where id=6;
set sql_log_bin=1;
insert into t1 values(3, 0, 0, 0, password('does_this_work?'));
insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?'));
select * into outfile 'rpl_misc_functions.outfile' from t1;
create table t2 like t1;
load data local infile './var/master-data/test/rpl_misc_functions.outfile' into table t2;
select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p);
id i r1 r2 p id i r1 r2 p
stop slave;

View File

@ -294,6 +294,10 @@ patient_uq clinic_uq
1 1
1 2
2 2
explain select * from t6 where exists (select * from t7 where uq = clinic_uq);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t6 ALL NULL NULL NULL NULL 4 Using where
2 DEPENDENT SUBQUERY t7 eq_ref PRIMARY PRIMARY 4 t6.clinic_uq 1
select * from t1 where a= (select a from t2,t4 where t2.b=t4.b);
Column: 'a' in field list is ambiguous
drop table if exists t1,t2,t3;
@ -1095,6 +1099,8 @@ UPDATE t1 SET i=i+(SELECT MAX(i) FROM (SELECT 1) t) WHERE i=(SELECT MAX(i));
Invalid use of group function
UPDATE t1 SET i=i+1 WHERE i=(SELECT MAX(i));
Invalid use of group function
UPDATE t1 SET t.i=i+(SELECT MAX(i) FROM (SELECT 1) t);
Unknown table 't' in field list
drop table t1;
CREATE TABLE t1 (
id int(11) default NULL
@ -1119,3 +1125,10 @@ select -10 IN (select a from t1 FORCE INDEX (indexa));
-10 IN (select a from t1 FORCE INDEX (indexa))
NULL
drop table t1;
create table t1 (id int not null auto_increment primary key, salary int, key(salary));
insert into t1 (salary) values (100),(1000),(10000),(10),(500),(5000),(50000);
explain SELECT id FROM t1 where salary = (SELECT MAX(salary) FROM t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ref salary salary 5 const 1 Using where
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
drop table t1;

View File

@ -347,7 +347,7 @@ a 1
hello 1
drop table t1;
create table t1 (a text, key (a(300)));
Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the table handler doesn't support unique sub keys
Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the store engine doesn't support unique sub keys
create table t1 (a text, key (a(255)));
drop table t1;
CREATE TABLE t1 (

View File

@ -50,7 +50,7 @@ Variable_name Value
max_join_size 100
show global variables like 'max_join_size';
Variable_name Value
max_join_size HA_POS_ERROR
max_join_size 10
set GLOBAL max_join_size=2000;
show global variables like 'max_join_size';
Variable_name Value

View File

@ -1,24 +1,13 @@
drop table if exists t1, t2;
drop table if exists t1;
Warnings:
Note 1051 Unknown table 't1'
Note 1051 Unknown table 't2'
create table t1 (a int);
insert into t1 values (1);
insert into t1 values ("hej");
Warnings:
Warning 1263 Data truncated for column 'a' at row 1
insert into t1 values ("hej"),("d<>");
Warnings:
Warning 1263 Data truncated for column 'a' at row 1
Warning 1263 Data truncated for column 'a' at row 2
set SQL_WARNINGS=1;
insert into t1 values ("hej");
Warnings:
Warning 1263 Data truncated for column 'a' at row 1
insert into t1 values ("hej"),("d<>");
Warnings:
Warning 1263 Data truncated for column 'a' at row 1
Warning 1263 Data truncated for column 'a' at row 2
drop table t1;
set SQL_WARNINGS=0;
drop temporary table if exists not_exists;
@ -42,71 +31,10 @@ select @@warning_count;
@@warning_count
0
drop table t1;
create table t1(a tinyint, b int not null, c date, d char(5));
load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ',';
create table t1 (id int) type=isam;
Warnings:
Warning 1261 Data truncated, NULL supplied to NOT NULL column 'b' at row 2
Warning 1263 Data truncated for column 'd' at row 3
Warning 1263 Data truncated for column 'c' at row 4
Warning 1259 Record count is fewer than the column count at row 5
Warning 1263 Data truncated for column 'b' at row 6
Warning 1260 Record count is more than the column count at row 7
Warning 1262 Data truncated, out of range for column 'a' at row 8
select @@warning_count;
@@warning_count
7
drop table t1;
create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5));
insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test');
Warnings:
Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 1
Warning 1262 Data truncated, out of range for column 'b' at row 2
Warning 1263 Data truncated for column 'c' at row 2
Warning 1262 Data truncated, out of range for column 'a' at row 3
Warning 1262 Data truncated, out of range for column 'b' at row 3
Warning 1263 Data truncated for column 'c' at row 3
alter table t1 modify c char(4);
Warnings:
Warning 1263 Data truncated for column 'c' at row 1
Warning 1263 Data truncated for column 'c' at row 2
alter table t1 add d char(2);
update t1 set a=NULL where a=10;
Warnings:
Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 2
update t1 set c='mysql ab' where c='test';
Warnings:
Warning 1263 Data truncated for column 'c' at row 4
update t1 set d=c;
Warnings:
Warning 1263 Data truncated for column 'd' at row 1
Warning 1263 Data truncated for column 'd' at row 2
Warning 1263 Data truncated for column 'd' at row 3
Warning 1263 Data truncated for column 'd' at row 4
create table t2(a tinyint NOT NULL, b char(3));
insert into t2 select b,c from t1;
Warnings:
Warning 1263 Data truncated for column 'b' at row 1
Warning 1263 Data truncated for column 'b' at row 2
Warning 1263 Data truncated for column 'b' at row 3
Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 4
Warning 1263 Data truncated for column 'b' at row 4
drop table t1, t2;
create table t1(a char(10));
alter table t1 add b char;
set max_error_count=10;
update t1 set b=a;
Warnings:
Warning 1263 Data truncated for column 'b' at row 1
Warning 1263 Data truncated for column 'b' at row 2
Warning 1263 Data truncated for column 'b' at row 3
Warning 1263 Data truncated for column 'b' at row 4
Warning 1263 Data truncated for column 'b' at row 5
Warning 1263 Data truncated for column 'b' at row 6
Warning 1263 Data truncated for column 'b' at row 7
Warning 1263 Data truncated for column 'b' at row 8
Warning 1263 Data truncated for column 'b' at row 9
Warning 1263 Data truncated for column 'b' at row 10
select @@warning_count;
@@warning_count
50
Warning 1259 Using storage engine MYISAM for table 't1'
alter table t1 type=isam;
Warnings:
Warning 1259 Using storage engine MYISAM for table 't1'
drop table t1;

View File

@ -1,8 +1,8 @@
2003-01-21,6328,%a%,%aaaaa%
>2003-01-21,6328,%a%,%aaaaa%
##
2003-02-22,2461,b,%a a a @@ @% @b ' " a%
>2003-02-22,2461,b,%a a a @@ @% @b ' " a%
##
2003-03-22,2161,%c%,%asdf%
>2003-03-22,2161,%c%,%asdf%
##
2003-04-22,2416,%a%,%bbbbb%
>2003-04-22,2416,%a%,%bbbbb%
##

View File

@ -813,3 +813,34 @@ insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000
SELECT col1 FROM t1 UNION SELECT col1 FROM t2 WHERE stamp <
'20020204120000' GROUP BY col1;
drop table t1,t2;
#
# Test by Francois MASUREL
#
CREATE TABLE t1 (
`id` int(10) unsigned NOT NULL auto_increment,
`id_object` int(10) unsigned default '0',
`id_version` int(10) unsigned NOT NULL default '1',
label varchar(100) NOT NULL default '',
`description` text,
PRIMARY KEY (`id`),
KEY `id_object` (`id_object`),
KEY `id_version` (`id_version`)
) TYPE=InnoDB;
INSERT INTO t1 VALUES("6", "3382", "9", "Test", NULL), ("7", "102", "5", "Le Pekin (Test)", NULL),("584", "1794", "4", "Test de resto", NULL),("837", "1822", "6", "Test 3", NULL),("1119", "3524", "1", "Societe Test", NULL),("1122", "3525", "1", "Fournisseur Test", NULL);
CREATE TABLE t2 (
`id` int(10) unsigned NOT NULL auto_increment,
`id_version` int(10) unsigned NOT NULL default '1',
PRIMARY KEY (`id`),
KEY `id_version` (`id_version`)
) TYPE=InnoDB;
INSERT INTO t2 VALUES("3524", "1"),("3525", "1"),("1794", "4"),("102", "5"),("1822", "6"),("3382", "9");
SELECT t2.id, t1.label FROM t2 INNER JOIN
(SELECT t1.id_object as id_object FROM t1 WHERE t1.label LIKE '%test%') AS lbl
ON (t2.id = lbl.id_object) INNER JOIN t1 ON (t2.id = t1.id_object);
drop table t1,t2;

View File

@ -21,4 +21,6 @@ INSERT t1 VALUES (5,6,30), (7,4,40), (8,9,60) ON DUPLICATE KEY UPDATE c=c+100;
SELECT * FROM t1;
INSERT t1 SET a=5 ON DUPLICATE KEY UPDATE b=0;
SELECT * FROM t1;
INSERT t1 VALUES (2,1,11), (7,4,40) ON DUPLICATE KEY UPDATE c=c+VALUES(a);
SELECT *, VALUES(a) FROM t1;
DROP TABLE t1;

View File

@ -115,7 +115,7 @@ drop table t1, t2;
create table t1 (a int primary key);
insert into t1 values(1),(2);
select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a);
--replace_result "31 tables" "XX tables" "63 tables" "XX tables"
--replace_result "31 tables" "XX tables" "62 tables" "XX tables"
--error 1116
select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a);
drop table t1;

View File

@ -0,0 +1,36 @@
#
# Test of replicating FLUSH TABLES to make
# RENAME TABLE work with MERGE tables on the slave.
# Test of FLUSH NO_WRITE_TO_BINLOG by the way.
#
source include/master-slave.inc;
let $VERSION=`select version()`;
create table t1 (a int);
insert into t1 values (10);
create table t2 (a int);
create table t3 (a int) type=merge union(t1);
create table t4 (a int);
# We force the slave to open t3 (because we want to try confusing him) with this :
insert into t4 select * from t3;
rename table t1 to t5, t2 to t1;
# RENAME may have confused the master (this is a known bug): so FLUSH tables,
# first don't write it to the binlog, to test the NO_WRITE_TO_BINLOG keyword.
flush no_write_to_binlog tables;
# Check that it's not in the binlog.
--replace_result $VERSION VERSION
show binlog events;
# Check that the master is not confused.
select * from t3;
# This FLUSH should go into the binlog to not confuse the slave.
flush tables;
# Check that it's in the binlog.
--replace_result $VERSION VERSION
show binlog events;
save_master_pos;
connection slave;
sync_with_master;
# Check that the slave is not confused.
select * from t3;
# Note that all this confusion may cause warnings 'table xx is open on rename'
# in the .err files; these are not fatal and are not reported by mysql-test-run.

View File

@ -10,8 +10,7 @@ create table t1(a int not null auto_increment, b int, primary key(a) );
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
#load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionaly enclosed by '%' escaped by '@' lines terminated by '\n%%\n' ignore 1 lines;
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' ignore 1 lines;
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;
create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
insert into t3 select * from t2;

View File

@ -0,0 +1 @@
rm -f $MYSQL_TEST_DIR/var/master-data/test/rpl_misc_functions.outfile

View File

@ -0,0 +1,30 @@
#
# Test of replicating some difficult functions
#
source include/master-slave.inc;
create table t1(id int, i int, r1 int, r2 int, p varchar(100));
insert into t1 values(1, connection_id(), 0, 0, "");
# don't put rand and password in the same query, to see if they replicate
# independently
# Pure rand test
insert into t1 values(2, 0, rand()*1000, rand()*1000, "");
# change the rand suite on the master (we do this because otherwise password()
# benefits from the fact that the above rand() is well replicated :
# it picks the same sequence element, which hides a possible bug in password() replication.
set sql_log_bin=0;
insert into t1 values(6, 0, rand(), rand(), "");
delete from t1 where id=6;
set sql_log_bin=1;
# Pure password test
insert into t1 values(3, 0, 0, 0, password('does_this_work?'));
# "altogether now"
insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?'));
select * into outfile 'rpl_misc_functions.outfile' from t1;
sync_slave_with_master;
create table t2 like t1;
# read the values from the master table
load data local infile './var/master-data/test/rpl_misc_functions.outfile' into table t2;
# compare them with the replica; the SELECT below should return no row
select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p);
stop slave;

View File

@ -125,6 +125,7 @@ create table t7( uq int primary key, name char(25));
insert into t7 values(1,"Oblastnaia bolnitsa"),(2,"Bolnitsa Krasnogo Kresta");
insert into t6 values (1,1),(1,2),(2,2),(1,3);
select * from t6 where exists (select * from t7 where uq = clinic_uq);
explain select * from t6 where exists (select * from t7 where uq = clinic_uq);
# not unique fields
-- error 1052
@ -677,6 +678,8 @@ INSERT INTO t1 VALUES (1);
UPDATE t1 SET i=i+(SELECT MAX(i) FROM (SELECT 1) t) WHERE i=(SELECT MAX(i));
-- error 1111
UPDATE t1 SET i=i+1 WHERE i=(SELECT MAX(i));
--error 1109
UPDATE t1 SET t.i=i+(SELECT MAX(i) FROM (SELECT 1) t);
drop table t1;
#
@ -703,3 +706,11 @@ create table t1 (a int, unique index indexa (a));
insert into t1 values (-1), (-4), (-2), (NULL);
select -10 IN (select a from t1 FORCE INDEX (indexa));
drop table t1;
#
# Test optimization for sub selects
#
create table t1 (id int not null auto_increment primary key, salary int, key(salary));
insert into t1 (salary) values (100),(1000),(10000),(10),(500),(5000),(50000);
explain SELECT id FROM t1 where salary = (SELECT MAX(salary) FROM t1);
drop table t1;

View File

@ -1 +1 @@
max_join_size=10
--max_join_size=10

View File

@ -0,0 +1 @@
--skip-isam

View File

@ -2,7 +2,7 @@
# Test some warnings
#
--disable-warnings
drop table if exists t1, t2;
drop table if exists t1;
--enable-warnings
create table t1 (a int);
@ -17,7 +17,6 @@ set SQL_WARNINGS=0;
#
# Test other warnings
#
drop temporary table if exists not_exists;
drop table if exists not_exists_table;
@ -29,45 +28,6 @@ create table if not exists t1(id int);
select @@warning_count;
drop table t1;
#
# Test warnings for LOAD DATA INFILE
#
create table t1(a tinyint, b int not null, c date, d char(5));
load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ',';
select @@warning_count;
drop table t1;
#
# Warnings from basic INSERT, UPDATE and ALTER commands
#
create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5));
insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test');
alter table t1 modify c char(4);
alter table t1 add d char(2);
update t1 set a=NULL where a=10;
update t1 set c='mysql ab' where c='test';
update t1 set d=c;
create table t2(a tinyint NOT NULL, b char(3));
insert into t2 select b,c from t1;
drop table t1, t2;
#
# Test for max_error_count
#
create table t1(a char(10));
let $1=50;
disable_query_log;
while ($1)
{
eval insert into t1 values('mysql ab');
dec $1;
}
enable_query_log;
alter table t1 add b char;
set max_error_count=10;
update t1 set b=a;
select @@warning_count;
create table t1 (id int) type=isam;
alter table t1 type=isam;
drop table t1;

View File

@ -258,6 +258,12 @@ do
then
$CP $i $BASE/$i
fi
done
#
# Fix some windows files
#
./extra/replace std:: "" -- $BASE/sql/sql_yacc.cpp
#

View File

@ -1,150 +0,0 @@
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifdef __GNUC__
#pragma implementation /* gcc: Class implementation */
#endif
#include <my_global.h>
#include <my_sys.h>
#include "cache_manager.h"
/*
cache_manager.cc
-----------------------------------------------------------------------
The cache_manager class manages a number of blocks (which are allocatable
units of memory).
-----------------------------------------------------------------------
*/
#define HEADER_LENGTH ALIGN_SIZE(8)
#define SUFFIX_LENGTH 4
#define ALLOC_MASK 0x3FFFFFFFL
#define FREE_BIT (1L << 31)
#define LOCK_BIT (1L << 30)
#define SMALLEST_BLOCK 32
/*
** Internal Methods
** --------------------
*/
/* list manipulation methods */
void *cache_manager::init_list(void)
{
return;
}
void *cache_manager::link_into_abs(void *ptr)
{
for (int i(0); (*abs_list)[i] != NULL; i++);
(*abs_list)[i] = ptr;
return (abs_list)[i]; // ???
}
bool *cache_manager::unlink_from_abs(void *ptr)
{
(*ptr) = NULL;
return;
}
/* memory allocation methods */
void *cache_manager::find_in_llist(uint)
{
return;
}
void cache_manager::defrag(void)
{
printf("Defragging: ..........");
return;
}
/*
** Public Methods
** ------------------
*/
cache_manager::cache_manager(uint size)
{
base_ptr = my_malloc(size, MY_WME); /* MY_WME = write mesg on err */
return;
}
cache_manager::~cache_manager(void)
{
free(base_ptr);
delete base_ptr;
return;
}
void *cache_manager::alloc(uint size)
{
void *llist;
void *abs_ptr;
size=ALIGN_SIZE(size+HEADER_LENGTH+SUFFIX_LENGTH);
if (!(llist = find_in_llist(size)))
{
//defrag();
if (!(llist = find_in_llist(size)))
return 0; /* return null pointer, buffer exhausted! */
}
size_of_found_block=int4korr((char*) llist) & ALLOC_MASK;
// if (size_of_found_block < SMALLEST_BLOCK)
abs_ptr = link_into_abs(llist);
return abs_ptr;
}
void cache_manager::dealloc(void)
{
printf("Deallocating: ..........\n");
return;
}
void cache_manager::clear(void)
{
// reset the internal linked list, forgetting all pointers to mem blks
return;
}

View File

@ -1,61 +0,0 @@
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifdef __GNUC__
#pragma interface /* gcc class implementation */
#endif
#ifndef _CACHE_MANAGER_H_
#define _CACHE_MANAGER_H_
#endif
/*
cache_manager.h
-----------------------------------------------------------------------
The cache_manager class manages a number of blocks (which are allocatable
units of memory).
-----------------------------------------------------------------------
*/
class cache_manager {
void **abs_list; /* List holding block abstraction ptrs */
typedef struct free_blks {
struct free_blks *next, **prev;
uint Size;
} FREE_BLKS;
FREE_BLKS *base_ptr; /* Pointer to newly allocated sys mem */
/* list manipulation methods */
void *link_into_abs(void *); /* Return an abstract pointer to blk */
bool *unlink_from_abs(void *); /* Used to dealloc a blk */
void *find_in_fblist(uint); /* */
/* memory allocation methods */
void defrag(void); /* Defragment the cache */
bool *init_blk(void *); /* Return a pointer to new list */
public:
cache_manager(uint); /* Get allocation of size from system */
~cache_manager(void); /* Destructor; return the cache */
void *alloc(uint); /* Alloc size bytes from the cache */
bool *dealloc(void *); /* Deallocate blocks (with *ptr_arg) */
void clear(void); /* Clear the cache */
};

View File

@ -5476,9 +5476,9 @@ create_field::create_field(Field *old_field,Field *orig_field)
char buff[MAX_FIELD_WIDTH],*pos;
String tmp(buff,sizeof(buff), charset);
/* Get the value from record[2] (the default value row) */
/* Get the value from default_values */
my_ptrdiff_t diff= (my_ptrdiff_t) (orig_field->table->rec_buff_length*2);
orig_field->move_field(diff); // Points now at record[2]
orig_field->move_field(diff); // Points now at default_values
bool is_null=orig_field->is_real_null();
orig_field->val_str(&tmp,&tmp);
orig_field->move_field(-diff); // Back to record[0]

View File

@ -83,7 +83,7 @@ public:
virtual void reset_fields() {}
virtual void set_default()
{
my_ptrdiff_t offset = table->default_values() - table->record[0];
my_ptrdiff_t offset = table->default_values - table->record[0];
memcpy(ptr, ptr + offset, pack_length());
if (null_ptr)
*null_ptr= ((*null_ptr & (uchar) ~null_bit) |

View File

@ -262,6 +262,22 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
} /* filesort */
void filesort_free_buffers(TABLE *table)
{
if (table->sort.record_pointers)
{
my_free((gptr) table->sort.record_pointers,MYF(0));
table->sort.record_pointers=0;
}
if (table->sort.addon_buf)
{
my_free((char *) table->sort.addon_buf, MYF(0));
my_free((char *) table->sort.addon_field, MYF(MY_ALLOW_ZERO_PTR));
table->sort.addon_buf=0;
table->sort.addon_field=0;
}
}
/* Make a array of string pointers */
static char **make_char_array(register uint fields, uint length, myf my_flag)

View File

@ -34,10 +34,11 @@
** isam tables
*****************************************************************************/
bool isam_skip;
const char **ha_isam::bas_ext() const
{ static const char *ext[]= { ".ISM",".ISD", NullS }; return ext; }
int ha_isam::open(const char *name, int mode, uint test_if_locked)
{
char name_buff[FN_REFLEN];

View File

@ -81,3 +81,5 @@ class ha_isam: public handler
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
enum thr_lock_type lock_type);
};
extern bool isam_skip;

View File

@ -34,6 +34,8 @@
#endif
#ifdef HAVE_INNOBASE_DB
#include "ha_innodb.h"
#else
#define innobase_query_caching_of_table_permitted(X,Y,Z) 1
#endif
#include <myisampack.h>
#include <errno.h>
@ -86,7 +88,12 @@ enum db_type ha_checktype(enum db_type database_type)
#endif
#ifdef HAVE_ISAM
case DB_TYPE_ISAM:
return (isam_skip ? DB_TYPE_MYISAM : database_type);
case DB_TYPE_MRG_ISAM:
return (isam_skip ? DB_TYPE_MRG_MYISAM : database_type);
#else
case DB_TYPE_MRG_ISAM:
return (DB_TYPE_MRG_MYISAM);
#endif
case DB_TYPE_HEAP:
case DB_TYPE_MYISAM:
@ -110,6 +117,9 @@ handler *get_new_handler(TABLE *table, enum db_type db_type)
return new ha_isammrg(table);
case DB_TYPE_ISAM:
return new ha_isam(table);
#else
case DB_TYPE_MRG_ISAM:
return new ha_myisammrg(table);
#endif
#ifdef HAVE_BERKELEY_DB
case DB_TYPE_BERKELEY_DB:

View File

@ -349,7 +349,7 @@ table_map Item_field::used_tables() const
{
if (field->table->const_table)
return 0; // const item
return (depended_from ? RAND_TABLE_BIT : field->table->map);
return (depended_from ? OUTER_REF_TABLE_BIT : field->table->map);
}
Item *Item_field::get_tmp_table_item(THD *thd)
@ -772,10 +772,9 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
(last= sl)->get_table_list(), &where,
0)) != not_found_field)
break;
if (sl->item_list.elements &&
((refer= find_item_in_list(this, sl->item_list, &counter,
if ((refer= find_item_in_list(this, sl->item_list, &counter,
REPORT_EXCEPT_NOT_FOUND)) !=
(Item **)not_found_item))
(Item **) not_found_item)
break;
if (sl->master_unit()->first_select()->linkage ==
DERIVED_TABLE_TYPE)
@ -1389,7 +1388,7 @@ bool Item_default_value::fix_fields(THD *thd, struct st_table_list *table_list,
if (!def_field)
return 1;
memcpy(def_field, field_arg->field, field_arg->field->size_of());
def_field->move_field(def_field->table->default_values() -
def_field->move_field(def_field->table->default_values -
def_field->table->record[0]);
set_field(def_field);
return 0;
@ -1407,6 +1406,59 @@ void Item_default_value::print(String *str)
str->append(')');
}
bool Item_insert_value::eq(const Item *item, bool binary_cmp) const
{
return item->type() == INSERT_VALUE_ITEM &&
((Item_default_value *)item)->arg->eq(arg, binary_cmp);
}
bool Item_insert_value::fix_fields(THD *thd, struct st_table_list *table_list, Item **items)
{
bool res= arg->fix_fields(thd, table_list, items);
if (res)
return res;
/*
arg->type() can be only REF_ITEM or FIELD_ITEM as arg is
a simple_ident in sql_yacc.yy
*/
if (arg->type() == REF_ITEM)
{
Item_ref *ref= (Item_ref *)arg;
if (ref->ref[0]->type() != FIELD_ITEM)
{
return 1;
}
arg= ref->ref[0];
}
Item_field *field_arg= (Item_field *)arg;
if (field_arg->field->table->insert_values)
{
Field *def_field= (Field*) sql_alloc(field_arg->field->size_of());
if (!def_field)
return 1;
memcpy(def_field, field_arg->field, field_arg->field->size_of());
def_field->move_field(def_field->table->insert_values -
def_field->table->record[0]);
set_field(def_field);
}
else
{
Field *field=field_arg->field;
/* charset doesn't matter here, it's to avoid sigsegv only */
set_field(new Field_null(0,0,Field::NONE,field->field_name,field->table,
default_charset_info));
}
return 0;
}
void Item_insert_value::print(String *str)
{
str->append("VALUE(");
arg->print(str);
str->append(')');
}
/*
If item is a const function, calculate it and return a const item
The original item is freed if not returned

View File

@ -35,12 +35,23 @@ public:
INT_ITEM, REAL_ITEM, NULL_ITEM, VARBIN_ITEM,
COPY_STR_ITEM, FIELD_AVG_ITEM, DEFAULT_VALUE_ITEM,
PROC_ITEM,COND_ITEM, REF_ITEM, FIELD_STD_ITEM,
FIELD_VARIANCE_ITEM, CONST_ITEM,
FIELD_VARIANCE_ITEM, INSERT_VALUE_ITEM,
SUBSELECT_ITEM, ROW_ITEM, CACHE_ITEM};
enum cond_result { COND_UNDEF,COND_OK,COND_TRUE,COND_FALSE };
enum coercion { COER_COERCIBLE=3, COER_IMPLICIT=2,
COER_NOCOLL=1, COER_EXPLICIT=0 };
const char *coercion_name(enum coercion coer) const
{
switch(coer)
{
case COER_COERCIBLE: return "COERCIBLE";
case COER_IMPLICIT: return "IMPLICIT";
case COER_EXPLICIT: return "EXPLICIT";
case COER_NOCOLL: return "NO COLLATION";
default: return "UNKNOWN";
}
}
String str_value; /* used to store value */
my_string name; /* Name from select */
@ -201,6 +212,7 @@ public:
bool is_null() { return field->is_null(); }
Item *get_tmp_table_item(THD *thd);
friend class Item_default_value;
friend class Item_insert_value;
};
class Item_null :public Item
@ -456,7 +468,7 @@ public:
longlong val_int();
String *val_str(String*) { return &str_value; }
int save_in_field(Field *field, bool no_conversions);
enum Item_result result_type () const { return INT_RESULT; }
enum Item_result result_type () const { return STRING_RESULT; }
enum_field_types field_type() const { return MYSQL_TYPE_STRING; }
};
@ -754,6 +766,24 @@ public:
table_map used_tables() const { return (table_map)0L; }
};
class Item_insert_value : public Item_field
{
public:
Item *arg;
Item_insert_value(Item *a) :
Item_field((const char *)NULL, (const char *)NULL, (const char *)NULL), arg(a) {}
bool eq(const Item *item, bool binary_cmp) const;
bool fix_fields(THD *, struct st_table_list *, Item **);
void set_outer_resolving() { arg->set_outer_resolving(); }
void print(String *str);
virtual bool basic_const_item() const { return true; }
int save_in_field(Field *field, bool no_conversions)
{
return Item_field::save_in_field(field, no_conversions);
}
table_map used_tables() const { return (table_map)0L; }
};
class Item_cache: public Item
{
table_map used_table_map;

View File

@ -170,7 +170,10 @@ void Item_bool_func2::fix_length_and_dec()
if (set_cmp_charset(args[0]->charset(), args[0]->coercibility,
args[1]->charset(), args[1]->coercibility))
{
my_error(ER_WRONG_ARGUMENTS,MYF(0),func_name());
my_error(ER_CANT_AGGREGATE_COLLATIONS,MYF(0),
args[0]->charset()->name,coercion_name(args[0]->coercibility),
args[1]->charset()->name,coercion_name(args[1]->coercibility),
func_name());
return;
}
set_cmp_func();
@ -346,7 +349,7 @@ bool Item_in_optimizer::fix_fields(THD *thd, struct st_table_list *tables,
if (cache->cols() == 1)
{
if (args[0]->used_tables())
cache->set_used_tables(RAND_TABLE_BIT);
cache->set_used_tables(OUTER_REF_TABLE_BIT);
else
cache->set_used_tables(0);
}
@ -356,7 +359,7 @@ bool Item_in_optimizer::fix_fields(THD *thd, struct st_table_list *tables,
for (uint i= 0; i < n; i++)
{
if (args[0]->el(i)->used_tables())
((Item_cache *)cache->el(i))->set_used_tables(RAND_TABLE_BIT);
((Item_cache *)cache->el(i))->set_used_tables(OUTER_REF_TABLE_BIT);
else
((Item_cache *)cache->el(i))->set_used_tables(0);
}
@ -652,7 +655,10 @@ Item_func_ifnull::fix_length_and_dec()
decimals= 0;
if (set_charset(args[0]->charset(),args[0]->coercibility,
args[1]->charset(),args[1]->coercibility))
my_error(ER_WRONG_ARGUMENTS,MYF(0),func_name());
my_error(ER_CANT_AGGREGATE_COLLATIONS,MYF(0),
args[0]->charset()->name,coercion_name(args[0]->coercibility),
args[1]->charset()->name,coercion_name(args[1]->coercibility),
func_name());
}
@ -731,7 +737,10 @@ Item_func_if::fix_length_and_dec()
if (set_charset(args[1]->charset(), args[1]->coercibility,
args[2]->charset(), args[2]->coercibility))
{
my_error(ER_WRONG_ARGUMENTS,MYF(0),func_name());
my_error(ER_CANT_AGGREGATE_COLLATIONS,MYF(0),
args[0]->charset()->name,coercion_name(args[0]->coercibility),
args[1]->charset()->name,coercion_name(args[1]->coercibility),
func_name());
return;
}
}
@ -1878,7 +1887,10 @@ bool Item_func_like::fix_fields(THD *thd, TABLE_LIST *tlist, Item ** ref)
if (set_cmp_charset(args[0]->charset(), args[0]->coercibility,
args[1]->charset(), args[1]->coercibility))
{
my_error(ER_WRONG_ARGUMENTS,MYF(0),func_name());
my_error(ER_CANT_AGGREGATE_COLLATIONS,MYF(0),
args[0]->charset()->name,coercion_name(args[0]->coercibility),
args[1]->charset()->name,coercion_name(args[1]->coercibility),
func_name());
return 1;
}

View File

@ -84,7 +84,11 @@ Item *create_func_connection_id(void)
{
THD *thd=current_thd;
thd->lex.safe_to_cache_query=0;
return new Item_int(NullS,(longlong) thd->thread_id,10);
return new Item_int(NullS,(longlong)
((thd->slave_thread) ?
thd->variables.pseudo_thread_id :
thd->thread_id),
10);
}
Item *create_func_conv(Item* a, Item *b, Item *c)

View File

@ -859,7 +859,10 @@ void Item_func_min_max::fix_length_and_dec()
else if (set_charset(charset(), coercibility,
args[i]->charset(), args[i]->coercibility))
{
my_error(ER_WRONG_ARGUMENTS,MYF(0),func_name());
my_error(ER_CANT_AGGREGATE_COLLATIONS,MYF(0),
charset()->name,coercion_name(coercibility),
args[i]->charset()->name,coercion_name(args[i]->coercibility),
func_name());
break;
}
}

View File

@ -326,7 +326,10 @@ void Item_func_concat::fix_length_and_dec()
if (set_charset(charset(), coercibility,
args[i]->charset(), args[i]->coercibility))
{
my_error(ER_WRONG_ARGUMENTS,MYF(0),func_name());
my_error(ER_CANT_AGGREGATE_COLLATIONS,MYF(0),
charset()->name,coercion_name(coercibility),
args[i]->charset()->name,coercion_name(args[i]->coercibility),
func_name());
break;
}
}
@ -630,7 +633,10 @@ void Item_func_concat_ws::fix_length_and_dec()
if (set_charset(charset(), coercibility,
args[i]->charset(), args[i]->coercibility))
{
my_error(ER_WRONG_ARGUMENTS,MYF(0),func_name());
my_error(ER_CANT_AGGREGATE_COLLATIONS,MYF(0),
charset()->name,coercion_name(coercibility),
args[i]->charset()->name,coercion_name(args[i]->coercibility),
func_name());
break;
}
}
@ -1288,6 +1294,18 @@ String *Item_func_trim::val_str(String *str)
void Item_func_password::fix_length_and_dec()
{
/*
If PASSWORD() was called with only one argument, it depends on a random
number so we need to save this random number into the binary log.
If called with two arguments, it is repeatable.
*/
if (arg_count == 1)
{
THD *thd= current_thd;
thd->rand_used= 1;
thd->rand_saved_seed1= thd->rand.seed1;
thd->rand_saved_seed2= thd->rand.seed2;
}
max_length= get_password_length(use_old_passwords);
}
@ -1457,12 +1475,13 @@ String *Item_func_user::val_str(String *str)
{
THD *thd=current_thd;
CHARSET_INFO *cs= default_charset();
const char *host=thd->host ? thd->host : thd->ip ? thd->ip : "";
const char *host= thd->host_or_ip;
uint res_length;
// For system threads (e.g. replication SQL thread) user may be empty
if (!thd->user)
return &empty_string;
uint32 res_length=(strlen(thd->user)+strlen(host)+3) * cs->mbmaxlen;
// it is +3 , because 1 for each string and 1 for '@' sign
res_length= (strlen(thd->user)+strlen(host)+2) * cs->mbmaxlen;
if (str->alloc(res_length))
{
@ -1611,7 +1630,10 @@ void Item_func_elt::fix_length_and_dec()
if (set_charset(charset(), coercibility,
args[i]->charset(), args[i]->coercibility))
{
my_error(ER_WRONG_ARGUMENTS,MYF(0),func_name());
my_error(ER_CANT_AGGREGATE_COLLATIONS,MYF(0),
charset()->name,coercion_name(coercibility),
args[i]->charset()->name,coercion_name(args[i]->coercibility),
func_name());
break;
}
}
@ -2956,7 +2978,8 @@ String *Item_func_compress::val_str(String *str)
return 0;
}
int4store(buffer.c_ptr(),res->length() & 0x3FFFFFFF);
char *tmp= buffer.c_ptr(); // int4store is a macro; avoid side effects
int4store(tmp, res->length() & 0x3FFFFFFF);
/* This is for the stupid char fields which trim ' ': */
char *last_char= ((char*)body)+new_size-1;

View File

@ -128,7 +128,7 @@ void Item_subselect::fix_length_and_dec()
inline table_map Item_subselect::used_tables() const
{
return (table_map) (engine->dependent() ? 1L :
(engine->uncacheable() ? RAND_TABLE_BIT : 0L));
(engine->uncacheable() ? OUTER_REF_TABLE_BIT : 0L));
}
Item_singlerow_subselect::Item_singlerow_subselect(THD *thd,

View File

@ -993,7 +993,7 @@ int dump_leaf(byte* key, uint32 count __attribute__((unused)),
int error;
/*
The first item->rec_offset bytes are taken care of with
restore_record(table,2) in setup()
restore_record(table,default_values) in setup()
*/
memcpy(buf + item->rec_offset, key, item->tree->size_of_element);
if ((error = item->table->file->write_row(buf)))
@ -1075,7 +1075,7 @@ bool Item_sum_count_distinct::setup(THD *thd)
void* cmp_arg;
// to make things easier for dump_leaf if we ever have to dump to MyISAM
restore_record(table,2);
restore_record(table,default_values);
if (table->fields == 1)
{
@ -1348,7 +1348,7 @@ static int group_concat_key_cmp_with_distinct(void* arg, byte* key1,
byte* key2)
{
Item_func_group_concat* item= (Item_func_group_concat*)arg;
for (int i= 0; i<item->arg_count_field; i++)
for (uint i= 0; i < item->arg_count_field; i++)
{
Item *field_item= item->expr[i];
Field *field= field_item->tmp_table_field();
@ -1377,7 +1377,7 @@ static int group_concat_key_cmp_with_distinct(void* arg, byte* key1,
static int group_concat_key_cmp_with_order(void* arg, byte* key1, byte* key2)
{
Item_func_group_concat* item= (Item_func_group_concat*)arg;
for (int i=0; i<item->arg_count_order; i++)
for (uint i=0; i < item->arg_count_order; i++)
{
ORDER *order_item= item->order[i];
Item *item= *order_item->item;
@ -1404,9 +1404,10 @@ static int group_concat_key_cmp_with_order(void* arg, byte* key1, byte* key2)
GROUP_CONCAT(DISTINCT expr,... ORDER BY col,... )
*/
static int group_concat_key_cmp_with_distinct_and_order(void* arg, byte* key1, byte* key2)
static int group_concat_key_cmp_with_distinct_and_order(void* arg,
byte* key1,
byte* key2)
{
Item_func_group_concat* item= (Item_func_group_concat*)arg;
if (!group_concat_key_cmp_with_distinct(arg,key1,key2))
return 0;
return(group_concat_key_cmp_with_order(arg,key1,key2));
@ -1427,7 +1428,7 @@ static int dump_leaf_key(byte* key, uint32 count __attribute__((unused)),
tmp.length(0);
for (int i= 0; i < group_concat_item->arg_show_fields; i++)
for (uint i= 0; i < group_concat_item->arg_show_fields; i++)
{
Item *show_item= group_concat_item->expr[i];
if (!show_item->const_item())
@ -1481,13 +1482,13 @@ static int dump_leaf_key(byte* key, uint32 count __attribute__((unused)),
is_separator - string value of separator
*/
Item_func_group_concat::Item_func_group_concat(int is_distinct,
Item_func_group_concat::Item_func_group_concat(bool is_distinct,
List<Item> *is_select,
SQL_LIST *is_order,
String *is_separator)
:Item_sum(), tmp_table_param(0), warning_available(false),
separator(is_separator), tree(&tree_base), table(0), distinct(is_distinct),
tree_mode(0), count_cut_values(0)
separator(is_separator), tree(&tree_base), table(0),
count_cut_values(0), tree_mode(0), distinct(is_distinct)
{
original= 0;
quick_group= 0;
@ -1506,39 +1507,31 @@ Item_func_group_concat::Item_func_group_concat(int is_distinct,
expr - arg_count_field
order - arg_count_order
*/
args= (Item**)sql_alloc(sizeof(Item*)*(arg_count+arg_count_order+arg_count_field)+
args= (Item**) sql_alloc(sizeof(Item*)*(arg_count+arg_count_order+
arg_count_field)+
sizeof(ORDER*)*arg_count_order);
if (!args)
{
my_error(ER_OUTOFMEMORY,MYF(0));
}
return; // thd->fatal is set
expr= args;
expr+= arg_count+arg_count_order;
if (arg_count_order)
{
order= (ORDER**)(expr + arg_count_field);
}
/*
fill args items of show and sort
*/
/* fill args items of show and sort */
int i= 0;
List_iterator_fast<Item> li(*is_select);
Item *item_select;
while ((item_select= li++))
{
for ( ; (item_select= li++) ; i++)
args[i]= expr[i]= item_select;
i++;
}
if (order)
if (arg_count_order)
{
uint j= 0;
i= 0;
order= (ORDER**)(expr + arg_count_field);
for (ORDER *order_item= (ORDER*) is_order->first;
order_item != NULL;
order_item= order_item->next)
{
order[j++]= order_item;
order[i++]= order_item;
}
}
}
@ -1561,7 +1554,6 @@ Item_func_group_concat::~Item_func_group_concat()
}
if (table)
free_tmp_table(thd, table);
if (tmp_table_param)
delete tmp_table_param;
if (tree_mode)
delete_tree(tree);
@ -1593,14 +1585,17 @@ bool Item_func_group_concat::add()
copy_funcs(tmp_table_param->items_to_copy);
bool record_is_null= TRUE;
for (int i= 0; i < arg_show_fields; i++)
for (uint i= 0; i < arg_show_fields; i++)
{
Item *show_item= expr[i];
if (!show_item->const_item())
{
Field *f= show_item->tmp_table_field();
if (!f->is_null())
{
record_is_null= FALSE;
break;
}
}
}
if (record_is_null)
@ -1631,7 +1626,7 @@ void Item_func_group_concat::reset_field()
bool
Item_func_group_concat::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
{
int i; /* for loop variable */
uint i; /* for loop variable */
if (!thd->allow_sum_func)
{
@ -1641,11 +1636,11 @@ Item_func_group_concat::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
thd->allow_sum_func= 0;
maybe_null= 0;
for (uint ui= 0 ; ui < arg_count ; ui++)
for (i= 0 ; i < arg_count ; i++)
{
if (args[ui]->fix_fields(thd, tables, args + ui) || args[ui]->check_cols(1))
if (args[i]->fix_fields(thd, tables, args + i) || args[i]->check_cols(1))
return 1;
maybe_null |= args[ui]->maybe_null;
maybe_null |= args[i]->maybe_null;
}
for (i= 0 ; i < arg_count_field ; i++)
{

View File

@ -643,21 +643,20 @@ class Item_func_group_concat : public Item_sum
public:
String result;
String *separator;
uint show_elements;
TREE tree_base;
TREE *tree;
TABLE *table;
int arg_count_order;
int arg_count_field;
int arg_show_fields;
int distinct;
Item **expr;
ORDER **order;
bool tree_mode;
int count_cut_values;
ulong group_concat_max_len;
bool warning_for_row;
TABLE_LIST *tables_list;
ulong group_concat_max_len;
uint show_elements;
uint arg_count_order;
uint arg_count_field;
uint arg_show_fields;
uint count_cut_values;
bool tree_mode, distinct;
bool warning_for_row;
bool always_null;
/*
Following is 0 normal object and pointer to original one for copy
@ -665,7 +664,7 @@ class Item_func_group_concat : public Item_sum
*/
Item_func_group_concat *original;
Item_func_group_concat(int is_distinct,List<Item> *is_select,
Item_func_group_concat(bool is_distinct,List<Item> *is_select,
SQL_LIST *is_order,String *is_separator);
Item_func_group_concat(THD *thd, Item_func_group_concat &item)
@ -675,20 +674,20 @@ class Item_func_group_concat : public Item_sum
warning(item.warning),
warning_available(item.warning_available),
separator(item.separator),
show_elements(item.show_elements),
tree(item.tree),
table(item.table),
expr(item.expr),
order(item.order),
tables_list(item.tables_list),
group_concat_max_len(item.group_concat_max_len),
show_elements(item.show_elements),
arg_count_order(item.arg_count_order),
arg_count_field(item.arg_count_field),
arg_show_fields(item.arg_show_fields),
distinct(item.distinct),
expr(item.expr),
order(item.order),
tree_mode(0),
count_cut_values(item.count_cut_values),
group_concat_max_len(item.group_concat_max_len),
tree_mode(0),
distinct(item.distinct),
warning_for_row(item.warning_for_row),
tables_list(item.tables_list),
original(&item)
{
quick_group = 0;

View File

@ -412,6 +412,7 @@ static SYMBOL symbols[] = {
{ "WRITE", SYM(WRITE_SYM),0,0},
{ "WHEN", SYM(WHEN_SYM),0,0},
{ "WHERE", SYM(WHERE),0,0},
{ "NO_WRITE_TO_BINLOG", SYM(NO_WRITE_TO_BINLOG),0,0},
{ "XOR", SYM(XOR),0,0},
{ "X509", SYM(X509_SYM),0,0},
{ "YEAR", SYM(YEAR_SYM),0,0},

View File

@ -767,6 +767,7 @@ int MYSQL_LOG::purge_logs(const char *to_log,
!log_in_use(log_info.log_file_name))
{
ulong tmp;
LINT_INIT(tmp);
if (decrease_log_space) //stat the file we want to delete
{
MY_STAT s;

View File

@ -1182,15 +1182,19 @@ void Load_log_event::pack_info(Protocol *protocol)
pos= pretty_print_str(pos, sql_ex.escaped, sql_ex.escaped_len);
}
bool line_lexem_added= false;
if (sql_ex.line_term_len)
{
pos= strmov(pos, " LINES TERMINATED BY ");
pos= pretty_print_str(pos, sql_ex.line_term, sql_ex.line_term_len);
line_lexem_added= true;
}
if (sql_ex.line_start_len)
{
pos= strmov(pos, " LINES STARTING BY ");
if (!line_lexem_added)
pos= strmov(pos," LINES");
pos= strmov(pos, " STARTING BY ");
pos= pretty_print_str(pos, sql_ex.line_start, sql_ex.line_start_len);
}
@ -1438,10 +1442,10 @@ void Load_log_event::print(FILE* file, bool short_form, char* last_db)
if (db && db[0] && !same_db)
fprintf(file, "use %s;\n", db);
fprintf(file, "LOAD ");
fprintf(file, "LOAD DATA ");
if (check_fname_outside_temp_buf())
fprintf(file, "LOCAL ");
fprintf(file, "DATA INFILE '%-*s' ", fname_len, fname);
fprintf(file, "INFILE '%-*s' ", fname_len, fname);
if (sql_ex.opt_flags & REPLACE_FLAG)
fprintf(file," REPLACE ");
@ -1469,15 +1473,19 @@ void Load_log_event::print(FILE* file, bool short_form, char* last_db)
pretty_print_str(file, sql_ex.escaped, sql_ex.escaped_len);
}
bool line_lexem_added= false;
if (sql_ex.line_term)
{
fprintf(file," LINES TERMINATED BY ");
pretty_print_str(file, sql_ex.line_term, sql_ex.line_term_len);
line_lexem_added= true;
}
if (sql_ex.line_start)
{
fprintf(file," LINES STARTING BY ");
if (!line_lexem_added)
fprintf(file," LINES");
fprintf(file," STARTING BY ");
pretty_print_str(file, sql_ex.line_start, sql_ex.line_start_len);
}

View File

@ -30,7 +30,7 @@
#undef write /* remove pthread.h macro definition for EMX */
#endif
typedef ulong table_map; /* Used for table bits in join */
typedef ulonglong table_map; /* Used for table bits in join */
typedef ulong key_map; /* Used for finding keys */
typedef ulong key_part_map; /* Used for finding key parts */
@ -369,7 +369,8 @@ bool do_command(THD *thd);
bool dispatch_command(enum enum_server_command command, THD *thd,
char* packet, uint packet_length);
bool check_stack_overrun(THD *thd,char *dummy);
bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables);
bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
bool *write_to_binlog);
void table_cache_init(void);
void table_cache_free(void);
uint cached_tables(void);
@ -846,6 +847,7 @@ void end_read_record(READ_RECORD *info);
ha_rows filesort(THD *thd, TABLE *form,struct st_sort_field *sortorder,
uint s_length, SQL_SELECT *select,
ha_rows max_rows, ha_rows *examined_rows);
void filesort_free_buffers(TABLE *table);
void change_double_for_sort(double nr,byte *to);
int get_quick_record(SQL_SELECT *select);
int calc_weekday(long daynr,bool sunday_first_day_of_week);

View File

@ -29,6 +29,9 @@
#include "ha_innodb.h"
#endif
#include "ha_myisam.h"
#ifdef HAVE_ISAM
#include "ha_isam.h"
#endif
#include <nisam.h>
#include <thr_alarm.h>
#include <ft_global.h>
@ -314,18 +317,12 @@ my_bool opt_safe_user_create = 0, opt_no_mix_types = 0;
my_bool lower_case_table_names, opt_old_rpl_compat;
my_bool opt_show_slave_auth_info, opt_sql_bin_update = 0;
my_bool opt_log_slave_updates= 0, opt_old_passwords=0, use_old_passwords=0;
my_bool opt_console= 0, opt_bdb, opt_innodb;
my_bool opt_console= 0, opt_bdb, opt_innodb, opt_isam;
volatile bool mqh_used = 0;
FILE *bootstrap_file=0;
int segfaulted = 0; // ensure we do not enter SIGSEGV handler twice
/*
If sql_bin_update is true, SQL_LOG_UPDATE and SQL_LOG_BIN are kept in sync,
and are treated as aliases for each other
*/
static bool kill_in_progress=FALSE;
static bool kill_in_progress=0, segfaulted= 0;
struct rand_struct sql_rand; // used by sql_class.cc:THD::THD()
static int cleanup_done;
static char **defaults_argv;
@ -379,7 +376,7 @@ arg_cmp_func Arg_comparator::comparator_matrix[4][2] =
{&Arg_comparator::compare_row, &Arg_comparator::compare_e_row}};
#ifdef HAVE_SMEM
char *shared_memory_base_name=default_shared_memory_base_name;
bool opt_enable_shared_memory = 0;
my_bool opt_enable_shared_memory = 0;
#endif
volatile ulong cached_thread_count=0;
@ -1496,7 +1493,7 @@ static void check_data_home(const char *path)
static void sig_reload(int signo)
{
// Flush everything
reload_acl_and_cache((THD*) 0,REFRESH_LOG, (TABLE_LIST*) 0);
reload_acl_and_cache((THD*) 0,REFRESH_LOG, (TABLE_LIST*) 0, NULL);
signal(signo, SIG_ACK);
}
@ -1832,7 +1829,7 @@ extern "C" void *signal_hand(void *arg __attribute__((unused)))
(REFRESH_LOG | REFRESH_TABLES | REFRESH_FAST |
REFRESH_STATUS | REFRESH_GRANT |
REFRESH_THREADS | REFRESH_HOSTS),
(TABLE_LIST*) 0); // Flush logs
(TABLE_LIST*) 0, NULL); // Flush logs
mysql_print_status((THD*) 0); // Send debug some info
}
break;
@ -3431,7 +3428,7 @@ enum options
OPT_INNODB_FLUSH_METHOD,
OPT_INNODB_FAST_SHUTDOWN,
OPT_SAFE_SHOW_DB,
OPT_INNODB, OPT_SKIP_SAFEMALLOC,
OPT_INNODB, OPT_ISAM, OPT_SKIP_SAFEMALLOC,
OPT_TEMP_POOL, OPT_TX_ISOLATION,
OPT_SKIP_STACK_TRACE, OPT_SKIP_SYMLINKS,
OPT_MAX_BINLOG_DUMP_EVENTS, OPT_SPORADIC_BINLOG_DUMP_FAIL,
@ -3892,6 +3889,10 @@ Disable with --skip-bdb (will save memory)",
Disable with --skip-innodb (will save memory)",
(gptr*) &opt_innodb, (gptr*) &opt_innodb, 0, GET_BOOL, NO_ARG, 1, 0, 0,
0, 0, 0},
{"isam", OPT_ISAM, "Enable isam (if this version of MySQL supports it). \
Disable with --skip-isam",
(gptr*) &opt_isam, (gptr*) &opt_isam, 0, GET_BOOL, NO_ARG, 1, 0, 0,
0, 0, 0},
{"skip-locking", OPT_SKIP_LOCK,
"Deprecated option, use --skip-external-locking instead",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@ -5043,6 +5044,20 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
berkeley_skip=1;
have_berkeley_db=SHOW_OPTION_DISABLED;
}
#endif
break;
case OPT_ISAM:
#ifdef HAVE_ISAM
if (opt_isam)
{
isam_skip=0;
have_isam= SHOW_OPTION_YES;
}
else
{
isam_skip=1;
have_isam= SHOW_OPTION_DISABLED;
}
#endif
break;
case OPT_INNODB:

View File

@ -134,19 +134,7 @@ void end_read_record(READ_RECORD *info)
}
if (info->table)
{
TABLE *table= info->table;
if (table->sort.record_pointers)
{
my_free((gptr) table->sort.record_pointers,MYF(0));
table->sort.record_pointers=0;
}
if (table->sort.addon_buf)
{
my_free((char *) table->sort.addon_buf, MYF(0));
my_free((char *) table->sort.addon_field, MYF(MY_ALLOW_ZERO_PTR));
table->sort.addon_buf=0;
table->sort.addon_field=0;
}
filesort_free_buffers(info->table);
(void) info->file->extra(HA_EXTRA_NO_CACHE);
(void) info->file->rnd_end();
info->table=0;

View File

@ -256,16 +256,18 @@ v/*
"Cyclic reference on subqueries",
"Converting column '%s' from %s to %s",
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -250,16 +250,18 @@
"Cyclic reference on subqueries",
"Converting column '%s' from %s to %s",
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -258,16 +258,18 @@
"Cyclic reference on subqueries",
"Converting column '%s' from %s to %s",
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -31,8 +31,8 @@
"'%-.64s' is locked against change",
"Sort aborted",
"View '%-.64s' doesn't exist for '%-.64s'",
"Got error %d from table handler",
"Table handler for '%-.64s' doesn't have this option",
"Got error %d from storage engine",
"Table storage engine for '%-.64s' doesn't have this option",
"Can't find record in '%-.64s'",
"Incorrect information in file: '%-.64s'",
"Incorrect key file for table: '%-.64s'. Try to repair it",
@ -90,7 +90,7 @@
"File '%-.80s' already exists",
"Records: %ld Deleted: %ld Skipped: %ld Warnings: %ld",
"Records: %ld Duplicates: %ld",
"Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the table handler doesn't support unique sub keys",
"Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the store engine doesn't support unique sub keys",
"You can't delete all columns with ALTER TABLE. Use DROP TABLE instead",
"Can't DROP '%-.64s'. Check that column/key exists",
"Records: %ld Duplicates: %ld Warnings: %ld",
@ -168,7 +168,7 @@
"The used table type doesn't support AUTO_INCREMENT columns",
"INSERT DELAYED can't be used with table '%-.64s' because it is locked with LOCK TABLES",
"Incorrect column name '%-.100s'",
"The used table handler can't index column '%-.64s'",
"The used storage engine can't index column '%-.64s'",
"All tables in the MERGE table are not identically defined",
"Can't write, because of unique constraint, to table '%-.64s'",
"BLOB column '%-.64s' used in key specification without a key length",
@ -179,14 +179,14 @@
"You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column",
"Key '%-.64s' doesn't exist in table '%-.64s'",
"Can't open table",
"The handler for the table doesn't support %s",
"The storage enginge for the table doesn't support %s",
"You are not allowed to execute this command in a transaction",
"Got error %d during COMMIT",
"Got error %d during ROLLBACK",
"Got error %d during FLUSH_LOGS",
"Got error %d during CHECKPOINT",
"Aborted connection %ld to db: '%-.64s' user: '%-.32s' host: `%-.64s' (%-.64s)",
"The handler for the table does not support binary table dump",
"The store engine for the table does not support binary table dump",
"Binlog closed, cannot RESET MASTER",
"Failed rebuilding the index of dumped table '%-.64s'",
"Error from master: '%-.64s'",
@ -249,21 +249,16 @@
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()";
"Record count is fewer than the column count at row %ld";
"Record count is more than the column count at row %ld";
"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld";
"Data truncated, out of range for column '%s' at row %ld";
"Data truncated for column '%s' at row %ld"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -252,16 +252,18 @@
"Cyclic reference on subqueries",
"Converting column '%s' from %s to %s",
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -247,16 +247,18 @@
"Cyclic reference on subqueries",
"Converting column '%s' from %s to %s",
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -260,12 +260,14 @@
"Select %u wurde w<>hrend der Optimierung reduziert.",
"Tabelle '%-.64s', die in einem der SELECT-Befehle verwendet wurde kann nicht in %-.32s verwendet werden",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -247,16 +247,18 @@
"Cyclic reference on subqueries",
"Converting column '%s' from %s to %s",
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -249,16 +249,18 @@
"Cyclic reference on subqueries",
"Converting column '%s' from %s to %s",
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -247,16 +247,18 @@
"Cyclic reference on subqueries",
"Converting column '%s' from %s to %s",
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -249,16 +249,18 @@
"Cyclic reference on subqueries",
"Converting column '%s' from %s to %s",
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -247,16 +247,18 @@
"Cyclic reference on subqueries",
"Converting column '%s' from %s to %s",
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -249,16 +249,18 @@
"Cyclic reference on subqueries",
"Converting column '%s' from %s to %s",
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -249,16 +249,18 @@
"Cyclic reference on subqueries",
"Converting column '%s' from %s to %s",
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -251,16 +251,18 @@
"Cyclic reference on subqueries",
"Converting column '%s' from %s to %s",
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -247,16 +247,18 @@
"Cyclic reference on subqueries",
"Converting column '%s' from %s to %s",
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -251,16 +251,18 @@
"Cyclic reference on subqueries",
"Converting column '%s' from %s to %s"
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -249,16 +249,18 @@
"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> '%s' <20><> %s <20> %s",
"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '%-.64s' <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

View File

@ -243,16 +243,18 @@
"Cyclic reference on subqueries",
"Converting column '%s' from %s to %s",
"Reference '%-.64s' not supported (%s)",
"Every derived table must have it's own alias"
"Every derived table must have it's own alias",
"Select %u was reduced during optimisation",
"Table '%-.64s' from one of SELECT's can not be used in %-.32s"
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
"All parts of a SPATIAL KEY must be NOT NULL"
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
"The slave was already running"
"The slave was already stopped"
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)"
"Z_BUF_ERROR: Not enough memory available for zlib"
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)"
"Z_DATA_ERROR: Input data was corrupted for zlib"
"%d line(s) was(were) cut by group_concat()"
"Table '%-.64s' from one of SELECT's can not be used in %-.32s",
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
"All parts of a SPATIAL KEY must be NOT NULL",
"COLLATION '%s' is not valid for CHARACTER SET '%s'",
"The slave was already running",
"The slave was already stopped",
"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)",
"Z_BUF_ERROR: Not enough memory available for zlib",
"Z_MEM_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"Z_DATA_ERROR: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",

Some files were not shown because too many files have changed in this diff Show More