mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge
sql/ha_ndbcluster.h: Auto merged sql/item.h: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_select.cc: Auto merged
This commit is contained in:
@ -155,6 +155,7 @@ mronstrom@mysql.com
|
|||||||
mskold@bk-internal.mysql.com
|
mskold@bk-internal.mysql.com
|
||||||
mskold@mysql.com
|
mskold@mysql.com
|
||||||
msvensson@build.mysql.com
|
msvensson@build.mysql.com
|
||||||
|
msvensson@neptunus.(none)
|
||||||
msvensson@neptunus.homeip.net
|
msvensson@neptunus.homeip.net
|
||||||
mwagner@cash.mwagner.org
|
mwagner@cash.mwagner.org
|
||||||
mwagner@evoq.mwagner.org
|
mwagner@evoq.mwagner.org
|
||||||
|
@ -344,6 +344,10 @@ SOURCE=..\mysys\my_alloc.c
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\mysys\my_decimal.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\mysys\my_getopt.c
|
SOURCE=..\mysys\my_getopt.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
@ -1085,6 +1085,10 @@ SOURCE=.\mf_iocache.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\my_decimal.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\my_time.c
|
SOURCE=.\my_time.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
@ -177,6 +177,10 @@ SOURCE=.\ctype.c
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\decimal.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\int2str.c
|
SOURCE=.\int2str.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
@ -1100,7 +1100,7 @@ at offset %lu ; this could be a log format error or read error",
|
|||||||
/* EOF can't be hit here normally, so it's a real error */
|
/* EOF can't be hit here normally, so it's a real error */
|
||||||
die("Could not read a Rotate_log_event event \
|
die("Could not read a Rotate_log_event event \
|
||||||
at offset %lu ; this could be a log format error or read error",
|
at offset %lu ; this could be a log format error or read error",
|
||||||
tmp_pos);
|
tmp_pos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
@ -1169,9 +1169,15 @@ static int dump_local_log_entries(const char* logname)
|
|||||||
Log_event* ev = Log_event::read_log_event(file, description_event);
|
Log_event* ev = Log_event::read_log_event(file, description_event);
|
||||||
if (!ev)
|
if (!ev)
|
||||||
{
|
{
|
||||||
if (file->error)
|
/*
|
||||||
|
if binlog wasn't closed properly ("in use" flag is set) don't complain
|
||||||
|
about a corruption, but treat it as EOF and move to the next binlog.
|
||||||
|
*/
|
||||||
|
if (description_event->flags & LOG_EVENT_BINLOG_IN_USE_F)
|
||||||
|
file->error= 0;
|
||||||
|
else if (file->error)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Could not read entry at offset %s:"
|
"Could not read entry at offset %s:"
|
||||||
"Error in log format or read error\n",
|
"Error in log format or read error\n",
|
||||||
llstr(old_off,llbuff));
|
llstr(old_off,llbuff));
|
||||||
|
@ -1887,7 +1887,7 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bzero chsize cuserid fchmod fcntl \
|
|||||||
getcwd gethostbyaddr_r gethostbyname_r getpass getpassphrase getpwnam \
|
getcwd gethostbyaddr_r gethostbyname_r getpass getpassphrase getpwnam \
|
||||||
getpwuid getrlimit getrusage getwd gmtime_r index initgroups isnan \
|
getpwuid getrlimit getrusage getwd gmtime_r index initgroups isnan \
|
||||||
localtime_r locking longjmp lrand48 madvise mallinfo memcpy memmove \
|
localtime_r locking longjmp lrand48 madvise mallinfo memcpy memmove \
|
||||||
mkstemp mlockall perror poll pread pthread_attr_create mmap \
|
mkstemp mlockall perror poll pread pthread_attr_create mmap getpagesize \
|
||||||
pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
|
pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
|
||||||
pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
|
pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
|
||||||
pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
|
pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
|
||||||
|
@ -310,9 +310,6 @@ inline double ulonglong2double(ulonglong value)
|
|||||||
#define HAVE_SETFILEPOINTER
|
#define HAVE_SETFILEPOINTER
|
||||||
#define HAVE_VIO
|
#define HAVE_VIO
|
||||||
|
|
||||||
#define HAME_MMAP /* in mysys/my_mmap.c */
|
|
||||||
#define HAVE_GETPAGESIZE /* in mysys/my_mmap.c */
|
|
||||||
|
|
||||||
#ifdef NOT_USED
|
#ifdef NOT_USED
|
||||||
#define HAVE_SNPRINTF /* Gave link error */
|
#define HAVE_SNPRINTF /* Gave link error */
|
||||||
#define _snprintf snprintf
|
#define _snprintf snprintf
|
||||||
@ -353,6 +350,8 @@ inline double ulonglong2double(ulonglong value)
|
|||||||
|
|
||||||
#define DO_NOT_REMOVE_THREAD_WRAPPERS
|
#define DO_NOT_REMOVE_THREAD_WRAPPERS
|
||||||
#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
|
#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
|
||||||
|
#define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V))
|
||||||
|
#define thread_safe_dec_and_test(V, L) thread_safe_decrement(V,L)
|
||||||
/* The following is only used for statistics, so it should be good enough */
|
/* The following is only used for statistics, so it should be good enough */
|
||||||
#ifdef __NT__ /* This should also work on Win98 but .. */
|
#ifdef __NT__ /* This should also work on Win98 but .. */
|
||||||
#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
|
#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
|
||||||
@ -366,6 +365,7 @@ inline double ulonglong2double(ulonglong value)
|
|||||||
#define statistic_add(V,C,L) (V)+=(C)
|
#define statistic_add(V,C,L) (V)+=(C)
|
||||||
#endif
|
#endif
|
||||||
#define statistic_increment(V,L) thread_safe_increment((V),(L))
|
#define statistic_increment(V,L) thread_safe_increment((V),(L))
|
||||||
|
#define statistic_decrement(V,L) thread_safe_decrement((V),(L))
|
||||||
|
|
||||||
#define shared_memory_buffer_length 16000
|
#define shared_memory_buffer_length 16000
|
||||||
#define default_shared_memory_base_name "MYSQL"
|
#define default_shared_memory_base_name "MYSQL"
|
||||||
|
@ -17,7 +17,9 @@
|
|||||||
#ifndef _decimal_h
|
#ifndef _decimal_h
|
||||||
#define _decimal_h
|
#define _decimal_h
|
||||||
|
|
||||||
typedef enum {TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR} decimal_round_mode;
|
typedef enum
|
||||||
|
{TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR}
|
||||||
|
decimal_round_mode;
|
||||||
typedef int32 decimal_digit;
|
typedef int32 decimal_digit;
|
||||||
|
|
||||||
typedef struct st_decimal {
|
typedef struct st_decimal {
|
||||||
@ -26,11 +28,10 @@ typedef struct st_decimal {
|
|||||||
decimal_digit *buf;
|
decimal_digit *buf;
|
||||||
} decimal;
|
} decimal;
|
||||||
|
|
||||||
|
int internal_str2dec(const char *from, decimal *to, char **end, my_bool fixed);
|
||||||
int decimal2string(decimal *from, char *to, int *to_len,
|
int decimal2string(decimal *from, char *to, int *to_len,
|
||||||
int fixed_precision, int fixed_decimals,
|
int fixed_precision, int fixed_decimals,
|
||||||
char filler);
|
char filler);
|
||||||
int string2decimal(char *from, decimal *to, char **end);
|
|
||||||
int string2decimal_fixed(char *from, decimal *to, char **end);
|
|
||||||
int decimal2ulonglong(decimal *from, ulonglong *to);
|
int decimal2ulonglong(decimal *from, ulonglong *to);
|
||||||
int ulonglong2decimal(ulonglong from, decimal *to);
|
int ulonglong2decimal(ulonglong from, decimal *to);
|
||||||
int decimal2longlong(decimal *from, longlong *to);
|
int decimal2longlong(decimal *from, longlong *to);
|
||||||
@ -51,10 +52,14 @@ int decimal_cmp(decimal *from1, decimal *from2);
|
|||||||
int decimal_mul(decimal *from1, decimal *from2, decimal *to);
|
int decimal_mul(decimal *from1, decimal *from2, decimal *to);
|
||||||
int decimal_div(decimal *from1, decimal *from2, decimal *to, int scale_incr);
|
int decimal_div(decimal *from1, decimal *from2, decimal *to, int scale_incr);
|
||||||
int decimal_mod(decimal *from1, decimal *from2, decimal *to);
|
int decimal_mod(decimal *from1, decimal *from2, decimal *to);
|
||||||
int decimal_round(decimal *from, decimal *to, int new_scale, decimal_round_mode mode);
|
int decimal_round(decimal *from, decimal *to, int new_scale,
|
||||||
|
decimal_round_mode mode);
|
||||||
int decimal_is_zero(decimal *from);
|
int decimal_is_zero(decimal *from);
|
||||||
void max_decimal(int precision, int frac, decimal *to);
|
void max_decimal(int precision, int frac, decimal *to);
|
||||||
|
|
||||||
|
#define string2decimal(A,B,C) internal_str2dec((A), (B), (C), 0)
|
||||||
|
#define string2decimal_fixed(A,B,C) internal_str2dec((A), (B), (C), 1)
|
||||||
|
|
||||||
/* set a decimal to zero */
|
/* set a decimal to zero */
|
||||||
|
|
||||||
#define decimal_make_zero(dec) do { \
|
#define decimal_make_zero(dec) do { \
|
||||||
|
@ -761,7 +761,7 @@ typedef long int32;
|
|||||||
#endif
|
#endif
|
||||||
typedef unsigned long uint32; /* Short for unsigned integer >= 32 bits */
|
typedef unsigned long uint32; /* Short for unsigned integer >= 32 bits */
|
||||||
#else
|
#else
|
||||||
error "Neither int or long is of 4 bytes width"
|
#error "Neither int or long is of 4 bytes width"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(HAVE_ULONG) && !defined(HAVE_LINUXTHREADS) && !defined(__USE_MISC)
|
#if !defined(HAVE_ULONG) && !defined(HAVE_LINUXTHREADS) && !defined(__USE_MISC)
|
||||||
|
@ -689,12 +689,12 @@ extern pthread_t shutdown_th, main_th, signal_th;
|
|||||||
#define thread_safe_add(V,C,L) (pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L)))
|
#define thread_safe_add(V,C,L) (pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L)))
|
||||||
#define thread_safe_sub(V,C,L) \
|
#define thread_safe_sub(V,C,L) \
|
||||||
(pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L)))
|
(pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L)))
|
||||||
#if defined (__GNUC__) || defined (__cplusplus)
|
#ifdef __cplusplus
|
||||||
static inline bool thread_safe_dec_and_test(ulong V, pthread_mutex_t *L)
|
static inline bool thread_safe_dec_and_test(ulong &V, pthread_mutex_t *L)
|
||||||
{
|
{
|
||||||
ulong res;
|
ulong res;
|
||||||
pthread_mutex_lock(L);
|
pthread_mutex_lock(L);
|
||||||
res=V--;
|
res=--V;
|
||||||
pthread_mutex_unlock(L);
|
pthread_mutex_unlock(L);
|
||||||
return res==0;
|
return res==0;
|
||||||
}
|
}
|
||||||
|
@ -796,7 +796,7 @@ void my_free_open_file_info(void);
|
|||||||
ulonglong my_getsystime(void);
|
ulonglong my_getsystime(void);
|
||||||
my_bool my_gethwaddr(uchar *to);
|
my_bool my_gethwaddr(uchar *to);
|
||||||
|
|
||||||
#ifdef HAVE_MMAP
|
#ifdef HAVE_SYS_MMAN_H
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
#ifndef MAP_NOSYNC
|
#ifndef MAP_NOSYNC
|
||||||
@ -811,9 +811,11 @@ my_bool my_gethwaddr(uchar *to);
|
|||||||
/* not a complete set of mmap() flags, but only those that nesessary */
|
/* not a complete set of mmap() flags, but only those that nesessary */
|
||||||
#define PROT_READ 1
|
#define PROT_READ 1
|
||||||
#define PROT_WRITE 2
|
#define PROT_WRITE 2
|
||||||
#define MAP_NOSYNC 0x800
|
#define MAP_SHARED 0x0001
|
||||||
|
#define MAP_NOSYNC 0x0800
|
||||||
#define MAP_FAILED ((void *)-1)
|
#define MAP_FAILED ((void *)-1)
|
||||||
#define MS_SYNC 0x0000
|
#define MS_SYNC 0x0000
|
||||||
|
#define HAVE_MMAP
|
||||||
|
|
||||||
int my_getpagesize(void);
|
int my_getpagesize(void);
|
||||||
void *my_mmap(void *, size_t, int, int, int, my_off_t);
|
void *my_mmap(void *, size_t, int, int, int, my_off_t);
|
||||||
|
@ -315,7 +315,7 @@ trx_is_active(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ut_dulint_cmp(trx_id, trx_sys->max_trx_id) >= 0) {
|
if (ut_dulint_cmp(trx_id, trx_sys->max_trx_id) >= 0) {
|
||||||
|
|
||||||
/* There must be corruption: we return TRUE because this
|
/* There must be corruption: we return TRUE because this
|
||||||
function is only called by lock_clust_rec_some_has_impl()
|
function is only called by lock_clust_rec_some_has_impl()
|
||||||
and row_vers_impl_x_locked_off_kernel() and they have
|
and row_vers_impl_x_locked_off_kernel() and they have
|
||||||
@ -325,8 +325,9 @@ trx_is_active(
|
|||||||
}
|
}
|
||||||
|
|
||||||
trx = trx_get_on_id(trx_id);
|
trx = trx_get_on_id(trx_id);
|
||||||
if (trx && (trx->conc_state == TRX_ACTIVE)) {
|
if (trx && (trx->conc_state == TRX_ACTIVE ||
|
||||||
|
trx->conc_state == TRX_PREPARED)) {
|
||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,10 +153,11 @@ read_view_open_now(
|
|||||||
/* No active transaction should be visible, except cr_trx */
|
/* No active transaction should be visible, except cr_trx */
|
||||||
|
|
||||||
while (trx) {
|
while (trx) {
|
||||||
if (trx != cr_trx && trx->conc_state == TRX_ACTIVE) {
|
if (trx != cr_trx && (trx->conc_state == TRX_ACTIVE ||
|
||||||
|
trx->conc_state == TRX_PREPARED)) {
|
||||||
|
|
||||||
read_view_set_nth_trx_id(view, n, trx->id);
|
read_view_set_nth_trx_id(view, n, trx->id);
|
||||||
|
|
||||||
n++;
|
n++;
|
||||||
|
|
||||||
/* NOTE that a transaction whose trx number is <
|
/* NOTE that a transaction whose trx number is <
|
||||||
@ -164,7 +165,7 @@ read_view_open_now(
|
|||||||
in the middle of its commit! Note that when a
|
in the middle of its commit! Note that when a
|
||||||
transaction starts, we initialize trx->no to
|
transaction starts, we initialize trx->no to
|
||||||
ut_dulint_max. */
|
ut_dulint_max. */
|
||||||
|
|
||||||
if (ut_dulint_cmp(view->low_limit_no, trx->no) > 0) {
|
if (ut_dulint_cmp(view->low_limit_no, trx->no) > 0) {
|
||||||
|
|
||||||
view->low_limit_no = trx->no;
|
view->low_limit_no = trx->no;
|
||||||
|
@ -1617,20 +1617,21 @@ trx_print(
|
|||||||
(ulong) ut_dulint_get_high(trx->id),
|
(ulong) ut_dulint_get_high(trx->id),
|
||||||
(ulong) ut_dulint_get_low(trx->id));
|
(ulong) ut_dulint_get_low(trx->id));
|
||||||
|
|
||||||
switch (trx->conc_state) {
|
switch (trx->conc_state) {
|
||||||
case TRX_NOT_STARTED:
|
case TRX_NOT_STARTED:
|
||||||
fputs(", not started", f);
|
fputs(", not started", f);
|
||||||
break;
|
break;
|
||||||
case TRX_ACTIVE:
|
case TRX_ACTIVE:
|
||||||
|
case TRX_PREPARED:
|
||||||
fprintf(f, ", ACTIVE %lu sec",
|
fprintf(f, ", ACTIVE %lu sec",
|
||||||
(ulong)difftime(time(NULL), trx->start_time));
|
(ulong)difftime(time(NULL), trx->start_time));
|
||||||
break;
|
break;
|
||||||
case TRX_COMMITTED_IN_MEMORY:
|
case TRX_COMMITTED_IN_MEMORY:
|
||||||
fputs(", COMMITTED IN MEMORY", f);
|
fputs(", COMMITTED IN MEMORY", f);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(f, " state %lu", (ulong) trx->conc_state);
|
fprintf(f, " state %lu", (ulong) trx->conc_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_LINUX
|
#ifdef UNIV_LINUX
|
||||||
fprintf(f, ", process no %lu", trx->mysql_process_no);
|
fprintf(f, ", process no %lu", trx->mysql_process_no);
|
||||||
|
0
libmysqld/libmysqld.rc
Executable file → Normal file
0
libmysqld/libmysqld.rc
Executable file → Normal file
0
libmysqld/resource.h
Executable file → Normal file
0
libmysqld/resource.h
Executable file → Normal file
@ -125,4 +125,5 @@ void ft_free_stopwords()
|
|||||||
my_free((char*) stopwords3,MYF(0));
|
my_free((char*) stopwords3,MYF(0));
|
||||||
stopwords3=0;
|
stopwords3=0;
|
||||||
}
|
}
|
||||||
|
ft_stopword_file= 0;
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,8 @@ mysql_test_run_new_SOURCES= mysql_test_run_new.c my_manage.c my_create_tables.c
|
|||||||
dist-hook:
|
dist-hook:
|
||||||
mkdir -p $(distdir)/t $(distdir)/r $(distdir)/include \
|
mkdir -p $(distdir)/t $(distdir)/r $(distdir)/include \
|
||||||
$(distdir)/std_data
|
$(distdir)/std_data
|
||||||
$(INSTALL_DATA) $(srcdir)/t/*.test $(srcdir)/t/*.opt $(srcdir)/t/*.sh $(srcdir)/t/*.slave-mi $(distdir)/t
|
$(INSTALL_DATA) $(srcdir)/t/*.test $(srcdir)/t/*.disabled $(distdir)/t
|
||||||
|
$(INSTALL_DATA) $(srcdir)/t/*.opt $(srcdir)/t/*.sh $(srcdir)/t/*.slave-mi $(distdir)/t
|
||||||
$(INSTALL_DATA) $(srcdir)/include/*.inc $(distdir)/include
|
$(INSTALL_DATA) $(srcdir)/include/*.inc $(distdir)/include
|
||||||
$(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.result.es $(srcdir)/r/*.require $(distdir)/r
|
$(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.result.es $(srcdir)/r/*.require $(distdir)/r
|
||||||
$(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(distdir)/std_data
|
$(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(distdir)/std_data
|
||||||
@ -62,10 +63,12 @@ install-data-local:
|
|||||||
$(DESTDIR)$(testdir)/std_data
|
$(DESTDIR)$(testdir)/std_data
|
||||||
$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(testdir)
|
$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(testdir)
|
||||||
$(INSTALL_DATA) $(srcdir)/t/*.test $(DESTDIR)$(testdir)/t
|
$(INSTALL_DATA) $(srcdir)/t/*.test $(DESTDIR)$(testdir)/t
|
||||||
|
$(INSTALL_DATA) $(srcdir)/t/*.disabled $(DESTDIR)$(testdir)/t
|
||||||
$(INSTALL_DATA) $(srcdir)/t/*.opt $(DESTDIR)$(testdir)/t
|
$(INSTALL_DATA) $(srcdir)/t/*.opt $(DESTDIR)$(testdir)/t
|
||||||
$(INSTALL_DATA) $(srcdir)/t/*.sh $(DESTDIR)$(testdir)/t
|
$(INSTALL_DATA) $(srcdir)/t/*.sh $(DESTDIR)$(testdir)/t
|
||||||
$(INSTALL_DATA) $(srcdir)/t/*.slave-mi $(DESTDIR)$(testdir)/t
|
$(INSTALL_DATA) $(srcdir)/t/*.slave-mi $(DESTDIR)$(testdir)/t
|
||||||
$(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.result.es $(DESTDIR)$(testdir)/r
|
$(INSTALL_DATA) $(srcdir)/r/*.result $(DESTDIR)$(testdir)/r
|
||||||
|
$(INSTALL_DATA) $(srcdir)/r/*.result.es $(DESTDIR)$(testdir)/r
|
||||||
$(INSTALL_DATA) $(srcdir)/r/*.require $(DESTDIR)$(testdir)/r
|
$(INSTALL_DATA) $(srcdir)/r/*.require $(DESTDIR)$(testdir)/r
|
||||||
$(INSTALL_DATA) $(srcdir)/include/*.inc $(DESTDIR)$(testdir)/include
|
$(INSTALL_DATA) $(srcdir)/include/*.inc $(DESTDIR)$(testdir)/include
|
||||||
$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(DESTDIR)$(testdir)/std_data
|
$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(DESTDIR)$(testdir)/std_data
|
||||||
|
@ -208,7 +208,6 @@ export UMASK UMASK_DIR
|
|||||||
MASTER_RUNNING=0
|
MASTER_RUNNING=0
|
||||||
MASTER1_RUNNING=0
|
MASTER1_RUNNING=0
|
||||||
MASTER_MYPORT=9306
|
MASTER_MYPORT=9306
|
||||||
MASTER_MYPORT1=9307
|
|
||||||
SLAVE_RUNNING=0
|
SLAVE_RUNNING=0
|
||||||
SLAVE_MYPORT=9308 # leave room for 2 masters for cluster tests
|
SLAVE_MYPORT=9308 # leave room for 2 masters for cluster tests
|
||||||
MYSQL_MANAGER_PORT=9305 # needs to be out of the way of slaves
|
MYSQL_MANAGER_PORT=9305 # needs to be out of the way of slaves
|
||||||
@ -495,7 +494,7 @@ SLAVE_MYERR="$MYSQL_TEST_DIR/var/log/slave.err"
|
|||||||
CURRENT_TEST="$MYSQL_TEST_DIR/var/log/current_test"
|
CURRENT_TEST="$MYSQL_TEST_DIR/var/log/current_test"
|
||||||
SMALL_SERVER="--key_buffer_size=1M --sort_buffer=256K --max_heap_table_size=1M"
|
SMALL_SERVER="--key_buffer_size=1M --sort_buffer=256K --max_heap_table_size=1M"
|
||||||
|
|
||||||
export MASTER_MYPORT MASTER_MYPORT1 SLAVE_MYPORT MYSQL_TCP_PORT MASTER_MYSOCK MASTER_MYSOCK1
|
export MASTER_MYPORT SLAVE_MYPORT MYSQL_TCP_PORT MASTER_MYSOCK MASTER_MYSOCK1
|
||||||
|
|
||||||
NDBCLUSTER_OPTS="--port=$NDBCLUSTER_PORT --data-dir=$MYSQL_TEST_DIR/var --ndb_mgm-extra-opts=$NDB_MGM_EXTRA_OPTS --ndb_mgmd-extra-opts=$NDB_MGMD_EXTRA_OPTS --ndbd-extra-opts=$NDBD_EXTRA_OPTS"
|
NDBCLUSTER_OPTS="--port=$NDBCLUSTER_PORT --data-dir=$MYSQL_TEST_DIR/var --ndb_mgm-extra-opts=$NDB_MGM_EXTRA_OPTS --ndb_mgmd-extra-opts=$NDB_MGMD_EXTRA_OPTS --ndbd-extra-opts=$NDBD_EXTRA_OPTS"
|
||||||
NDB_BACKUP_DIR=$MYSQL_TEST_DIR/var/ndbcluster-$NDBCLUSTER_PORT
|
NDB_BACKUP_DIR=$MYSQL_TEST_DIR/var/ndbcluster-$NDBCLUSTER_PORT
|
||||||
@ -1144,6 +1143,8 @@ start_master()
|
|||||||
id=`$EXPR $1 + 101`;
|
id=`$EXPR $1 + 101`;
|
||||||
this_master_myport=`$EXPR $MASTER_MYPORT + $1`
|
this_master_myport=`$EXPR $MASTER_MYPORT + $1`
|
||||||
NOT_FIRST_MASTER_EXTRA_OPTS="--skip-innodb"
|
NOT_FIRST_MASTER_EXTRA_OPTS="--skip-innodb"
|
||||||
|
eval "MASTER_MYPORT$1=$this_master_myport"
|
||||||
|
export MASTER_MYPORT$1
|
||||||
else
|
else
|
||||||
id=1;
|
id=1;
|
||||||
this_master_myport=$MASTER_MYPORT
|
this_master_myport=$MASTER_MYPORT
|
||||||
@ -1762,7 +1763,7 @@ then
|
|||||||
$MYSQLADMIN --no-defaults --socket=$MASTER_MYSOCK1 -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
$MYSQLADMIN --no-defaults --socket=$MASTER_MYSOCK1 -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
||||||
$MYSQLADMIN --no-defaults --socket=$SLAVE_MYSOCK -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
$MYSQLADMIN --no-defaults --socket=$SLAVE_MYSOCK -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
||||||
$MYSQLADMIN --no-defaults --host=$hostname --port=$MASTER_MYPORT -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
$MYSQLADMIN --no-defaults --host=$hostname --port=$MASTER_MYPORT -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
||||||
$MYSQLADMIN --no-defaults --host=$hostname --port=$MASTER_MYPORT1 -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
$MYSQLADMIN --no-defaults --host=$hostname --port=`expr $MASTER_MYPORT+1` -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
||||||
$MYSQLADMIN --no-defaults --host=$hostname --port=$SLAVE_MYPORT -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
$MYSQLADMIN --no-defaults --host=$hostname --port=$SLAVE_MYPORT -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
||||||
$MYSQLADMIN --no-defaults --host=$hostname --port=`expr $SLAVE_MYPORT + 1` -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
$MYSQLADMIN --no-defaults --host=$hostname --port=`expr $SLAVE_MYPORT + 1` -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
||||||
sleep_until_file_deleted 0 $MASTER_MYPID
|
sleep_until_file_deleted 0 $MASTER_MYPID
|
||||||
|
@ -326,3 +326,15 @@ latin1_german2_ci 6109
|
|||||||
latin1_german2_ci 61
|
latin1_german2_ci 61
|
||||||
latin1_german2_ci 6120
|
latin1_german2_ci 6120
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
SET NAMES latin1;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
col1 varchar(255) NOT NULL default ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 collate latin1_german2_ci;
|
||||||
|
INSERT INTO t1 VALUES ('<27>'),('ss'),('ss');
|
||||||
|
ALTER TABLE t1 ADD KEY ifword(col1);
|
||||||
|
SELECT * FROM t1 WHERE col1='<27>' ORDER BY col1, BINARY col1;
|
||||||
|
col1
|
||||||
|
ss
|
||||||
|
ss
|
||||||
|
<EFBFBD>
|
||||||
|
DROP TABLE t1;
|
||||||
|
@ -523,11 +523,12 @@ create table t2 (c char(30)) charset=ucs2;
|
|||||||
set @v=convert('abc' using ucs2);
|
set @v=convert('abc' using ucs2);
|
||||||
reset master;
|
reset master;
|
||||||
insert into t2 values (@v);
|
insert into t2 values (@v);
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 User var 1 135 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci
|
master-bin.000001 96 User var 1 136 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci
|
||||||
master-bin.000001 135 Query 1 225 use `test`; insert into t2 values (@v)
|
master-bin.000001 136 Query 1 226 use `test`; insert into t2 values (@v)
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`;
|
SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=10000;
|
SET TIMESTAMP=10000;
|
||||||
|
@ -90,6 +90,26 @@ id avg(rating)
|
|||||||
1 3.0000
|
1 3.0000
|
||||||
2 NULL
|
2 NULL
|
||||||
3 2.0000
|
3 2.0000
|
||||||
|
select sql_small_result t2.id, avg(rating) from t2 group by t2.id;
|
||||||
|
id avg(rating)
|
||||||
|
1 3.0000
|
||||||
|
2 NULL
|
||||||
|
3 2.0000
|
||||||
|
select sql_big_result t2.id, avg(rating) from t2 group by t2.id;
|
||||||
|
id avg(rating)
|
||||||
|
1 3.0000
|
||||||
|
2 NULL
|
||||||
|
3 2.0000
|
||||||
|
select sql_small_result t2.id, avg(rating+0.0e0) from t2 group by t2.id;
|
||||||
|
id avg(rating+0.0e0)
|
||||||
|
1 3
|
||||||
|
2 NULL
|
||||||
|
3 2
|
||||||
|
select sql_big_result t2.id, avg(rating+0.0e0) from t2 group by t2.id;
|
||||||
|
id avg(rating+0.0e0)
|
||||||
|
1 3
|
||||||
|
2 NULL
|
||||||
|
3 2
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
create table t1 (a smallint(6) primary key, c char(10), b text);
|
create table t1 (a smallint(6) primary key, c char(10), b text);
|
||||||
INSERT INTO t1 VALUES (1,'1','1');
|
INSERT INTO t1 VALUES (1,'1','1');
|
||||||
|
@ -30,6 +30,12 @@ Y-N-N-Y-N Y,N,N,Y,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,
|
|||||||
select elt(2,1),field(NULL,"a","b","c");
|
select elt(2,1),field(NULL,"a","b","c");
|
||||||
elt(2,1) field(NULL,"a","b","c")
|
elt(2,1) field(NULL,"a","b","c")
|
||||||
NULL 0
|
NULL 0
|
||||||
|
select field("b","a",NULL),field(1,0,NULL)+0,field(1.0,0.0,NULL)+0.0,field(1.0e1,0.0e1,NULL)+0.0e1;
|
||||||
|
field("b","a",NULL) field(1,0,NULL)+0 field(1.0,0.0,NULL)+0.0 field(1.0e1,0.0e1,NULL)+0.0e1
|
||||||
|
0 0 0.0 0
|
||||||
|
select field(NULL,"a",NULL),field(NULL,0,NULL)+0,field(NULL,0.0,NULL)+0.0,field(NULL,0.0e1,NULL)+0.0e1;
|
||||||
|
field(NULL,"a",NULL) field(NULL,0,NULL)+0 field(NULL,0.0,NULL)+0.0 field(NULL,0.0e1,NULL)+0.0e1
|
||||||
|
0 0 0.0 0
|
||||||
select find_in_set("","a,b,c"),find_in_set("","a,b,c,"),find_in_set("",",a,b,c");
|
select find_in_set("","a,b,c"),find_in_set("","a,b,c,"),find_in_set("",",a,b,c");
|
||||||
find_in_set("","a,b,c") find_in_set("","a,b,c,") find_in_set("",",a,b,c")
|
find_in_set("","a,b,c") find_in_set("","a,b,c,") find_in_set("",",a,b,c")
|
||||||
0 4 1
|
0 4 1
|
||||||
|
@ -271,7 +271,7 @@ n
|
|||||||
6
|
6
|
||||||
7
|
7
|
||||||
rollback to savepoint `my_savepoint`;
|
rollback to savepoint `my_savepoint`;
|
||||||
ERROR HY000: Got error 153 during ROLLBACK
|
ERROR 42000: SAVEPOINT my_savepoint does not exist
|
||||||
set autocommit=1;
|
set autocommit=1;
|
||||||
rollback;
|
rollback;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
@ -1633,14 +1633,14 @@ t2 CREATE TABLE `t2` (
|
|||||||
drop table t2, t1;
|
drop table t2, t1;
|
||||||
show status like "binlog_cache_use";
|
show status like "binlog_cache_use";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Binlog_cache_use 25
|
Binlog_cache_use 152
|
||||||
show status like "binlog_cache_disk_use";
|
show status like "binlog_cache_disk_use";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Binlog_cache_disk_use 0
|
Binlog_cache_disk_use 0
|
||||||
create table t1 (a int) engine=innodb;
|
create table t1 (a int) engine=innodb;
|
||||||
show status like "binlog_cache_use";
|
show status like "binlog_cache_use";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Binlog_cache_use 26
|
Binlog_cache_use 153
|
||||||
show status like "binlog_cache_disk_use";
|
show status like "binlog_cache_disk_use";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Binlog_cache_disk_use 1
|
Binlog_cache_disk_use 1
|
||||||
@ -1649,7 +1649,7 @@ delete from t1;
|
|||||||
commit;
|
commit;
|
||||||
show status like "binlog_cache_use";
|
show status like "binlog_cache_use";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Binlog_cache_use 27
|
Binlog_cache_use 154
|
||||||
show status like "binlog_cache_disk_use";
|
show status like "binlog_cache_disk_use";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Binlog_cache_disk_use 1
|
Binlog_cache_disk_use 1
|
||||||
|
@ -74,8 +74,8 @@ insert into t1 select * from t2;
|
|||||||
ERROR 23000: Duplicate entry '2' for key 1
|
ERROR 23000: Duplicate entry '2' for key 1
|
||||||
show binlog events;
|
show binlog events;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
|
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
|
||||||
master-bin.000001 95 Query 1 190 use `test`; insert into t1 select * from t2
|
master-bin.000001 96 Query 1 191 use `test`; insert into t1 select * from t2
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
@ -88,7 +88,7 @@ create table t2(unique(a)) select a from t1;
|
|||||||
ERROR 23000: Duplicate entry '1' for key 1
|
ERROR 23000: Duplicate entry '1' for key 1
|
||||||
show binlog events;
|
show binlog events;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
|
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a int not null);
|
create table t1 (a int not null);
|
||||||
create table t2 (a int not null);
|
create table t2 (a int not null);
|
||||||
|
@ -6,12 +6,12 @@ begin;
|
|||||||
insert into t1 values(1);
|
insert into t1 values(1);
|
||||||
insert into t2 select * from t1;
|
insert into t2 select * from t1;
|
||||||
commit;
|
commit;
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 Query 1 # use `test`; BEGIN
|
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||||
master-bin.000001 164 Query 1 # use `test`; insert into t1 values(1)
|
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(1)
|
||||||
master-bin.000001 252 Query 1 # use `test`; insert into t2 select * from t1
|
master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1
|
||||||
master-bin.000001 347 Query 1 # use `test`; COMMIT
|
master-bin.000001 348 Xid 1 # COMMIT /* xid=7 */
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
reset master;
|
reset master;
|
||||||
@ -21,12 +21,12 @@ insert into t2 select * from t1;
|
|||||||
rollback;
|
rollback;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 Query 1 # use `test`; BEGIN
|
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||||
master-bin.000001 164 Query 1 # use `test`; insert into t1 values(2)
|
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(2)
|
||||||
master-bin.000001 252 Query 1 # use `test`; insert into t2 select * from t1
|
master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1
|
||||||
master-bin.000001 347 Query 1 # use `test`; ROLLBACK
|
master-bin.000001 348 Query 1 # use `test`; ROLLBACK
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
reset master;
|
reset master;
|
||||||
@ -39,15 +39,15 @@ rollback to savepoint my_savepoint;
|
|||||||
Warnings:
|
Warnings:
|
||||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||||
commit;
|
commit;
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 Query 1 # use `test`; BEGIN
|
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||||
master-bin.000001 164 Query 1 # use `test`; insert into t1 values(3)
|
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(3)
|
||||||
master-bin.000001 252 Query 1 # use `test`; savepoint my_savepoint
|
master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint
|
||||||
master-bin.000001 338 Query 1 # use `test`; insert into t1 values(4)
|
master-bin.000001 339 Query 1 # use `test`; insert into t1 values(4)
|
||||||
master-bin.000001 426 Query 1 # use `test`; insert into t2 select * from t1
|
master-bin.000001 427 Query 1 # use `test`; insert into t2 select * from t1
|
||||||
master-bin.000001 521 Query 1 # use `test`; rollback to savepoint my_savepoint
|
master-bin.000001 522 Query 1 # use `test`; rollback to savepoint my_savepoint
|
||||||
master-bin.000001 619 Query 1 # use `test`; COMMIT
|
master-bin.000001 620 Xid 1 # COMMIT /* xid=24 */
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
reset master;
|
reset master;
|
||||||
@ -65,16 +65,16 @@ select a from t1 order by a;
|
|||||||
a
|
a
|
||||||
5
|
5
|
||||||
7
|
7
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 Query 1 # use `test`; BEGIN
|
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||||
master-bin.000001 164 Query 1 # use `test`; insert into t1 values(5)
|
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(5)
|
||||||
master-bin.000001 252 Query 1 # use `test`; savepoint my_savepoint
|
master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint
|
||||||
master-bin.000001 338 Query 1 # use `test`; insert into t1 values(6)
|
master-bin.000001 339 Query 1 # use `test`; insert into t1 values(6)
|
||||||
master-bin.000001 426 Query 1 # use `test`; insert into t2 select * from t1
|
master-bin.000001 427 Query 1 # use `test`; insert into t2 select * from t1
|
||||||
master-bin.000001 521 Query 1 # use `test`; rollback to savepoint my_savepoint
|
master-bin.000001 522 Query 1 # use `test`; rollback to savepoint my_savepoint
|
||||||
master-bin.000001 619 Query 1 # use `test`; insert into t1 values(7)
|
master-bin.000001 620 Query 1 # use `test`; insert into t1 values(7)
|
||||||
master-bin.000001 707 Query 1 # use `test`; COMMIT
|
master-bin.000001 708 Xid 1 # COMMIT /* xid=36 */
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
reset master;
|
reset master;
|
||||||
@ -87,40 +87,47 @@ insert into t2 select * from t1;
|
|||||||
select get_lock("a",10);
|
select get_lock("a",10);
|
||||||
get_lock("a",10)
|
get_lock("a",10)
|
||||||
1
|
1
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 Query 1 # use `test`; BEGIN
|
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||||
master-bin.000001 164 Query 1 # use `test`; insert into t1 values(8)
|
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(8)
|
||||||
master-bin.000001 252 Query 1 # use `test`; insert into t2 select * from t1
|
master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1
|
||||||
master-bin.000001 347 Query 1 # use `test`; ROLLBACK
|
master-bin.000001 348 Query 1 # use `test`; ROLLBACK
|
||||||
|
master-bin.000001 420 Query 1 # use `test`; DO RELEASE_LOCK("a")
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
reset master;
|
reset master;
|
||||||
insert into t1 values(9);
|
insert into t1 values(9);
|
||||||
insert into t2 select * from t1;
|
insert into t2 select * from t1;
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 Query 1 # use `test`; insert into t1 values(9)
|
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||||
master-bin.000001 183 Query 1 # use `test`; insert into t2 select * from t1
|
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(9)
|
||||||
|
master-bin.000001 253 Xid 1 # COMMIT /* xid=59 */
|
||||||
|
master-bin.000001 280 Query 1 # use `test`; insert into t2 select * from t1
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
reset master;
|
reset master;
|
||||||
insert into t1 values(10);
|
insert into t1 values(10);
|
||||||
begin;
|
begin;
|
||||||
insert into t2 select * from t1;
|
insert into t2 select * from t1;
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 Query 1 # use `test`; insert into t1 values(10)
|
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||||
master-bin.000001 184 Query 1 # use `test`; insert into t2 select * from t1
|
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(10)
|
||||||
|
master-bin.000001 254 Xid 1 # COMMIT /* xid=65 */
|
||||||
|
master-bin.000001 281 Query 1 # use `test`; insert into t2 select * from t1
|
||||||
insert into t1 values(11);
|
insert into t1 values(11);
|
||||||
commit;
|
commit;
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 Query 1 # use `test`; insert into t1 values(10)
|
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||||
master-bin.000001 184 Query 1 # use `test`; insert into t2 select * from t1
|
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(10)
|
||||||
master-bin.000001 279 Query 1 # use `test`; BEGIN
|
master-bin.000001 254 Xid 1 # COMMIT /* xid=65 */
|
||||||
master-bin.000001 348 Query 1 # use `test`; insert into t1 values(11)
|
master-bin.000001 281 Query 1 # use `test`; insert into t2 select * from t1
|
||||||
master-bin.000001 437 Query 1 # use `test`; COMMIT
|
master-bin.000001 376 Query 1 # use `test`; BEGIN
|
||||||
|
master-bin.000001 445 Query 1 # use `test`; insert into t1 values(11)
|
||||||
|
master-bin.000001 534 Xid 1 # COMMIT /* xid=67 */
|
||||||
alter table t2 engine=INNODB;
|
alter table t2 engine=INNODB;
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
@ -129,12 +136,12 @@ begin;
|
|||||||
insert into t1 values(12);
|
insert into t1 values(12);
|
||||||
insert into t2 select * from t1;
|
insert into t2 select * from t1;
|
||||||
commit;
|
commit;
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 Query 1 # use `test`; BEGIN
|
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||||
master-bin.000001 164 Query 1 # use `test`; insert into t1 values(12)
|
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(12)
|
||||||
master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1
|
master-bin.000001 254 Query 1 # use `test`; insert into t2 select * from t1
|
||||||
master-bin.000001 348 Query 1 # use `test`; COMMIT
|
master-bin.000001 349 Xid 1 # COMMIT /* xid=77 */
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
reset master;
|
reset master;
|
||||||
@ -142,7 +149,7 @@ begin;
|
|||||||
insert into t1 values(13);
|
insert into t1 values(13);
|
||||||
insert into t2 select * from t1;
|
insert into t2 select * from t1;
|
||||||
rollback;
|
rollback;
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
@ -154,11 +161,11 @@ insert into t1 values(15);
|
|||||||
insert into t2 select * from t1;
|
insert into t2 select * from t1;
|
||||||
rollback to savepoint my_savepoint;
|
rollback to savepoint my_savepoint;
|
||||||
commit;
|
commit;
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 Query 1 # use `test`; BEGIN
|
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||||
master-bin.000001 164 Query 1 # use `test`; insert into t1 values(14)
|
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(14)
|
||||||
master-bin.000001 253 Query 1 # use `test`; COMMIT
|
master-bin.000001 254 Xid 1 # COMMIT /* xid=93 */
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
reset master;
|
reset master;
|
||||||
@ -174,12 +181,12 @@ select a from t1 order by a;
|
|||||||
a
|
a
|
||||||
16
|
16
|
||||||
18
|
18
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 Query 1 # use `test`; BEGIN
|
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||||
master-bin.000001 164 Query 1 # use `test`; insert into t1 values(16)
|
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(16)
|
||||||
master-bin.000001 253 Query 1 # use `test`; insert into t1 values(18)
|
master-bin.000001 254 Query 1 # use `test`; insert into t1 values(18)
|
||||||
master-bin.000001 342 Query 1 # use `test`; COMMIT
|
master-bin.000001 343 Xid 1 # COMMIT /* xid=104 */
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
alter table t2 type=MyISAM;
|
alter table t2 type=MyISAM;
|
||||||
|
@ -15,6 +15,7 @@ flush logs;
|
|||||||
|
|
||||||
--- Local --
|
--- Local --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1000000000;
|
SET TIMESTAMP=1000000000;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||||
@ -47,6 +48,7 @@ insert into t1 values ("Alas");
|
|||||||
|
|
||||||
--- --database --
|
--- --database --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
SET INSERT_ID=1;
|
SET INSERT_ID=1;
|
||||||
|
|
||||||
--- --position --
|
--- --position --
|
||||||
@ -60,6 +62,7 @@ insert into t1 values ("Alas");
|
|||||||
|
|
||||||
--- Remote --
|
--- Remote --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1000000000;
|
SET TIMESTAMP=1000000000;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||||
@ -92,6 +95,7 @@ insert into t1 values ("Alas");
|
|||||||
|
|
||||||
--- --database --
|
--- --database --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
SET INSERT_ID=1;
|
SET INSERT_ID=1;
|
||||||
|
|
||||||
--- --position --
|
--- --position --
|
||||||
@ -105,11 +109,16 @@ insert into t1 values ("Alas");
|
|||||||
|
|
||||||
--- reading stdin --
|
--- reading stdin --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1065204671;
|
SET TIMESTAMP=1108844556;
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
SET TIMESTAMP=1108844555;
|
||||||
|
insert t1 values (1);
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1065204671;
|
SET TIMESTAMP=1108844556;
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
SET TIMESTAMP=1108844555;
|
||||||
|
insert t1 values (1);
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
|
@ -16,6 +16,7 @@ insert into t1 values(null, "f");
|
|||||||
|
|
||||||
--- Local --
|
--- Local --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||||
@ -40,6 +41,7 @@ insert into t1 values(null, "e");
|
|||||||
|
|
||||||
--- offset --
|
--- offset --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
SET INSERT_ID=1;
|
SET INSERT_ID=1;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
@ -75,6 +77,7 @@ insert into t1 values(null, "e");
|
|||||||
|
|
||||||
--- stop-position --
|
--- stop-position --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||||
@ -93,6 +96,7 @@ insert into t1 values(null, "c");
|
|||||||
|
|
||||||
--- start-datetime --
|
--- start-datetime --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
SET INSERT_ID=3;
|
SET INSERT_ID=3;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609944;
|
SET TIMESTAMP=1579609944;
|
||||||
@ -109,6 +113,7 @@ insert into t1 values(null, "e");
|
|||||||
|
|
||||||
--- stop-datetime --
|
--- stop-datetime --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||||
@ -124,6 +129,7 @@ insert into t1 values(null, "b");
|
|||||||
|
|
||||||
--- Local with 2 binlogs on command line --
|
--- Local with 2 binlogs on command line --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||||
@ -155,6 +161,7 @@ insert into t1 values(null, "f");
|
|||||||
|
|
||||||
--- offset --
|
--- offset --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
SET INSERT_ID=1;
|
SET INSERT_ID=1;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
@ -204,6 +211,7 @@ insert into t1 values(null, "f");
|
|||||||
|
|
||||||
--- stop-position --
|
--- stop-position --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||||
@ -229,6 +237,7 @@ SET INSERT_ID=6;
|
|||||||
|
|
||||||
--- start-datetime --
|
--- start-datetime --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
SET INSERT_ID=3;
|
SET INSERT_ID=3;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609944;
|
SET TIMESTAMP=1579609944;
|
||||||
@ -252,6 +261,7 @@ insert into t1 values(null, "f");
|
|||||||
|
|
||||||
--- stop-datetime --
|
--- stop-datetime --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||||
@ -267,6 +277,7 @@ insert into t1 values(null, "b");
|
|||||||
|
|
||||||
--- Remote --
|
--- Remote --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||||
@ -291,6 +302,7 @@ insert into t1 values(null, "e");
|
|||||||
|
|
||||||
--- offset --
|
--- offset --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
SET INSERT_ID=1;
|
SET INSERT_ID=1;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
@ -326,6 +338,7 @@ insert into t1 values(null, "e");
|
|||||||
|
|
||||||
--- stop-position --
|
--- stop-position --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||||
@ -344,6 +357,7 @@ insert into t1 values(null, "c");
|
|||||||
|
|
||||||
--- start-datetime --
|
--- start-datetime --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
SET INSERT_ID=3;
|
SET INSERT_ID=3;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609944;
|
SET TIMESTAMP=1579609944;
|
||||||
@ -360,6 +374,7 @@ insert into t1 values(null, "e");
|
|||||||
|
|
||||||
--- stop-datetime --
|
--- stop-datetime --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||||
@ -375,6 +390,7 @@ insert into t1 values(null, "b");
|
|||||||
|
|
||||||
--- Remote with 2 binlogs on command line --
|
--- Remote with 2 binlogs on command line --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||||
@ -406,6 +422,7 @@ insert into t1 values(null, "f");
|
|||||||
|
|
||||||
--- offset --
|
--- offset --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
SET INSERT_ID=1;
|
SET INSERT_ID=1;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
@ -455,6 +472,7 @@ insert into t1 values(null, "f");
|
|||||||
|
|
||||||
--- stop-position --
|
--- stop-position --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||||
@ -480,6 +498,7 @@ SET INSERT_ID=6;
|
|||||||
|
|
||||||
--- start-datetime --
|
--- start-datetime --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
SET INSERT_ID=3;
|
SET INSERT_ID=3;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609944;
|
SET TIMESTAMP=1579609944;
|
||||||
@ -503,6 +522,7 @@ insert into t1 values(null, "f");
|
|||||||
|
|
||||||
--- stop-datetime --
|
--- stop-datetime --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||||
@ -518,6 +538,7 @@ insert into t1 values(null, "b");
|
|||||||
|
|
||||||
--- to-last-log --
|
--- to-last-log --
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1579609942;
|
SET TIMESTAMP=1579609942;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||||
|
@ -167,8 +167,25 @@ show status like 'handler_discover%';
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_discover 0
|
Handler_discover 0
|
||||||
drop table t4;
|
drop table t4;
|
||||||
|
ERROR 42S02: Unknown table 't4'
|
||||||
|
create table t4(
|
||||||
|
id int not null primary key,
|
||||||
|
name char(27)
|
||||||
|
) engine=ndb;
|
||||||
|
insert into t4 values (1, "Automatic");
|
||||||
|
select * from t4;
|
||||||
|
id name
|
||||||
|
1 Automatic
|
||||||
|
select * from t4;
|
||||||
|
ERROR 42S02: Table 'test.t4' doesn't exist
|
||||||
|
drop table if exists t4;
|
||||||
Warnings:
|
Warnings:
|
||||||
Error 1296 Got error 709 'No such table existed' from NDB
|
Note 1051 Unknown table 't4'
|
||||||
|
drop table t5;
|
||||||
|
ERROR 42S02: Unknown table 't5'
|
||||||
|
drop table if exists t5;
|
||||||
|
Warnings:
|
||||||
|
Note 1051 Unknown table 't5'
|
||||||
flush status;
|
flush status;
|
||||||
create table t4(
|
create table t4(
|
||||||
id int not null primary key,
|
id int not null primary key,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
set GLOBAL query_cache_type=on;
|
set GLOBAL query_cache_type=on;
|
||||||
set GLOBAL query_cache_size=1355776;
|
set GLOBAL query_cache_size=1355776;
|
||||||
set GLOBAL ndb_cache_check_time=5;
|
set GLOBAL ndb_cache_check_time=1;
|
||||||
reset query cache;
|
reset query cache;
|
||||||
flush status;
|
flush status;
|
||||||
CREATE TABLE t1 ( pk int not null primary key,
|
CREATE TABLE t1 ( pk int not null primary key,
|
||||||
|
@ -72,3 +72,11 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 0
|
Qcache_hits 0
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
|
set GLOBAL query_cache_size=0;
|
||||||
|
set GLOBAL ndb_cache_check_time=0;
|
||||||
|
reset query cache;
|
||||||
|
flush status;
|
||||||
|
set GLOBAL query_cache_size=0;
|
||||||
|
set GLOBAL ndb_cache_check_time=0;
|
||||||
|
reset query cache;
|
||||||
|
flush status;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
reset master;
|
reset master;
|
||||||
show master status;
|
show master status;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||||
master-bin.000001 95
|
master-bin.000001 96
|
||||||
reset slave;
|
reset slave;
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
@ -17,7 +17,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
|
|||||||
start slave;
|
start slave;
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 95 # # master-bin.000001 Yes Yes 0 0 95 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 96 # # master-bin.000001 Yes Yes 0 0 96 # None 0 No #
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
create table t1 (n int);
|
create table t1 (n int);
|
||||||
insert into t1 values (10),(45),(90);
|
insert into t1 values (10),(45),(90);
|
||||||
|
@ -16,11 +16,11 @@ n
|
|||||||
1
|
1
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 376 # # master-bin.000001 No No 0 0 288 # None 0 No #
|
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 377 # # master-bin.000001 No No 0 0 289 # None 0 No #
|
||||||
change master to master_user='root';
|
change master to master_user='root';
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 288 # # master-bin.000001 No No 0 0 288 # None 0 No #
|
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 289 # # master-bin.000001 No No 0 0 289 # None 0 No #
|
||||||
select release_lock("a");
|
select release_lock("a");
|
||||||
release_lock("a")
|
release_lock("a")
|
||||||
1
|
1
|
||||||
|
@ -103,7 +103,7 @@ a b
|
|||||||
1 cp850_general_ci
|
1 cp850_general_ci
|
||||||
drop database mysqltest2;
|
drop database mysqltest2;
|
||||||
drop database mysqltest3;
|
drop database mysqltest3;
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # drop database if exists mysqltest2
|
master-bin.000001 # Query 1 # drop database if exists mysqltest2
|
||||||
master-bin.000001 # Query 1 # drop database if exists mysqltest3
|
master-bin.000001 # Query 1 # drop database if exists mysqltest3
|
||||||
@ -175,6 +175,7 @@ select hex(c1), hex(c2) from t1;
|
|||||||
hex(c1) hex(c2)
|
hex(c1) hex(c2)
|
||||||
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
|
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
SET TIMESTAMP=1000000000;
|
SET TIMESTAMP=1000000000;
|
||||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||||
SET @@session.sql_mode=0;
|
SET @@session.sql_mode=0;
|
||||||
|
@ -9,7 +9,7 @@ insert into t1 values (1),(1);
|
|||||||
ERROR 23000: Duplicate entry '1' for key 1
|
ERROR 23000: Duplicate entry '1' for key 1
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 287 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 287 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 288 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 288 # None 0 No #
|
||||||
show tables like 't1';
|
show tables like 't1';
|
||||||
Tables_in_test (t1)
|
Tables_in_test (t1)
|
||||||
drop table t1;
|
drop table t1;
|
||||||
@ -26,14 +26,14 @@ select (@id := id) - id from t3;
|
|||||||
0
|
0
|
||||||
kill @id;
|
kill @id;
|
||||||
drop table t2,t3;
|
drop table t2,t3;
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 Query 1 194 use `test`; create table t1 (a int primary key)
|
master-bin.000001 96 Query 1 195 use `test`; create table t1 (a int primary key)
|
||||||
master-bin.000001 194 Query 1 287 use `test`; insert into t1 values (1),(1)
|
master-bin.000001 195 Query 1 288 use `test`; insert into t1 values (1),(1)
|
||||||
master-bin.000001 287 Query 1 364 use `test`; drop table t1
|
master-bin.000001 288 Query 1 365 use `test`; drop table t1
|
||||||
master-bin.000001 364 Query 1 463 use `test`; create table t2 (a int primary key)
|
master-bin.000001 365 Query 1 464 use `test`; create table t2 (a int primary key)
|
||||||
master-bin.000001 463 Query 1 551 use `test`; insert into t2 values(1)
|
master-bin.000001 464 Query 1 552 use `test`; insert into t2 values(1)
|
||||||
master-bin.000001 551 Query 1 639 use `test`; create table t3 (id int)
|
master-bin.000001 552 Query 1 640 use `test`; create table t3 (id int)
|
||||||
master-bin.000001 639 Query 1 741 use `test`; insert into t3 values(connection_id())
|
master-bin.000001 640 Query 1 742 use `test`; insert into t3 values(connection_id())
|
||||||
master-bin.000001 741 Query 1 861 use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10)
|
master-bin.000001 742 Query 1 862 use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10)
|
||||||
master-bin.000001 861 Query 1 941 use `test`; drop table t2,t3
|
master-bin.000001 862 Query 1 942 use `test`; drop table t2,t3
|
||||||
|
@ -14,4 +14,4 @@ start slave;
|
|||||||
flush logs;
|
flush logs;
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 206 # # slave-bin.000001 Yes Yes 0 0 206 # None 0 No #
|
# 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 207 # # slave-bin.000001 Yes Yes 0 0 207 # None 0 No #
|
||||||
|
@ -14,27 +14,27 @@ rename table t1 to t5, t2 to t1;
|
|||||||
flush no_write_to_binlog tables;
|
flush no_write_to_binlog tables;
|
||||||
show binlog events;
|
show binlog events;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 4 Format_desc 1 95 Server ver: SERVER_VERSION, Binlog ver: 4
|
master-bin.000001 4 Format_desc 1 96 Server ver: SERVER_VERSION, Binlog ver: 4
|
||||||
master-bin.000001 95 Query 1 182 use `test`; create table t1 (a int)
|
master-bin.000001 96 Query 1 183 use `test`; create table t1 (a int)
|
||||||
master-bin.000001 182 Query 1 272 use `test`; insert into t1 values (10)
|
master-bin.000001 183 Query 1 273 use `test`; insert into t1 values (10)
|
||||||
master-bin.000001 272 Query 1 359 use `test`; create table t2 (a int)
|
master-bin.000001 273 Query 1 360 use `test`; create table t2 (a int)
|
||||||
master-bin.000001 359 Query 1 469 use `test`; create table t3 (a int) engine=merge union(t1)
|
master-bin.000001 360 Query 1 470 use `test`; create table t3 (a int) engine=merge union(t1)
|
||||||
master-bin.000001 469 Query 1 556 use `test`; create table t4 (a int)
|
master-bin.000001 470 Query 1 557 use `test`; create table t4 (a int)
|
||||||
master-bin.000001 556 Query 1 651 use `test`; insert into t4 select * from t3
|
master-bin.000001 557 Query 1 652 use `test`; insert into t4 select * from t3
|
||||||
master-bin.000001 651 Query 1 746 use `test`; rename table t1 to t5, t2 to t1
|
master-bin.000001 652 Query 1 747 use `test`; rename table t1 to t5, t2 to t1
|
||||||
select * from t3;
|
select * from t3;
|
||||||
a
|
a
|
||||||
flush tables;
|
flush tables;
|
||||||
show binlog events;
|
show binlog events;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 4 Format_desc 1 95 Server ver: SERVER_VERSION, Binlog ver: 4
|
master-bin.000001 4 Format_desc 1 96 Server ver: SERVER_VERSION, Binlog ver: 4
|
||||||
master-bin.000001 95 Query 1 182 use `test`; create table t1 (a int)
|
master-bin.000001 96 Query 1 183 use `test`; create table t1 (a int)
|
||||||
master-bin.000001 182 Query 1 272 use `test`; insert into t1 values (10)
|
master-bin.000001 183 Query 1 273 use `test`; insert into t1 values (10)
|
||||||
master-bin.000001 272 Query 1 359 use `test`; create table t2 (a int)
|
master-bin.000001 273 Query 1 360 use `test`; create table t2 (a int)
|
||||||
master-bin.000001 359 Query 1 469 use `test`; create table t3 (a int) engine=merge union(t1)
|
master-bin.000001 360 Query 1 470 use `test`; create table t3 (a int) engine=merge union(t1)
|
||||||
master-bin.000001 469 Query 1 556 use `test`; create table t4 (a int)
|
master-bin.000001 470 Query 1 557 use `test`; create table t4 (a int)
|
||||||
master-bin.000001 556 Query 1 651 use `test`; insert into t4 select * from t3
|
master-bin.000001 557 Query 1 652 use `test`; insert into t4 select * from t3
|
||||||
master-bin.000001 651 Query 1 746 use `test`; rename table t1 to t5, t2 to t1
|
master-bin.000001 652 Query 1 747 use `test`; rename table t1 to t5, t2 to t1
|
||||||
master-bin.000001 746 Query 1 822 use `test`; flush tables
|
master-bin.000001 747 Query 1 823 use `test`; flush tables
|
||||||
select * from t3;
|
select * from t3;
|
||||||
a
|
a
|
||||||
|
@ -22,7 +22,7 @@ day id category name
|
|||||||
2003-03-22 2416 a bbbbb
|
2003-03-22 2416 a bbbbb
|
||||||
show master status;
|
show master status;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||||
slave-bin.000001 1096
|
slave-bin.000001 1097
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
drop table t3;
|
drop table t3;
|
||||||
@ -33,7 +33,7 @@ set global sql_slave_skip_counter=1;
|
|||||||
start slave;
|
start slave;
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1559 # # master-bin.000001 Yes Yes 0 0 1559 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1560 # # master-bin.000001 Yes Yes 0 0 1560 # None 0 No #
|
||||||
set sql_log_bin=0;
|
set sql_log_bin=0;
|
||||||
delete from t1;
|
delete from t1;
|
||||||
set sql_log_bin=1;
|
set sql_log_bin=1;
|
||||||
@ -43,7 +43,7 @@ change master to master_user='test';
|
|||||||
change master to master_user='root';
|
change master to master_user='root';
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1667 # # master-bin.000001 No No 0 0 1667 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1668 # # master-bin.000001 No No 0 0 1668 # None 0 No #
|
||||||
set global sql_slave_skip_counter=1;
|
set global sql_slave_skip_counter=1;
|
||||||
start slave;
|
start slave;
|
||||||
set sql_log_bin=0;
|
set sql_log_bin=0;
|
||||||
@ -64,5 +64,5 @@ terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
|
|||||||
ERROR 23000: Duplicate entry '2003-03-22' for key 1
|
ERROR 23000: Duplicate entry '2003-03-22' for key 1
|
||||||
show master status;
|
show master status;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||||
master-bin.000001 536
|
master-bin.000001 537
|
||||||
drop table t2;
|
drop table t2;
|
||||||
|
@ -10,8 +10,8 @@ create database mysqltest;
|
|||||||
create table t1(a int, b int, unique(b));
|
create table t1(a int, b int, unique(b));
|
||||||
use mysqltest;
|
use mysqltest;
|
||||||
load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
|
load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 Query 1 197 drop database if exists mysqltest
|
master-bin.000001 96 Query 1 198 drop database if exists mysqltest
|
||||||
master-bin.000001 197 Query 1 291 create database mysqltest
|
master-bin.000001 198 Query 1 292 create database mysqltest
|
||||||
drop database mysqltest;
|
drop database mysqltest;
|
||||||
|
@ -10,5 +10,5 @@ load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
|
|||||||
select count(*) from t1;
|
select count(*) from t1;
|
||||||
count(*)
|
count(*)
|
||||||
2
|
2
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
@ -19,25 +19,25 @@ count(*)
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
show binlog events;
|
show binlog events;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
|
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
|
||||||
master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key)
|
master-bin.000001 96 Query 1 218 use `test`; create table t1(n int not null auto_increment primary key)
|
||||||
master-bin.000001 217 Intvar 1 245 INSERT_ID=1
|
master-bin.000001 218 Intvar 1 246 INSERT_ID=1
|
||||||
master-bin.000001 245 Query 1 337 use `test`; insert into t1 values (NULL)
|
master-bin.000001 246 Query 1 338 use `test`; insert into t1 values (NULL)
|
||||||
master-bin.000001 337 Query 1 414 use `test`; drop table t1
|
master-bin.000001 338 Query 1 415 use `test`; drop table t1
|
||||||
master-bin.000001 414 Query 1 518 use `test`; create table t1 (word char(20) not null)
|
master-bin.000001 415 Query 1 519 use `test`; create table t1 (word char(20) not null)
|
||||||
master-bin.000001 518 Create_file 1 1188 db=test;table=t1;file_id=1;block_len=581
|
master-bin.000001 519 Create_file 1 1189 db=test;table=t1;file_id=1;block_len=581
|
||||||
master-bin.000001 1188 Exec_load 1 1211 ;file_id=1
|
master-bin.000001 1189 Exec_load 1 1212 ;file_id=1
|
||||||
master-bin.000001 1211 Query 1 1288 use `test`; drop table t1
|
master-bin.000001 1212 Query 1 1289 use `test`; drop table t1
|
||||||
show binlog events from 95 limit 1;
|
show binlog events from 96 limit 1;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key)
|
master-bin.000001 96 Query 1 218 use `test`; create table t1(n int not null auto_increment primary key)
|
||||||
show binlog events from 95 limit 2;
|
show binlog events from 96 limit 2;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key)
|
master-bin.000001 96 Query 1 218 use `test`; create table t1(n int not null auto_increment primary key)
|
||||||
master-bin.000001 217 Intvar 1 245 INSERT_ID=1
|
master-bin.000001 218 Intvar 1 246 INSERT_ID=1
|
||||||
show binlog events from 95 limit 2,1;
|
show binlog events from 96 limit 2,1;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 245 Query 1 337 use `test`; insert into t1 values (NULL)
|
master-bin.000001 246 Query 1 338 use `test`; insert into t1 values (NULL)
|
||||||
flush logs;
|
flush logs;
|
||||||
create table t5 (a int);
|
create table t5 (a int);
|
||||||
drop table t5;
|
drop table t5;
|
||||||
@ -49,24 +49,24 @@ insert into t1 values (1);
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
show binlog events;
|
show binlog events;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
|
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
|
||||||
master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key)
|
master-bin.000001 96 Query 1 218 use `test`; create table t1(n int not null auto_increment primary key)
|
||||||
master-bin.000001 217 Intvar 1 245 INSERT_ID=1
|
master-bin.000001 218 Intvar 1 246 INSERT_ID=1
|
||||||
master-bin.000001 245 Query 1 337 use `test`; insert into t1 values (NULL)
|
master-bin.000001 246 Query 1 338 use `test`; insert into t1 values (NULL)
|
||||||
master-bin.000001 337 Query 1 414 use `test`; drop table t1
|
master-bin.000001 338 Query 1 415 use `test`; drop table t1
|
||||||
master-bin.000001 414 Query 1 518 use `test`; create table t1 (word char(20) not null)
|
master-bin.000001 415 Query 1 519 use `test`; create table t1 (word char(20) not null)
|
||||||
master-bin.000001 518 Create_file 1 1188 db=test;table=t1;file_id=1;block_len=581
|
master-bin.000001 519 Create_file 1 1189 db=test;table=t1;file_id=1;block_len=581
|
||||||
master-bin.000001 1188 Exec_load 1 1211 ;file_id=1
|
master-bin.000001 1189 Exec_load 1 1212 ;file_id=1
|
||||||
master-bin.000001 1211 Query 1 1288 use `test`; drop table t1
|
master-bin.000001 1212 Query 1 1289 use `test`; drop table t1
|
||||||
master-bin.000001 1288 Rotate 1 1332 master-bin.000002;pos=4
|
master-bin.000001 1289 Rotate 1 1333 master-bin.000002;pos=4
|
||||||
show binlog events in 'master-bin.000002';
|
show binlog events in 'master-bin.000002';
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000002 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
|
master-bin.000002 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
|
||||||
master-bin.000002 95 Query 1 182 use `test`; create table t5 (a int)
|
master-bin.000002 96 Query 1 183 use `test`; create table t5 (a int)
|
||||||
master-bin.000002 182 Query 1 259 use `test`; drop table t5
|
master-bin.000002 183 Query 1 260 use `test`; drop table t5
|
||||||
master-bin.000002 259 Query 1 346 use `test`; create table t1 (n int)
|
master-bin.000002 260 Query 1 347 use `test`; create table t1 (n int)
|
||||||
master-bin.000002 346 Query 1 435 use `test`; insert into t1 values (1)
|
master-bin.000002 347 Query 1 436 use `test`; insert into t1 values (1)
|
||||||
master-bin.000002 435 Query 1 512 use `test`; drop table t1
|
master-bin.000002 436 Query 1 513 use `test`; drop table t1
|
||||||
show binary logs;
|
show binary logs;
|
||||||
Log_name
|
Log_name
|
||||||
master-bin.000001
|
master-bin.000001
|
||||||
@ -78,26 +78,26 @@ slave-bin.000001
|
|||||||
slave-bin.000002
|
slave-bin.000002
|
||||||
show binlog events in 'slave-bin.000001' from 4;
|
show binlog events in 'slave-bin.000001' from 4;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
slave-bin.000001 4 Format_desc 2 95 Server ver: VERSION, Binlog ver: 4
|
slave-bin.000001 4 Format_desc 2 96 Server ver: VERSION, Binlog ver: 4
|
||||||
slave-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key)
|
slave-bin.000001 96 Query 1 218 use `test`; create table t1(n int not null auto_increment primary key)
|
||||||
slave-bin.000001 217 Intvar 1 245 INSERT_ID=1
|
slave-bin.000001 218 Intvar 1 246 INSERT_ID=1
|
||||||
slave-bin.000001 245 Query 1 337 use `test`; insert into t1 values (NULL)
|
slave-bin.000001 246 Query 1 338 use `test`; insert into t1 values (NULL)
|
||||||
slave-bin.000001 337 Query 1 414 use `test`; drop table t1
|
slave-bin.000001 338 Query 1 415 use `test`; drop table t1
|
||||||
slave-bin.000001 414 Query 1 518 use `test`; create table t1 (word char(20) not null)
|
slave-bin.000001 415 Query 1 519 use `test`; create table t1 (word char(20) not null)
|
||||||
slave-bin.000001 518 Create_file 1 1197 db=test;table=t1;file_id=1;block_len=581
|
slave-bin.000001 519 Create_file 1 1198 db=test;table=t1;file_id=1;block_len=581
|
||||||
slave-bin.000001 1197 Exec_load 1 1220 ;file_id=1
|
slave-bin.000001 1198 Exec_load 1 1221 ;file_id=1
|
||||||
slave-bin.000001 1220 Query 1 1297 use `test`; drop table t1
|
slave-bin.000001 1221 Query 1 1298 use `test`; drop table t1
|
||||||
slave-bin.000001 1297 Query 1 1384 use `test`; create table t5 (a int)
|
slave-bin.000001 1298 Query 1 1385 use `test`; create table t5 (a int)
|
||||||
slave-bin.000001 1384 Query 1 1461 use `test`; drop table t5
|
slave-bin.000001 1385 Query 1 1462 use `test`; drop table t5
|
||||||
slave-bin.000001 1461 Rotate 2 1504 slave-bin.000002;pos=4
|
slave-bin.000001 1462 Rotate 2 1505 slave-bin.000002;pos=4
|
||||||
show binlog events in 'slave-bin.000002' from 4;
|
show binlog events in 'slave-bin.000002' from 4;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
slave-bin.000002 4 Format_desc 2 95 Server ver: VERSION, Binlog ver: 4
|
slave-bin.000002 4 Format_desc 2 96 Server ver: VERSION, Binlog ver: 4
|
||||||
slave-bin.000002 95 Query 1 182 use `test`; create table t1 (n int)
|
slave-bin.000002 96 Query 1 183 use `test`; create table t1 (n int)
|
||||||
slave-bin.000002 182 Query 1 271 use `test`; insert into t1 values (1)
|
slave-bin.000002 183 Query 1 272 use `test`; insert into t1 values (1)
|
||||||
slave-bin.000002 271 Query 1 348 use `test`; drop table t1
|
slave-bin.000002 272 Query 1 349 use `test`; drop table t1
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 512 # # master-bin.000002 Yes Yes 0 0 512 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 513 # # master-bin.000002 Yes Yes 0 0 513 # None 0 No #
|
||||||
show binlog events in 'slave-bin.000005' from 4;
|
show binlog events in 'slave-bin.000005' from 4;
|
||||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
|
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
|
||||||
|
@ -6,10 +6,10 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|||||||
start slave;
|
start slave;
|
||||||
show master status;
|
show master status;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||||
master-bin.000001 95
|
master-bin.000001 96
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 95 # # master-bin.000001 Yes Yes 0 0 95 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 96 # # master-bin.000001 Yes Yes 0 0 96 # None 0 No #
|
||||||
stop slave;
|
stop slave;
|
||||||
change master to master_log_pos=73;
|
change master to master_log_pos=73;
|
||||||
start slave;
|
start slave;
|
||||||
@ -30,13 +30,13 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
|
|||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 173 # # master-bin.000001 No Yes 0 0 173 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 173 # # master-bin.000001 No Yes 0 0 173 # None 0 No #
|
||||||
show master status;
|
show master status;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||||
master-bin.000001 95
|
master-bin.000001 96
|
||||||
create table if not exists t1 (n int);
|
create table if not exists t1 (n int);
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
create table t1 (n int);
|
create table t1 (n int);
|
||||||
insert into t1 values (1),(2),(3);
|
insert into t1 values (1),(2),(3);
|
||||||
stop slave;
|
stop slave;
|
||||||
change master to master_log_pos=95;
|
change master to master_log_pos=96;
|
||||||
start slave;
|
start slave;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
n
|
n
|
||||||
|
@ -16,7 +16,7 @@ select @@global.max_relay_log_size;
|
|||||||
start slave;
|
start slave;
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73751 # # master-bin.000001 Yes Yes 0 0 73751 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73752 # # master-bin.000001 Yes Yes 0 0 73752 # None 0 No #
|
||||||
stop slave;
|
stop slave;
|
||||||
reset slave;
|
reset slave;
|
||||||
set global max_relay_log_size=(5*4096);
|
set global max_relay_log_size=(5*4096);
|
||||||
@ -26,7 +26,7 @@ select @@global.max_relay_log_size;
|
|||||||
start slave;
|
start slave;
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73751 # # master-bin.000001 Yes Yes 0 0 73751 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73752 # # master-bin.000001 Yes Yes 0 0 73752 # None 0 No #
|
||||||
stop slave;
|
stop slave;
|
||||||
reset slave;
|
reset slave;
|
||||||
set global max_relay_log_size=0;
|
set global max_relay_log_size=0;
|
||||||
@ -36,7 +36,7 @@ select @@global.max_relay_log_size;
|
|||||||
start slave;
|
start slave;
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73751 # # master-bin.000001 Yes Yes 0 0 73751 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73752 # # master-bin.000001 Yes Yes 0 0 73752 # None 0 No #
|
||||||
stop slave;
|
stop slave;
|
||||||
reset slave;
|
reset slave;
|
||||||
flush logs;
|
flush logs;
|
||||||
@ -49,13 +49,13 @@ flush logs;
|
|||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73838 # # master-bin.000001 Yes Yes 0 0 73838 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73839 # # master-bin.000001 Yes Yes 0 0 73839 # None 0 No #
|
||||||
flush logs;
|
flush logs;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73915 # # master-bin.000001 Yes Yes 0 0 73915 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73916 # # master-bin.000001 Yes Yes 0 0 73916 # None 0 No #
|
||||||
flush logs;
|
flush logs;
|
||||||
show master status;
|
show master status;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||||
master-bin.000002 95
|
master-bin.000002 96
|
||||||
|
@ -19,7 +19,7 @@ n
|
|||||||
3
|
3
|
||||||
4
|
4
|
||||||
5
|
5
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # drop database if exists mysqltest
|
master-bin.000001 # Query 1 # drop database if exists mysqltest
|
||||||
master-bin.000001 # Query 1 # create database mysqltest
|
master-bin.000001 # Query 1 # create database mysqltest
|
||||||
|
@ -18,5 +18,5 @@ max(a)
|
|||||||
8000
|
8000
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 743228 # # master-bin.000001 Yes Yes 0 0 743228 # None 0 No #
|
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 743186 # # master-bin.000001 Yes Yes 0 0 743186 # None 0 No #
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -28,4 +28,4 @@ ERROR 42S02: Table 'test.t11' doesn't exist
|
|||||||
drop table if exists t1,t2,t11;
|
drop table if exists t1,t2,t11;
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1617 # # master-bin.000001 Yes Yes test.t1 0 0 1617 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1618 # # master-bin.000001 Yes Yes test.t1 0 0 1618 # None 0 No #
|
||||||
|
@ -6,12 +6,12 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|||||||
start slave;
|
start slave;
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 95 # # master-bin.000001 Yes Yes 0 0 95 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 96 # # master-bin.000001 Yes Yes 0 0 96 # None 0 No #
|
||||||
stop slave;
|
stop slave;
|
||||||
change master to master_user='test';
|
change master to master_user='test';
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 95 # # master-bin.000001 No No 0 0 95 # None 0 No #
|
# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 96 # # master-bin.000001 No No 0 0 96 # None 0 No #
|
||||||
reset slave;
|
reset slave;
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
@ -19,7 +19,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
|
|||||||
start slave;
|
start slave;
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 95 # # master-bin.000001 Yes Yes 0 0 95 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 96 # # master-bin.000001 Yes Yes 0 0 96 # None 0 No #
|
||||||
stop slave;
|
stop slave;
|
||||||
reset slave;
|
reset slave;
|
||||||
start slave;
|
start slave;
|
||||||
|
@ -16,7 +16,7 @@ create table t1 (s text);
|
|||||||
insert into t1 values('Could not break slave'),('Tried hard');
|
insert into t1 values('Could not break slave'),('Tried hard');
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 549 # # master-bin.000001 Yes Yes 0 0 549 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 550 # # master-bin.000001 Yes Yes 0 0 550 # None 0 No #
|
||||||
select * from t1;
|
select * from t1;
|
||||||
s
|
s
|
||||||
Could not break slave
|
Could not break slave
|
||||||
@ -57,7 +57,7 @@ master-bin.000003
|
|||||||
insert into t2 values (65);
|
insert into t2 values (65);
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 497 # # master-bin.000003 Yes Yes 0 0 497 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 498 # # master-bin.000003 Yes Yes 0 0 498 # None 0 No #
|
||||||
select * from t2;
|
select * from t2;
|
||||||
m
|
m
|
||||||
34
|
34
|
||||||
@ -79,13 +79,13 @@ master-bin.000004
|
|||||||
master-bin.000005
|
master-bin.000005
|
||||||
show master status;
|
show master status;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||||
master-bin.000005 2050
|
master-bin.000005 2051
|
||||||
select * from t4;
|
select * from t4;
|
||||||
a
|
a
|
||||||
testing temporary tables part 2
|
testing temporary tables part 2
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2050 # # master-bin.000005 Yes Yes 0 0 2050 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2051 # # master-bin.000005 Yes Yes 0 0 2051 # None 0 No #
|
||||||
lock tables t3 read;
|
lock tables t3 read;
|
||||||
select count(*) from t3 where n >= 4;
|
select count(*) from t3 where n >= 4;
|
||||||
count(*)
|
count(*)
|
||||||
|
@ -10,7 +10,7 @@ stop slave;
|
|||||||
change master to master_port=SLAVE_PORT;
|
change master to master_port=SLAVE_PORT;
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 95 None 0 No NULL
|
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 96 None 0 No NULL
|
||||||
start slave;
|
start slave;
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
show status like "slave_running";
|
show status like "slave_running";
|
||||||
|
@ -10,7 +10,7 @@ stop slave;
|
|||||||
change master to master_port=SLAVE_PORT;
|
change master to master_port=SLAVE_PORT;
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 95 None 0 No NULL
|
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 96 None 0 No NULL
|
||||||
start slave;
|
start slave;
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
select * from t1;
|
select * from t1;
|
||||||
|
@ -38,19 +38,19 @@ f
|
|||||||
7
|
7
|
||||||
show binlog events;
|
show binlog events;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
|
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
|
||||||
master-bin.000001 95 Query 1 185 use `test`; drop table if exists t1,t2
|
master-bin.000001 96 Query 1 186 use `test`; drop table if exists t1,t2
|
||||||
master-bin.000001 185 Query 1 271 use `test`; create table t1(f int)
|
master-bin.000001 186 Query 1 272 use `test`; create table t1(f int)
|
||||||
master-bin.000001 271 Query 1 357 use `test`; create table t2(f int)
|
master-bin.000001 272 Query 1 358 use `test`; create table t2(f int)
|
||||||
master-bin.000001 357 Query 1 483 use `test`; insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10)
|
master-bin.000001 358 Query 1 484 use `test`; insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10)
|
||||||
master-bin.000001 483 Query 1 579 use `test`; create temporary table t3(f int)
|
master-bin.000001 484 Query 1 580 use `test`; create temporary table t3(f int)
|
||||||
master-bin.000001 579 Query 1 684 use `test`; insert into t3 select * from t1 where f<6
|
master-bin.000001 580 Query 1 685 use `test`; insert into t3 select * from t1 where f<6
|
||||||
master-bin.000001 684 Query 1 780 use `test`; create temporary table t3(f int)
|
master-bin.000001 685 Query 1 781 use `test`; create temporary table t3(f int)
|
||||||
master-bin.000001 780 Query 1 882 use `test`; insert into t2 select count(*) from t3
|
master-bin.000001 781 Query 1 883 use `test`; insert into t2 select count(*) from t3
|
||||||
master-bin.000001 882 Query 1 988 use `test`; insert into t3 select * from t1 where f>=4
|
master-bin.000001 883 Query 1 989 use `test`; insert into t3 select * from t1 where f>=4
|
||||||
master-bin.000001 988 Query 1 1075 use `test`; drop temporary table t3
|
master-bin.000001 989 Query 1 1076 use `test`; drop temporary table t3
|
||||||
master-bin.000001 1075 Query 1 1177 use `test`; insert into t2 select count(*) from t3
|
master-bin.000001 1076 Query 1 1178 use `test`; insert into t2 select count(*) from t3
|
||||||
master-bin.000001 1177 Query 1 1264 use `test`; drop temporary table t3
|
master-bin.000001 1178 Query 1 1265 use `test`; drop temporary table t3
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=1040323920;
|
SET TIMESTAMP=1040323920;
|
||||||
|
@ -32,13 +32,13 @@ t
|
|||||||
2004-06-11 09:39:02
|
2004-06-11 09:39:02
|
||||||
show binlog events;
|
show binlog events;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
|
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
|
||||||
master-bin.000001 95 Query 1 188 use `test`; create table t1 (t timestamp)
|
master-bin.000001 96 Query 1 189 use `test`; create table t1 (t timestamp)
|
||||||
master-bin.000001 188 Query 1 280 use `test`; create table t2 (t char(32))
|
master-bin.000001 189 Query 1 281 use `test`; create table t2 (t char(32))
|
||||||
master-bin.000001 280 Query 1 372 use `test`; SET ONE_SHOT TIME_ZONE='UTC'
|
master-bin.000001 281 Query 1 373 use `test`; SET ONE_SHOT TIME_ZONE='UTC'
|
||||||
master-bin.000001 372 Query 1 496 use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
|
master-bin.000001 373 Query 1 497 use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
|
||||||
master-bin.000001 496 Query 1 574 use `test`; delete from t1
|
master-bin.000001 497 Query 1 575 use `test`; delete from t1
|
||||||
master-bin.000001 574 Query 1 698 use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
|
master-bin.000001 575 Query 1 699 use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
|
||||||
set time_zone='MET';
|
set time_zone='MET';
|
||||||
insert into t2 (select t from t1);
|
insert into t2 (select t from t1);
|
||||||
select * from t1;
|
select * from t1;
|
||||||
|
@ -6,8 +6,12 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|||||||
start slave;
|
start slave;
|
||||||
stop slave;
|
stop slave;
|
||||||
flush logs;
|
flush logs;
|
||||||
|
create table t1 (a int) engine=bdb;
|
||||||
reset slave;
|
reset slave;
|
||||||
start slave;
|
start slave;
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 4 # # master-bin.000001 Yes No 0 Rolling back unfinished transaction (no COMMIT or ROLLBACK) from relay log. A probable cause is that the master died while writing the transaction to its binary log. 0 79 # None 0 No #
|
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 4 # # master-bin.000002 Yes Yes 0 Rolling back unfinished transaction (no COMMIT or ROLLBACK) from relay log. A probable cause is that the master died while writing the transaction to its binary log. 0 4 # None 0 No #
|
||||||
|
select * from t1;
|
||||||
|
a
|
||||||
|
drop table t1;
|
||||||
|
@ -14,14 +14,14 @@ insert into t2 values (3),(4);
|
|||||||
drop table t2;
|
drop table t2;
|
||||||
show binlog events;
|
show binlog events;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
|
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
|
||||||
master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key)
|
master-bin.000001 96 Query 1 218 use `test`; create table t1(n int not null auto_increment primary key)
|
||||||
master-bin.000001 217 Query 1 318 use `test`; insert into t1 values (1),(2),(3),(4)
|
master-bin.000001 218 Query 1 319 use `test`; insert into t1 values (1),(2),(3),(4)
|
||||||
master-bin.000001 318 Query 1 395 use `test`; drop table t1
|
master-bin.000001 319 Query 1 396 use `test`; drop table t1
|
||||||
master-bin.000001 395 Query 1 517 use `test`; create table t2(n int not null auto_increment primary key)
|
master-bin.000001 396 Query 1 518 use `test`; create table t2(n int not null auto_increment primary key)
|
||||||
master-bin.000001 517 Query 1 610 use `test`; insert into t2 values (1),(2)
|
master-bin.000001 518 Query 1 611 use `test`; insert into t2 values (1),(2)
|
||||||
master-bin.000001 610 Query 1 703 use `test`; insert into t2 values (3),(4)
|
master-bin.000001 611 Query 1 704 use `test`; insert into t2 values (3),(4)
|
||||||
master-bin.000001 703 Query 1 780 use `test`; drop table t2
|
master-bin.000001 704 Query 1 781 use `test`; drop table t2
|
||||||
start slave until master_log_file='master-bin.000001', master_log_pos=304;
|
start slave until master_log_file='master-bin.000001', master_log_pos=304;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
n
|
n
|
||||||
@ -31,7 +31,7 @@ n
|
|||||||
4
|
4
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 780 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 318 # Master master-bin.000001 304 No #
|
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 781 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 319 # Master master-bin.000001 304 No #
|
||||||
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
|
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
n
|
n
|
||||||
@ -41,7 +41,7 @@ n
|
|||||||
4
|
4
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 780 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 318 # Master master-no-such-bin.000001 291 No #
|
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 781 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 319 # Master master-no-such-bin.000001 291 No #
|
||||||
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=710;
|
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=710;
|
||||||
select * from t2;
|
select * from t2;
|
||||||
n
|
n
|
||||||
@ -49,13 +49,13 @@ n
|
|||||||
2
|
2
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 780 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 610 # Relay slave-relay-bin.000004 710 No #
|
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 781 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 611 # Relay slave-relay-bin.000004 710 No #
|
||||||
start slave;
|
start slave;
|
||||||
stop slave;
|
stop slave;
|
||||||
start slave until master_log_file='master-bin.000001', master_log_pos=710;
|
start slave until master_log_file='master-bin.000001', master_log_pos=710;
|
||||||
show slave status;
|
show slave status;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 780 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 780 # Master master-bin.000001 710 No #
|
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 781 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 781 # Master master-bin.000001 710 No #
|
||||||
start slave until master_log_file='master-bin', master_log_pos=561;
|
start slave until master_log_file='master-bin', master_log_pos=561;
|
||||||
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
||||||
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
|
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
|
||||||
|
@ -76,35 +76,35 @@ abcn1n2
|
|||||||
NULL
|
NULL
|
||||||
NULL
|
NULL
|
||||||
NULL
|
NULL
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
slave-bin.000001 95 Query 1 186 use `test`; create table t1(n char(30))
|
slave-bin.000001 96 Query 1 187 use `test`; create table t1(n char(30))
|
||||||
slave-bin.000001 186 User var 2 229 @`i1`=12345678901234
|
slave-bin.000001 187 User var 2 230 @`i1`=12345678901234
|
||||||
slave-bin.000001 229 User var 2 272 @`i2`=-12345678901234
|
slave-bin.000001 230 User var 2 273 @`i2`=-12345678901234
|
||||||
slave-bin.000001 272 User var 2 315 @`i3`=0
|
slave-bin.000001 273 User var 2 316 @`i3`=0
|
||||||
slave-bin.000001 315 User var 2 358 @`i4`=-1
|
slave-bin.000001 316 User var 2 359 @`i4`=-1
|
||||||
slave-bin.000001 358 Query 1 470 use `test`; insert into t1 values (@i1), (@i2), (@i3), (@i4)
|
slave-bin.000001 359 Query 1 471 use `test`; insert into t1 values (@i1), (@i2), (@i3), (@i4)
|
||||||
slave-bin.000001 470 User var 2 509 @`r1`=12.5
|
slave-bin.000001 471 User var 2 510 @`r1`=12.5
|
||||||
slave-bin.000001 509 User var 2 548 @`r2`=-12.5
|
slave-bin.000001 510 User var 2 549 @`r2`=-12.5
|
||||||
slave-bin.000001 548 Query 1 646 use `test`; insert into t1 values (@r1), (@r2)
|
slave-bin.000001 549 Query 1 647 use `test`; insert into t1 values (@r1), (@r2)
|
||||||
slave-bin.000001 646 User var 2 695 @`s1`=_latin1 0x5468697320697320612074657374 COLLATE latin1_swedish_ci
|
slave-bin.000001 647 User var 2 696 @`s1`=_latin1 0x5468697320697320612074657374 COLLATE latin1_swedish_ci
|
||||||
slave-bin.000001 695 User var 2 730 @`s2`=_latin1 "" COLLATE latin1_swedish_ci
|
slave-bin.000001 696 User var 2 731 @`s2`=_latin1 "" COLLATE latin1_swedish_ci
|
||||||
slave-bin.000001 730 User var 2 772 @`s3`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci
|
slave-bin.000001 731 User var 2 773 @`s3`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci
|
||||||
slave-bin.000001 772 User var 2 814 @`s4`=_latin1 0x6162635C646566 COLLATE latin1_swedish_ci
|
slave-bin.000001 773 User var 2 815 @`s4`=_latin1 0x6162635C646566 COLLATE latin1_swedish_ci
|
||||||
slave-bin.000001 814 User var 2 856 @`s5`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci
|
slave-bin.000001 815 User var 2 857 @`s5`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci
|
||||||
slave-bin.000001 856 Query 1 975 use `test`; insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5)
|
slave-bin.000001 857 Query 1 976 use `test`; insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5)
|
||||||
slave-bin.000001 975 User var 2 1001 @`n1`=NULL
|
slave-bin.000001 976 User var 2 1002 @`n1`=NULL
|
||||||
slave-bin.000001 1001 Query 1 1092 use `test`; insert into t1 values (@n1)
|
slave-bin.000001 1002 Query 1 1093 use `test`; insert into t1 values (@n1)
|
||||||
slave-bin.000001 1092 User var 2 1118 @`n2`=NULL
|
slave-bin.000001 1093 User var 2 1119 @`n2`=NULL
|
||||||
slave-bin.000001 1118 Query 1 1209 use `test`; insert into t1 values (@n2)
|
slave-bin.000001 1119 Query 1 1210 use `test`; insert into t1 values (@n2)
|
||||||
slave-bin.000001 1209 Query 1 1326 use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1)
|
slave-bin.000001 1210 Query 1 1327 use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1)
|
||||||
slave-bin.000001 1326 User var 2 1368 @`a`=2
|
slave-bin.000001 1327 User var 2 1369 @`a`=2
|
||||||
slave-bin.000001 1368 Query 1 1469 use `test`; insert into t1 values (@a+(@b:=@a+1))
|
slave-bin.000001 1369 Query 1 1470 use `test`; insert into t1 values (@a+(@b:=@a+1))
|
||||||
slave-bin.000001 1469 User var 2 1506 @`q`=_latin1 0x616263 COLLATE latin1_swedish_ci
|
slave-bin.000001 1470 User var 2 1507 @`q`=_latin1 0x616263 COLLATE latin1_swedish_ci
|
||||||
slave-bin.000001 1506 Query 1 1639 use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2'))
|
slave-bin.000001 1507 Query 1 1640 use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2'))
|
||||||
slave-bin.000001 1639 User var 2 1681 @`a`=5
|
slave-bin.000001 1640 User var 2 1682 @`a`=5
|
||||||
slave-bin.000001 1681 Query 1 1776 use `test`; insert into t1 values (@a),(@a)
|
slave-bin.000001 1682 Query 1 1777 use `test`; insert into t1 values (@a),(@a)
|
||||||
slave-bin.000001 1776 User var 2 1801 @`a`=NULL
|
slave-bin.000001 1777 User var 2 1802 @`a`=NULL
|
||||||
slave-bin.000001 1801 Query 1 1903 use `test`; insert into t1 values (@a),(@a),(@a*5)
|
slave-bin.000001 1802 Query 1 1904 use `test`; insert into t1 values (@a),(@a),(@a*5)
|
||||||
drop table t1;
|
drop table t1;
|
||||||
stop slave;
|
stop slave;
|
||||||
|
@ -2069,6 +2069,97 @@ call bug8540()|
|
|||||||
y z
|
y z
|
||||||
1 1
|
1 1
|
||||||
drop procedure bug8540|
|
drop procedure bug8540|
|
||||||
|
drop table if exists t3|
|
||||||
|
create table t3 (s1 int)|
|
||||||
|
drop procedure if exists bug6642|
|
||||||
|
create procedure bug6642()
|
||||||
|
select abs(count(s1)) from t3|
|
||||||
|
call bug6642()|
|
||||||
|
abs(count(s1))
|
||||||
|
0
|
||||||
|
call bug6642()|
|
||||||
|
abs(count(s1))
|
||||||
|
0
|
||||||
|
drop procedure bug6642|
|
||||||
|
insert into t3 values (0),(1)|
|
||||||
|
drop procedure if exists bug7013|
|
||||||
|
create procedure bug7013()
|
||||||
|
select s1,count(s1) from t3 group by s1 with rollup|
|
||||||
|
call bug7013()|
|
||||||
|
s1 count(s1)
|
||||||
|
0 1
|
||||||
|
1 1
|
||||||
|
NULL 2
|
||||||
|
call bug7013()|
|
||||||
|
s1 count(s1)
|
||||||
|
0 1
|
||||||
|
1 1
|
||||||
|
NULL 2
|
||||||
|
drop procedure bug7013|
|
||||||
|
drop table if exists t4;
|
||||||
|
--enable_warnings|
|
||||||
|
create table t4 (
|
||||||
|
a mediumint(8) unsigned not null auto_increment,
|
||||||
|
b smallint(5) unsigned not null,
|
||||||
|
c char(32) not null,
|
||||||
|
primary key (a)
|
||||||
|
) engine=myisam default charset=latin1|
|
||||||
|
insert into t4 values (1, 2, 'oneword')|
|
||||||
|
insert into t4 values (2, 2, 'anotherword')|
|
||||||
|
drop procedure if exists bug7743|
|
||||||
|
create procedure bug7743 ( searchstring char(28) )
|
||||||
|
begin
|
||||||
|
declare var mediumint(8) unsigned;
|
||||||
|
select a into var from t4 where b = 2 and c = binary searchstring limit 1;
|
||||||
|
select var;
|
||||||
|
end|
|
||||||
|
call bug7743("oneword")|
|
||||||
|
var
|
||||||
|
1
|
||||||
|
call bug7743("OneWord")|
|
||||||
|
var
|
||||||
|
NULL
|
||||||
|
call bug7743("anotherword")|
|
||||||
|
var
|
||||||
|
2
|
||||||
|
call bug7743("AnotherWord")|
|
||||||
|
var
|
||||||
|
NULL
|
||||||
|
drop procedure bug7743|
|
||||||
|
drop table t4|
|
||||||
|
delete from t3|
|
||||||
|
insert into t3 values(1)|
|
||||||
|
drop procedure if exists bug7992_1|
|
||||||
|
Warnings:
|
||||||
|
Note 1305 PROCEDURE bug7992_1 does not exist
|
||||||
|
drop procedure if exists bug7992_2|
|
||||||
|
Warnings:
|
||||||
|
Note 1305 PROCEDURE bug7992_2 does not exist
|
||||||
|
create procedure bug7992_1()
|
||||||
|
begin
|
||||||
|
declare i int;
|
||||||
|
select max(s1)+1 into i from t3;
|
||||||
|
end|
|
||||||
|
create procedure bug7992_2()
|
||||||
|
insert into t3 (s1) select max(t4.s1)+1 from t3 as t4|
|
||||||
|
call bug7992_1()|
|
||||||
|
call bug7992_1()|
|
||||||
|
call bug7992_2()|
|
||||||
|
call bug7992_2()|
|
||||||
|
drop procedure bug7992_1|
|
||||||
|
drop procedure bug7992_2|
|
||||||
|
drop table t3|
|
||||||
|
drop table if exists t3|
|
||||||
|
create table t3 ( userid bigint(20) not null default 0 )|
|
||||||
|
drop procedure if exists bug8116|
|
||||||
|
create procedure bug8116(in _userid int)
|
||||||
|
select * from t3 where userid = _userid|
|
||||||
|
call bug8116(42)|
|
||||||
|
userid
|
||||||
|
call bug8116(42)|
|
||||||
|
userid
|
||||||
|
drop procedure bug8116|
|
||||||
|
drop table t3|
|
||||||
drop table if exists fac|
|
drop table if exists fac|
|
||||||
create table fac (n int unsigned not null primary key, f bigint unsigned)|
|
create table fac (n int unsigned not null primary key, f bigint unsigned)|
|
||||||
drop procedure if exists ifac|
|
drop procedure if exists ifac|
|
||||||
|
@ -169,8 +169,19 @@ Warnings:
|
|||||||
Warning 1264 Out of range value adjusted for column 'a' at row 1
|
Warning 1264 Out of range value adjusted for column 'a' at row 1
|
||||||
Note 1265 Data truncated for column 'a' at row 2
|
Note 1265 Data truncated for column 'a' at row 2
|
||||||
Warning 1264 Out of range value adjusted for column 'a' at row 3
|
Warning 1264 Out of range value adjusted for column 'a' at row 3
|
||||||
|
insert into t1 values ("1e+4294967296"),("1e-4294967296");
|
||||||
|
Warnings:
|
||||||
|
Warning 1264 Out of range value adjusted for column 'a' at row 1
|
||||||
|
Note 1265 Data truncated for column 'a' at row 2
|
||||||
|
insert into t1 values ("1e+18446744073709551615"),("1e+18446744073709551616"),("1e-9223372036854775807"),("1e-9223372036854775809");
|
||||||
|
Warnings:
|
||||||
|
Warning 1264 Out of range value adjusted for column 'a' at row 1
|
||||||
|
Warning 1366 Incorrect decimal value: '1e+18446744073709551616' for column 'a' at row 2
|
||||||
|
Note 1265 Data truncated for column 'a' at row 3
|
||||||
|
Warning 1366 Incorrect decimal value: '1e-9223372036854775809' for column 'a' at row 4
|
||||||
insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
|
insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1265 Data truncated for column 'a' at row 1
|
||||||
Note 1265 Data truncated for column 'a' at row 3
|
Note 1265 Data truncated for column 'a' at row 3
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
@ -195,6 +206,12 @@ a
|
|||||||
99999999.99
|
99999999.99
|
||||||
0.00
|
0.00
|
||||||
-99999999.99
|
-99999999.99
|
||||||
|
99999999.99
|
||||||
|
0.00
|
||||||
|
99999999.99
|
||||||
|
0.00
|
||||||
|
0.00
|
||||||
|
0.00
|
||||||
123.40
|
123.40
|
||||||
12340.00
|
12340.00
|
||||||
1.23
|
1.23
|
||||||
@ -229,6 +246,7 @@ Note 1265 Data truncated for column 'a' at row 2
|
|||||||
Warning 1264 Out of range value adjusted for column 'a' at row 3
|
Warning 1264 Out of range value adjusted for column 'a' at row 3
|
||||||
insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
|
insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1265 Data truncated for column 'a' at row 1
|
||||||
Note 1265 Data truncated for column 'a' at row 3
|
Note 1265 Data truncated for column 'a' at row 3
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
@ -287,6 +305,7 @@ Note 1265 Data truncated for column 'a' at row 2
|
|||||||
Warning 1264 Out of range value adjusted for column 'a' at row 3
|
Warning 1264 Out of range value adjusted for column 'a' at row 3
|
||||||
insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
|
insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1265 Data truncated for column 'a' at row 1
|
||||||
Note 1265 Data truncated for column 'a' at row 3
|
Note 1265 Data truncated for column 'a' at row 3
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
@ -338,6 +357,7 @@ Warning 1264 Out of range value adjusted for column 'a' at row 3
|
|||||||
insert into t1 values (123.4e0),(123.4e+2),(123.4e-2),(123e1),(123e+0);
|
insert into t1 values (123.4e0),(123.4e+2),(123.4e-2),(123e1),(123e+0);
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1265 Data truncated for column 'a' at row 3
|
Note 1265 Data truncated for column 'a' at row 3
|
||||||
|
insert into t1 values (MID("987",1,2)),("987 "),("987.6e+2 ");
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
0.00
|
0.00
|
||||||
@ -366,6 +386,9 @@ a
|
|||||||
1.23
|
1.23
|
||||||
1230.00
|
1230.00
|
||||||
123.00
|
123.00
|
||||||
|
98.00
|
||||||
|
987.00
|
||||||
|
98760.00
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a decimal);
|
create table t1 (a decimal);
|
||||||
insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+12345678901'),(99999999999999);
|
insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+12345678901'),(99999999999999);
|
||||||
|
@ -696,7 +696,7 @@ end while; select v1, v2, v3 * 0.000000000001, v4 * 0.000000000001; end;//
|
|||||||
call p1()//
|
call p1()//
|
||||||
#
|
#
|
||||||
v1 v2 v3 * 0.000000000001 v4 * 0.000000000001
|
v1 v2 v3 * 0.000000000001 v4 * 0.000000000001
|
||||||
1.000000100000 1.999999900000 1.000000100000000000 1.999999900000000000
|
1.000000100000 1.999999900000 1.000000100000 1.999999900000
|
||||||
drop procedure p1;
|
drop procedure p1;
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
Warnings:
|
Warnings:
|
||||||
|
@ -174,14 +174,15 @@ INSERT INTO t1 VALUES(@`a b`);
|
|||||||
set @var1= "';aaa";
|
set @var1= "';aaa";
|
||||||
SET @var2=char(ascii('a'));
|
SET @var2=char(ascii('a'));
|
||||||
insert into t1 values (@var1),(@var2);
|
insert into t1 values (@var1),(@var2);
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 95 User var 1 136 @`a b`=_latin1 0x68656C6C6F COLLATE latin1_swedish_ci
|
master-bin.000001 96 User var 1 137 @`a b`=_latin1 0x68656C6C6F COLLATE latin1_swedish_ci
|
||||||
master-bin.000001 136 Query 1 229 use `test`; INSERT INTO t1 VALUES(@`a b`)
|
master-bin.000001 137 Query 1 230 use `test`; INSERT INTO t1 VALUES(@`a b`)
|
||||||
master-bin.000001 229 User var 1 271 @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci
|
master-bin.000001 230 User var 1 272 @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci
|
||||||
master-bin.000001 271 User var 1 309 @`var2`=_latin1 0x61 COLLATE latin1_swedish_ci
|
master-bin.000001 272 User var 1 310 @`var2`=_latin1 0x61 COLLATE latin1_swedish_ci
|
||||||
master-bin.000001 309 Query 1 410 use `test`; insert into t1 values (@var1),(@var2)
|
master-bin.000001 310 Query 1 411 use `test`; insert into t1 values (@var1),(@var2)
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
ROLLBACK;
|
||||||
SET @`a b`:=_latin1 0x68656C6C6F COLLATE `latin1_swedish_ci`;
|
SET @`a b`:=_latin1 0x68656C6C6F COLLATE `latin1_swedish_ci`;
|
||||||
use test;
|
use test;
|
||||||
SET TIMESTAMP=10000;
|
SET TIMESTAMP=10000;
|
||||||
|
Binary file not shown.
@ -116,3 +116,19 @@ SELECT FIELD('ue',s1), FIELD('
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
-- source include/ctype_filesort.inc
|
-- source include/ctype_filesort.inc
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#7878 with utf8_general_ci, equals (=) has problem with
|
||||||
|
# accent insensitivity.
|
||||||
|
# Although originally this problem was found with UTF8 character set,
|
||||||
|
# '=' behaved wrong for latin1_german2_ci as well.
|
||||||
|
# Let's check it does not work incorrect anymore.
|
||||||
|
#
|
||||||
|
SET NAMES latin1;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
col1 varchar(255) NOT NULL default ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 collate latin1_german2_ci;
|
||||||
|
INSERT INTO t1 VALUES ('<27>'),('ss'),('ss');
|
||||||
|
ALTER TABLE t1 ADD KEY ifword(col1);
|
||||||
|
SELECT * FROM t1 WHERE col1='<27>' ORDER BY col1, BINARY col1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
@ -338,7 +338,7 @@ create table t2 (c char(30)) charset=ucs2;
|
|||||||
set @v=convert('abc' using ucs2);
|
set @v=convert('abc' using ucs2);
|
||||||
reset master;
|
reset master;
|
||||||
insert into t2 values (@v);
|
insert into t2 values (@v);
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
|
# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
|
||||||
# absolutely need variables names to be quoted and strings to be
|
# absolutely need variables names to be quoted and strings to be
|
||||||
# escaped).
|
# escaped).
|
||||||
|
@ -58,6 +58,11 @@ create table t2 (id int not null,rating int null);
|
|||||||
insert into t1 values(1),(2),(3);
|
insert into t1 values(1),(2),(3);
|
||||||
insert into t2 values(1, 3),(2, NULL),(2, NULL),(3, 2),(3, NULL);
|
insert into t2 values(1, 3),(2, NULL),(2, NULL),(3, 2),(3, NULL);
|
||||||
select t1.id, avg(rating) from t1 left join t2 on ( t1.id = t2.id ) group by t1.id;
|
select t1.id, avg(rating) from t1 left join t2 on ( t1.id = t2.id ) group by t1.id;
|
||||||
|
# Test different types with avg()
|
||||||
|
select sql_small_result t2.id, avg(rating) from t2 group by t2.id;
|
||||||
|
select sql_big_result t2.id, avg(rating) from t2 group by t2.id;
|
||||||
|
select sql_small_result t2.id, avg(rating+0.0e0) from t2 group by t2.id;
|
||||||
|
select sql_big_result t2.id, avg(rating+0.0e0) from t2 group by t2.id;
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -18,6 +18,8 @@ select export_set(9,"Y","N","-",5),export_set(9,"Y","N"),export_set(9,"Y","N",""
|
|||||||
# Wrong usage of functions
|
# Wrong usage of functions
|
||||||
#
|
#
|
||||||
select elt(2,1),field(NULL,"a","b","c");
|
select elt(2,1),field(NULL,"a","b","c");
|
||||||
|
select field("b","a",NULL),field(1,0,NULL)+0,field(1.0,0.0,NULL)+0.0,field(1.0e1,0.0e1,NULL)+0.0e1;
|
||||||
|
select field(NULL,"a",NULL),field(NULL,0,NULL)+0,field(NULL,0.0,NULL)+0.0,field(NULL,0.0e1,NULL)+0.0e1;
|
||||||
select find_in_set("","a,b,c"),find_in_set("","a,b,c,"),find_in_set("",",a,b,c");
|
select find_in_set("","a,b,c"),find_in_set("","a,b,c,"),find_in_set("",",a,b,c");
|
||||||
select find_in_set("abc","abc"),find_in_set("ab","abc"),find_in_set("abcd","abc");
|
select find_in_set("abc","abc"),find_in_set("ab","abc"),find_in_set("abcd","abc");
|
||||||
select interval(null, 1, 10, 100);
|
select interval(null, 1, 10, 100);
|
||||||
|
@ -139,7 +139,7 @@ select n from t1;
|
|||||||
rollback to savepoint `savept2`;
|
rollback to savepoint `savept2`;
|
||||||
release savepoint `my_savepoint`;
|
release savepoint `my_savepoint`;
|
||||||
select n from t1;
|
select n from t1;
|
||||||
-- error 1181
|
-- error 1305
|
||||||
rollback to savepoint `my_savepoint`;
|
rollback to savepoint `my_savepoint`;
|
||||||
set autocommit=1;
|
set autocommit=1;
|
||||||
# nop
|
# nop
|
||||||
|
@ -26,7 +26,8 @@ insert into t2 select * from t1;
|
|||||||
commit;
|
commit;
|
||||||
|
|
||||||
--replace_column 5 #
|
--replace_column 5 #
|
||||||
show binlog events from 95;
|
--replace_result "xid=12" "xid=7"
|
||||||
|
show binlog events from 96;
|
||||||
|
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
@ -39,7 +40,7 @@ insert into t2 select * from t1;
|
|||||||
rollback;
|
rollback;
|
||||||
|
|
||||||
--replace_column 5 #
|
--replace_column 5 #
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
|
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
@ -54,7 +55,8 @@ rollback to savepoint my_savepoint;
|
|||||||
commit;
|
commit;
|
||||||
|
|
||||||
--replace_column 5 #
|
--replace_column 5 #
|
||||||
show binlog events from 95;
|
--replace_result "xid=45" "xid=24"
|
||||||
|
show binlog events from 96;
|
||||||
|
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
@ -71,7 +73,8 @@ commit;
|
|||||||
select a from t1 order by a; # check that savepoints work :)
|
select a from t1 order by a; # check that savepoints work :)
|
||||||
|
|
||||||
--replace_column 5 #
|
--replace_column 5 #
|
||||||
show binlog events from 95;
|
--replace_result "xid=67" "xid=36"
|
||||||
|
show binlog events from 96;
|
||||||
|
|
||||||
# and when ROLLBACK is not explicit?
|
# and when ROLLBACK is not explicit?
|
||||||
delete from t1;
|
delete from t1;
|
||||||
@ -92,7 +95,7 @@ connection con2;
|
|||||||
# logging has been done, we use a user lock.
|
# logging has been done, we use a user lock.
|
||||||
select get_lock("a",10);
|
select get_lock("a",10);
|
||||||
--replace_column 5 #
|
--replace_column 5 #
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
|
|
||||||
# and when not in a transact1on?
|
# and when not in a transact1on?
|
||||||
delete from t1;
|
delete from t1;
|
||||||
@ -103,7 +106,8 @@ insert into t1 values(9);
|
|||||||
insert into t2 select * from t1;
|
insert into t2 select * from t1;
|
||||||
|
|
||||||
--replace_column 5 #
|
--replace_column 5 #
|
||||||
show binlog events from 95;
|
--replace_result "xid=116" "xid=59"
|
||||||
|
show binlog events from 96;
|
||||||
|
|
||||||
# Check that when the query updat1ng the MyISAM table is the first in the
|
# Check that when the query updat1ng the MyISAM table is the first in the
|
||||||
# transaction, we log it immediately.
|
# transaction, we log it immediately.
|
||||||
@ -115,12 +119,14 @@ insert into t1 values(10); # first make t1 non-empty
|
|||||||
begin;
|
begin;
|
||||||
insert into t2 select * from t1;
|
insert into t2 select * from t1;
|
||||||
--replace_column 5 #
|
--replace_column 5 #
|
||||||
show binlog events from 95;
|
--replace_result "xid=130" "xid=65"
|
||||||
|
show binlog events from 96;
|
||||||
insert into t1 values(11);
|
insert into t1 values(11);
|
||||||
commit;
|
commit;
|
||||||
|
|
||||||
--replace_column 5 #
|
--replace_column 5 #
|
||||||
show binlog events from 95;
|
--replace_result "xid=130" "xid=65" "xid=133" "xid=67"
|
||||||
|
show binlog events from 96;
|
||||||
|
|
||||||
|
|
||||||
# Check that things work like before this BEGIN/ROLLBACK code was added,
|
# Check that things work like before this BEGIN/ROLLBACK code was added,
|
||||||
@ -138,7 +144,8 @@ insert into t2 select * from t1;
|
|||||||
commit;
|
commit;
|
||||||
|
|
||||||
--replace_column 5 #
|
--replace_column 5 #
|
||||||
show binlog events from 95;
|
--replace_result "xid=152" "xid=77"
|
||||||
|
show binlog events from 96;
|
||||||
|
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
@ -150,7 +157,7 @@ insert into t2 select * from t1;
|
|||||||
rollback;
|
rollback;
|
||||||
|
|
||||||
--replace_column 5 #
|
--replace_column 5 #
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
|
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
@ -165,7 +172,8 @@ rollback to savepoint my_savepoint;
|
|||||||
commit;
|
commit;
|
||||||
|
|
||||||
--replace_column 5 #
|
--replace_column 5 #
|
||||||
show binlog events from 95;
|
--replace_result "xid=184" "xid=93"
|
||||||
|
show binlog events from 96;
|
||||||
|
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
@ -182,7 +190,8 @@ commit;
|
|||||||
select a from t1 order by a; # check that savepoints work :)
|
select a from t1 order by a; # check that savepoints work :)
|
||||||
|
|
||||||
--replace_column 5 #
|
--replace_column 5 #
|
||||||
show binlog events from 95;
|
--replace_result "xid=205" "xid=104"
|
||||||
|
show binlog events from 96;
|
||||||
|
|
||||||
# Test for BUG#5714, where a MyISAM update in the transaction used to
|
# Test for BUG#5714, where a MyISAM update in the transaction used to
|
||||||
# release row-level locks in InnoDB
|
# release row-level locks in InnoDB
|
||||||
|
@ -61,7 +61,7 @@ select "--- --database --" as "";
|
|||||||
select "--- --position --" as "";
|
select "--- --position --" as "";
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||||
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --position=118 $MYSQL_TEST_DIR/var/log/master-bin.000002
|
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --position=119 $MYSQL_TEST_DIR/var/log/master-bin.000002
|
||||||
|
|
||||||
# These are tests for remote binlog.
|
# These are tests for remote binlog.
|
||||||
# They should return the same as previous test.
|
# They should return the same as previous test.
|
||||||
@ -93,7 +93,7 @@ select "--- --database --" as "";
|
|||||||
select "--- --position --" as "";
|
select "--- --position --" as "";
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||||
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --read-from-remote-server --position=118 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
|
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --read-from-remote-server --position=119 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
|
||||||
|
|
||||||
# Bug#7853 (mysqlbinlog does not accept input from stdin)
|
# Bug#7853 (mysqlbinlog does not accept input from stdin)
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
@ -107,3 +107,4 @@ select "--- reading stdin --" as "";
|
|||||||
|
|
||||||
# clean up
|
# clean up
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
|
|
||||||
|
@ -46,11 +46,11 @@ select "--- offset --" as "";
|
|||||||
--disable_query_log
|
--disable_query_log
|
||||||
select "--- start-position --" as "";
|
select "--- start-position --" as "";
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
--exec $MYSQL_BINLOG --short-form --start-position=601 $MYSQL_TEST_DIR/var/log/master-bin.000001
|
--exec $MYSQL_BINLOG --short-form --start-position=602 $MYSQL_TEST_DIR/var/log/master-bin.000001
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
select "--- stop-position --" as "";
|
select "--- stop-position --" as "";
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
--exec $MYSQL_BINLOG --short-form --stop-position=601 $MYSQL_TEST_DIR/var/log/master-bin.000001
|
--exec $MYSQL_BINLOG --short-form --stop-position=602 $MYSQL_TEST_DIR/var/log/master-bin.000001
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
select "--- start-datetime --" as "";
|
select "--- start-datetime --" as "";
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
@ -75,11 +75,11 @@ select "--- offset --" as "";
|
|||||||
--disable_query_log
|
--disable_query_log
|
||||||
select "--- start-position --" as "";
|
select "--- start-position --" as "";
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
--exec $MYSQL_BINLOG --short-form --start-position=601 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002
|
--exec $MYSQL_BINLOG --short-form --start-position=602 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
select "--- stop-position --" as "";
|
select "--- stop-position --" as "";
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
--exec $MYSQL_BINLOG --short-form --stop-position=123 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002
|
--exec $MYSQL_BINLOG --short-form --stop-position=124 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
select "--- start-datetime --" as "";
|
select "--- start-datetime --" as "";
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
@ -102,11 +102,11 @@ select "--- offset --" as "";
|
|||||||
--disable_query_log
|
--disable_query_log
|
||||||
select "--- start-position --" as "";
|
select "--- start-position --" as "";
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
--exec $MYSQL_BINLOG --short-form --start-position=601 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
|
--exec $MYSQL_BINLOG --short-form --start-position=602 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
select "--- stop-position --" as "";
|
select "--- stop-position --" as "";
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
--exec $MYSQL_BINLOG --short-form --stop-position=601 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
|
--exec $MYSQL_BINLOG --short-form --stop-position=602 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
select "--- start-datetime --" as "";
|
select "--- start-datetime --" as "";
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
@ -129,11 +129,11 @@ select "--- offset --" as "";
|
|||||||
--disable_query_log
|
--disable_query_log
|
||||||
select "--- start-position --" as "";
|
select "--- start-position --" as "";
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
--exec $MYSQL_BINLOG --short-form --start-position=601 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
|
--exec $MYSQL_BINLOG --short-form --start-position=602 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
select "--- stop-position --" as "";
|
select "--- stop-position --" as "";
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
--exec $MYSQL_BINLOG --short-form --stop-position=123 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
|
--exec $MYSQL_BINLOG --short-form --stop-position=124 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
select "--- start-datetime --" as "";
|
select "--- start-datetime --" as "";
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
@ -209,8 +209,30 @@ select * from t4;
|
|||||||
select * from t4;
|
select * from t4;
|
||||||
|
|
||||||
show status like 'handler_discover%';
|
show status like 'handler_discover%';
|
||||||
|
--error 1051
|
||||||
drop table t4;
|
drop table t4;
|
||||||
|
|
||||||
|
create table t4(
|
||||||
|
id int not null primary key,
|
||||||
|
name char(27)
|
||||||
|
) engine=ndb;
|
||||||
|
insert into t4 values (1, "Automatic");
|
||||||
|
select * from t4;
|
||||||
|
|
||||||
|
# Remove the table from NDB
|
||||||
|
system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ;
|
||||||
|
|
||||||
|
--error 1146
|
||||||
|
select * from t4;
|
||||||
|
|
||||||
|
drop table if exists t4;
|
||||||
|
|
||||||
|
# Test that dropping a table that does not exists
|
||||||
|
# on disk or in NDB gives same result as above
|
||||||
|
--error 1051
|
||||||
|
drop table t5;
|
||||||
|
drop table if exists t5;
|
||||||
|
|
||||||
|
|
||||||
#######################################################
|
#######################################################
|
||||||
# Test that a table that has been dropped from NDB
|
# Test that a table that has been dropped from NDB
|
||||||
|
@ -10,7 +10,7 @@ drop table if exists t1;
|
|||||||
set GLOBAL query_cache_type=on;
|
set GLOBAL query_cache_type=on;
|
||||||
set GLOBAL query_cache_size=1355776;
|
set GLOBAL query_cache_size=1355776;
|
||||||
# Turn on thread that will fetch commit count for open tables
|
# Turn on thread that will fetch commit count for open tables
|
||||||
set GLOBAL ndb_cache_check_time=5;
|
set GLOBAL ndb_cache_check_time=1;
|
||||||
reset query cache;
|
reset query cache;
|
||||||
flush status;
|
flush status;
|
||||||
|
|
||||||
|
@ -68,4 +68,14 @@ show status like "Qcache_hits";
|
|||||||
|
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
|
|
||||||
|
# Turn off and reset query cache on server1 and server2
|
||||||
|
connection server1;
|
||||||
|
set GLOBAL query_cache_size=0;
|
||||||
|
set GLOBAL ndb_cache_check_time=0;
|
||||||
|
reset query cache;
|
||||||
|
flush status;
|
||||||
|
connection server2;
|
||||||
|
set GLOBAL query_cache_size=0;
|
||||||
|
set GLOBAL ndb_cache_check_time=0;
|
||||||
|
reset query cache;
|
||||||
|
flush status;
|
||||||
|
@ -107,7 +107,7 @@ connection master;
|
|||||||
drop database mysqltest2;
|
drop database mysqltest2;
|
||||||
drop database mysqltest3;
|
drop database mysqltest3;
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
# Check that we can change global.collation_server (since 5.0.3)
|
# Check that we can change global.collation_server (since 5.0.3)
|
||||||
@ -156,3 +156,4 @@ connection master;
|
|||||||
--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001
|
--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001
|
||||||
drop table t1;
|
drop table t1;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ connection master;
|
|||||||
--error 0,1053;
|
--error 0,1053;
|
||||||
reap;
|
reap;
|
||||||
connection master1;
|
connection master1;
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
save_master_pos;
|
save_master_pos;
|
||||||
connection slave;
|
connection slave;
|
||||||
# SQL slave thread should not have stopped (because table of the killed
|
# SQL slave thread should not have stopped (because table of the killed
|
||||||
|
@ -19,5 +19,5 @@ create database mysqltest;
|
|||||||
create table t1(a int, b int, unique(b));
|
create table t1(a int, b int, unique(b));
|
||||||
use mysqltest;
|
use mysqltest;
|
||||||
load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
|
load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
|
||||||
show binlog events from 95; # should be nothing
|
show binlog events from 96; # should be nothing
|
||||||
drop database mysqltest;
|
drop database mysqltest;
|
||||||
|
@ -17,4 +17,4 @@ save_master_pos;
|
|||||||
connection slave;
|
connection slave;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
select count(*) from t1; # check that LOAD was replicated
|
select count(*) from t1; # check that LOAD was replicated
|
||||||
show binlog events from 95; # should be nothing
|
show binlog events from 96; # should be nothing
|
||||||
|
@ -38,9 +38,9 @@ select count(*) from t1;
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
--replace_result $VERSION VERSION
|
--replace_result $VERSION VERSION
|
||||||
show binlog events;
|
show binlog events;
|
||||||
show binlog events from 95 limit 1;
|
show binlog events from 96 limit 1;
|
||||||
show binlog events from 95 limit 2;
|
show binlog events from 96 limit 2;
|
||||||
show binlog events from 95 limit 2,1;
|
show binlog events from 96 limit 2,1;
|
||||||
flush logs;
|
flush logs;
|
||||||
|
|
||||||
# We need an extra update before doing save_master_pos.
|
# We need an extra update before doing save_master_pos.
|
||||||
|
@ -38,7 +38,7 @@ insert into t1 values (1),(2),(3);
|
|||||||
save_master_pos;
|
save_master_pos;
|
||||||
connection slave;
|
connection slave;
|
||||||
stop slave;
|
stop slave;
|
||||||
change master to master_log_pos=95;
|
change master to master_log_pos=96;
|
||||||
start slave;
|
start slave;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
|
@ -24,6 +24,6 @@ sync_slave_with_master;
|
|||||||
select * from mysqltest.t1;
|
select * from mysqltest.t1;
|
||||||
connection master;
|
connection master;
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
drop database mysqltest;
|
drop database mysqltest;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
@ -1,21 +1,28 @@
|
|||||||
# We are testing if a binlog which contains BEGIN but not COMMIT (the
|
# We are testing if a binlog which contains BEGIN but not COMMIT (the
|
||||||
# master did while writing the transaction to the binlog) triggers an
|
# master died while writing the transaction to the binlog) triggers a
|
||||||
# error on slave. So we use such a truncated binlog and simulate that
|
# rollback on slave. So we use such a truncated binlog and simulate that
|
||||||
# the master restarted after this.
|
# the master restarted after this.
|
||||||
|
|
||||||
source include/master-slave.inc;
|
source include/master-slave.inc;
|
||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
# If we are not supporting transactions in the slave, the unfinished transaction
|
# If we are not supporting transactions in the slave, the unfinished
|
||||||
# won't cause any error, so we need to skip the test. In the 4.0 testsuite, the
|
# transaction won't cause any error, so we need to skip the test. In the 4.0
|
||||||
# slave always runs without InnoDB, so we check for BDB.
|
# testsuite, the slave always runs without InnoDB, so we check for BDB.
|
||||||
source include/have_bdb.inc;
|
source include/have_bdb.inc;
|
||||||
stop slave;
|
stop slave;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
flush logs;
|
flush logs;
|
||||||
system mv -f var/log/master-bin.000001 var/log/master-bin.000002;
|
system mv -f var/log/master-bin.000001 var/log/master-bin.000002;
|
||||||
system cp std_data/trunc_binlog.000001 var/log/master-bin.000001;
|
system cp std_data/trunc_binlog.000001 var/log/master-bin.000001;
|
||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
|
|
||||||
|
# truncated binlog contains: BEGIN; INSERT t1 VALUES (1);
|
||||||
|
# so let's create the table t1 on slave
|
||||||
|
|
||||||
|
create table t1 (a int) engine=bdb;
|
||||||
reset slave;
|
reset slave;
|
||||||
start slave;
|
start slave;
|
||||||
# can't sync_with_master so we must sleep
|
# can't sync_with_master so we must sleep
|
||||||
@ -23,3 +30,6 @@ sleep 3;
|
|||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||||
--replace_column 1 # 8 # 9 # 23 # 33 #
|
--replace_column 1 # 8 # 9 # 23 # 33 #
|
||||||
show slave status;
|
show slave status;
|
||||||
|
select * from t1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ save_master_pos;
|
|||||||
connection slave;
|
connection slave;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
connection master;
|
connection master;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
save_master_pos;
|
save_master_pos;
|
||||||
|
@ -2536,6 +2536,115 @@ end|
|
|||||||
call bug8540()|
|
call bug8540()|
|
||||||
drop procedure bug8540|
|
drop procedure bug8540|
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG#6642: Stored procedure crash if expression with set function
|
||||||
|
#
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists t3|
|
||||||
|
--enable_warnings
|
||||||
|
create table t3 (s1 int)|
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop procedure if exists bug6642|
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
create procedure bug6642()
|
||||||
|
select abs(count(s1)) from t3|
|
||||||
|
|
||||||
|
call bug6642()|
|
||||||
|
call bug6642()|
|
||||||
|
drop procedure bug6642|
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG#7013: Stored procedure crash if group by ... with rollup
|
||||||
|
#
|
||||||
|
insert into t3 values (0),(1)|
|
||||||
|
--disable_warnings
|
||||||
|
drop procedure if exists bug7013|
|
||||||
|
--enable_warnings
|
||||||
|
create procedure bug7013()
|
||||||
|
select s1,count(s1) from t3 group by s1 with rollup|
|
||||||
|
call bug7013()|
|
||||||
|
call bug7013()|
|
||||||
|
drop procedure bug7013|
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG#7743: 'Lost connection to MySQL server during query' on Stored Procedure
|
||||||
|
#
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists t4;
|
||||||
|
--enable_warnings
|
||||||
|
create table t4 (
|
||||||
|
a mediumint(8) unsigned not null auto_increment,
|
||||||
|
b smallint(5) unsigned not null,
|
||||||
|
c char(32) not null,
|
||||||
|
primary key (a)
|
||||||
|
) engine=myisam default charset=latin1|
|
||||||
|
insert into t4 values (1, 2, 'oneword')|
|
||||||
|
insert into t4 values (2, 2, 'anotherword')|
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop procedure if exists bug7743|
|
||||||
|
--enable_warnings
|
||||||
|
create procedure bug7743 ( searchstring char(28) )
|
||||||
|
begin
|
||||||
|
declare var mediumint(8) unsigned;
|
||||||
|
select a into var from t4 where b = 2 and c = binary searchstring limit 1;
|
||||||
|
select var;
|
||||||
|
end|
|
||||||
|
|
||||||
|
call bug7743("oneword")|
|
||||||
|
call bug7743("OneWord")|
|
||||||
|
call bug7743("anotherword")|
|
||||||
|
call bug7743("AnotherWord")|
|
||||||
|
drop procedure bug7743|
|
||||||
|
drop table t4|
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG#7992: SELECT .. INTO variable .. within Stored Procedure crashes
|
||||||
|
# the server
|
||||||
|
#
|
||||||
|
delete from t3|
|
||||||
|
insert into t3 values(1)|
|
||||||
|
drop procedure if exists bug7992_1|
|
||||||
|
drop procedure if exists bug7992_2|
|
||||||
|
create procedure bug7992_1()
|
||||||
|
begin
|
||||||
|
declare i int;
|
||||||
|
select max(s1)+1 into i from t3;
|
||||||
|
end|
|
||||||
|
create procedure bug7992_2()
|
||||||
|
insert into t3 (s1) select max(t4.s1)+1 from t3 as t4|
|
||||||
|
|
||||||
|
call bug7992_1()|
|
||||||
|
call bug7992_1()|
|
||||||
|
call bug7992_2()|
|
||||||
|
call bug7992_2()|
|
||||||
|
|
||||||
|
drop procedure bug7992_1|
|
||||||
|
drop procedure bug7992_2|
|
||||||
|
drop table t3|
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG#8116: calling simple stored procedure twice in a row results
|
||||||
|
# in server crash
|
||||||
|
#
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists t3|
|
||||||
|
--enable_warnings
|
||||||
|
create table t3 ( userid bigint(20) not null default 0 )|
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop procedure if exists bug8116|
|
||||||
|
--enable_warnings
|
||||||
|
create procedure bug8116(in _userid int)
|
||||||
|
select * from t3 where userid = _userid|
|
||||||
|
|
||||||
|
call bug8116(42)|
|
||||||
|
call bug8116(42)|
|
||||||
|
drop procedure bug8116|
|
||||||
|
drop table t3|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Some "real" examples
|
# Some "real" examples
|
||||||
|
@ -866,12 +866,12 @@ DROP TABLE t1;
|
|||||||
|
|
||||||
CREATE TABLE t1 (col1 CHAR(5), col2 VARCHAR(6));
|
CREATE TABLE t1 (col1 CHAR(5), col2 VARCHAR(6));
|
||||||
INSERT INTO t1 VALUES ('hello', 'hello'),('he', 'he'),('hello ', 'hello ');
|
INSERT INTO t1 VALUES ('hello', 'hello'),('he', 'he'),('hello ', 'hello ');
|
||||||
--error 1400
|
--error 1406
|
||||||
INSERT INTO t1 (col1) VALUES ('hellobob');
|
INSERT INTO t1 (col1) VALUES ('hellobob');
|
||||||
--error 1265
|
--error 1265
|
||||||
INSERT INTO t1 (col2) VALUES ('hellobob');
|
INSERT INTO t1 (col2) VALUES ('hellobob');
|
||||||
INSERT INTO t1 (col2) VALUES ('hello ');
|
INSERT INTO t1 (col2) VALUES ('hello ');
|
||||||
--error 1400
|
--error 1406
|
||||||
UPDATE t1 SET col1 ='hellobob' WHERE col1 ='he';
|
UPDATE t1 SET col1 ='hellobob' WHERE col1 ='he';
|
||||||
--error 1265
|
--error 1265
|
||||||
UPDATE t1 SET col2 ='hellobob' WHERE col2 ='he';
|
UPDATE t1 SET col2 ='hellobob' WHERE col2 ='he';
|
||||||
|
@ -165,6 +165,8 @@ insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001");
|
|||||||
insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
|
insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
|
||||||
insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
|
insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
|
||||||
insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
|
insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
|
||||||
|
insert into t1 values ("1e+4294967296"),("1e-4294967296");
|
||||||
|
insert into t1 values ("1e+18446744073709551615"),("1e+18446744073709551616"),("1e-9223372036854775807"),("1e-9223372036854775809");
|
||||||
insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
|
insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
|
||||||
select * from t1;
|
select * from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
@ -201,6 +203,7 @@ insert into t1 values (+111111111.11),(111111111.11),(-11111111.11);
|
|||||||
insert into t1 values (-111111111.11),(+1111111111.11),(1111111111.11);
|
insert into t1 values (-111111111.11),(+1111111111.11),(1111111111.11);
|
||||||
insert into t1 values (1e+100),(1e-100),(-1e+100);
|
insert into t1 values (1e+100),(1e-100),(-1e+100);
|
||||||
insert into t1 values (123.4e0),(123.4e+2),(123.4e-2),(123e1),(123e+0);
|
insert into t1 values (123.4e0),(123.4e+2),(123.4e-2),(123e1),(123e+0);
|
||||||
|
insert into t1 values (MID("987",1,2)),("987 "),("987.6e+2 ");
|
||||||
select * from t1;
|
select * from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ INSERT INTO t1 VALUES(@`a b`);
|
|||||||
set @var1= "';aaa";
|
set @var1= "';aaa";
|
||||||
SET @var2=char(ascii('a'));
|
SET @var2=char(ascii('a'));
|
||||||
insert into t1 values (@var1),(@var2);
|
insert into t1 values (@var1),(@var2);
|
||||||
show binlog events from 95;
|
show binlog events from 96;
|
||||||
# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
|
# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
|
||||||
# absolutely need variables names to be quoted and strings to be
|
# absolutely need variables names to be quoted and strings to be
|
||||||
# escaped).
|
# escaped).
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
init_compiled_charsets() that only adds those that he wants
|
init_compiled_charsets() that only adds those that he wants
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_UCA_COLLATIONS
|
||||||
|
|
||||||
#ifdef HAVE_CHARSET_ucs2
|
#ifdef HAVE_CHARSET_ucs2
|
||||||
extern CHARSET_INFO my_charset_ucs2_general_uca;
|
extern CHARSET_INFO my_charset_ucs2_general_uca;
|
||||||
extern CHARSET_INFO my_charset_ucs2_icelandic_uca_ci;
|
extern CHARSET_INFO my_charset_ucs2_icelandic_uca_ci;
|
||||||
@ -62,6 +64,8 @@ extern CHARSET_INFO my_charset_utf8_roman_uca_ci;
|
|||||||
extern CHARSET_INFO my_charset_utf8_persian_uca_ci;
|
extern CHARSET_INFO my_charset_utf8_persian_uca_ci;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* HAVE_UCA_COLLATIONS */
|
||||||
|
|
||||||
my_bool init_compiled_charsets(myf flags __attribute__((unused)))
|
my_bool init_compiled_charsets(myf flags __attribute__((unused)))
|
||||||
{
|
{
|
||||||
CHARSET_INFO *cs;
|
CHARSET_INFO *cs;
|
||||||
@ -123,6 +127,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
|
|||||||
#ifdef HAVE_CHARSET_ucs2
|
#ifdef HAVE_CHARSET_ucs2
|
||||||
add_compiled_collation(&my_charset_ucs2_general_ci);
|
add_compiled_collation(&my_charset_ucs2_general_ci);
|
||||||
add_compiled_collation(&my_charset_ucs2_bin);
|
add_compiled_collation(&my_charset_ucs2_bin);
|
||||||
|
#ifdef HAVE_UCA_COLLATIONS
|
||||||
add_compiled_collation(&my_charset_ucs2_general_uca);
|
add_compiled_collation(&my_charset_ucs2_general_uca);
|
||||||
add_compiled_collation(&my_charset_ucs2_icelandic_uca_ci);
|
add_compiled_collation(&my_charset_ucs2_icelandic_uca_ci);
|
||||||
add_compiled_collation(&my_charset_ucs2_latvian_uca_ci);
|
add_compiled_collation(&my_charset_ucs2_latvian_uca_ci);
|
||||||
@ -141,6 +146,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
|
|||||||
add_compiled_collation(&my_charset_ucs2_roman_uca_ci);
|
add_compiled_collation(&my_charset_ucs2_roman_uca_ci);
|
||||||
add_compiled_collation(&my_charset_ucs2_persian_uca_ci);
|
add_compiled_collation(&my_charset_ucs2_persian_uca_ci);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CHARSET_ujis
|
#ifdef HAVE_CHARSET_ujis
|
||||||
add_compiled_collation(&my_charset_ujis_japanese_ci);
|
add_compiled_collation(&my_charset_ujis_japanese_ci);
|
||||||
@ -150,6 +156,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
|
|||||||
#ifdef HAVE_CHARSET_utf8
|
#ifdef HAVE_CHARSET_utf8
|
||||||
add_compiled_collation(&my_charset_utf8_general_ci);
|
add_compiled_collation(&my_charset_utf8_general_ci);
|
||||||
add_compiled_collation(&my_charset_utf8_bin);
|
add_compiled_collation(&my_charset_utf8_bin);
|
||||||
|
#ifdef HAVE_UCA_COLLATIONS
|
||||||
add_compiled_collation(&my_charset_utf8_general_uca_ci);
|
add_compiled_collation(&my_charset_utf8_general_uca_ci);
|
||||||
add_compiled_collation(&my_charset_utf8_icelandic_uca_ci);
|
add_compiled_collation(&my_charset_utf8_icelandic_uca_ci);
|
||||||
add_compiled_collation(&my_charset_utf8_latvian_uca_ci);
|
add_compiled_collation(&my_charset_utf8_latvian_uca_ci);
|
||||||
@ -167,6 +174,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
|
|||||||
add_compiled_collation(&my_charset_utf8_spanish2_uca_ci);
|
add_compiled_collation(&my_charset_utf8_spanish2_uca_ci);
|
||||||
add_compiled_collation(&my_charset_utf8_roman_uca_ci);
|
add_compiled_collation(&my_charset_utf8_roman_uca_ci);
|
||||||
add_compiled_collation(&my_charset_utf8_persian_uca_ci);
|
add_compiled_collation(&my_charset_utf8_persian_uca_ci);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Copy compiled charsets */
|
/* Copy compiled charsets */
|
||||||
|
@ -215,7 +215,7 @@ static int add_collation(CHARSET_INFO *cs)
|
|||||||
|
|
||||||
if (!strcmp(cs->csname,"ucs2") )
|
if (!strcmp(cs->csname,"ucs2") )
|
||||||
{
|
{
|
||||||
#ifdef HAVE_CHARSET_ucs2
|
#if defined(HAVE_CHARSET_ucs2) && defined(HAVE_UCA_COLLATIONS)
|
||||||
new->cset= my_charset_ucs2_general_uca.cset;
|
new->cset= my_charset_ucs2_general_uca.cset;
|
||||||
new->coll= my_charset_ucs2_general_uca.coll;
|
new->coll= my_charset_ucs2_general_uca.coll;
|
||||||
new->strxfrm_multiply= my_charset_ucs2_general_uca.strxfrm_multiply;
|
new->strxfrm_multiply= my_charset_ucs2_general_uca.strxfrm_multiply;
|
||||||
|
@ -103,7 +103,7 @@ static inline void hash_free_elements(HASH *hash)
|
|||||||
hash_free()
|
hash_free()
|
||||||
hash the hash to delete elements of
|
hash the hash to delete elements of
|
||||||
|
|
||||||
NOTES: Hash can't be reused wuthing calling hash_init again.
|
NOTES: Hash can't be reused without calling hash_init again.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void hash_free(HASH *hash)
|
void hash_free(HASH *hash)
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "mysys_priv.h"
|
#include "mysys_priv.h"
|
||||||
|
|
||||||
#ifdef HAVE_MMAP
|
#ifdef HAVE_SYS_MMAN_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
system msync() only syncs mmap'ed area to fs cache.
|
system msync() only syncs mmap'ed area to fs cache.
|
||||||
@ -84,6 +84,6 @@ int my_msync(int fd, void *addr, size_t len, int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#error "no mmap!"
|
#warning "no mmap!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -45,9 +45,9 @@ public:
|
|||||||
typedef int Cmp(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2, bool full);
|
typedef int Cmp(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2, bool full);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prototype for "like" comparison. Defined for the 3 char string
|
* Prototype for "like" comparison. Defined for string types. Second
|
||||||
* types. Second argument must have same type-specific format.
|
* argument must have same type-specific format. Returns 0 on match,
|
||||||
* Returns >0 on match, 0 on no match, <0 on bad data.
|
* +1 on no match, and -1 on bad data.
|
||||||
*
|
*
|
||||||
* Uses default special chars ( \ % _ ).
|
* Uses default special chars ( \ % _ ).
|
||||||
*
|
*
|
||||||
|
@ -25,10 +25,15 @@
|
|||||||
#include <ndb_opt_defaults.h>
|
#include <ndb_opt_defaults.h>
|
||||||
|
|
||||||
#define NDB_STD_OPTS_VARS \
|
#define NDB_STD_OPTS_VARS \
|
||||||
const char *opt_connect_str= 0;\
|
|
||||||
my_bool opt_ndb_optimized_node_selection
|
my_bool opt_ndb_optimized_node_selection
|
||||||
|
|
||||||
|
int opt_ndb_nodeid;
|
||||||
my_bool opt_ndb_shm;
|
my_bool opt_ndb_shm;
|
||||||
|
const char *opt_ndb_connectstring= 0;
|
||||||
|
const char *opt_connect_str= 0;
|
||||||
|
const char *opt_ndb_mgmd= 0;
|
||||||
|
char opt_ndb_constrbuf[1024];
|
||||||
|
unsigned opt_ndb_constrbuf_len;
|
||||||
|
|
||||||
#define OPT_NDB_CONNECTSTRING 'c'
|
#define OPT_NDB_CONNECTSTRING 'c'
|
||||||
|
|
||||||
@ -43,8 +48,17 @@ my_bool opt_ndb_shm;
|
|||||||
"Set connect string for connecting to ndb_mgmd. " \
|
"Set connect string for connecting to ndb_mgmd. " \
|
||||||
"Syntax: \"[nodeid=<id>;][host=]<hostname>[:<port>]\". " \
|
"Syntax: \"[nodeid=<id>;][host=]<hostname>[:<port>]\". " \
|
||||||
"Overides specifying entries in NDB_CONNECTSTRING and Ndb.cfg", \
|
"Overides specifying entries in NDB_CONNECTSTRING and Ndb.cfg", \
|
||||||
(gptr*) &opt_connect_str, (gptr*) &opt_connect_str, 0, \
|
(gptr*) &opt_ndb_connectstring, (gptr*) &opt_ndb_connectstring, \
|
||||||
|
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\
|
||||||
|
{ "ndb-mgmd-host", OPT_NDB_MGMD, \
|
||||||
|
"Set host and port for connecting to ndb_mgmd. " \
|
||||||
|
"Syntax: <hostname>[:<port>].", \
|
||||||
|
(gptr*) &opt_ndb_mgmd, (gptr*) &opt_ndb_mgmd, 0, \
|
||||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\
|
||||||
|
{ "ndb-nodeid", OPT_NDB_NODEID, \
|
||||||
|
"Set node id for this node.", \
|
||||||
|
(gptr*) &opt_ndb_nodeid, (gptr*) &opt_ndb_nodeid, 0, \
|
||||||
|
GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\
|
||||||
{ "ndb-shm", OPT_NDB_SHM,\
|
{ "ndb-shm", OPT_NDB_SHM,\
|
||||||
"Allow optimizing using shared memory connections when available",\
|
"Allow optimizing using shared memory connections when available",\
|
||||||
(gptr*) &opt_ndb_shm, (gptr*) &opt_ndb_shm, 0,\
|
(gptr*) &opt_ndb_shm, (gptr*) &opt_ndb_shm, 0,\
|
||||||
@ -55,8 +69,8 @@ my_bool opt_ndb_shm;
|
|||||||
(gptr*) &opt_ndb_optimized_node_selection, 0,\
|
(gptr*) &opt_ndb_optimized_node_selection, 0,\
|
||||||
GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},\
|
GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},\
|
||||||
{ "connect-string", OPT_NDB_CONNECTSTRING, "same as --ndb-connectstring",\
|
{ "connect-string", OPT_NDB_CONNECTSTRING, "same as --ndb-connectstring",\
|
||||||
(gptr*) &opt_connect_str, (gptr*) &opt_connect_str, 0,\
|
(gptr*) &opt_ndb_connectstring, (gptr*) &opt_ndb_connectstring, \
|
||||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }
|
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }
|
||||||
|
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
#define NDB_STD_OPTS(prog_name) \
|
#define NDB_STD_OPTS(prog_name) \
|
||||||
@ -79,6 +93,8 @@ enum ndb_std_options {
|
|||||||
OPT_NDB_SHM= 256,
|
OPT_NDB_SHM= 256,
|
||||||
OPT_NDB_SHM_SIGNUM,
|
OPT_NDB_SHM_SIGNUM,
|
||||||
OPT_NDB_OPTIMIZED_NODE_SELECTION,
|
OPT_NDB_OPTIMIZED_NODE_SELECTION,
|
||||||
|
OPT_NDB_MGMD,
|
||||||
|
OPT_NDB_NODEID,
|
||||||
NDB_STD_OPTIONS_LAST /* should always be last in this enum */
|
NDB_STD_OPTIONS_LAST /* should always be last in this enum */
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -110,6 +126,29 @@ ndb_std_get_one_option(int optid,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case OPT_NDB_MGMD:
|
||||||
|
case OPT_NDB_NODEID:
|
||||||
|
{
|
||||||
|
int len= my_snprintf(opt_ndb_constrbuf+opt_ndb_constrbuf_len,
|
||||||
|
sizeof(opt_ndb_constrbuf)-opt_ndb_constrbuf_len,
|
||||||
|
"%s%s%s",opt_ndb_constrbuf_len > 0 ? ",":"",
|
||||||
|
optid == OPT_NDB_NODEID ? "nodeid=" : "",
|
||||||
|
argument);
|
||||||
|
opt_ndb_constrbuf_len+= len;
|
||||||
|
}
|
||||||
|
/* fall through to add the connectstring to the end
|
||||||
|
* and set opt_ndbcluster_connectstring
|
||||||
|
*/
|
||||||
|
case OPT_NDB_CONNECTSTRING:
|
||||||
|
if (opt_ndb_connectstring && opt_ndb_connectstring[0])
|
||||||
|
my_snprintf(opt_ndb_constrbuf+opt_ndb_constrbuf_len,
|
||||||
|
sizeof(opt_ndb_constrbuf)-opt_ndb_constrbuf_len,
|
||||||
|
"%s%s", opt_ndb_constrbuf_len > 0 ? ",":"",
|
||||||
|
opt_ndb_connectstring);
|
||||||
|
else
|
||||||
|
opt_ndb_constrbuf[opt_ndb_constrbuf_len]= 0;
|
||||||
|
opt_connect_str= opt_ndb_constrbuf;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -795,14 +795,18 @@ NdbSqlUtil::cmpTimestamp(const void* info, const void* p1, unsigned n1, const vo
|
|||||||
|
|
||||||
// like
|
// like
|
||||||
|
|
||||||
|
static const int ndb_wild_prefix = '\\';
|
||||||
|
static const int ndb_wild_one = '_';
|
||||||
|
static const int ndb_wild_many = '%';
|
||||||
|
|
||||||
int
|
int
|
||||||
NdbSqlUtil::likeChar(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2)
|
NdbSqlUtil::likeChar(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2)
|
||||||
{
|
{
|
||||||
const char* v1 = (const char*)p1;
|
const char* v1 = (const char*)p1;
|
||||||
const char* v2 = (const char*)p2;
|
const char* v2 = (const char*)p2;
|
||||||
CHARSET_INFO* cs = (CHARSET_INFO*)(info);
|
CHARSET_INFO* cs = (CHARSET_INFO*)(info);
|
||||||
int k = (cs->coll->wildcmp)(cs, v1, v1 + n1, v2, v2 + n2, wild_prefix, wild_one, wild_many);
|
int k = (cs->coll->wildcmp)(cs, v1, v1 + n1, v2, v2 + n2, ndb_wild_prefix, ndb_wild_one, ndb_wild_many);
|
||||||
return k;
|
return k == 0 ? 0 : +1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -825,8 +829,8 @@ NdbSqlUtil::likeVarchar(const void* info, const void* p1, unsigned n1, const voi
|
|||||||
const char* w1 = (const char*)v1 + lb;
|
const char* w1 = (const char*)v1 + lb;
|
||||||
const char* w2 = (const char*)v2 + lb;
|
const char* w2 = (const char*)v2 + lb;
|
||||||
CHARSET_INFO* cs = (CHARSET_INFO*)(info);
|
CHARSET_INFO* cs = (CHARSET_INFO*)(info);
|
||||||
int k = (cs->coll->wildcmp)(cs, w1, w1 + m1, w2, w2 + m2, wild_prefix, wild_one, wild_many);
|
int k = (cs->coll->wildcmp)(cs, w1, w1 + m1, w2, w2 + m2, ndb_wild_prefix, ndb_wild_one, ndb_wild_many);
|
||||||
return k;
|
return k == 0 ? 0 : +1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
@ -852,8 +856,8 @@ NdbSqlUtil::likeLongvarchar(const void* info, const void* p1, unsigned n1, const
|
|||||||
const char* w1 = (const char*)v1 + lb;
|
const char* w1 = (const char*)v1 + lb;
|
||||||
const char* w2 = (const char*)v2 + lb;
|
const char* w2 = (const char*)v2 + lb;
|
||||||
CHARSET_INFO* cs = (CHARSET_INFO*)(info);
|
CHARSET_INFO* cs = (CHARSET_INFO*)(info);
|
||||||
int k = (cs->coll->wildcmp)(cs, w1, w1 + m1, w2, w2 + m2, wild_prefix, wild_one, wild_many);
|
int k = (cs->coll->wildcmp)(cs, w1, w1 + m1, w2, w2 + m2, ndb_wild_prefix, ndb_wild_one, ndb_wild_many);
|
||||||
return k;
|
return k == 0 ? 0 : +1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1861,56 +1861,57 @@ int Dbtup::interpreterNextLab(Signal* signal,
|
|||||||
|
|
||||||
bool r1_null = ah.isNULL();
|
bool r1_null = ah.isNULL();
|
||||||
bool r2_null = argLen == 0;
|
bool r2_null = argLen == 0;
|
||||||
int res;
|
int res1;
|
||||||
if (cond != Interpreter::LIKE &&
|
if (cond != Interpreter::LIKE &&
|
||||||
cond != Interpreter::NOT_LIKE) {
|
cond != Interpreter::NOT_LIKE) {
|
||||||
if (r1_null || r2_null) {
|
if (r1_null || r2_null) {
|
||||||
// NULL==NULL and NULL<not-NULL
|
// NULL==NULL and NULL<not-NULL
|
||||||
res = r1_null && r2_null ? 0 : r1_null ? -1 : 1;
|
res1 = r1_null && r2_null ? 0 : r1_null ? -1 : 1;
|
||||||
} else {
|
} else {
|
||||||
res = (*sqlType.m_cmp)(cs, s1, attrLen, s2, argLen, true);
|
res1 = (*sqlType.m_cmp)(cs, s1, attrLen, s2, argLen, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (r1_null || r2_null) {
|
if (r1_null || r2_null) {
|
||||||
// NULL like NULL is true (has no practical use)
|
// NULL like NULL is true (has no practical use)
|
||||||
res = r1_null && r2_null ? 0 : -1;
|
res1 = r1_null && r2_null ? 0 : -1;
|
||||||
} else {
|
} else {
|
||||||
res = (*sqlType.m_like)(cs, s1, attrLen, s2, argLen);
|
res1 = (*sqlType.m_like)(cs, s1, attrLen, s2, argLen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int res = 0;
|
||||||
switch ((Interpreter::BinaryCondition)cond) {
|
switch ((Interpreter::BinaryCondition)cond) {
|
||||||
case Interpreter::EQ:
|
case Interpreter::EQ:
|
||||||
res = (res == 0);
|
res = (res1 == 0);
|
||||||
break;
|
break;
|
||||||
case Interpreter::NE:
|
case Interpreter::NE:
|
||||||
res = (res != 0);
|
res = (res1 != 0);
|
||||||
break;
|
break;
|
||||||
// note the condition is backwards
|
// note the condition is backwards
|
||||||
case Interpreter::LT:
|
case Interpreter::LT:
|
||||||
res = (res > 0);
|
res = (res1 > 0);
|
||||||
break;
|
break;
|
||||||
case Interpreter::LE:
|
case Interpreter::LE:
|
||||||
res = (res >= 0);
|
res = (res1 >= 0);
|
||||||
break;
|
break;
|
||||||
case Interpreter::GT:
|
case Interpreter::GT:
|
||||||
res = (res < 0);
|
res = (res1 < 0);
|
||||||
break;
|
break;
|
||||||
case Interpreter::GE:
|
case Interpreter::GE:
|
||||||
res = (res <= 0);
|
res = (res1 <= 0);
|
||||||
break;
|
break;
|
||||||
case Interpreter::LIKE:
|
case Interpreter::LIKE:
|
||||||
res = (res > 0);
|
res = (res1 == 0);
|
||||||
break;
|
break;
|
||||||
case Interpreter::NOT_LIKE:
|
case Interpreter::NOT_LIKE:
|
||||||
res = (res == 0);
|
res = (res1 == 1);
|
||||||
break;
|
break;
|
||||||
// XXX handle invalid value
|
// XXX handle invalid value
|
||||||
}
|
}
|
||||||
#ifdef TRACE_INTERPRETER
|
#ifdef TRACE_INTERPRETER
|
||||||
ndbout_c("cond=%u diff=%d vc=%d nopad=%d attr(%d) = >%.*s<(%d) str=>%.*s<(%d) -> res = %d",
|
ndbout_c("cond=%u attr(%d)='%.*s'(%d) str='%.*s'(%d) res1=%d res=%d",
|
||||||
cond, diff, vchr, nopad,
|
cond, attrId >> 16,
|
||||||
attrId >> 16, attrLen, s1, attrLen, argLen, s2, argLen, res);
|
attrLen, s1, attrLen, argLen, s2, argLen, res1, res);
|
||||||
#endif
|
#endif
|
||||||
if (res)
|
if (res)
|
||||||
TprogramCounter = brancher(theInstruction, TprogramCounter);
|
TprogramCounter = brancher(theInstruction, TprogramCounter);
|
||||||
|
@ -27,7 +27,9 @@ LocalConfig::LocalConfig(){
|
|||||||
|
|
||||||
bool
|
bool
|
||||||
LocalConfig::init(const char *connectString,
|
LocalConfig::init(const char *connectString,
|
||||||
const char *fileName) {
|
const char *fileName)
|
||||||
|
{
|
||||||
|
DBUG_ENTER("LocalConfig::init");
|
||||||
/**
|
/**
|
||||||
* Escalation:
|
* Escalation:
|
||||||
* 1. Check connectString
|
* 1. Check connectString
|
||||||
@ -38,21 +40,25 @@ LocalConfig::init(const char *connectString,
|
|||||||
* 6. Check defaultConnectString
|
* 6. Check defaultConnectString
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
_ownNodeId= 0;
|
||||||
|
|
||||||
//1. Check connectString
|
//1. Check connectString
|
||||||
if(connectString != 0 && connectString[0] != 0){
|
if(connectString != 0 && connectString[0] != 0){
|
||||||
if(readConnectString(connectString, "connect string")){
|
if(readConnectString(connectString, "connect string")){
|
||||||
return true;
|
if (ids.size())
|
||||||
}
|
DBUG_RETURN(true);
|
||||||
return false;
|
// only nodeid given, continue to find hosts
|
||||||
|
} else
|
||||||
|
DBUG_RETURN(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//2. Check given filename
|
//2. Check given filename
|
||||||
if (fileName && strlen(fileName) > 0) {
|
if (fileName && strlen(fileName) > 0) {
|
||||||
bool fopenError;
|
bool fopenError;
|
||||||
if(readFile(fileName, fopenError)){
|
if(readFile(fileName, fopenError)){
|
||||||
return true;
|
DBUG_RETURN(true);
|
||||||
}
|
}
|
||||||
return false;
|
DBUG_RETURN(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//3. Check environment variable
|
//3. Check environment variable
|
||||||
@ -60,9 +66,9 @@ LocalConfig::init(const char *connectString,
|
|||||||
if(NdbEnv_GetEnv("NDB_CONNECTSTRING", buf, sizeof(buf)) &&
|
if(NdbEnv_GetEnv("NDB_CONNECTSTRING", buf, sizeof(buf)) &&
|
||||||
strlen(buf) != 0){
|
strlen(buf) != 0){
|
||||||
if(readConnectString(buf, "NDB_CONNECTSTRING")){
|
if(readConnectString(buf, "NDB_CONNECTSTRING")){
|
||||||
return true;
|
DBUG_RETURN(true);
|
||||||
}
|
}
|
||||||
return false;
|
DBUG_RETURN(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//4. Check Ndb.cfg in NDB_HOME
|
//4. Check Ndb.cfg in NDB_HOME
|
||||||
@ -71,9 +77,9 @@ LocalConfig::init(const char *connectString,
|
|||||||
char *buf= NdbConfig_NdbCfgName(1 /*true*/);
|
char *buf= NdbConfig_NdbCfgName(1 /*true*/);
|
||||||
NdbAutoPtr<char> tmp_aptr(buf);
|
NdbAutoPtr<char> tmp_aptr(buf);
|
||||||
if(readFile(buf, fopenError))
|
if(readFile(buf, fopenError))
|
||||||
return true;
|
DBUG_RETURN(true);
|
||||||
if (!fopenError)
|
if (!fopenError)
|
||||||
return false;
|
DBUG_RETURN(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//5. Check Ndb.cfg in cwd
|
//5. Check Ndb.cfg in cwd
|
||||||
@ -82,9 +88,9 @@ LocalConfig::init(const char *connectString,
|
|||||||
char *buf= NdbConfig_NdbCfgName(0 /*false*/);
|
char *buf= NdbConfig_NdbCfgName(0 /*false*/);
|
||||||
NdbAutoPtr<char> tmp_aptr(buf);
|
NdbAutoPtr<char> tmp_aptr(buf);
|
||||||
if(readFile(buf, fopenError))
|
if(readFile(buf, fopenError))
|
||||||
return true;
|
DBUG_RETURN(true);
|
||||||
if (!fopenError)
|
if (!fopenError)
|
||||||
return false;
|
DBUG_RETURN(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//7. Check
|
//7. Check
|
||||||
@ -92,12 +98,12 @@ LocalConfig::init(const char *connectString,
|
|||||||
char buf[256];
|
char buf[256];
|
||||||
BaseString::snprintf(buf, sizeof(buf), "host=localhost:%s", NDB_PORT);
|
BaseString::snprintf(buf, sizeof(buf), "host=localhost:%s", NDB_PORT);
|
||||||
if(readConnectString(buf, "default connect string"))
|
if(readConnectString(buf, "default connect string"))
|
||||||
return true;
|
DBUG_RETURN(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
setError(0, "");
|
setError(0, "");
|
||||||
|
|
||||||
return false;
|
DBUG_RETURN(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalConfig::~LocalConfig(){
|
LocalConfig::~LocalConfig(){
|
||||||
@ -142,6 +148,7 @@ const char *nodeIdTokens[] = {
|
|||||||
const char *hostNameTokens[] = {
|
const char *hostNameTokens[] = {
|
||||||
"host://%[^:]:%i",
|
"host://%[^:]:%i",
|
||||||
"host=%[^:]:%i",
|
"host=%[^:]:%i",
|
||||||
|
"mgmd=%[^:]:%i",
|
||||||
"%[^:^=^ ]:%i",
|
"%[^:^=^ ]:%i",
|
||||||
"%s %i",
|
"%s %i",
|
||||||
0
|
0
|
||||||
@ -207,30 +214,22 @@ LocalConfig::parseString(const char * connectString, BaseString &err){
|
|||||||
char * copy = strdup(connectString);
|
char * copy = strdup(connectString);
|
||||||
NdbAutoPtr<char> tmp_aptr(copy);
|
NdbAutoPtr<char> tmp_aptr(copy);
|
||||||
|
|
||||||
bool b_nodeId = false;
|
|
||||||
bool found_other = false;
|
|
||||||
|
|
||||||
for (char *tok = strtok_r(copy,";,",&for_strtok); tok != 0;
|
for (char *tok = strtok_r(copy,";,",&for_strtok); tok != 0;
|
||||||
tok = strtok_r(NULL, ";,", &for_strtok)) {
|
tok = strtok_r(NULL, ";,", &for_strtok)) {
|
||||||
if (tok[0] == '#') continue;
|
if (tok[0] == '#') continue;
|
||||||
|
|
||||||
if (!b_nodeId) // only one nodeid definition allowed
|
if (!_ownNodeId) // only one nodeid definition allowed
|
||||||
if (b_nodeId = parseNodeId(tok))
|
if (parseNodeId(tok))
|
||||||
continue;
|
continue;
|
||||||
if (found_other = parseHostName(tok))
|
if (parseHostName(tok))
|
||||||
continue;
|
continue;
|
||||||
if (found_other = parseFileName(tok))
|
if (parseFileName(tok))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
err.assfmt("Unexpected entry: \"%s\"", tok);
|
err.assfmt("Unexpected entry: \"%s\"", tok);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!found_other) {
|
|
||||||
err.appfmt("Missing host/file name extry in \"%s\"", connectString);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,17 +169,18 @@ extern "C"
|
|||||||
int
|
int
|
||||||
ndb_mgm_set_connectstring(NdbMgmHandle handle, const char * mgmsrv)
|
ndb_mgm_set_connectstring(NdbMgmHandle handle, const char * mgmsrv)
|
||||||
{
|
{
|
||||||
|
DBUG_ENTER("ndb_mgm_set_connectstring");
|
||||||
new (&(handle->cfg)) LocalConfig;
|
new (&(handle->cfg)) LocalConfig;
|
||||||
if (!handle->cfg.init(mgmsrv, 0) ||
|
if (!handle->cfg.init(mgmsrv, 0) ||
|
||||||
handle->cfg.ids.size() == 0)
|
handle->cfg.ids.size() == 0)
|
||||||
{
|
{
|
||||||
new (&(handle->cfg)) LocalConfig;
|
new (&(handle->cfg)) LocalConfig;
|
||||||
handle->cfg.init(0, 0); /* reset the LocalCongig */
|
handle->cfg.init(0, 0); /* reset the LocalConfig */
|
||||||
SET_ERROR(handle, NDB_MGM_ILLEGAL_CONNECT_STRING, "");
|
SET_ERROR(handle, NDB_MGM_ILLEGAL_CONNECT_STRING, "");
|
||||||
return -1;
|
DBUG_RETURN(-1);
|
||||||
}
|
}
|
||||||
handle->cfg_i= -1;
|
handle->cfg_i= -1;
|
||||||
return 0;
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -356,6 +357,7 @@ ndb_mgm_connect(NdbMgmHandle handle, int no_retries,
|
|||||||
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_connect");
|
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_connect");
|
||||||
CHECK_HANDLE(handle, -1);
|
CHECK_HANDLE(handle, -1);
|
||||||
|
|
||||||
|
DBUG_ENTER("ndb_mgm_connect");
|
||||||
#ifdef MGMAPI_LOG
|
#ifdef MGMAPI_LOG
|
||||||
/**
|
/**
|
||||||
* Open the log file
|
* Open the log file
|
||||||
@ -385,6 +387,13 @@ ndb_mgm_connect(NdbMgmHandle handle, int no_retries,
|
|||||||
}
|
}
|
||||||
if (sockfd != NDB_INVALID_SOCKET)
|
if (sockfd != NDB_INVALID_SOCKET)
|
||||||
break;
|
break;
|
||||||
|
#ifndef DBUG_OFF
|
||||||
|
{
|
||||||
|
char buf[1024];
|
||||||
|
DBUG_PRINT("info",("Unable to connect with connect string: %s",
|
||||||
|
cfg.makeConnectString(buf,sizeof(buf))));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (verbose > 0) {
|
if (verbose > 0) {
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
ndbout_c("Unable to connect with connect string: %s",
|
ndbout_c("Unable to connect with connect string: %s",
|
||||||
@ -398,7 +407,7 @@ ndb_mgm_connect(NdbMgmHandle handle, int no_retries,
|
|||||||
cfg.makeConnectString(buf,sizeof(buf)));
|
cfg.makeConnectString(buf,sizeof(buf)));
|
||||||
if (verbose == -2)
|
if (verbose == -2)
|
||||||
ndbout << ", failed." << endl;
|
ndbout << ", failed." << endl;
|
||||||
return -1;
|
DBUG_RETURN(-1);
|
||||||
}
|
}
|
||||||
if (verbose == -1) {
|
if (verbose == -1) {
|
||||||
ndbout << "Retrying every " << retry_delay_in_seconds << " seconds";
|
ndbout << "Retrying every " << retry_delay_in_seconds << " seconds";
|
||||||
@ -426,7 +435,7 @@ ndb_mgm_connect(NdbMgmHandle handle, int no_retries,
|
|||||||
handle->socket = sockfd;
|
handle->socket = sockfd;
|
||||||
handle->connected = 1;
|
handle->connected = 1;
|
||||||
|
|
||||||
return 0;
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -220,8 +220,10 @@ $CP mysql-test/std_data/*.dat mysql-test/std_data/*.frm \
|
|||||||
mysql-test/std_data/*.pem mysql-test/std_data/Moscow_leap \
|
mysql-test/std_data/*.pem mysql-test/std_data/Moscow_leap \
|
||||||
mysql-test/std_data/des_key_file mysql-test/std_data/*.*001 \
|
mysql-test/std_data/des_key_file mysql-test/std_data/*.*001 \
|
||||||
$BASE/mysql-test/std_data
|
$BASE/mysql-test/std_data
|
||||||
$CP mysql-test/t/*test mysql-test/t/*.opt mysql-test/t/*.slave-mi mysql-test/t/*.sh $BASE/mysql-test/t
|
$CP mysql-test/t/*.test mysql-test/t/*.disabled mysql-test/t/*.opt \
|
||||||
$CP mysql-test/r/*result mysql-test/r/*result.es mysql-test/r/*.require $BASE/mysql-test/r
|
mysql-test/t/*.slave-mi mysql-test/t/*.sh $BASE/mysql-test/t
|
||||||
|
$CP mysql-test/r/*.result mysql-test/r/*.result.es mysql-test/r/*.require \
|
||||||
|
$BASE/mysql-test/r
|
||||||
|
|
||||||
if [ $BASE_SYSTEM != "netware" ] ; then
|
if [ $BASE_SYSTEM != "netware" ] ; then
|
||||||
chmod a+x $BASE/bin/*
|
chmod a+x $BASE/bin/*
|
||||||
|
@ -25,7 +25,7 @@ DEFS= -DMYSQL_INSTANCE_MANAGER -DMYSQL_SERVER
|
|||||||
|
|
||||||
noinst_LIBRARIES= liboptions.a libnet.a
|
noinst_LIBRARIES= liboptions.a libnet.a
|
||||||
|
|
||||||
liboptions_a_CPPFLAGS= $(CPPFLAGS) \
|
liboptions_a_CXXFLAGS= $(CXXFLAGS) \
|
||||||
-DDEFAULT_PID_FILE_NAME="$(localstatedir)/mysqlmanager.pid" \
|
-DDEFAULT_PID_FILE_NAME="$(localstatedir)/mysqlmanager.pid" \
|
||||||
-DDEFAULT_LOG_FILE_NAME="$(localstatedir)/mysqlmanager.log" \
|
-DDEFAULT_LOG_FILE_NAME="$(localstatedir)/mysqlmanager.log" \
|
||||||
-DDEFAULT_SOCKET_FILE_NAME="$(localstatedir)/mysqlmanager.sock" \
|
-DDEFAULT_SOCKET_FILE_NAME="$(localstatedir)/mysqlmanager.sock" \
|
||||||
|
@ -135,6 +135,23 @@ static HASH archive_open_tables;
|
|||||||
#define DATA_BUFFER_SIZE 2 // Size of the data used in the data file
|
#define DATA_BUFFER_SIZE 2 // Size of the data used in the data file
|
||||||
#define ARCHIVE_CHECK_HEADER 254 // The number we use to determine corruption
|
#define ARCHIVE_CHECK_HEADER 254 // The number we use to determine corruption
|
||||||
|
|
||||||
|
/* dummy handlerton - only to have something to return from archive_db_init */
|
||||||
|
static handlerton archive_hton = {
|
||||||
|
0, /* slot */
|
||||||
|
0, /* savepoint size. */
|
||||||
|
0, /* close_connection */
|
||||||
|
0, /* savepoint */
|
||||||
|
0, /* rollback to savepoint */
|
||||||
|
0, /* releas savepoint */
|
||||||
|
0, /* commit */
|
||||||
|
0, /* rollback */
|
||||||
|
0, /* prepare */
|
||||||
|
0, /* recover */
|
||||||
|
0, /* commit_by_xid */
|
||||||
|
0 /* rollback_by_xid */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Used for hash table that tracks open tables.
|
Used for hash table that tracks open tables.
|
||||||
*/
|
*/
|
||||||
@ -154,19 +171,20 @@ static byte* archive_get_key(ARCHIVE_SHARE *share,uint *length,
|
|||||||
void
|
void
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
FALSE OK
|
&archive_hton OK
|
||||||
TRUE Error
|
0 Error
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool archive_db_init()
|
handlerton *archive_db_init()
|
||||||
{
|
{
|
||||||
archive_inited= 1;
|
archive_inited= 1;
|
||||||
VOID(pthread_mutex_init(&archive_mutex, MY_MUTEX_INIT_FAST));
|
VOID(pthread_mutex_init(&archive_mutex, MY_MUTEX_INIT_FAST));
|
||||||
return (hash_init(&archive_open_tables, system_charset_info, 32, 0, 0,
|
if (hash_init(&archive_open_tables, system_charset_info, 32, 0, 0,
|
||||||
(hash_get_key) archive_get_key, 0, 0));
|
(hash_get_key) archive_get_key, 0, 0))
|
||||||
|
return 0;
|
||||||
|
return &archive_hton;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Release the archive handler.
|
Release the archive handler.
|
||||||
|
|
||||||
@ -734,7 +752,7 @@ int ha_archive::rnd_next(byte *buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Thanks to the table flag HA_REC_NOT_IN_SEQ this will be called after
|
Thanks to the table flag HA_REC_NOT_IN_SEQ this will be called after
|
||||||
each call to ha_archive::rnd_next() if an ordering of the rows is
|
each call to ha_archive::rnd_next() if an ordering of the rows is
|
||||||
needed.
|
needed.
|
||||||
@ -743,7 +761,7 @@ int ha_archive::rnd_next(byte *buf)
|
|||||||
void ha_archive::position(const byte *record)
|
void ha_archive::position(const byte *record)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("ha_archive::position");
|
DBUG_ENTER("ha_archive::position");
|
||||||
ha_store_ptr(ref, ref_length, current_position);
|
my_store_ptr(ref, ref_length, current_position);
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -760,7 +778,7 @@ int ha_archive::rnd_pos(byte * buf, byte *pos)
|
|||||||
DBUG_ENTER("ha_archive::rnd_pos");
|
DBUG_ENTER("ha_archive::rnd_pos");
|
||||||
statistic_increment(table->in_use->status_var.ha_read_rnd_next_count,
|
statistic_increment(table->in_use->status_var.ha_read_rnd_next_count,
|
||||||
&LOCK_status);
|
&LOCK_status);
|
||||||
current_position= ha_get_ptr(pos, ref_length);
|
current_position= my_get_ptr(pos, ref_length);
|
||||||
z_off_t seek= gzseek(archive, current_position, SEEK_SET);
|
z_off_t seek= gzseek(archive, current_position, SEEK_SET);
|
||||||
|
|
||||||
DBUG_RETURN(get_row(archive, buf));
|
DBUG_RETURN(get_row(archive, buf));
|
||||||
|
@ -106,6 +106,6 @@ public:
|
|||||||
enum thr_lock_type lock_type);
|
enum thr_lock_type lock_type);
|
||||||
};
|
};
|
||||||
|
|
||||||
bool archive_db_init(void);
|
handlerton *archive_db_init(void);
|
||||||
bool archive_db_end(void);
|
bool archive_db_end(void);
|
||||||
|
|
||||||
|
@ -414,7 +414,7 @@ int ha_example::rnd_next(byte *buf)
|
|||||||
position() is called after each call to rnd_next() if the data needs
|
position() is called after each call to rnd_next() if the data needs
|
||||||
to be ordered. You can do something like the following to store
|
to be ordered. You can do something like the following to store
|
||||||
the position:
|
the position:
|
||||||
ha_store_ptr(ref, ref_length, current_position);
|
my_store_ptr(ref, ref_length, current_position);
|
||||||
|
|
||||||
The server uses ref to store data. ref_length in the above case is
|
The server uses ref to store data. ref_length in the above case is
|
||||||
the size needed to store current_position. ref is just a byte array
|
the size needed to store current_position. ref is just a byte array
|
||||||
|
@ -647,7 +647,7 @@ int ha_tina::rnd_next(byte *buf)
|
|||||||
In the case of an order by rows will need to be sorted.
|
In the case of an order by rows will need to be sorted.
|
||||||
::position() is called after each call to ::rnd_next(),
|
::position() is called after each call to ::rnd_next(),
|
||||||
the data it stores is to a byte array. You can store this
|
the data it stores is to a byte array. You can store this
|
||||||
data via ha_store_ptr(). ref_length is a variable defined to the
|
data via my_store_ptr(). ref_length is a variable defined to the
|
||||||
class that is the sizeof() of position being stored. In our case
|
class that is the sizeof() of position being stored. In our case
|
||||||
its just a position. Look at the bdb code if you want to see a case
|
its just a position. Look at the bdb code if you want to see a case
|
||||||
where something other then a number is stored.
|
where something other then a number is stored.
|
||||||
@ -655,14 +655,14 @@ int ha_tina::rnd_next(byte *buf)
|
|||||||
void ha_tina::position(const byte *record)
|
void ha_tina::position(const byte *record)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("ha_tina::position");
|
DBUG_ENTER("ha_tina::position");
|
||||||
ha_store_ptr(ref, ref_length, current_position);
|
my_store_ptr(ref, ref_length, current_position);
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Used to fetch a row from a posiion stored with ::position().
|
Used to fetch a row from a posiion stored with ::position().
|
||||||
ha_get_ptr() retrieves the data for you.
|
my_get_ptr() retrieves the data for you.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int ha_tina::rnd_pos(byte * buf, byte *pos)
|
int ha_tina::rnd_pos(byte * buf, byte *pos)
|
||||||
@ -670,7 +670,7 @@ int ha_tina::rnd_pos(byte * buf, byte *pos)
|
|||||||
DBUG_ENTER("ha_tina::rnd_pos");
|
DBUG_ENTER("ha_tina::rnd_pos");
|
||||||
statistic_increment(table->in_use->status_var.ha_read_rnd_next_count,
|
statistic_increment(table->in_use->status_var.ha_read_rnd_next_count,
|
||||||
&LOCK_status);
|
&LOCK_status);
|
||||||
current_position= ha_get_ptr(pos,ref_length);
|
current_position= my_get_ptr(pos,ref_length);
|
||||||
DBUG_RETURN(find_current_row(buf));
|
DBUG_RETURN(find_current_row(buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user