mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 01:34:17 +01:00
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
This commit is contained in:
commit
003cb2f424
412 changed files with 22763 additions and 3102 deletions
client
cmake
dbug
extra
libmariadbmysql-test
README
include
innodb_gis_row_format_basic.incinnodb_gis_undo.inckill_and_restart_mysqld.incwait_innodb_all_purged.inc
lib/My/SafeProcess
r
alter_table.resultcase.resultctype_gbk.resultctype_latin1.resultctype_ucs.resultctype_utf32.resultctype_utf8.resultdelete_returning.resulterrors.resultfunc_in.resultfunc_regexp_pcre.resultfunc_time.resultmdev13607.resultmyisam.resultpartition_datatype.resultps.resultrange_vs_index_merge.resultrange_vs_index_merge_innodb.resultread_only.resultshow_check.resultshow_function_with_pad_char_to_full_length.resultstrict.resultsubselect_mat_cost_bugs.resulttype_varchar.result
suite
compat/oracle
galera_3nodes
innodb
disabled.def
r
alter_table.resultinnodb-16k.resultinnodb-32k.resultinnodb-64k.resultinnodb-alter-table.resultinnodb-alter.resultinnodb-get-fk.resultinnodb-wl5980-alter.resulttable_definition_cache_debug.resultundo_log.result
t
innodb_fts
r
t
innodb_gis
|
@ -1065,8 +1065,7 @@ static void fix_history(String *final_command);
|
|||
|
||||
static COMMANDS *find_command(char *name);
|
||||
static COMMANDS *find_command(char cmd_name);
|
||||
static bool add_line(String &buffer, char *line, ulong line_length,
|
||||
char *in_string, bool *ml_comment, bool truncated);
|
||||
static bool add_line(String &, char *, ulong, char *, bool *, bool);
|
||||
static void remove_cntrl(String &buffer);
|
||||
static void print_table_data(MYSQL_RES *result);
|
||||
static void print_table_data_html(MYSQL_RES *result);
|
||||
|
@ -1078,7 +1077,7 @@ static ulong start_timer(void);
|
|||
static void end_timer(ulong start_time,char *buff);
|
||||
static void mysql_end_timer(ulong start_time,char *buff);
|
||||
static void nice_time(double sec,char *buff,bool part_second);
|
||||
extern "C" sig_handler mysql_end(int sig);
|
||||
extern "C" sig_handler mysql_end(int sig) __attribute__ ((noreturn));
|
||||
extern "C" sig_handler handle_sigint(int sig);
|
||||
#if defined(HAVE_TERMIOS_H) && defined(GWINSZ_IN_SYS_IOCTL)
|
||||
static sig_handler window_resize(int sig);
|
||||
|
|
|
@ -165,9 +165,14 @@ SETA(CPACK_RPM_server_PACKAGE_REQUIRES
|
|||
"MariaDB-client")
|
||||
|
||||
IF(WITH_WSREP)
|
||||
SETA(CPACK_RPM_server_PACKAGE_REQUIRES
|
||||
"galera" "rsync" "lsof" "grep" "gawk" "iproute"
|
||||
"coreutils" "findutils" "tar" "which")
|
||||
SETA(CPACK_RPM_server_PACKAGE_REQUIRES
|
||||
"galera" "rsync" "lsof" "grep" "gawk" "iproute"
|
||||
"coreutils" "findutils" "tar")
|
||||
IF (RPM MATCHES "sles11")
|
||||
SETA(CPACK_RPM_server_PACKAGE_REQUIRES "util-linux")
|
||||
ELSE()
|
||||
SETA(CPACK_RPM_server_PACKAGE_REQUIRES "which")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh)
|
||||
|
|
|
@ -20,6 +20,11 @@ IF(have_C__Wvla)
|
|||
SET(MY_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wvla")
|
||||
ENDIF()
|
||||
|
||||
MY_CHECK_C_COMPILER_FLAG("-Wno-format-truncation")
|
||||
IF(HAVE_C__Wno_format_truncation)
|
||||
SET(MY_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wno-format-truncation")
|
||||
ENDIF()
|
||||
|
||||
# Common warning flags for GCC and Clang
|
||||
SET(MY_C_WARNING_FLAGS
|
||||
"${MY_WARNING_FLAGS} -Wwrite-strings -Wdeclaration-after-statement")
|
||||
|
|
|
@ -7,10 +7,8 @@ ENDIF()
|
|||
SET(CONC_WITH_SIGNCODE ${SIGNCODE})
|
||||
SET(SIGN_OPTIONS ${SIGNTOOL_PARAMETERS})
|
||||
|
||||
IF(TARGET zlib)
|
||||
GET_PROPERTY(ZLIB_LIBRARY_LOCATION TARGET zlib PROPERTY LOCATION)
|
||||
ELSE()
|
||||
SET(ZLIB_LIBRARY_LOCATION ${ZLIB_LIBRARY})
|
||||
IF(NOT TARGET zlib)
|
||||
SET(CONC_WITH_EXTERNAL_ZLIB ON)
|
||||
ENDIF()
|
||||
|
||||
IF(SSL_DEFINES MATCHES "YASSL")
|
||||
|
|
|
@ -69,13 +69,9 @@ ENDMACRO()
|
|||
# Get mysql version and other interesting variables
|
||||
GET_MYSQL_VERSION()
|
||||
|
||||
SET(MYSQL_TCP_PORT_DEFAULT "3306")
|
||||
|
||||
SET(MYSQL_TCP_PORT_DEFAULT 0)
|
||||
IF(NOT MYSQL_TCP_PORT)
|
||||
SET(MYSQL_TCP_PORT ${MYSQL_TCP_PORT_DEFAULT})
|
||||
SET(MYSQL_TCP_PORT_DEFAULT "0")
|
||||
ELSEIF(MYSQL_TCP_PORT EQUAL MYSQL_TCP_PORT_DEFAULT)
|
||||
SET(MYSQL_TCP_PORT_DEFAULT "0")
|
||||
SET(MYSQL_TCP_PORT 3306)
|
||||
ENDIF()
|
||||
|
||||
IF(NOT COMPILATION_COMMENT)
|
||||
|
|
|
@ -1,11 +1,23 @@
|
|||
INCLUDE (CheckCSourceRuns)
|
||||
|
||||
SET(WITH_PCRE "auto" CACHE STRING
|
||||
"Which pcre to use (possible values are 'bundled', 'system', or 'auto')")
|
||||
|
||||
MACRO (CHECK_PCRE)
|
||||
IF(WITH_PCRE STREQUAL "system" OR WITH_PCRE STREQUAL "auto")
|
||||
CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE)
|
||||
CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE_STACK_GUARD)
|
||||
IF(NOT CMAKE_CROSSCOMPILING)
|
||||
SET(CMAKE_REQUIRED_LIBRARIES "pcre")
|
||||
CHECK_C_SOURCE_RUNS("
|
||||
#include <pcre.h>
|
||||
int main() {
|
||||
return -pcre_exec(NULL, NULL, NULL, -999, -999, 0, NULL, 0) < 256;
|
||||
}" PCRE_STACK_SIZE_OK)
|
||||
SET(CMAKE_REQUIRED_LIBRARIES)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
IF(NOT HAVE_PCRE OR WITH_PCRE STREQUAL "bundled")
|
||||
IF(NOT HAVE_PCRE_STACK_GUARD OR NOT PCRE_STACK_SIZE_OK OR
|
||||
WITH_PCRE STREQUAL "bundled")
|
||||
IF (WITH_PCRE STREQUAL "system")
|
||||
MESSAGE(FATAL_ERROR "system pcre is not found or unusable")
|
||||
ENDIF()
|
||||
|
|
111
dbug/dbug.c
111
dbug/dbug.c
|
@ -259,7 +259,7 @@ typedef struct _db_code_state_ {
|
|||
#define ListDel(A,B,C) ListAddDel(A,B,C,EXCLUDE)
|
||||
static struct link *ListAddDel(struct link *, const char *, const char *, int);
|
||||
static struct link *ListCopy(struct link *);
|
||||
static int InList(struct link *linkp,const char *cp, int exact_match);
|
||||
static int InList(struct link *linkp,const char *cp,int exact_match);
|
||||
static uint ListFlags(struct link *linkp);
|
||||
static void FreeList(struct link *linkp);
|
||||
|
||||
|
@ -458,8 +458,8 @@ static int DbugParse(CODE_STATE *cs, const char *control)
|
|||
|
||||
if (!(org_cs_locked= cs->locked))
|
||||
{
|
||||
cs->locked= 1;
|
||||
pthread_mutex_lock(&THR_LOCK_dbug);
|
||||
cs->locked= 1;
|
||||
}
|
||||
|
||||
if (control[0] == '-' && control[1] == '#')
|
||||
|
@ -666,8 +666,8 @@ static int DbugParse(CODE_STATE *cs, const char *control)
|
|||
}
|
||||
if (!org_cs_locked)
|
||||
{
|
||||
pthread_mutex_unlock(&THR_LOCK_dbug);
|
||||
cs->locked= 0;
|
||||
pthread_mutex_unlock(&THR_LOCK_dbug);
|
||||
}
|
||||
return !rel || f_used;
|
||||
}
|
||||
|
@ -1096,7 +1096,7 @@ int _db_explain_init_(char *buf, size_t len)
|
|||
void _db_enter_(const char *_func_, const char *_file_,
|
||||
uint _line_, struct _db_stack_frame_ *_stack_frame_)
|
||||
{
|
||||
int save_errno;
|
||||
int save_errno, org_cs_locked;
|
||||
CODE_STATE *cs;
|
||||
if (!((cs=code_state())))
|
||||
{
|
||||
|
@ -1125,12 +1125,20 @@ void _db_enter_(const char *_func_, const char *_file_,
|
|||
cs->stack->flags &= ~SANITY_CHECK_ON;
|
||||
if (TRACING)
|
||||
{
|
||||
if (!cs->locked)
|
||||
if (!(org_cs_locked= cs->locked))
|
||||
{
|
||||
pthread_mutex_lock(&THR_LOCK_dbug);
|
||||
cs->locked= 1;
|
||||
}
|
||||
DoPrefix(cs, _line_);
|
||||
Indent(cs, cs->level);
|
||||
(void) fprintf(cs->stack->out_file->file, ">%s\n", cs->func);
|
||||
DbugFlush(cs); /* This does a unlock */
|
||||
if (!org_cs_locked)
|
||||
{
|
||||
cs->locked= 0;
|
||||
pthread_mutex_unlock(&THR_LOCK_dbug);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DISABLE_TRACE:
|
||||
|
@ -1181,16 +1189,25 @@ void _db_return_(struct _db_stack_frame_ *_stack_frame_)
|
|||
|
||||
if (DoTrace(cs) & DO_TRACE)
|
||||
{
|
||||
int org_cs_locked;
|
||||
if ((cs->stack->flags & SANITY_CHECK_ON) && sf_sanity())
|
||||
cs->stack->flags &= ~SANITY_CHECK_ON;
|
||||
if (TRACING)
|
||||
{
|
||||
if (!cs->locked)
|
||||
if (!(org_cs_locked= cs->locked))
|
||||
{
|
||||
pthread_mutex_lock(&THR_LOCK_dbug);
|
||||
cs->locked= 1;
|
||||
}
|
||||
DoPrefix(cs, _stack_frame_->line);
|
||||
Indent(cs, cs->level);
|
||||
(void) fprintf(cs->stack->out_file->file, "<%s\n", cs->func);
|
||||
DbugFlush(cs);
|
||||
if (!org_cs_locked)
|
||||
{
|
||||
cs->locked= 0;
|
||||
pthread_mutex_unlock(&THR_LOCK_dbug);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
@ -1267,14 +1284,17 @@ void _db_doprnt_(const char *format,...)
|
|||
{
|
||||
va_list args;
|
||||
CODE_STATE *cs;
|
||||
int save_errno;
|
||||
int save_errno, org_cs_locked;
|
||||
|
||||
get_code_state_or_return;
|
||||
|
||||
va_start(args,format);
|
||||
|
||||
if (!cs->locked)
|
||||
if (!(org_cs_locked= cs->locked))
|
||||
{
|
||||
pthread_mutex_lock(&THR_LOCK_dbug);
|
||||
cs->locked= 1;
|
||||
}
|
||||
save_errno=errno;
|
||||
DoPrefix(cs, cs->u_line);
|
||||
if (TRACING)
|
||||
|
@ -1284,6 +1304,11 @@ void _db_doprnt_(const char *format,...)
|
|||
(void) fprintf(cs->stack->out_file->file, "%s: ", cs->u_keyword);
|
||||
DbugVfprintf(cs->stack->out_file->file, format, args);
|
||||
DbugFlush(cs);
|
||||
if (!org_cs_locked)
|
||||
{
|
||||
cs->locked= 0;
|
||||
pthread_mutex_unlock(&THR_LOCK_dbug);
|
||||
}
|
||||
errno=save_errno;
|
||||
|
||||
va_end(args);
|
||||
|
@ -1323,12 +1348,15 @@ static void DbugVfprintf(FILE *stream, const char* format, va_list args)
|
|||
void _db_dump_(uint _line_, const char *keyword,
|
||||
const unsigned char *memory, size_t length)
|
||||
{
|
||||
int pos;
|
||||
int pos, org_cs_locked;
|
||||
CODE_STATE *cs;
|
||||
get_code_state_or_return;
|
||||
|
||||
if (!cs->locked)
|
||||
if (!(org_cs_locked= cs->locked))
|
||||
{
|
||||
pthread_mutex_lock(&THR_LOCK_dbug);
|
||||
cs->locked= 1;
|
||||
}
|
||||
if (_db_keyword_(cs, keyword, 0))
|
||||
{
|
||||
DoPrefix(cs, _line_);
|
||||
|
@ -1360,8 +1388,11 @@ void _db_dump_(uint _line_, const char *keyword,
|
|||
(void) fputc('\n',cs->stack->out_file->file);
|
||||
DbugFlush(cs);
|
||||
}
|
||||
else if (!cs->locked)
|
||||
if (!org_cs_locked)
|
||||
{
|
||||
cs->locked= 0;
|
||||
pthread_mutex_unlock(&THR_LOCK_dbug);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1509,11 +1540,13 @@ static struct link *ListCopy(struct link *orig)
|
|||
static int InList(struct link *linkp, const char *cp, int exact_match)
|
||||
{
|
||||
int result;
|
||||
|
||||
for (result=MATCHED; linkp != NULL; linkp= linkp->next_link)
|
||||
{
|
||||
if (!(exact_match ? strcmp(linkp->str,cp) : fnmatch(linkp->str, cp, 0)))
|
||||
return linkp->flags;
|
||||
{
|
||||
result= linkp->flags;
|
||||
break;
|
||||
}
|
||||
if (!(linkp->flags & EXCLUDE))
|
||||
result=NOT_MATCHED;
|
||||
if (linkp->flags & SUBDIR)
|
||||
|
@ -1647,6 +1680,7 @@ void _db_end_()
|
|||
FreeState(cs, 0);
|
||||
pthread_mutex_destroy(&THR_LOCK_dbug);
|
||||
init_done= 0;
|
||||
_dbug_on_= 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1665,22 +1699,39 @@ void _db_end_()
|
|||
|
||||
static int DoTrace(CODE_STATE *cs)
|
||||
{
|
||||
int res= DONT_TRACE;
|
||||
if (!cs->locked)
|
||||
pthread_mutex_lock(&THR_LOCK_dbug);
|
||||
if ((cs->stack->maxdepth == 0 || cs->level <= cs->stack->maxdepth) &&
|
||||
InList(cs->stack->processes, cs->process, 0) & (MATCHED|INCLUDE))
|
||||
{
|
||||
switch(InList(cs->stack->functions, cs->func, 0)) {
|
||||
case INCLUDE|SUBDIR: return ENABLE_TRACE;
|
||||
case INCLUDE: return DO_TRACE;
|
||||
case INCLUDE|SUBDIR:
|
||||
res= ENABLE_TRACE;
|
||||
break;
|
||||
case INCLUDE:
|
||||
res= DO_TRACE;
|
||||
break;
|
||||
case MATCHED|SUBDIR:
|
||||
case NOT_MATCHED|SUBDIR:
|
||||
case MATCHED: return framep_trace_flag(cs, cs->framep) ?
|
||||
DO_TRACE : DONT_TRACE;
|
||||
case MATCHED:
|
||||
res= (framep_trace_flag(cs, cs->framep) ? DO_TRACE : DONT_TRACE);
|
||||
break;
|
||||
case EXCLUDE:
|
||||
case NOT_MATCHED: return DONT_TRACE;
|
||||
case EXCLUDE|SUBDIR: return DISABLE_TRACE;
|
||||
case NOT_MATCHED:
|
||||
res= DONT_TRACE;
|
||||
break;
|
||||
case EXCLUDE|SUBDIR:
|
||||
res= DISABLE_TRACE;
|
||||
break;
|
||||
}
|
||||
return DONT_TRACE;
|
||||
}
|
||||
if (!cs->locked)
|
||||
pthread_mutex_unlock(&THR_LOCK_dbug);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
FILE *_db_fp_(void)
|
||||
{
|
||||
CODE_STATE *cs;
|
||||
|
@ -1711,10 +1762,17 @@ FILE *_db_fp_(void)
|
|||
BOOLEAN _db_keyword_(CODE_STATE *cs, const char *keyword, int strict)
|
||||
{
|
||||
int match= strict ? INCLUDE : INCLUDE|MATCHED;
|
||||
int res;
|
||||
get_code_state_if_not_set_or_return FALSE;
|
||||
|
||||
return (DEBUGGING && DoTrace(cs) & DO_TRACE &&
|
||||
InList(cs->stack->keywords, keyword, strict) & match);
|
||||
if (!(DEBUGGING && (DoTrace(cs) & DO_TRACE)))
|
||||
return 0;
|
||||
if (!cs->locked)
|
||||
pthread_mutex_lock(&THR_LOCK_dbug);
|
||||
res= (InList(cs->stack->keywords, keyword, strict) & match);
|
||||
if (!cs->locked)
|
||||
pthread_mutex_unlock(&THR_LOCK_dbug);
|
||||
return res != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2130,8 +2188,6 @@ static void DbugFlush(CODE_STATE *cs)
|
|||
if (cs->stack->delay)
|
||||
(void) Delay(cs->stack->delay);
|
||||
}
|
||||
if (!cs->locked)
|
||||
pthread_mutex_unlock(&THR_LOCK_dbug);
|
||||
} /* DbugFlush */
|
||||
|
||||
|
||||
|
@ -2141,7 +2197,12 @@ void _db_flush_()
|
|||
{
|
||||
CODE_STATE *cs;
|
||||
get_code_state_or_return;
|
||||
(void) fflush(cs->stack->out_file->file);
|
||||
if (DEBUGGING)
|
||||
{
|
||||
pthread_mutex_lock(&THR_LOCK_dbug);
|
||||
(void) fflush(cs->stack->out_file->file);
|
||||
pthread_mutex_unlock(&THR_LOCK_dbug);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1896,6 +1896,13 @@ decrypt_decompress_file(const char *filepath, uint thread_n)
|
|||
if (system(cmd.str().c_str()) != 0) {
|
||||
return(false);
|
||||
}
|
||||
|
||||
if (opt_remove_original) {
|
||||
msg_ts("[%02u] removing %s\n", thread_n, filepath);
|
||||
if (my_delete(filepath, MYF(MY_WME)) != 0) {
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return(true);
|
||||
|
|
|
@ -535,7 +535,7 @@ xb_msg_missing_lsn_data(
|
|||
lsn_t missing_interval_start, /*!<in: interval start */
|
||||
lsn_t missing_interval_end) /*!<in: interval end */
|
||||
{
|
||||
msg("xtrabackup: warning: changed page data missing for LSNs between "
|
||||
msg("mariabackup: warning: changed page data missing for LSNs between "
|
||||
LSN_PF " and " LSN_PF "\n", missing_interval_start,
|
||||
missing_interval_end);
|
||||
}
|
||||
|
@ -612,7 +612,7 @@ xb_page_bitmap_init(void)
|
|||
|
||||
if (UNIV_UNLIKELY(bmp_start_lsn > bmp_end_lsn)) {
|
||||
|
||||
msg("xtrabackup: incremental backup LSN " LSN_PF
|
||||
msg("mariabackup: incremental backup LSN " LSN_PF
|
||||
" is larger than than the last checkpoint LSN " LSN_PF
|
||||
"\n", bmp_start_lsn, bmp_end_lsn);
|
||||
return NULL;
|
||||
|
@ -697,7 +697,7 @@ xb_page_bitmap_init(void)
|
|||
¤t_page_end_lsn,
|
||||
bmp_start_lsn))) {
|
||||
|
||||
msg("xtrabackup: Warning: changed page bitmap file "
|
||||
msg("mariabackup: Warning: changed page bitmap file "
|
||||
"\'%s\' corrupted\n", bitmap_file.name);
|
||||
rbt_free(result);
|
||||
free(bitmap_files.files);
|
||||
|
@ -802,7 +802,7 @@ xb_page_bitmap_init(void)
|
|||
|
||||
if (UNIV_UNLIKELY(!last_page_ok)) {
|
||||
|
||||
msg("xtrabackup: warning: changed page bitmap file "
|
||||
msg("mariabackup: warning: changed page bitmap file "
|
||||
"\'%s\' corrupted.\n", bitmap_file.name);
|
||||
rbt_free(result);
|
||||
free(bitmap_files.files);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/******************************************************
|
||||
XtraBackup: hot backup tool for InnoDB
|
||||
MariaBackup: hot backup tool for InnoDB
|
||||
(c) 2009-2013 Percona LLC and/or its affiliates.
|
||||
Originally Created 3/3/2009 Yasufumi Kinoshita
|
||||
Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko,
|
||||
|
@ -169,7 +169,7 @@ xb_fil_cur_open(
|
|||
/* The following call prints an error message */
|
||||
os_file_get_last_error(TRUE);
|
||||
|
||||
msg("[%02u] xtrabackup: error: cannot open "
|
||||
msg("[%02u] mariabackup: error: cannot open "
|
||||
"tablespace %s\n",
|
||||
thread_n, cursor->abs_path);
|
||||
|
||||
|
@ -196,7 +196,7 @@ xb_fil_cur_open(
|
|||
cursor->file = node->handle;
|
||||
|
||||
if (stat(cursor->abs_path, &cursor->statinfo)) {
|
||||
msg("[%02u] xtrabackup: error: cannot stat %s\n",
|
||||
msg("[%02u] mariabackup: error: cannot stat %s\n",
|
||||
thread_n, cursor->abs_path);
|
||||
|
||||
xb_fil_cur_close(cursor);
|
||||
|
@ -222,7 +222,7 @@ xb_fil_cur_open(
|
|||
if (!fsp_flags_is_valid(flags, cursor->space_id)) {
|
||||
ulint cflags = fsp_flags_convert_from_101(flags);
|
||||
if (cflags == ULINT_UNDEFINED) {
|
||||
msg("[%02u] xtrabackup: Error: Invalid "
|
||||
msg("[%02u] mariabackup: Error: Invalid "
|
||||
"tablespace flags: %x.\n", thread_n, uint(flags));
|
||||
return(XB_FIL_CUR_SKIP);
|
||||
}
|
||||
|
@ -294,9 +294,9 @@ xb_fil_cur_read(
|
|||
&& offset + to_read == cursor->statinfo.st_size) {
|
||||
|
||||
if (to_read < (ib_int64_t) page_size) {
|
||||
msg("[%02u] xtrabackup: Warning: junk at the end of "
|
||||
msg("[%02u] mariabackup: Warning: junk at the end of "
|
||||
"%s:\n", cursor->thread_n, cursor->abs_path);
|
||||
msg("[%02u] xtrabackup: Warning: offset = %llu, "
|
||||
msg("[%02u] mariabackup: Warning: offset = %llu, "
|
||||
"to_read = %llu\n",
|
||||
cursor->thread_n,
|
||||
(unsigned long long) offset,
|
||||
|
@ -354,7 +354,7 @@ read_retry:
|
|||
space)) {
|
||||
retry_count--;
|
||||
if (retry_count == 0) {
|
||||
msg("[%02u] xtrabackup: "
|
||||
msg("[%02u] mariabackup: "
|
||||
"Error: failed to read page after "
|
||||
"10 retries. File %s seems to be "
|
||||
"corrupted.\n", cursor->thread_n,
|
||||
|
@ -364,7 +364,7 @@ read_retry:
|
|||
}
|
||||
|
||||
if (retry_count == 9) {
|
||||
msg("[%02u] xtrabackup: "
|
||||
msg("[%02u] mariabackup: "
|
||||
"Database page corruption detected at page "
|
||||
ULINTPF ", retrying...\n",
|
||||
cursor->thread_n, page_no);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/******************************************************
|
||||
XtraBackup: hot backup tool for InnoDB
|
||||
MariaBackup: hot backup tool for InnoDB
|
||||
(c) 2009-2013 Percona LLC and/or its affiliates.
|
||||
Originally Created 3/3/2009 Yasufumi Kinoshita
|
||||
Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko,
|
||||
|
@ -86,7 +86,7 @@ wf_incremental_init(xb_write_filt_ctxt_t *ctxt, char *dst_name,
|
|||
XB_DELTA_INFO_SUFFIX);
|
||||
const xb_delta_info_t info(cursor->page_size, cursor->space_id);
|
||||
if (!xb_write_delta_metadata(meta_name, &info)) {
|
||||
msg("[%02u] xtrabackup: Error: "
|
||||
msg("[%02u] mariabackup: Error: "
|
||||
"failed to write meta info for %s\n",
|
||||
cursor->thread_n, cursor->rel_path);
|
||||
return(FALSE);
|
||||
|
|
|
@ -194,7 +194,7 @@ xb_write_galera_info(bool incremental_prepare)
|
|||
fp = fopen(XB_GALERA_INFO_FILENAME, "w");
|
||||
if (fp == NULL) {
|
||||
|
||||
msg("xtrabackup: error: "
|
||||
msg("mariabackup: error: "
|
||||
"could not create " XB_GALERA_INFO_FILENAME
|
||||
", errno = %d\n",
|
||||
errno);
|
||||
|
@ -203,12 +203,12 @@ xb_write_galera_info(bool incremental_prepare)
|
|||
|
||||
seqno = wsrep_xid_seqno(&xid);
|
||||
|
||||
msg("xtrabackup: Recovered WSREP position: %s:%lld\n",
|
||||
msg("mariabackup: Recovered WSREP position: %s:%lld\n",
|
||||
uuid_str, (long long) seqno);
|
||||
|
||||
if (fprintf(fp, "%s:%lld", uuid_str, (long long) seqno) < 0) {
|
||||
|
||||
msg("xtrabackup: error: "
|
||||
msg("mariabackup: error: "
|
||||
"could not write to " XB_GALERA_INFO_FILENAME
|
||||
", errno = %d\n",
|
||||
errno);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/******************************************************
|
||||
XtraBackup: hot backup tool for InnoDB
|
||||
MariaBackup: hot backup tool for InnoDB
|
||||
(c) 2009-2017 Percona LLC and/or its affiliates
|
||||
Originally Created 3/3/2009 Yasufumi Kinoshita
|
||||
Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko,
|
||||
|
@ -295,6 +295,7 @@ my_bool opt_force_non_empty_dirs = FALSE;
|
|||
my_bool opt_noversioncheck = FALSE;
|
||||
my_bool opt_no_backup_locks = FALSE;
|
||||
my_bool opt_decompress = FALSE;
|
||||
my_bool opt_remove_original;
|
||||
|
||||
my_bool opt_lock_ddl_per_table = FALSE;
|
||||
|
||||
|
@ -526,6 +527,7 @@ enum options_xtrabackup
|
|||
OPT_DECOMPRESS,
|
||||
OPT_INCREMENTAL_HISTORY_NAME,
|
||||
OPT_INCREMENTAL_HISTORY_UUID,
|
||||
OPT_REMOVE_ORIGINAL,
|
||||
OPT_LOCK_WAIT_QUERY_TYPE,
|
||||
OPT_KILL_LONG_QUERY_TYPE,
|
||||
OPT_HISTORY,
|
||||
|
@ -808,6 +810,11 @@ struct my_option xb_client_options[] =
|
|||
(uchar*) &opt_incremental_history_uuid, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
|
||||
{"remove-original", OPT_REMOVE_ORIGINAL, "Remove .qp files after decompression.",
|
||||
(uchar *) &opt_remove_original,
|
||||
(uchar *) &opt_remove_original,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
|
||||
{"ftwrl-wait-query-type", OPT_LOCK_WAIT_QUERY_TYPE,
|
||||
"This option specifies which types of queries are allowed to complete "
|
||||
"before innobackupex will issue the global lock. Default is all.",
|
||||
|
@ -1119,13 +1126,13 @@ debug_sync_point(const char *name)
|
|||
xtrabackup_target_dir);
|
||||
fp = fopen(pid_path, "w");
|
||||
if (fp == NULL) {
|
||||
msg("xtrabackup: Error: cannot open %s\n", pid_path);
|
||||
msg("mariabackup: Error: cannot open %s\n", pid_path);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
fprintf(fp, "%u\n", (uint) pid);
|
||||
fclose(fp);
|
||||
|
||||
msg("xtrabackup: DEBUG: Suspending at debug sync point '%s'. "
|
||||
msg("mariabackup: DEBUG: Suspending at debug sync point '%s'. "
|
||||
"Resume with 'kill -SIGCONT %u'.\n", name, (uint) pid);
|
||||
|
||||
debug_sync_resumed= 0;
|
||||
|
@ -1135,7 +1142,7 @@ debug_sync_point(const char *name)
|
|||
}
|
||||
|
||||
/* On resume */
|
||||
msg("xtrabackup: DEBUG: removing the pid file.\n");
|
||||
msg("mariabackup: DEBUG: removing the pid file.\n");
|
||||
my_delete(pid_path, MYF(MY_WME));
|
||||
#endif
|
||||
}
|
||||
|
@ -1469,12 +1476,12 @@ innodb_init_param(void)
|
|||
/* Check that values don't overflow on 32-bit systems. */
|
||||
if (sizeof(ulint) == 4) {
|
||||
if (xtrabackup_use_memory > UINT_MAX32) {
|
||||
msg("xtrabackup: use-memory can't be over 4GB"
|
||||
msg("mariabackup: use-memory can't be over 4GB"
|
||||
" on 32-bit systems\n");
|
||||
}
|
||||
|
||||
if (innobase_buffer_pool_size > UINT_MAX32) {
|
||||
msg("xtrabackup: innobase_buffer_pool_size can't be "
|
||||
msg("mariabackup: innobase_buffer_pool_size can't be "
|
||||
"over 4GB on 32-bit systems\n");
|
||||
|
||||
goto error;
|
||||
|
@ -1488,9 +1495,9 @@ innodb_init_param(void)
|
|||
read from MySQL .cnf file */
|
||||
|
||||
if (xtrabackup_backup) {
|
||||
msg("xtrabackup: using the following InnoDB configuration:\n");
|
||||
msg("mariabackup: using the following InnoDB configuration:\n");
|
||||
} else {
|
||||
msg("xtrabackup: using the following InnoDB configuration "
|
||||
msg("mariabackup: using the following InnoDB configuration "
|
||||
"for recovery:\n");
|
||||
}
|
||||
|
||||
|
@ -1500,7 +1507,7 @@ innodb_init_param(void)
|
|||
|
||||
srv_data_home = (xtrabackup_backup && innobase_data_home_dir
|
||||
? innobase_data_home_dir : default_path);
|
||||
msg("xtrabackup: innodb_data_home_dir = %s\n", srv_data_home);
|
||||
msg("mariabackup: innodb_data_home_dir = %s\n", srv_data_home);
|
||||
|
||||
/* Set default InnoDB data file size to 10 MB and let it be
|
||||
auto-extending. Thus users can use InnoDB in >= 4.0 without having
|
||||
|
@ -1509,7 +1516,7 @@ innodb_init_param(void)
|
|||
if (!innobase_data_file_path) {
|
||||
innobase_data_file_path = (char*) "ibdata1:10M:autoextend";
|
||||
}
|
||||
msg("xtrabackup: innodb_data_file_path = %s\n",
|
||||
msg("mariabackup: innodb_data_file_path = %s\n",
|
||||
innobase_data_file_path);
|
||||
|
||||
/* This is the first time univ_page_size is used.
|
||||
|
@ -1536,7 +1543,7 @@ innodb_init_param(void)
|
|||
if (xtrabackup_prepare && xtrabackup_incremental_dir) {
|
||||
srv_log_group_home_dir = xtrabackup_incremental_dir;
|
||||
}
|
||||
msg("xtrabackup: innodb_log_group_home_dir = %s\n",
|
||||
msg("mariabackup: innodb_log_group_home_dir = %s\n",
|
||||
srv_log_group_home_dir);
|
||||
|
||||
os_normalize_path(srv_log_group_home_dir);
|
||||
|
@ -1637,7 +1644,7 @@ innodb_init_param(void)
|
|||
return(FALSE);
|
||||
|
||||
error:
|
||||
msg("xtrabackup: innodb_init_param(): Error occured.\n");
|
||||
msg("mariabackup: innodb_init_param(): Error occured.\n");
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
@ -1645,7 +1652,7 @@ static bool innodb_init()
|
|||
{
|
||||
dberr_t err = innobase_start_or_create_for_mysql();
|
||||
if (err != DB_SUCCESS) {
|
||||
msg("xtrabackup: innodb_init() returned %d (%s).\n",
|
||||
msg("mariabackup: innodb_init() returned %d (%s).\n",
|
||||
err, ut_strerr(err));
|
||||
innodb_shutdown();
|
||||
return(TRUE);
|
||||
|
@ -1669,7 +1676,7 @@ xtrabackup_read_metadata(char *filename)
|
|||
|
||||
fp = fopen(filename,"r");
|
||||
if(!fp) {
|
||||
msg("xtrabackup: Error: cannot open %s\n", filename);
|
||||
msg("mariabackup: Error: cannot open %s\n", filename);
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
|
@ -1748,7 +1755,7 @@ xtrabackup_stream_metadata(ds_ctxt_t *ds_ctxt)
|
|||
|
||||
stream = ds_open(ds_ctxt, XTRABACKUP_METADATA_FILENAME, &mystat);
|
||||
if (stream == NULL) {
|
||||
msg("xtrabackup: Error: cannot open output stream "
|
||||
msg("mariabackup: Error: cannot open output stream "
|
||||
"for %s\n", XTRABACKUP_METADATA_FILENAME);
|
||||
return(FALSE);
|
||||
}
|
||||
|
@ -1781,7 +1788,7 @@ xtrabackup_write_metadata(const char *filepath)
|
|||
|
||||
fp = fopen(filepath, "w");
|
||||
if(!fp) {
|
||||
msg("xtrabackup: Error: cannot open %s\n", filepath);
|
||||
msg("mariabackup: Error: cannot open %s\n", filepath);
|
||||
return(FALSE);
|
||||
}
|
||||
if (fwrite(buf, len, 1, fp) < 1) {
|
||||
|
@ -1830,7 +1837,7 @@ xb_read_delta_metadata(const char *filepath, xb_delta_info_t *info)
|
|||
fclose(fp);
|
||||
|
||||
if (page_size == ULINT_UNDEFINED) {
|
||||
msg("xtrabackup: page_size is required in %s\n", filepath);
|
||||
msg("mariabackup: page_size is required in %s\n", filepath);
|
||||
r = FALSE;
|
||||
} else {
|
||||
info->page_size = page_size_t(zip_size ? zip_size : page_size,
|
||||
|
@ -1838,7 +1845,7 @@ xb_read_delta_metadata(const char *filepath, xb_delta_info_t *info)
|
|||
}
|
||||
|
||||
if (info->space_id == ULINT_UNDEFINED) {
|
||||
msg("xtrabackup: Warning: This backup was taken with XtraBackup 2.0.1 "
|
||||
msg("mariabackup: Warning: This backup was taken with XtraBackup 2.0.1 "
|
||||
"or earlier, some DDL operations between full and incremental "
|
||||
"backups may be handled incorrectly\n");
|
||||
}
|
||||
|
@ -1873,7 +1880,7 @@ xb_write_delta_metadata(const char *filename, const xb_delta_info_t *info)
|
|||
|
||||
f = ds_open(ds_meta, filename, &mystat);
|
||||
if (f == NULL) {
|
||||
msg("xtrabackup: Error: cannot open output stream for %s\n",
|
||||
msg("mariabackup: Error: cannot open output stream for %s\n",
|
||||
filename);
|
||||
return(FALSE);
|
||||
}
|
||||
|
@ -2239,14 +2246,14 @@ xtrabackup_copy_datafile(fil_node_t* node, uint thread_n)
|
|||
|
||||
if (write_filter->init != NULL &&
|
||||
!write_filter->init(&write_filt_ctxt, dst_name, &cursor)) {
|
||||
msg("[%02u] xtrabackup: error: "
|
||||
msg("[%02u] mariabackup: error: "
|
||||
"failed to initialize page write filter.\n", thread_n);
|
||||
goto error;
|
||||
}
|
||||
|
||||
dstfile = ds_open(ds_data, dst_name, &cursor.statinfo);
|
||||
if (dstfile == NULL) {
|
||||
msg("[%02u] xtrabackup: error: "
|
||||
msg("[%02u] mariabackup: error: "
|
||||
"cannot open the destination stream for %s\n",
|
||||
thread_n, dst_name);
|
||||
goto error;
|
||||
|
@ -2296,7 +2303,7 @@ error:
|
|||
if (write_filter && write_filter->deinit) {
|
||||
write_filter->deinit(&write_filt_ctxt);;
|
||||
}
|
||||
msg("[%02u] xtrabackup: Error: "
|
||||
msg("[%02u] mariabackup: Error: "
|
||||
"xtrabackup_copy_datafile() failed.\n", thread_n);
|
||||
return(TRUE); /*ERROR*/
|
||||
|
||||
|
@ -2308,10 +2315,10 @@ skip:
|
|||
if (write_filter && write_filter->deinit) {
|
||||
write_filter->deinit(&write_filt_ctxt);
|
||||
}
|
||||
msg("[%02u] xtrabackup: Warning: We assume the "
|
||||
msg("[%02u] mariabackup: Warning: We assume the "
|
||||
"table was dropped during xtrabackup execution "
|
||||
"and ignore the file.\n", thread_n);
|
||||
msg("[%02u] xtrabackup: Warning: skipping tablespace %s.\n",
|
||||
msg("[%02u] mariabackup: Warning: skipping tablespace %s.\n",
|
||||
thread_n, node_name);
|
||||
return(FALSE);
|
||||
}
|
||||
|
@ -2382,7 +2389,7 @@ xtrabackup_copy_log(copy_logfile copy, lsn_t start_lsn, lsn_t end_lsn)
|
|||
}
|
||||
|
||||
if (ds_write(dst_log_file, log_sys->buf, write_size)) {
|
||||
msg("xtrabackup: Error: "
|
||||
msg("mariabackup: Error: "
|
||||
"write to logfile failed\n");
|
||||
return(0);
|
||||
}
|
||||
|
@ -2426,7 +2433,7 @@ xtrabackup_copy_logfile(copy_logfile copy)
|
|||
if (!start_lsn) {
|
||||
ds_close(dst_log_file);
|
||||
dst_log_file = NULL;
|
||||
msg("xtrabackup: Error: xtrabackup_copy_logfile()"
|
||||
msg("mariabackup: Error: xtrabackup_copy_logfile()"
|
||||
" failed.\n");
|
||||
return(true);
|
||||
}
|
||||
|
@ -2512,7 +2519,7 @@ data_copy_thread_func(
|
|||
|
||||
/* copy the datafile */
|
||||
if(xtrabackup_copy_datafile(node, num)) {
|
||||
msg("[%02u] xtrabackup: Error: "
|
||||
msg("[%02u] mariabackup: Error: "
|
||||
"failed to copy datafile.\n", num);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -2888,7 +2895,7 @@ xb_load_tablespaces()
|
|||
|
||||
/* create_new_db must not be true. */
|
||||
if (err != DB_SUCCESS || create_new_db) {
|
||||
msg("xtrabackup: could not find data files at the "
|
||||
msg("mariabackup: could not find data files at the "
|
||||
"specified datadir\n");
|
||||
return(DB_ERROR);
|
||||
}
|
||||
|
@ -2897,18 +2904,18 @@ xb_load_tablespaces()
|
|||
&flush_lsn);
|
||||
|
||||
if (err != DB_SUCCESS) {
|
||||
msg("xtrabackup: Could not open or create data files.\n"
|
||||
"xtrabackup: If you tried to add new data files, and it "
|
||||
msg("mariabackup: Could not open or create data files.\n"
|
||||
"mariabackup: If you tried to add new data files, and it "
|
||||
"failed here,\n"
|
||||
"xtrabackup: you should now edit innodb_data_file_path in "
|
||||
"mariabackup: you should now edit innodb_data_file_path in "
|
||||
"my.cnf back\n"
|
||||
"xtrabackup: to what it was, and remove the new ibdata "
|
||||
"mariabackup: to what it was, and remove the new ibdata "
|
||||
"files InnoDB created\n"
|
||||
"xtrabackup: in this failed attempt. InnoDB only wrote "
|
||||
"mariabackup: in this failed attempt. InnoDB only wrote "
|
||||
"those files full of\n"
|
||||
"xtrabackup: zeros, but did not yet use them in any way. "
|
||||
"mariabackup: zeros, but did not yet use them in any way. "
|
||||
"But be careful: do not\n"
|
||||
"xtrabackup: remove old data files which contain your "
|
||||
"mariabackup: remove old data files which contain your "
|
||||
"precious data!\n");
|
||||
return(err);
|
||||
}
|
||||
|
@ -2925,7 +2932,7 @@ xb_load_tablespaces()
|
|||
srv_undo_tablespaces_init(), because fil_is_user_tablespace_id() *
|
||||
relies on srv_undo_tablespaces_open to be properly initialized */
|
||||
|
||||
msg("xtrabackup: Generating a list of tablespaces\n");
|
||||
msg("mariabackup: Generating a list of tablespaces\n");
|
||||
|
||||
err = enumerate_ibd_files(xb_load_single_table_tablespace);
|
||||
if (err != DB_SUCCESS) {
|
||||
|
@ -3028,12 +3035,12 @@ xb_validate_name(
|
|||
/* perform only basic validation. validate length and
|
||||
path symbols */
|
||||
if (len > NAME_LEN) {
|
||||
msg("xtrabackup: name `%s` is too long.\n", name);
|
||||
msg("mariabackup: name `%s` is too long.\n", name);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
p = strpbrk(name, "/\\~");
|
||||
if (p && p - name < NAME_LEN) {
|
||||
msg("xtrabackup: name `%s` is not valid.\n", name);
|
||||
msg("mariabackup: name `%s` is not valid.\n", name);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
@ -3112,7 +3119,7 @@ xb_register_table(
|
|||
const char* name) /*!< in: name of table */
|
||||
{
|
||||
if (strchr(name, '.') == NULL) {
|
||||
msg("xtrabackup: `%s` is not fully qualified name.\n", name);
|
||||
msg("mariabackup: `%s` is not fully qualified name.\n", name);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
@ -3134,7 +3141,7 @@ xb_add_regex_to_list(
|
|||
|
||||
if (ret != 0) {
|
||||
regerror(ret, &compiled_regex, errbuf, sizeof(errbuf));
|
||||
msg("xtrabackup: error: %s regcomp(%s): %s\n",
|
||||
msg("mariabackup: error: %s regcomp(%s): %s\n",
|
||||
error_context, regex, errbuf);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -3203,7 +3210,7 @@ xb_load_list_file(
|
|||
/* read and store the filenames */
|
||||
fp = fopen(filename, "r");
|
||||
if (!fp) {
|
||||
msg("xtrabackup: cannot open %s\n",
|
||||
msg("mariabackup: cannot open %s\n",
|
||||
filename);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -3212,7 +3219,7 @@ xb_load_list_file(
|
|||
if (p) {
|
||||
*p = '\0';
|
||||
} else {
|
||||
msg("xtrabackup: `%s...` name is too long", name_buf);
|
||||
msg("mariabackup: `%s...` name is too long", name_buf);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
@ -3434,7 +3441,7 @@ static void stop_backup_threads()
|
|||
|
||||
if (log_copying_stop) {
|
||||
os_event_set(log_copying_stop);
|
||||
msg("xtrabackup: Stopping log copying thread.\n");
|
||||
msg("mariabackup: Stopping log copying thread.\n");
|
||||
while (log_copying_running) {
|
||||
msg(".");
|
||||
os_thread_sleep(200000); /*0.2 sec*/
|
||||
|
@ -3468,12 +3475,12 @@ xtrabackup_backup_low()
|
|||
&& log_sys->log.format != 0) {
|
||||
metadata_to_lsn = mach_read_from_8(
|
||||
log_sys->checkpoint_buf + LOG_CHECKPOINT_LSN);
|
||||
msg("xtrabackup: The latest check point"
|
||||
msg("mariabackup: The latest check point"
|
||||
" (for incremental): '" LSN_PF "'\n",
|
||||
metadata_to_lsn);
|
||||
} else {
|
||||
metadata_to_lsn = 0;
|
||||
msg("xtrabackup: Error: recv_find_max_checkpoint() failed.\n");
|
||||
msg("mariabackup: Error: recv_find_max_checkpoint() failed.\n");
|
||||
}
|
||||
log_mutex_exit();
|
||||
}
|
||||
|
@ -3501,7 +3508,7 @@ xtrabackup_backup_low()
|
|||
metadata_last_lsn = log_copy_scanned_lsn;
|
||||
|
||||
if (!xtrabackup_stream_metadata(ds_meta)) {
|
||||
msg("xtrabackup: Error: failed to stream metadata.\n");
|
||||
msg("mariabackup: Error: failed to stream metadata.\n");
|
||||
return false;
|
||||
}
|
||||
if (xtrabackup_extra_lsndir) {
|
||||
|
@ -3510,7 +3517,7 @@ xtrabackup_backup_low()
|
|||
sprintf(filename, "%s/%s", xtrabackup_extra_lsndir,
|
||||
XTRABACKUP_METADATA_FILENAME);
|
||||
if (!xtrabackup_write_metadata(filename)) {
|
||||
msg("xtrabackup: Error: failed to write metadata "
|
||||
msg("mariabackup: Error: failed to write metadata "
|
||||
"to '%s'.\n", filename);
|
||||
return false;
|
||||
}
|
||||
|
@ -3533,19 +3540,19 @@ xtrabackup_backup_func()
|
|||
data_thread_ctxt_t *data_threads;
|
||||
|
||||
#ifdef USE_POSIX_FADVISE
|
||||
msg("xtrabackup: uses posix_fadvise().\n");
|
||||
msg("mariabackup: uses posix_fadvise().\n");
|
||||
#endif
|
||||
|
||||
/* cd to datadir */
|
||||
|
||||
if (my_setwd(mysql_real_data_home,MYF(MY_WME)))
|
||||
{
|
||||
msg("xtrabackup: cannot my_setwd %s\n", mysql_real_data_home);
|
||||
msg("mariabackup: cannot my_setwd %s\n", mysql_real_data_home);
|
||||
return(false);
|
||||
}
|
||||
msg("xtrabackup: cd to %s\n", mysql_real_data_home);
|
||||
msg("mariabackup: cd to %s\n", mysql_real_data_home);
|
||||
|
||||
msg("xtrabackup: open files limit requested %u, set to %u\n",
|
||||
msg("mariabackup: open files limit requested %u, set to %u\n",
|
||||
(uint) xb_open_files_limit,
|
||||
xb_set_max_open_files(xb_open_files_limit));
|
||||
|
||||
|
@ -3559,7 +3566,7 @@ xtrabackup_backup_func()
|
|||
srv_operation = SRV_OPERATION_BACKUP;
|
||||
|
||||
if (xb_close_files)
|
||||
msg("xtrabackup: warning: close-files specified. Use it "
|
||||
msg("mariabackup: warning: close-files specified. Use it "
|
||||
"at your own risk. If there are DDL operations like table DROP TABLE "
|
||||
"or RENAME TABLE during the backup, inconsistent backup will be "
|
||||
"produced.\n");
|
||||
|
@ -3589,30 +3596,24 @@ fail:
|
|||
|
||||
} else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT")) {
|
||||
srv_file_flush_method = SRV_O_DIRECT;
|
||||
msg("xtrabackup: using O_DIRECT\n");
|
||||
msg("mariabackup: using O_DIRECT\n");
|
||||
} else if (0 == ut_strcmp(srv_file_flush_method_str, "littlesync")) {
|
||||
srv_file_flush_method = SRV_LITTLESYNC;
|
||||
} else if (0 == ut_strcmp(srv_file_flush_method_str, "nosync")) {
|
||||
srv_file_flush_method = SRV_NOSYNC;
|
||||
} else if (0 == ut_strcmp(srv_file_flush_method_str, "ALL_O_DIRECT")) {
|
||||
srv_file_flush_method = SRV_ALL_O_DIRECT_FSYNC;
|
||||
msg("xtrabackup: using ALL_O_DIRECT\n");
|
||||
msg("mariabackup: using ALL_O_DIRECT\n");
|
||||
} else if (0 == ut_strcmp(srv_file_flush_method_str,
|
||||
"O_DIRECT_NO_FSYNC")) {
|
||||
srv_file_flush_method = SRV_O_DIRECT_NO_FSYNC;
|
||||
msg("xtrabackup: using O_DIRECT_NO_FSYNC\n");
|
||||
msg("mariabackup: using O_DIRECT_NO_FSYNC\n");
|
||||
} else {
|
||||
msg("xtrabackup: Unrecognized value %s for "
|
||||
msg("mariabackup: Unrecognized value %s for "
|
||||
"innodb_flush_method\n", srv_file_flush_method_str);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* We can only use synchronous unbuffered IO on Windows for now */
|
||||
if (srv_file_flush_method_str != NULL) {
|
||||
msg("xtrabackupp: Warning: "
|
||||
"ignoring innodb_flush_method = %s on Windows.\n", srv_file_flush_method_str);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
srv_file_flush_method = SRV_ALL_O_DIRECT_FSYNC;
|
||||
srv_use_native_aio = TRUE;
|
||||
|
@ -3687,12 +3688,12 @@ fail:
|
|||
}
|
||||
if ((log_opened && log_created)) {
|
||||
msg(
|
||||
"xtrabackup: Error: all log files must be created at the same time.\n"
|
||||
"xtrabackup: All log files must be created also in database creation.\n"
|
||||
"xtrabackup: If you want bigger or smaller log files, shut down the\n"
|
||||
"xtrabackup: database and make sure there were no errors in shutdown.\n"
|
||||
"xtrabackup: Then delete the existing log files. Edit the .cnf file\n"
|
||||
"xtrabackup: and start the database again.\n");
|
||||
"mariabackup: Error: all log files must be created at the same time.\n"
|
||||
"mariabackup: All log files must be created also in database creation.\n"
|
||||
"mariabackup: If you want bigger or smaller log files, shut down the\n"
|
||||
"mariabackup: database and make sure there were no errors in shutdown.\n"
|
||||
"mariabackup: Then delete the existing log files. Edit the .cnf file\n"
|
||||
"mariabackup: and start the database again.\n");
|
||||
|
||||
goto fail;
|
||||
}
|
||||
|
@ -3700,7 +3701,7 @@ fail:
|
|||
|
||||
/* log_file_created must not be TRUE, if online */
|
||||
if (log_file_created) {
|
||||
msg("xtrabackup: Something wrong with source files...\n");
|
||||
msg("mariabackup: Something wrong with source files...\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -3710,7 +3711,7 @@ fail:
|
|||
if (xtrabackup_extra_lsndir
|
||||
&&!my_stat(xtrabackup_extra_lsndir,&stat_info,MYF(0))
|
||||
&& (my_mkdir(xtrabackup_extra_lsndir,0777,MYF(0)) < 0)) {
|
||||
msg("xtrabackup: Error: cannot mkdir %d: %s\n",
|
||||
msg("mariabackup: Error: cannot mkdir %d: %s\n",
|
||||
my_errno, xtrabackup_extra_lsndir);
|
||||
goto fail;
|
||||
}
|
||||
|
@ -3718,7 +3719,7 @@ fail:
|
|||
/* create target dir if not exist */
|
||||
if (!xtrabackup_stream_str && !my_stat(xtrabackup_target_dir,&stat_info,MYF(0))
|
||||
&& (my_mkdir(xtrabackup_target_dir,0777,MYF(0)) < 0)){
|
||||
msg("xtrabackup: Error: cannot mkdir %d: %s\n",
|
||||
msg("mariabackup: Error: cannot mkdir %d: %s\n",
|
||||
my_errno, xtrabackup_target_dir);
|
||||
goto fail;
|
||||
}
|
||||
|
@ -3746,7 +3747,7 @@ log_fail:
|
|||
|
||||
if (log_sys->log.format == 0) {
|
||||
old_format:
|
||||
msg("xtrabackup: Error: cannot process redo log"
|
||||
msg("mariabackup: Error: cannot process redo log"
|
||||
" before MariaDB 10.2.2\n");
|
||||
log_mutex_exit();
|
||||
goto log_fail;
|
||||
|
@ -3792,7 +3793,7 @@ reread_log_header:
|
|||
memset(&stat_info, 0, sizeof(MY_STAT));
|
||||
dst_log_file = ds_open(ds_redo, "ib_logfile0", &stat_info);
|
||||
if (dst_log_file == NULL) {
|
||||
msg("xtrabackup: error: failed to open the target stream for "
|
||||
msg("mariabackup: error: failed to open the target stream for "
|
||||
"'ib_logfile0'.\n");
|
||||
goto fail;
|
||||
}
|
||||
|
@ -3810,7 +3811,7 @@ reread_log_header:
|
|||
/* Write the log header. */
|
||||
if (ds_write(dst_log_file, log_hdr, sizeof log_hdr)) {
|
||||
log_write_fail:
|
||||
msg("xtrabackup: error: write to logfile failed\n");
|
||||
msg("mariabackup: error: write to logfile failed\n");
|
||||
goto fail;
|
||||
}
|
||||
/* Adjust the checkpoint page. */
|
||||
|
@ -3856,7 +3857,7 @@ reread_log_header:
|
|||
/* Populate fil_system with tablespaces to copy */
|
||||
err = xb_load_tablespaces();
|
||||
if (err != DB_SUCCESS) {
|
||||
msg("xtrabackup: error: xb_load_tablespaces() failed with"
|
||||
msg("mariabackup: error: xb_load_tablespaces() failed with"
|
||||
"error code %u\n", err);
|
||||
goto fail;
|
||||
}
|
||||
|
@ -3872,25 +3873,25 @@ reread_log_header:
|
|||
changed_page_bitmap = xb_page_bitmap_init();
|
||||
}
|
||||
if (!changed_page_bitmap) {
|
||||
msg("xtrabackup: using the full scan for incremental "
|
||||
msg("mariabackup: using the full scan for incremental "
|
||||
"backup\n");
|
||||
} else if (incremental_lsn != checkpoint_lsn_start) {
|
||||
/* Do not print that bitmaps are used when dummy bitmap
|
||||
is build for an empty LSN range. */
|
||||
msg("xtrabackup: using the changed page bitmap\n");
|
||||
msg("mariabackup: using the changed page bitmap\n");
|
||||
}
|
||||
}
|
||||
|
||||
ut_a(xtrabackup_parallel > 0);
|
||||
|
||||
if (xtrabackup_parallel > 1) {
|
||||
msg("xtrabackup: Starting %u threads for parallel data "
|
||||
msg("mariabackup: Starting %u threads for parallel data "
|
||||
"files transfer\n", xtrabackup_parallel);
|
||||
}
|
||||
|
||||
it = datafiles_iter_new(fil_system);
|
||||
if (it == NULL) {
|
||||
msg("xtrabackup: Error: datafiles_iter_new() failed.\n");
|
||||
msg("mariabackup: Error: datafiles_iter_new() failed.\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -3951,7 +3952,7 @@ reread_log_header:
|
|||
|
||||
xtrabackup_destroy_datasinks();
|
||||
|
||||
msg("xtrabackup: Redo log (from LSN " LSN_PF " to " LSN_PF
|
||||
msg("mariabackup: Redo log (from LSN " LSN_PF " to " LSN_PF
|
||||
") was copied.\n", checkpoint_lsn_start, log_copy_scanned_lsn);
|
||||
xb_filters_free();
|
||||
|
||||
|
@ -3959,7 +3960,7 @@ reread_log_header:
|
|||
|
||||
/* Make sure that the latest checkpoint was included */
|
||||
if (metadata_to_lsn > log_copy_scanned_lsn) {
|
||||
msg("xtrabackup: error: failed to copy enough redo log ("
|
||||
msg("mariabackup: error: failed to copy enough redo log ("
|
||||
"LSN=" LSN_PF "; checkpoint LSN=" LSN_PF ").\n",
|
||||
log_copy_scanned_lsn, metadata_to_lsn);
|
||||
goto fail;
|
||||
|
@ -4017,14 +4018,14 @@ xb_space_create_file(
|
|||
*file = os_file_create_simple_no_error_handling(
|
||||
0, path, OS_FILE_CREATE, OS_FILE_READ_WRITE, false, &ret);
|
||||
if (!ret) {
|
||||
msg("xtrabackup: cannot create file %s\n", path);
|
||||
msg("mariabackup: cannot create file %s\n", path);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = os_file_set_size(path, *file,
|
||||
FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE);
|
||||
if (!ret) {
|
||||
msg("xtrabackup: cannot set size for file %s\n", path);
|
||||
msg("mariabackup: cannot set size for file %s\n", path);
|
||||
os_file_close(*file);
|
||||
os_file_delete(0, path);
|
||||
return ret;
|
||||
|
@ -4068,7 +4069,7 @@ xb_space_create_file(
|
|||
free(buf);
|
||||
|
||||
if (!ret) {
|
||||
msg("xtrabackup: could not write the first page to %s\n",
|
||||
msg("mariabackup: could not write the first page to %s\n",
|
||||
path);
|
||||
os_file_close(*file);
|
||||
os_file_delete(0, path);
|
||||
|
@ -4129,7 +4130,7 @@ xb_delta_open_matching_space(
|
|||
|
||||
/* Create the database directory if it doesn't exist yet */
|
||||
if (!os_file_create_directory(dest_dir, FALSE)) {
|
||||
msg("xtrabackup: error: cannot create dir %s\n", dest_dir);
|
||||
msg("mariabackup: error: cannot create dir %s\n", dest_dir);
|
||||
return file;
|
||||
}
|
||||
|
||||
|
@ -4143,7 +4144,7 @@ found:
|
|||
OS_FILE_OPEN, OS_FILE_READ_WRITE, false, success);
|
||||
|
||||
if (!*success) {
|
||||
msg("xtrabackup: Cannot open file %s\n", real_name);
|
||||
msg("mariabackup: Cannot open file %s\n", real_name);
|
||||
}
|
||||
exit:
|
||||
log_mutex_exit();
|
||||
|
@ -4176,7 +4177,7 @@ exit:
|
|||
snprintf(tmpname, FN_REFLEN, "%s/xtrabackup_tmp_#" ULINTPF,
|
||||
dbname, fil_space->id);
|
||||
|
||||
msg("xtrabackup: Renaming %s to %s.ibd\n",
|
||||
msg("mariabackup: Renaming %s to %s.ibd\n",
|
||||
fil_space->name, tmpname);
|
||||
|
||||
if (!fil_rename_tablespace(
|
||||
|
@ -4184,7 +4185,7 @@ exit:
|
|||
fil_space->chain.start->name,
|
||||
tmpname, NULL))
|
||||
{
|
||||
msg("xtrabackup: Cannot rename %s to %s\n",
|
||||
msg("mariabackup: Cannot rename %s to %s\n",
|
||||
fil_space->name, tmpname);
|
||||
goto exit;
|
||||
}
|
||||
|
@ -4193,7 +4194,7 @@ exit:
|
|||
|
||||
if (info.space_id == ULINT_UNDEFINED)
|
||||
{
|
||||
msg("xtrabackup: Error: Cannot handle DDL operation on tablespace "
|
||||
msg("mariabackup: Error: Cannot handle DDL operation on tablespace "
|
||||
"%s\n", dest_space_name);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -4205,7 +4206,7 @@ exit:
|
|||
|
||||
strncpy(tmpname, dest_space_name, FN_REFLEN);
|
||||
|
||||
msg("xtrabackup: Renaming %s to %s\n",
|
||||
msg("mariabackup: Renaming %s to %s\n",
|
||||
fil_space->name, dest_space_name);
|
||||
|
||||
if (!fil_rename_tablespace(fil_space->id,
|
||||
|
@ -4213,7 +4214,7 @@ exit:
|
|||
tmpname,
|
||||
NULL))
|
||||
{
|
||||
msg("xtrabackup: Cannot rename %s to %s\n",
|
||||
msg("mariabackup: Cannot rename %s to %s\n",
|
||||
fil_space->name, dest_space_name);
|
||||
goto exit;
|
||||
}
|
||||
|
@ -4241,7 +4242,7 @@ exit:
|
|||
*success = xb_space_create_file(real_name, info.space_id,
|
||||
flags, &file);
|
||||
} else {
|
||||
msg("xtrabackup: Cannot create tablespace %s\n",
|
||||
msg("mariabackup: Cannot create tablespace %s\n",
|
||||
dest_space_name);
|
||||
}
|
||||
|
||||
|
@ -4312,11 +4313,11 @@ xtrabackup_apply_delta(
|
|||
|
||||
page_size = info.page_size.physical();
|
||||
page_size_shift = get_bit_shift(page_size);
|
||||
msg("xtrabackup: page size for %s is %lu bytes\n",
|
||||
msg("mariabackup: page size for %s is %lu bytes\n",
|
||||
src_path, page_size);
|
||||
if (page_size_shift < 10 ||
|
||||
page_size_shift > UNIV_PAGE_SIZE_SHIFT_MAX) {
|
||||
msg("xtrabackup: error: invalid value of page_size "
|
||||
msg("mariabackup: error: invalid value of page_size "
|
||||
"(%lu bytes) read from %s\n", page_size, meta_path);
|
||||
goto error;
|
||||
}
|
||||
|
@ -4326,7 +4327,7 @@ xtrabackup_apply_delta(
|
|||
OS_FILE_OPEN, OS_FILE_READ_WRITE, false, &success);
|
||||
if (!success) {
|
||||
os_file_get_last_error(TRUE);
|
||||
msg("xtrabackup: error: cannot open %s\n", src_path);
|
||||
msg("mariabackup: error: cannot open %s\n", src_path);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -4338,7 +4339,7 @@ xtrabackup_apply_delta(
|
|||
dbname, space_name, info,
|
||||
dst_path, sizeof(dst_path), &success);
|
||||
if (!success) {
|
||||
msg("xtrabackup: error: cannot open %s\n", dst_path);
|
||||
msg("mariabackup: error: cannot open %s\n", dst_path);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -4376,7 +4377,7 @@ xtrabackup_apply_delta(
|
|||
last_buffer = TRUE;
|
||||
break;
|
||||
default:
|
||||
msg("xtrabackup: error: %s seems not "
|
||||
msg("mariabackup: error: %s seems not "
|
||||
".delta file.\n", src_path);
|
||||
goto error;
|
||||
}
|
||||
|
@ -4450,7 +4451,7 @@ error:
|
|||
os_file_close(src_file);
|
||||
if (dst_file != OS_FILE_CLOSED)
|
||||
os_file_close(dst_file);
|
||||
msg("xtrabackup: Error: xtrabackup_apply_delta(): "
|
||||
msg("mariabackup: Error: xtrabackup_apply_delta(): "
|
||||
"failed to apply %s to %s.\n", src_path, dst_path);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -4512,7 +4513,7 @@ xb_process_datadir(
|
|||
handle_datadir_entry_func_t func) /*!<in: callback */
|
||||
{
|
||||
ulint ret;
|
||||
char dbpath[FN_REFLEN];
|
||||
char dbpath[OS_FILE_MAX_PATH];
|
||||
os_file_dir_t dir;
|
||||
os_file_dir_t dbdir;
|
||||
os_file_stat_t dbinfo;
|
||||
|
@ -4557,7 +4558,7 @@ next_file_item_1:
|
|||
|
||||
os_file_closedir(dbdir);
|
||||
} else {
|
||||
msg("xtrabackup: Cannot open dir %s\n",
|
||||
msg("mariabackup: Cannot open dir %s\n",
|
||||
path);
|
||||
}
|
||||
|
||||
|
@ -4565,7 +4566,7 @@ next_file_item_1:
|
|||
dir = os_file_opendir(path, FALSE);
|
||||
|
||||
if (dir == NULL) {
|
||||
msg("xtrabackup: Cannot open dir %s\n",
|
||||
msg("mariabackup: Cannot open dir %s\n",
|
||||
path);
|
||||
}
|
||||
|
||||
|
@ -4578,8 +4579,8 @@ next_file_item_1:
|
|||
goto next_datadir_item;
|
||||
}
|
||||
|
||||
sprintf(dbpath, "%s/%s", path,
|
||||
dbinfo.name);
|
||||
snprintf(dbpath, sizeof(dbpath), "%s/%s", path, dbinfo.name);
|
||||
|
||||
os_normalize_path(dbpath);
|
||||
|
||||
dbdir = os_file_opendir(dbpath, FALSE);
|
||||
|
@ -4661,7 +4662,7 @@ store_binlog_info(const char* filename, const char* name, ulonglong pos)
|
|||
FILE *fp = fopen(filename, "w");
|
||||
|
||||
if (!fp) {
|
||||
msg("xtrabackup: failed to open '%s'\n", filename);
|
||||
msg("mariabackup: failed to open '%s'\n", filename);
|
||||
return(false);
|
||||
}
|
||||
|
||||
|
@ -4682,11 +4683,11 @@ xtrabackup_prepare_func(char** argv)
|
|||
|
||||
if (my_setwd(xtrabackup_real_target_dir,MYF(MY_WME)))
|
||||
{
|
||||
msg("xtrabackup: cannot my_setwd %s\n",
|
||||
msg("mariabackup: cannot my_setwd %s\n",
|
||||
xtrabackup_real_target_dir);
|
||||
return(false);
|
||||
}
|
||||
msg("xtrabackup: cd to %s\n", xtrabackup_real_target_dir);
|
||||
msg("mariabackup: cd to %s\n", xtrabackup_real_target_dir);
|
||||
|
||||
int argc; for (argc = 0; argv[argc]; argc++) {}
|
||||
encryption_plugin_prepare_init(argc, argv);
|
||||
|
@ -4704,31 +4705,31 @@ xtrabackup_prepare_func(char** argv)
|
|||
XTRABACKUP_METADATA_FILENAME);
|
||||
|
||||
if (!xtrabackup_read_metadata(metadata_path)) {
|
||||
msg("xtrabackup: Error: failed to read metadata from '%s'\n",
|
||||
msg("mariabackup: Error: failed to read metadata from '%s'\n",
|
||||
metadata_path);
|
||||
return(false);
|
||||
}
|
||||
|
||||
if (!strcmp(metadata_type, "full-backuped")) {
|
||||
if (xtrabackup_incremental) {
|
||||
msg("xtrabackup: error: applying incremental backup "
|
||||
msg("mariabackup: error: applying incremental backup "
|
||||
"needs a prepared target.\n");
|
||||
return(false);
|
||||
}
|
||||
msg("xtrabackup: This target seems to be not prepared yet.\n");
|
||||
msg("mariabackup: This target seems to be not prepared yet.\n");
|
||||
} else if (!strcmp(metadata_type, "log-applied")) {
|
||||
msg("xtrabackup: This target seems to be already prepared.\n");
|
||||
msg("mariabackup: This target seems to be already prepared.\n");
|
||||
} else {
|
||||
msg("xtrabackup: This target does not have correct metadata.\n");
|
||||
msg("mariabackup: This target does not have correct metadata.\n");
|
||||
return(false);
|
||||
}
|
||||
|
||||
bool ok = !xtrabackup_incremental
|
||||
|| metadata_to_lsn == incremental_lsn;
|
||||
if (!ok) {
|
||||
msg("xtrabackup: error: This incremental backup seems "
|
||||
msg("mariabackup: error: This incremental backup seems "
|
||||
"not to be proper for the target.\n"
|
||||
"xtrabackup: Check 'to_lsn' of the target and "
|
||||
"mariabackup: Check 'to_lsn' of the target and "
|
||||
"'from_lsn' of the incremental.\n");
|
||||
return(false);
|
||||
}
|
||||
|
@ -4763,7 +4764,7 @@ xtrabackup_prepare_func(char** argv)
|
|||
#endif
|
||||
dberr_t err = xb_data_files_init();
|
||||
if (err != DB_SUCCESS) {
|
||||
msg("xtrabackup: error: xb_data_files_init() failed "
|
||||
msg("mariabackup: error: xb_data_files_init() failed "
|
||||
"with error %s\n", ut_strerr(err));
|
||||
goto error_cleanup;
|
||||
}
|
||||
|
@ -4806,8 +4807,8 @@ xtrabackup_prepare_func(char** argv)
|
|||
srv_n_write_io_threads = 4;
|
||||
}
|
||||
|
||||
msg("xtrabackup: Starting InnoDB instance for recovery.\n"
|
||||
"xtrabackup: Using %lld bytes for buffer pool "
|
||||
msg("mariabackup: Starting InnoDB instance for recovery.\n"
|
||||
"mariabackup: Using %lld bytes for buffer pool "
|
||||
"(set by --use-memory parameter)\n", xtrabackup_use_memory);
|
||||
|
||||
srv_max_buf_pool_modified_pct = (double)max_buf_pool_modified_pct;
|
||||
|
@ -4820,7 +4821,6 @@ xtrabackup_prepare_func(char** argv)
|
|||
goto error_cleanup;
|
||||
}
|
||||
|
||||
|
||||
if (ok) {
|
||||
mtr_t mtr;
|
||||
mtr.start();
|
||||
|
@ -4858,7 +4858,7 @@ xtrabackup_prepare_func(char** argv)
|
|||
/* Check whether the log is applied enough or not. */
|
||||
if ((srv_start_lsn || fil_space_get(SRV_LOG_SPACE_FIRST_ID))
|
||||
&& srv_start_lsn < target_lsn) {
|
||||
msg("xtrabackup: error: "
|
||||
msg("mariabackup: error: "
|
||||
"The log was only applied up to LSN " LSN_PF
|
||||
", instead of " LSN_PF "\n",
|
||||
srv_start_lsn, target_lsn);
|
||||
|
@ -4887,13 +4887,13 @@ xtrabackup_prepare_func(char** argv)
|
|||
sprintf(filename, "%s/%s", xtrabackup_target_dir, XTRABACKUP_METADATA_FILENAME);
|
||||
if (!xtrabackup_write_metadata(filename)) {
|
||||
|
||||
msg("xtrabackup: Error: failed to write metadata "
|
||||
msg("mariabackup: Error: failed to write metadata "
|
||||
"to '%s'\n", filename);
|
||||
ok = false;
|
||||
} else if (xtrabackup_extra_lsndir) {
|
||||
sprintf(filename, "%s/%s", xtrabackup_extra_lsndir, XTRABACKUP_METADATA_FILENAME);
|
||||
if (!xtrabackup_write_metadata(filename)) {
|
||||
msg("xtrabackup: Error: failed to write "
|
||||
msg("mariabackup: Error: failed to write "
|
||||
"metadata to '%s'\n", filename);
|
||||
ok = false;
|
||||
}
|
||||
|
@ -5156,7 +5156,7 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server)
|
|||
if (optend - argv[i] == 15 &&
|
||||
!strncmp(argv[i], "--defaults-file", optend - argv[i])) {
|
||||
|
||||
msg("xtrabackup: Error: --defaults-file "
|
||||
msg("mariabackup: Error: --defaults-file "
|
||||
"must be specified first on the command "
|
||||
"line\n");
|
||||
exit(EXIT_FAILURE);
|
||||
|
@ -5165,7 +5165,7 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server)
|
|||
!strncmp(argv[i], "--defaults-extra-file",
|
||||
optend - argv[i])) {
|
||||
|
||||
msg("xtrabackup: Error: --defaults-extra-file "
|
||||
msg("mariabackup: Error: --defaults-extra-file "
|
||||
"must be specified first on the command "
|
||||
"line\n");
|
||||
exit(EXIT_FAILURE);
|
||||
|
@ -5216,7 +5216,7 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server)
|
|||
}
|
||||
|
||||
if (!server_option) {
|
||||
msg("xtrabackup: Error:"
|
||||
msg("mariabackup: Error:"
|
||||
" unknown argument: '%s'\n", opt);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -5335,7 +5335,7 @@ static int main_low(char** argv)
|
|||
&& !strcmp(mysql_data_home, "./")) {
|
||||
if (!xtrabackup_print_param)
|
||||
usage();
|
||||
msg("\nxtrabackup: Error: Please set parameter 'datadir'\n");
|
||||
msg("\nmariabackup: Error: Please set parameter 'datadir'\n");
|
||||
return(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
@ -5405,7 +5405,7 @@ static int main_low(char** argv)
|
|||
error = 1;
|
||||
|
||||
if (error) {
|
||||
msg("xtrabackup: value '%s' may be wrong format for "
|
||||
msg("mariabackup: value '%s' may be wrong format for "
|
||||
"incremental option.\n", xtrabackup_incremental);
|
||||
return(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -5415,7 +5415,7 @@ static int main_low(char** argv)
|
|||
sprintf(filename, "%s/%s", xtrabackup_incremental_basedir, XTRABACKUP_METADATA_FILENAME);
|
||||
|
||||
if (!xtrabackup_read_metadata(filename)) {
|
||||
msg("xtrabackup: error: failed to read metadata from "
|
||||
msg("mariabackup: error: failed to read metadata from "
|
||||
"%s\n", filename);
|
||||
return(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -5428,7 +5428,7 @@ static int main_low(char** argv)
|
|||
sprintf(filename, "%s/%s", xtrabackup_incremental_dir, XTRABACKUP_METADATA_FILENAME);
|
||||
|
||||
if (!xtrabackup_read_metadata(filename)) {
|
||||
msg("xtrabackup: error: failed to read metadata from "
|
||||
msg("mariabackup: error: failed to read metadata from "
|
||||
"%s\n", filename);
|
||||
return(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -5463,7 +5463,7 @@ static int main_low(char** argv)
|
|||
}
|
||||
|
||||
if (xtrabackup_export && innobase_file_per_table == FALSE) {
|
||||
msg("xtrabackup: auto-enabling --innodb-file-per-table due to "
|
||||
msg("mariabackup: auto-enabling --innodb-file-per-table due to "
|
||||
"the --export option\n");
|
||||
innobase_file_per_table = TRUE;
|
||||
}
|
||||
|
@ -5531,4 +5531,3 @@ static int get_exepath(char *buf, size_t size, const char *argv0)
|
|||
|
||||
return my_realpath(buf, argv0, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -109,6 +109,7 @@ extern my_bool opt_force_non_empty_dirs;
|
|||
extern my_bool opt_noversioncheck;
|
||||
extern my_bool opt_no_backup_locks;
|
||||
extern my_bool opt_decompress;
|
||||
extern my_bool opt_remove_original;
|
||||
|
||||
extern char *opt_incremental_history_name;
|
||||
extern char *opt_incremental_history_uuid;
|
||||
|
|
|
@ -98,18 +98,23 @@ static struct my_option my_long_options[] =
|
|||
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
void cleanup_and_exit(int exit_code)
|
||||
static void cleanup_and_exit(int exit_code) __attribute__ ((noreturn));
|
||||
static void cleanup_and_exit(int exit_code)
|
||||
{
|
||||
my_end(0);
|
||||
exit(exit_code);
|
||||
}
|
||||
|
||||
static void usage(my_bool version)
|
||||
static void version()
|
||||
{
|
||||
printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE,
|
||||
MACHINE_TYPE);
|
||||
if (version)
|
||||
return;
|
||||
printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE);
|
||||
}
|
||||
|
||||
|
||||
static void usage() __attribute__ ((noreturn));
|
||||
static void usage()
|
||||
{
|
||||
version();
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
|
||||
puts("Prints all arguments that is give to some program using the default files");
|
||||
printf("Usage: %s [OPTIONS] [groups]\n", my_progname);
|
||||
|
@ -133,12 +138,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||
cleanup_and_exit(0);
|
||||
case 'I':
|
||||
case '?':
|
||||
usage(0);
|
||||
usage();
|
||||
case 'v':
|
||||
verbose++;
|
||||
break;
|
||||
case 'V':
|
||||
usage(1);
|
||||
version();
|
||||
/* fall through */
|
||||
case '#':
|
||||
DBUG_PUSH(argument ? argument : default_dbug_option);
|
||||
break;
|
||||
|
@ -186,7 +192,7 @@ int main(int argc, char **argv)
|
|||
nargs+= array_elements(mysqld_groups);
|
||||
|
||||
if (nargs < 2)
|
||||
usage(0);
|
||||
usage();
|
||||
|
||||
load_default_groups=(char**) my_malloc(nargs*sizeof(char*), MYF(MY_WME));
|
||||
if (!load_default_groups)
|
||||
|
|
|
@ -174,7 +174,7 @@ register char **argv[];
|
|||
break;
|
||||
case 'V':
|
||||
version=1;
|
||||
/* fall through */
|
||||
/* fall through */
|
||||
case 'I':
|
||||
case '?':
|
||||
help=1; /* Help text written */
|
||||
|
|
|
@ -12,6 +12,14 @@ before calling SSL_new();
|
|||
|
||||
*** end Note ***
|
||||
|
||||
yaSSL Release notes, version 2.4.4 (8/8/2017)
|
||||
This release of yaSSL fixes an interop issue. A fix for detecting cipher
|
||||
suites with non leading zeros is included as yaSSL only supports cipher
|
||||
suites with leading zeros. Thanks for the report from Security Innovation
|
||||
and Oracle.
|
||||
|
||||
Users interoping with other SSL stacks should update.
|
||||
|
||||
yaSSL Release notes, version 2.4.2 (9/22/2016)
|
||||
This release of yaSSL fixes a medium security vulnerability. A fix for
|
||||
potential AES side channel leaks is included that a local user monitoring
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
Copyright (c) 2005, 2014, Oracle and/or its affiliates.
|
||||
Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
Use is subject to license terms.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -34,7 +35,7 @@
|
|||
#include "rsa.h"
|
||||
|
||||
|
||||
#define YASSL_VERSION "2.4.2"
|
||||
#define YASSL_VERSION "2.4.4"
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (c) 2005, 2014, Oracle and/or its affiliates
|
||||
Copyright (c) 2005, 2017, Oracle and/or its affiliates.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1578,6 +1578,10 @@ void ServerHello::Process(input_buffer& input, SSL& ssl)
|
|||
ssl.SetError(badVersion_error);
|
||||
return;
|
||||
}
|
||||
if (cipher_suite_[0] != 0x00) {
|
||||
ssl.SetError(unknown_cipher);
|
||||
return;
|
||||
}
|
||||
ssl.set_pending(cipher_suite_[1]);
|
||||
ssl.set_random(random_, server_end);
|
||||
if (id_len_)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (c) 2005, 2014, Oracle and/or its affiliates
|
||||
Copyright (c) 2005, 2017, Oracle and/or its affiliates.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1399,12 +1399,17 @@ void SSL::matchSuite(const opaque* peer, uint length)
|
|||
// start with best, if a match we are good, Ciphers are at odd index
|
||||
// since all SSL and TLS ciphers have 0x00 first byte
|
||||
for (uint i = 1; i < secure_.get_parms().suites_size_; i += 2)
|
||||
for (uint j = 1; j < length; j+= 2)
|
||||
if (secure_.use_parms().suites_[i] == peer[j]) {
|
||||
for (uint j = 0; (j + 1) < length; j+= 2) {
|
||||
if (peer[j] != 0x00) {
|
||||
continue; // only 0x00 first byte supported
|
||||
}
|
||||
|
||||
if (secure_.use_parms().suites_[i] == peer[j + 1]) {
|
||||
secure_.use_parms().suite_[0] = 0x00;
|
||||
secure_.use_parms().suite_[1] = peer[j];
|
||||
secure_.use_parms().suite_[1] = peer[j + 1];
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
SetError(match_error);
|
||||
}
|
||||
|
@ -2702,4 +2707,3 @@ extern "C" void yaSSL_CleanUp()
|
|||
yaSSL::sessionsInstance = 0;
|
||||
yaSSL::errorsInstance = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 931450c3f8793f2653f6292847cbc005b30ed3b6
|
||||
Subproject commit 7e53ab369815590ff92913b581d43eb7786f2fe2
|
|
@ -1,74 +1,93 @@
|
|||
This directory contains a test suite for the MySQL daemon. To run
|
||||
the currently existing test cases, simply execute ./mysql-test-run in
|
||||
this directory. It will fire up the newly built mysqld and test it.
|
||||
This directory contains test suites for the MariaDB server. To run
|
||||
currently existing test cases, execute ./mysql-test-run in this directory.
|
||||
|
||||
Note that you do not have to have to do "make install", and you could
|
||||
actually have a co-existing MySQL installation. The tests will not
|
||||
conflict with it. To run the test suite in a source directory, you
|
||||
must do make first.
|
||||
Some tests are known to fail on some platforms or be otherwise unreliable.
|
||||
The file "unstable-tests" contains the list of such tests along with
|
||||
a comment for every test.
|
||||
To exclude them from the test run, execute
|
||||
# ./mysql-test-run --skip-test-list=unstable-tests
|
||||
|
||||
All tests must pass. If one or more of them fail on your system, please
|
||||
read the following manual section for instructions on how to report the
|
||||
problem:
|
||||
In general you do not have to have to do "make install", and you can have
|
||||
a co-existing MariaDB installation, the tests will not conflict with it.
|
||||
To run the tests in a source directory, you must do "make" first.
|
||||
|
||||
In Red Hat distributions, you should run the script as user "mysql".
|
||||
The user is created with nologin shell, so the best bet is something like
|
||||
# su -
|
||||
# cd /usr/share/mysql-test
|
||||
# su -s /bin/bash mysql -c "./mysql-test-run --skip-test-list=unstable-tests"
|
||||
|
||||
This will use the installed MariaDB executables, but will run a private
|
||||
copy of the server process (using data files within /usr/share/mysql-test),
|
||||
so you need not start the mysqld service beforehand.
|
||||
|
||||
You can omit --skip-test-list option if you want to check whether
|
||||
the listed failures occur for you.
|
||||
|
||||
To clean up afterwards, remove the created "var" subdirectory, e.g.
|
||||
# su -s /bin/bash - mysql -c "rm -rf /usr/share/mysql-test/var"
|
||||
|
||||
If one or more tests fail on your system on reasons other than listed
|
||||
in lists of unstable tests, please read the following manual section
|
||||
for instructions on how to report the problem:
|
||||
|
||||
https://mariadb.com/kb/en/reporting-bugs
|
||||
|
||||
If you want to use an already running MySQL server for specific tests,
|
||||
use the --extern option to mysql-test-run. Please note that in this mode,
|
||||
the test suite expects you to provide the names of the tests to run.
|
||||
you are expected to provide names of the tests to run.
|
||||
|
||||
For example, here is the command to run the "alias" and "analyze" tests
|
||||
with an external server:
|
||||
|
||||
mysql-test-run --extern socket=/tmp/mysql.sock alias analyze
|
||||
# mysql-test-run --extern socket=/tmp/mysql.sock alias analyze
|
||||
|
||||
To match your setup, you might also need to provide --socket, --user, and
|
||||
other relevant options.
|
||||
To match your setup, you might need to provide other relevant options.
|
||||
|
||||
With no test cases named on the command line, mysql-test-run falls back
|
||||
to the normal "non-extern" behavior. The reason for this is that some
|
||||
tests cannot run with an external server.
|
||||
With no test names on the command line, mysql-test-run will attempt
|
||||
to execute the default set of tests, which will certainly fail, because
|
||||
many tests cannot run with an external server (they need to control the
|
||||
options with which the server is started, restart the server during
|
||||
execution, etc.)
|
||||
|
||||
You can create your own test cases. To create a test case, create a new
|
||||
file in the t subdirectory using a text editor. The file should have a .test
|
||||
extension. For example:
|
||||
|
||||
xemacs t/test_case_name.test
|
||||
# xemacs t/test_case_name.test
|
||||
|
||||
In the file, put a set of SQL statements that create some tables,
|
||||
load test data, and run some queries to manipulate it.
|
||||
In the file, put a set of SQL statements that create some tables,
|
||||
load test data, and run some queries to manipulate it.
|
||||
|
||||
We would appreciate it if you name your test tables t1, t2, t3 ... (to not
|
||||
conflict too much with existing tables).
|
||||
Your test should begin by dropping the tables you are going to create and
|
||||
end by dropping them again. This ensures that you can run the test over
|
||||
and over again.
|
||||
|
||||
Your test should begin by dropping the tables you are going to create and
|
||||
end by dropping them again. This ensures that you can run the test over
|
||||
and over again.
|
||||
|
||||
If you are using mysqltest commands (like result file names) in your
|
||||
test case, you should create the result file as follows:
|
||||
If you are using mysqltest commands in your test case, you should create
|
||||
the result file as follows:
|
||||
|
||||
mysql-test-run --record test_case_name
|
||||
# mysql-test-run --record test_case_name
|
||||
|
||||
or
|
||||
or
|
||||
|
||||
mysqltest --record < t/test_case_name.test
|
||||
# mysqltest --record < t/test_case_name.test
|
||||
|
||||
If you only have a simple test cases consisting of SQL statements and
|
||||
comments, you can create the test case in one of the following ways:
|
||||
If you only have a simple test case consisting of SQL statements and
|
||||
comments, you can create the result file in one of the following ways:
|
||||
|
||||
mysql-test-run --record test_case_name
|
||||
# mysql-test-run --record test_case_name
|
||||
|
||||
mysql test < t/test_case_name.test > r/test_case_name.result
|
||||
# mysql test < t/test_case_name.test > r/test_case_name.result
|
||||
|
||||
mysqltest --record --database test --result-file=r/test_case_name.result < t/test_case_name.test
|
||||
# mysqltest --record --database test --result-file=r/test_case_name.result < t/test_case_name.test
|
||||
|
||||
When this is done, take a look at r/test_case_name.result
|
||||
- If the result is incorrect, you have found a bug. In this case, you should
|
||||
edit the test result to the correct results so that we can verify
|
||||
that the bug is corrected in future releases.
|
||||
When this is done, take a look at r/test_case_name.result .
|
||||
If the result is incorrect, you have found a bug. In this case, you should
|
||||
edit the test result to the correct results so that we can verify that
|
||||
the bug is corrected in future releases.
|
||||
|
||||
If you want to submit your test case you can send it
|
||||
to maria-developers@lists.launchpad.com or attach it to a bug report on
|
||||
to maria-developers@lists.launchpad.net or attach it to a bug report on
|
||||
http://mariadb.org/jira/.
|
||||
|
||||
If the test case is really big or if it contains 'not public' data,
|
||||
|
|
420
mysql-test/include/innodb_gis_row_format_basic.inc
Normal file
420
mysql-test/include/innodb_gis_row_format_basic.inc
Normal file
|
@ -0,0 +1,420 @@
|
|||
--source include/have_innodb.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
eval SET GLOBAL innodb_file_per_table=$file_per_table;
|
||||
eval SET GLOBAL innodb_file_format=$file_format;
|
||||
|
||||
#
|
||||
# This test is the same as innodb_gis_rollback
|
||||
#
|
||||
|
||||
eval CREATE TABLE t1 (
|
||||
id bigint(12) unsigned NOT NULL auto_increment,
|
||||
c2 varchar(15) collate utf8_bin DEFAULT NULL,
|
||||
c1 varchar(15) collate utf8_bin DEFAULT NULL,
|
||||
c3 varchar(10) collate utf8_bin DEFAULT NULL,
|
||||
spatial_point point NOT NULL,
|
||||
PRIMARY KEY(id),
|
||||
SPATIAL KEY (spatial_point)
|
||||
) ROW_FORMAT=$row_format ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
|
||||
INSERT INTO t1 (c2, c1, c3, spatial_poINT) VALUES
|
||||
('y', 's', 'j', ST_GeomFromText('POINT(167 74)')),
|
||||
('r', 'n', 'd', ST_GeomFromText('POINT(215 118)')),
|
||||
('g', 'n', 'e', ST_GeomFromText('POINT(203 98)')),
|
||||
('h', 'd', 'd', ST_GeomFromText('POINT(54 193)')),
|
||||
('r', 'x', 'y', ST_GeomFromText('POINT(47 69)')),
|
||||
('t', 'q', 'r', ST_GeomFromText('POINT(109 42)')),
|
||||
('a', 'z', 'd', ST_GeomFromText('POINT(0 154)')),
|
||||
('x', 'v', 'o', ST_GeomFromText('POINT(174 131)')),
|
||||
('b', 'r', 'a', ST_GeomFromText('POINT(114 253)')),
|
||||
('x', 'z', 'i', ST_GeomFromText('POINT(163 21)')),
|
||||
('w', 'p', 'i', ST_GeomFromText('POINT(42 102)')),
|
||||
('g', 'j', 'j', ST_GeomFromText('POINT(170 133)')),
|
||||
('m', 'g', 'n', ST_GeomFromText('POINT(28 22)')),
|
||||
('b', 'z', 'h', ST_GeomFromText('POINT(174 28)')),
|
||||
('q', 'k', 'f', ST_GeomFromText('POINT(233 73)')),
|
||||
('w', 'w', 'a', ST_GeomFromText('POINT(124 200)')),
|
||||
('t', 'j', 'w', ST_GeomFromText('POINT(252 101)')),
|
||||
('d', 'r', 'd', ST_GeomFromText('POINT(98 18)')),
|
||||
('w', 'o', 'y', ST_GeomFromText('POINT(165 31)')),
|
||||
('y', 'h', 't', ST_GeomFromText('POINT(14 220)')),
|
||||
('d', 'p', 'u', ST_GeomFromText('POINT(223 196)')),
|
||||
('g', 'y', 'g', ST_GeomFromText('POINT(207 96)')),
|
||||
('x', 'm', 'n', ST_GeomFromText('POINT(214 3)')),
|
||||
('g', 'v', 'e', ST_GeomFromText('POINT(140 205)')),
|
||||
('g', 'm', 'm', ST_GeomFromText('POINT(10 236)')),
|
||||
('i', 'r', 'j', ST_GeomFromText('POINT(137 228)')),
|
||||
('w', 's', 'p', ST_GeomFromText('POINT(115 6)')),
|
||||
('o', 'n', 'k', ST_GeomFromText('POINT(158 129)')),
|
||||
('j', 'h', 'l', ST_GeomFromText('POINT(129 72)')),
|
||||
('f', 'x', 'l', ST_GeomFromText('POINT(139 207)')),
|
||||
('u', 'd', 'n', ST_GeomFromText('POINT(125 109)')),
|
||||
('b', 'a', 'z', ST_GeomFromText('POINT(30 32)')),
|
||||
('m', 'h', 'o', ST_GeomFromText('POINT(251 251)')),
|
||||
('f', 'r', 'd', ST_GeomFromText('POINT(243 211)')),
|
||||
('b', 'd', 'r', ST_GeomFromText('POINT(232 80)')),
|
||||
('g', 'k', 'v', ST_GeomFromText('POINT(15 100)')),
|
||||
('i', 'f', 'c', ST_GeomFromText('POINT(109 66)')),
|
||||
('r', 't', 'j', ST_GeomFromText('POINT(178 6)')),
|
||||
('y', 'n', 'f', ST_GeomFromText('POINT(233 211)')),
|
||||
('f', 'y', 'm', ST_GeomFromText('POINT(99 16)')),
|
||||
('z', 'q', 'l', ST_GeomFromText('POINT(39 49)')),
|
||||
('j', 'c', 'r', ST_GeomFromText('POINT(75 187)')),
|
||||
('c', 'y', 'y', ST_GeomFromText('POINT(246 253)')),
|
||||
('w', 'u', 'd', ST_GeomFromText('POINT(56 190)')),
|
||||
('n', 'q', 'm', ST_GeomFromText('POINT(73 149)')),
|
||||
('d', 'y', 'a', ST_GeomFromText('POINT(134 6)')),
|
||||
('z', 's', 'w', ST_GeomFromText('POINT(216 225)')),
|
||||
('d', 'u', 'k', ST_GeomFromText('POINT(132 70)')),
|
||||
('f', 'v', 't', ST_GeomFromText('POINT(187 141)')),
|
||||
('r', 'r', 'a', ST_GeomFromText('POINT(152 39)')),
|
||||
('y', 'p', 'o', ST_GeomFromText('POINT(45 27)')),
|
||||
('p', 'n', 'm', ST_GeomFromText('POINT(228 148)')),
|
||||
('e', 'g', 'e', ST_GeomFromText('POINT(88 81)')),
|
||||
('m', 'a', 'h', ST_GeomFromText('POINT(35 29)')),
|
||||
('m', 'h', 'f', ST_GeomFromText('POINT(30 71)')),
|
||||
('h', 'k', 'i', ST_GeomFromText('POINT(244 78)')),
|
||||
('z', 'v', 'd', ST_GeomFromText('POINT(241 38)')),
|
||||
('q', 'l', 'j', ST_GeomFromText('POINT(13 71)')),
|
||||
('s', 'p', 'g', ST_GeomFromText('POINT(108 38)')),
|
||||
('q', 's', 'j', ST_GeomFromText('POINT(92 101)')),
|
||||
('l', 'h', 'g', ST_GeomFromText('POINT(120 78)')),
|
||||
('w', 't', 'b', ST_GeomFromText('POINT(193 109)')),
|
||||
('b', 's', 's', ST_GeomFromText('POINT(223 211)')),
|
||||
('w', 'w', 'y', ST_GeomFromText('POINT(122 42)')),
|
||||
('q', 'c', 'c', ST_GeomFromText('POINT(104 102)')),
|
||||
('w', 'g', 'n', ST_GeomFromText('POINT(213 120)')),
|
||||
('p', 'q', 'a', ST_GeomFromText('POINT(247 148)')),
|
||||
('c', 'z', 'e', ST_GeomFromText('POINT(18 106)')),
|
||||
('z', 'u', 'n', ST_GeomFromText('POINT(70 133)')),
|
||||
('j', 'n', 'x', ST_GeomFromText('POINT(232 13)')),
|
||||
('e', 'h', 'f', ST_GeomFromText('POINT(22 135)')),
|
||||
('w', 'l', 'f', ST_GeomFromText('POINT(9 180)')),
|
||||
('a', 'v', 'q', ST_GeomFromText('POINT(163 228)')),
|
||||
('i', 'z', 'o', ST_GeomFromText('POINT(180 100)')),
|
||||
('e', 'c', 'l', ST_GeomFromText('POINT(182 231)')),
|
||||
('c', 'k', 'o', ST_GeomFromText('POINT(19 60)')),
|
||||
('q', 'f', 'p', ST_GeomFromText('POINT(79 95)')),
|
||||
('m', 'd', 'r', ST_GeomFromText('POINT(3 127)')),
|
||||
('m', 'e', 't', ST_GeomFromText('POINT(136 154)')),
|
||||
('w', 'w', 'w', ST_GeomFromText('POINT(102 15)')),
|
||||
('l', 'n', 'q', ST_GeomFromText('POINT(71 196)')),
|
||||
('p', 'k', 'c', ST_GeomFromText('POINT(47 139)')),
|
||||
('j', 'o', 'r', ST_GeomFromText('POINT(177 128)')),
|
||||
('j', 'q', 'a', ST_GeomFromText('POINT(170 6)')),
|
||||
('b', 'a', 'o', ST_GeomFromText('POINT(63 211)')),
|
||||
('g', 's', 'o', ST_GeomFromText('POINT(144 251)')),
|
||||
('w', 'u', 'w', ST_GeomFromText('POINT(221 214)')),
|
||||
('g', 'a', 'm', ST_GeomFromText('POINT(14 102)')),
|
||||
('u', 'q', 'z', ST_GeomFromText('POINT(86 200)')),
|
||||
('k', 'a', 'm', ST_GeomFromText('POINT(144 222)')),
|
||||
('j', 'u', 'r', ST_GeomFromText('POINT(216 142)')),
|
||||
('q', 'k', 'v', ST_GeomFromText('POINT(121 236)')),
|
||||
('p', 'o', 'r', ST_GeomFromText('POINT(108 102)')),
|
||||
('b', 'd', 'x', ST_GeomFromText('POINT(127 198)')),
|
||||
('k', 's', 'a', ST_GeomFromText('POINT(2 150)')),
|
||||
('f', 'm', 'f', ST_GeomFromText('POINT(160 191)')),
|
||||
('q', 'y', 'x', ST_GeomFromText('POINT(98 111)')),
|
||||
('o', 'f', 'm', ST_GeomFromText('POINT(232 218)')),
|
||||
('c', 'w', 'j', ST_GeomFromText('POINT(156 165)')),
|
||||
('s', 'q', 'v', ST_GeomFromText('POINT(98 161)'));
|
||||
INSERT INTO t1 (c2, c1, c3, spatial_poINT) VALUES
|
||||
('f', 'y', 'p', ST_GeomFromText('POINT(109 235)')),
|
||||
('b', 'e', 'v', ST_GeomFromText('POINT(20 48)')),
|
||||
('i', 'u', 'f', ST_GeomFromText('POINT(15 55)')),
|
||||
('o', 'r', 'z', ST_GeomFromText('POINT(105 64)')),
|
||||
('a', 'p', 'a', ST_GeomFromText('POINT(142 236)')),
|
||||
('g', 'i', 'k', ST_GeomFromText('POINT(10 49)')),
|
||||
('x', 'z', 'x', ST_GeomFromText('POINT(192 200)')),
|
||||
('c', 'v', 'r', ST_GeomFromText('POINT(94 168)')),
|
||||
('y', 'z', 'e', ST_GeomFromText('POINT(141 51)')),
|
||||
('h', 'm', 'd', ST_GeomFromText('POINT(35 251)')),
|
||||
('v', 'm', 'q', ST_GeomFromText('POINT(44 90)')),
|
||||
('j', 'l', 'z', ST_GeomFromText('POINT(67 237)')),
|
||||
('i', 'v', 'a', ST_GeomFromText('POINT(75 14)')),
|
||||
('b', 'q', 't', ST_GeomFromText('POINT(153 33)')),
|
||||
('e', 'm', 'a', ST_GeomFromText('POINT(247 49)')),
|
||||
('l', 'y', 'g', ST_GeomFromText('POINT(56 203)')),
|
||||
('v', 'o', 'r', ST_GeomFromText('POINT(90 54)')),
|
||||
('r', 'n', 'd', ST_GeomFromText('POINT(135 83)')),
|
||||
('j', 't', 'u', ST_GeomFromText('POINT(174 239)')),
|
||||
('u', 'n', 'g', ST_GeomFromText('POINT(104 191)')),
|
||||
('p', 'q', 'y', ST_GeomFromText('POINT(63 171)')),
|
||||
('o', 'q', 'p', ST_GeomFromText('POINT(192 103)')),
|
||||
('f', 'x', 'e', ST_GeomFromText('POINT(244 30)')),
|
||||
('n', 'x', 'c', ST_GeomFromText('POINT(92 103)')),
|
||||
('r', 'q', 'z', ST_GeomFromText('POINT(166 20)')),
|
||||
('s', 'a', 'j', ST_GeomFromText('POINT(137 205)')),
|
||||
('z', 't', 't', ST_GeomFromText('POINT(99 134)')),
|
||||
('o', 'm', 'j', ST_GeomFromText('POINT(217 3)')),
|
||||
('n', 'h', 'j', ST_GeomFromText('POINT(211 17)')),
|
||||
('v', 'v', 'a', ST_GeomFromText('POINT(41 137)')),
|
||||
('q', 'o', 'j', ST_GeomFromText('POINT(5 92)')),
|
||||
('z', 'y', 'e', ST_GeomFromText('POINT(175 212)')),
|
||||
('j', 'z', 'h', ST_GeomFromText('POINT(224 194)')),
|
||||
('a', 'g', 'm', ST_GeomFromText('POINT(31 119)')),
|
||||
('p', 'c', 'f', ST_GeomFromText('POINT(17 221)')),
|
||||
('t', 'h', 'k', ST_GeomFromText('POINT(26 203)')),
|
||||
('u', 'w', 'p', ST_GeomFromText('POINT(47 185)')),
|
||||
('z', 'a', 'c', ST_GeomFromText('POINT(61 133)')),
|
||||
('u', 'k', 'a', ST_GeomFromText('POINT(210 115)')),
|
||||
('k', 'f', 'h', ST_GeomFromText('POINT(125 113)')),
|
||||
('t', 'v', 'y', ST_GeomFromText('POINT(12 239)')),
|
||||
('u', 'v', 'd', ST_GeomFromText('POINT(90 24)')),
|
||||
('m', 'y', 'w', ST_GeomFromText('POINT(25 243)')),
|
||||
('d', 'n', 'g', ST_GeomFromText('POINT(122 92)')),
|
||||
('z', 'm', 'f', ST_GeomFromText('POINT(235 110)')),
|
||||
('q', 'd', 'f', ST_GeomFromText('POINT(233 217)')),
|
||||
('a', 'v', 'u', ST_GeomFromText('POINT(69 59)')),
|
||||
('x', 'k', 'p', ST_GeomFromText('POINT(240 14)')),
|
||||
('i', 'v', 'r', ST_GeomFromText('POINT(154 42)')),
|
||||
('w', 'h', 'l', ST_GeomFromText('POINT(178 156)')),
|
||||
('d', 'h', 'n', ST_GeomFromText('POINT(65 157)')),
|
||||
('c', 'k', 'z', ST_GeomFromText('POINT(62 33)')),
|
||||
('e', 'l', 'w', ST_GeomFromText('POINT(162 1)')),
|
||||
('r', 'f', 'i', ST_GeomFromText('POINT(127 71)')),
|
||||
('q', 'm', 'c', ST_GeomFromText('POINT(63 118)')),
|
||||
('c', 'h', 'u', ST_GeomFromText('POINT(205 203)')),
|
||||
('d', 't', 'p', ST_GeomFromText('POINT(234 87)')),
|
||||
('s', 'g', 'h', ST_GeomFromText('POINT(149 34)')),
|
||||
('o', 'b', 'q', ST_GeomFromText('POINT(159 179)')),
|
||||
('k', 'u', 'f', ST_GeomFromText('POINT(202 254)')),
|
||||
('u', 'f', 'g', ST_GeomFromText('POINT(70 15)')),
|
||||
('x', 's', 'b', ST_GeomFromText('POINT(25 181)')),
|
||||
('s', 'c', 'g', ST_GeomFromText('POINT(252 17)')),
|
||||
('a', 'c', 'f', ST_GeomFromText('POINT(89 67)')),
|
||||
('r', 'e', 'q', ST_GeomFromText('POINT(55 54)')),
|
||||
('f', 'i', 'k', ST_GeomFromText('POINT(178 230)')),
|
||||
('p', 'e', 'l', ST_GeomFromText('POINT(198 28)')),
|
||||
('w', 'o', 'd', ST_GeomFromText('POINT(204 189)')),
|
||||
('c', 'a', 'g', ST_GeomFromText('POINT(230 178)')),
|
||||
('r', 'o', 'e', ST_GeomFromText('POINT(61 116)')),
|
||||
('w', 'a', 'a', ST_GeomFromText('POINT(178 237)')),
|
||||
('v', 'd', 'e', ST_GeomFromText('POINT(70 85)')),
|
||||
('k', 'c', 'e', ST_GeomFromText('POINT(147 118)')),
|
||||
('d', 'q', 't', ST_GeomFromText('POINT(218 77)')),
|
||||
('k', 'g', 'f', ST_GeomFromText('POINT(192 113)')),
|
||||
('w', 'n', 'e', ST_GeomFromText('POINT(92 124)')),
|
||||
('r', 'm', 'q', ST_GeomFromText('POINT(130 65)')),
|
||||
('o', 'r', 'r', ST_GeomFromText('POINT(174 233)')),
|
||||
('k', 'n', 't', ST_GeomFromText('POINT(175 147)')),
|
||||
('q', 'm', 'r', ST_GeomFromText('POINT(18 208)')),
|
||||
('l', 'd', 'i', ST_GeomFromText('POINT(13 104)')),
|
||||
('w', 'o', 'y', ST_GeomFromText('POINT(207 39)')),
|
||||
('p', 'u', 'o', ST_GeomFromText('POINT(114 31)')),
|
||||
('y', 'a', 'p', ST_GeomFromText('POINT(106 59)')),
|
||||
('a', 'x', 'z', ST_GeomFromText('POINT(17 57)')),
|
||||
('v', 'h', 'x', ST_GeomFromText('POINT(170 13)')),
|
||||
('t', 's', 'u', ST_GeomFromText('POINT(84 18)')),
|
||||
('z', 'z', 'f', ST_GeomFromText('POINT(250 197)')),
|
||||
('l', 'z', 't', ST_GeomFromText('POINT(59 80)')),
|
||||
('j', 'g', 's', ST_GeomFromText('POINT(54 26)')),
|
||||
('g', 'v', 'm', ST_GeomFromText('POINT(89 98)')),
|
||||
('q', 'v', 'b', ST_GeomFromText('POINT(39 240)')),
|
||||
('x', 'k', 'v', ST_GeomFromText('POINT(246 207)')),
|
||||
('k', 'u', 'i', ST_GeomFromText('POINT(105 111)')),
|
||||
('w', 'z', 's', ST_GeomFromText('POINT(235 8)')),
|
||||
('d', 'd', 'd', ST_GeomFromText('POINT(105 4)')),
|
||||
('c', 'z', 'q', ST_GeomFromText('POINT(13 140)')),
|
||||
('m', 'k', 'i', ST_GeomFromText('POINT(208 120)')),
|
||||
('g', 'a', 'g', ST_GeomFromText('POINT(9 182)')),
|
||||
('z', 'j', 'r', ST_GeomFromText('POINT(149 153)')),
|
||||
('h', 'f', 'g', ST_GeomFromText('POINT(81 236)')),
|
||||
('m', 'e', 'q', ST_GeomFromText('POINT(209 215)')),
|
||||
('c', 'h', 'y', ST_GeomFromText('POINT(235 70)')),
|
||||
('i', 'e', 'g', ST_GeomFromText('POINT(138 26)')),
|
||||
('m', 't', 'u', ST_GeomFromText('POINT(119 237)')),
|
||||
('o', 'w', 's', ST_GeomFromText('POINT(193 166)')),
|
||||
('f', 'm', 'q', ST_GeomFromText('POINT(85 96)')),
|
||||
('x', 'l', 'x', ST_GeomFromText('POINT(58 115)')),
|
||||
('x', 'q', 'u', ST_GeomFromText('POINT(108 210)')),
|
||||
('b', 'h', 'i', ST_GeomFromText('POINT(250 139)')),
|
||||
('y', 'd', 'x', ST_GeomFromText('POINT(199 135)')),
|
||||
('w', 'h', 'p', ST_GeomFromText('POINT(247 233)')),
|
||||
('p', 'z', 't', ST_GeomFromText('POINT(148 249)')),
|
||||
('q', 'a', 'u', ST_GeomFromText('POINT(174 78)')),
|
||||
('v', 't', 'm', ST_GeomFromText('POINT(70 228)')),
|
||||
('t', 'n', 'f', ST_GeomFromText('POINT(123 2)')),
|
||||
('x', 't', 'b', ST_GeomFromText('POINT(35 50)')),
|
||||
('r', 'j', 'f', ST_GeomFromText('POINT(200 51)')),
|
||||
('s', 'q', 'o', ST_GeomFromText('POINT(23 184)')),
|
||||
('u', 'v', 'z', ST_GeomFromText('POINT(7 113)')),
|
||||
('v', 'u', 'l', ST_GeomFromText('POINT(145 190)')),
|
||||
('o', 'k', 'i', ST_GeomFromText('POINT(161 122)')),
|
||||
('l', 'y', 'e', ST_GeomFromText('POINT(17 232)')),
|
||||
('t', 'b', 'e', ST_GeomFromText('POINT(120 50)')),
|
||||
('e', 's', 'u', ST_GeomFromText('POINT(254 1)')),
|
||||
('d', 'd', 'u', ST_GeomFromText('POINT(167 140)')),
|
||||
('o', 'b', 'x', ST_GeomFromText('POINT(186 237)')),
|
||||
('m', 's', 's', ST_GeomFromText('POINT(172 149)')),
|
||||
('t', 'y', 'a', ST_GeomFromText('POINT(149 85)')),
|
||||
('x', 't', 'r', ST_GeomFromText('POINT(10 165)')),
|
||||
('g', 'c', 'e', ST_GeomFromText('POINT(95 165)')),
|
||||
('e', 'e', 'z', ST_GeomFromText('POINT(98 65)')),
|
||||
('f', 'v', 'i', ST_GeomFromText('POINT(149 144)')),
|
||||
('o', 'p', 'm', ST_GeomFromText('POINT(233 67)')),
|
||||
('t', 'u', 'b', ST_GeomFromText('POINT(109 215)')),
|
||||
('o', 'o', 'b', ST_GeomFromText('POINT(130 48)')),
|
||||
('e', 'm', 'h', ST_GeomFromText('POINT(88 189)')),
|
||||
('e', 'v', 'y', ST_GeomFromText('POINT(55 29)')),
|
||||
('e', 't', 'm', ST_GeomFromText('POINT(129 55)')),
|
||||
('p', 'p', 'i', ST_GeomFromText('POINT(126 222)')),
|
||||
('c', 'i', 'c', ST_GeomFromText('POINT(19 158)')),
|
||||
('c', 'b', 's', ST_GeomFromText('POINT(13 19)')),
|
||||
('u', 'y', 'a', ST_GeomFromText('POINT(114 5)')),
|
||||
('a', 'o', 'f', ST_GeomFromText('POINT(227 232)')),
|
||||
('t', 'c', 'z', ST_GeomFromText('POINT(63 62)')),
|
||||
('d', 'o', 'k', ST_GeomFromText('POINT(48 228)')),
|
||||
('x', 'c', 'e', ST_GeomFromText('POINT(204 2)')),
|
||||
('e', 'e', 'g', ST_GeomFromText('POINT(125 43)')),
|
||||
('o', 'r', 'f', ST_GeomFromText('POINT(171 140)'));
|
||||
INSERT INTO t1 (c2, c1, c3, spatial_poINT) VALUES
|
||||
('b', 'c', 'e', ST_GeomFromText('POINT(41 137)')),
|
||||
('p', 'y', 'k', ST_GeomFromText('POINT(50 22)')),
|
||||
('s', 'c', 'h', ST_GeomFromText('POINT(208 173)')),
|
||||
('x', 'u', 'l', ST_GeomFromText('POINT(199 175)')),
|
||||
('s', 'r', 'h', ST_GeomFromText('POINT(85 192)')),
|
||||
('j', 'k', 'u', ST_GeomFromText('POINT(18 25)')),
|
||||
('p', 'w', 'h', ST_GeomFromText('POINT(152 197)')),
|
||||
('e', 'd', 'c', ST_GeomFromText('POINT(229 3)')),
|
||||
('o', 'x', 'k', ST_GeomFromText('POINT(187 155)')),
|
||||
('o', 'b', 'k', ST_GeomFromText('POINT(208 150)')),
|
||||
('d', 'a', 'j', ST_GeomFromText('POINT(70 87)')),
|
||||
('f', 'e', 'k', ST_GeomFromText('POINT(156 96)')),
|
||||
('u', 'y', 'p', ST_GeomFromText('POINT(239 193)')),
|
||||
('n', 'v', 'p', ST_GeomFromText('POINT(223 98)')),
|
||||
('z', 'j', 'r', ST_GeomFromText('POINT(87 89)')),
|
||||
('h', 'x', 'x', ST_GeomFromText('POINT(92 0)')),
|
||||
('r', 'v', 'r', ST_GeomFromText('POINT(159 139)')),
|
||||
('v', 'g', 'g', ST_GeomFromText('POINT(16 229)')),
|
||||
('z', 'k', 'u', ST_GeomFromText('POINT(99 52)')),
|
||||
('p', 'p', 'o', ST_GeomFromText('POINT(105 125)')),
|
||||
('w', 'h', 'y', ST_GeomFromText('POINT(105 154)')),
|
||||
('v', 'y', 'z', ST_GeomFromText('POINT(134 238)')),
|
||||
('x', 'o', 'o', ST_GeomFromText('POINT(178 88)')),
|
||||
('z', 'w', 'd', ST_GeomFromText('POINT(123 60)')),
|
||||
('q', 'f', 'u', ST_GeomFromText('POINT(64 90)')),
|
||||
('s', 'n', 't', ST_GeomFromText('POINT(50 138)')),
|
||||
('v', 'p', 't', ST_GeomFromText('POINT(114 91)')),
|
||||
('a', 'o', 'n', ST_GeomFromText('POINT(78 43)')),
|
||||
('k', 'u', 'd', ST_GeomFromText('POINT(185 161)')),
|
||||
('w', 'd', 'n', ST_GeomFromText('POINT(25 92)')),
|
||||
('k', 'w', 'a', ST_GeomFromText('POINT(59 238)')),
|
||||
('t', 'c', 'f', ST_GeomFromText('POINT(65 87)')),
|
||||
('g', 's', 'p', ST_GeomFromText('POINT(238 126)')),
|
||||
('d', 'n', 'y', ST_GeomFromText('POINT(107 173)')),
|
||||
('l', 'a', 'w', ST_GeomFromText('POINT(125 152)')),
|
||||
('m', 'd', 'j', ST_GeomFromText('POINT(146 53)')),
|
||||
('q', 'm', 'c', ST_GeomFromText('POINT(217 187)')),
|
||||
('i', 'r', 'r', ST_GeomFromText('POINT(6 113)')),
|
||||
('e', 'j', 'b', ST_GeomFromText('POINT(37 83)')),
|
||||
('w', 'w', 'h', ST_GeomFromText('POINT(83 199)')),
|
||||
('k', 'b', 's', ST_GeomFromText('POINT(170 64)')),
|
||||
('s', 'b', 'c', ST_GeomFromText('POINT(163 130)')),
|
||||
('c', 'h', 'a', ST_GeomFromText('POINT(141 3)')),
|
||||
('k', 'j', 'u', ST_GeomFromText('POINT(143 76)')),
|
||||
('r', 'h', 'o', ST_GeomFromText('POINT(243 92)')),
|
||||
('i', 'd', 'b', ST_GeomFromText('POINT(205 13)')),
|
||||
('r', 'y', 'q', ST_GeomFromText('POINT(138 8)')),
|
||||
('m', 'o', 'i', ST_GeomFromText('POINT(36 45)')),
|
||||
('v', 'g', 'm', ST_GeomFromText('POINT(0 40)')),
|
||||
('f', 'e', 'i', ST_GeomFromText('POINT(76 6)')),
|
||||
('c', 'q', 'q', ST_GeomFromText('POINT(115 248)')),
|
||||
('x', 'c', 'i', ST_GeomFromText('POINT(29 74)')),
|
||||
('l', 's', 't', ST_GeomFromText('POINT(83 18)')),
|
||||
('t', 't', 'a', ST_GeomFromText('POINT(26 168)')),
|
||||
('u', 'n', 'x', ST_GeomFromText('POINT(200 110)')),
|
||||
('j', 'b', 'd', ST_GeomFromText('POINT(216 136)')),
|
||||
('s', 'p', 'w', ST_GeomFromText('POINT(38 156)')),
|
||||
('f', 'b', 'v', ST_GeomFromText('POINT(29 186)')),
|
||||
('v', 'e', 'r', ST_GeomFromText('POINT(149 40)')),
|
||||
('v', 't', 'm', ST_GeomFromText('POINT(184 24)')),
|
||||
('y', 'g', 'a', ST_GeomFromText('POINT(219 105)')),
|
||||
('s', 'f', 'i', ST_GeomFromText('POINT(114 130)')),
|
||||
('e', 'q', 'h', ST_GeomFromText('POINT(203 135)')),
|
||||
('h', 'g', 'b', ST_GeomFromText('POINT(9 208)')),
|
||||
('o', 'l', 'r', ST_GeomFromText('POINT(245 79)')),
|
||||
('s', 's', 'v', ST_GeomFromText('POINT(238 198)')),
|
||||
('w', 'w', 'z', ST_GeomFromText('POINT(209 232)')),
|
||||
('v', 'd', 'n', ST_GeomFromText('POINT(30 193)')),
|
||||
('q', 'w', 'k', ST_GeomFromText('POINT(133 18)')),
|
||||
('o', 'h', 'o', ST_GeomFromText('POINT(42 140)')),
|
||||
('f', 'f', 'h', ST_GeomFromText('POINT(145 1)')),
|
||||
('u', 's', 'r', ST_GeomFromText('POINT(70 62)')),
|
||||
('x', 'n', 'q', ST_GeomFromText('POINT(33 86)')),
|
||||
('u', 'p', 'v', ST_GeomFromText('POINT(232 220)')),
|
||||
('z', 'e', 'a', ST_GeomFromText('POINT(130 69)')),
|
||||
('r', 'u', 'z', ST_GeomFromText('POINT(243 241)')),
|
||||
('b', 'n', 't', ST_GeomFromText('POINT(120 12)')),
|
||||
('u', 'f', 's', ST_GeomFromText('POINT(190 212)')),
|
||||
('a', 'd', 'q', ST_GeomFromText('POINT(235 191)')),
|
||||
('f', 'q', 'm', ST_GeomFromText('POINT(176 2)')),
|
||||
('n', 'c', 's', ST_GeomFromText('POINT(218 163)')),
|
||||
('e', 'm', 'h', ST_GeomFromText('POINT(163 108)')),
|
||||
('c', 'f', 'l', ST_GeomFromText('POINT(220 115)')),
|
||||
('c', 'v', 'q', ST_GeomFromText('POINT(66 45)')),
|
||||
('w', 'v', 'x', ST_GeomFromText('POINT(251 220)')),
|
||||
('f', 'w', 'z', ST_GeomFromText('POINT(146 149)')),
|
||||
('h', 'n', 'h', ST_GeomFromText('POINT(148 128)')),
|
||||
('y', 'k', 'v', ST_GeomFromText('POINT(28 110)')),
|
||||
('c', 'x', 'q', ST_GeomFromText('POINT(13 13)')),
|
||||
('e', 'd', 's', ST_GeomFromText('POINT(91 190)')),
|
||||
('c', 'w', 'c', ST_GeomFromText('POINT(10 231)')),
|
||||
('u', 'j', 'n', ST_GeomFromText('POINT(250 21)')),
|
||||
('w', 'n', 'x', ST_GeomFromText('POINT(141 69)')),
|
||||
('f', 'p', 'y', ST_GeomFromText('POINT(228 246)')),
|
||||
('d', 'q', 'f', ST_GeomFromText('POINT(194 22)')),
|
||||
('d', 'z', 'l', ST_GeomFromText('POINT(233 181)')),
|
||||
('c', 'a', 'q', ST_GeomFromText('POINT(183 96)')),
|
||||
('m', 'i', 'd', ST_GeomFromText('POINT(117 226)')),
|
||||
('z', 'y', 'y', ST_GeomFromText('POINT(62 81)')),
|
||||
('g', 'v', 'm', ST_GeomFromText('POINT(66 158)'));
|
||||
|
||||
START TRANSACTION;
|
||||
|
||||
# following INSERTion will result in a node split
|
||||
INSERT INTO t1 (c2, c1, c3, spatial_poINT) VALUES
|
||||
('f', 'x', 'p', ST_GeomFromText('POINT(92 181)'));
|
||||
|
||||
# Test rollback, this will result above split being rolled back, btr_compress
|
||||
# gets called
|
||||
ROLLBACK;
|
||||
|
||||
INSERT INTO t1 (c2, c1, c3, spatial_poINT) VALUES
|
||||
('f', 'x', 'p', ST_GeomFromText('POINT(92 181)'));
|
||||
|
||||
# create overlap on the bounding box in parent
|
||||
INSERT INTO t1 (c2, c1, c3, spatial_poINT) VALUES ('n', 'x', 'p', ST_GeomFromText('POINT(0 1280)'));
|
||||
|
||||
INSERT INTO t1 (c2, c1, c3, spatial_poINT) VALUES ('n', 'x', 'p', ST_GeomFromText('POINT(45 1280)'));
|
||||
|
||||
# Add a row in the cross section of the 2 bounding box
|
||||
INSERT INTO t1 VALUES (1280, 'n', 'x', 'p', ST_GeomFromText('POINT(44 253)'));
|
||||
|
||||
# Delete this new poINT
|
||||
DELETE FROM t1 WHERE id = 1280;
|
||||
|
||||
INSERT INTO t1 VALUES (1280, 'n', 'x', 'p', ST_GeomFromText('POINT(44 253)'));
|
||||
|
||||
START TRANSACTION;
|
||||
DELETE FROM t1 WHERE id = 1280;
|
||||
ROLLBACK;
|
||||
|
||||
# Test MBR increase
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 (c2, c1, c3, spatial_point) VALUES
|
||||
('m', 'u', 'p', ST_GeomFromText('POINT(1192 1181)'));
|
||||
ROLLBACK;
|
||||
|
||||
SELECT COUNT(*) FROM t1;
|
||||
UPDATE t1 SET spatial_point = ST_GeomFromText('POINT(123 456)') WHERE id < 2000;
|
||||
SET @g1 = ST_GeomFromText('Polygon((123 456, 123 678, 456 678,456 456,123 456))');
|
||||
DELETE FROM t1 WHERE MBRContains(@g1, t1.spatial_point);
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
SET GLOBAL innodb_file_per_table=default;
|
||||
SET GLOBAL innodb_file_format=default;
|
||||
|
83
mysql-test/include/innodb_gis_undo.inc
Normal file
83
mysql-test/include/innodb_gis_undo.inc
Normal file
File diff suppressed because one or more lines are too long
15
mysql-test/include/kill_and_restart_mysqld.inc
Normal file
15
mysql-test/include/kill_and_restart_mysqld.inc
Normal file
|
@ -0,0 +1,15 @@
|
|||
if (!$restart_parameters)
|
||||
{
|
||||
let $restart_parameters = restart;
|
||||
}
|
||||
|
||||
--let $_server_id= `SELECT @@server_id`
|
||||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
|
||||
|
||||
--echo # Kill and $restart_parameters
|
||||
--exec echo "$restart_parameters" > $_expect_file_name
|
||||
--shutdown_server 0
|
||||
--source include/wait_until_disconnected.inc
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
--disable_reconnect
|
60
mysql-test/include/wait_innodb_all_purged.inc
Normal file
60
mysql-test/include/wait_innodb_all_purged.inc
Normal file
|
@ -0,0 +1,60 @@
|
|||
# include/wait_innodb_all_purged.inc
|
||||
#
|
||||
# SUMMARY
|
||||
#
|
||||
# Waits until purged all undo records of innodb, or operation times out.
|
||||
#
|
||||
# USAGE
|
||||
#
|
||||
# --source include/wait_innodb_all_purged.inc
|
||||
#
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
|
||||
--disable_query_log
|
||||
|
||||
let $wait_counter_init= 300;
|
||||
if ($wait_timeout)
|
||||
{
|
||||
let $wait_counter_init= `SELECT $wait_timeout * 10`;
|
||||
}
|
||||
# Reset $wait_timeout so that its value won't be used on subsequent
|
||||
# calls, and default will be used instead.
|
||||
let $wait_timeout= 0;
|
||||
|
||||
let $wait_counter= $wait_counter_init;
|
||||
|
||||
# Keep track of how many times the wait condition is tested
|
||||
let $wait_condition_reps= 0;
|
||||
let $prev_trx_age= 0;
|
||||
while ($wait_counter)
|
||||
{
|
||||
--disable_warnings
|
||||
let $trx_age = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE VARIABLE_NAME = 'INNODB_PURGE_TRX_ID_AGE';`;
|
||||
--enable_warnings
|
||||
|
||||
if ($trx_age != $prev_trx_age)
|
||||
{
|
||||
let $wait_counter= $wait_counter_init;
|
||||
let $prev_trx_age= $trx_age;
|
||||
}
|
||||
|
||||
let $success= `SELECT $trx_age < 1`;
|
||||
inc $wait_condition_reps;
|
||||
if ($success)
|
||||
{
|
||||
let $wait_counter= 0;
|
||||
}
|
||||
if (!$success)
|
||||
{
|
||||
real_sleep 0.1;
|
||||
dec $wait_counter;
|
||||
}
|
||||
}
|
||||
if (!$success)
|
||||
{
|
||||
echo Timeout in wait_innodb_all_purged.inc for INNODB_PURGE_TRX_ID_AGE = $trx_age;
|
||||
}
|
||||
|
||||
--enable_query_log
|
|
@ -26,80 +26,137 @@
|
|||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <psapi.h>
|
||||
#include <DbgHelp.h>
|
||||
#include <dbghelp.h>
|
||||
#include <tlhelp32.h>
|
||||
#include <vector>
|
||||
|
||||
static int create_dump(DWORD pid)
|
||||
|
||||
static std::vector<DWORD> find_children(DWORD pid)
|
||||
{
|
||||
HANDLE h= NULL;
|
||||
PROCESSENTRY32 pe={ 0 };
|
||||
std::vector<DWORD> children;
|
||||
|
||||
pe.dwSize = sizeof(PROCESSENTRY32);
|
||||
h = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
|
||||
if(h == INVALID_HANDLE_VALUE)
|
||||
return children;
|
||||
|
||||
for (BOOL ret = Process32First(h, &pe); ret; ret = Process32Next(h, &pe))
|
||||
{
|
||||
if (pe.th32ParentProcessID == pid)
|
||||
children.push_back(pe.th32ProcessID);
|
||||
}
|
||||
CloseHandle(h);
|
||||
return children;
|
||||
}
|
||||
|
||||
void dump_single_process(DWORD pid)
|
||||
{
|
||||
HANDLE file = 0;
|
||||
HANDLE process= 0;
|
||||
DWORD size= MAX_PATH;
|
||||
char path[MAX_PATH];
|
||||
char working_dir[MAX_PATH];
|
||||
int ret= -1;
|
||||
HANDLE process= INVALID_HANDLE_VALUE;
|
||||
HANDLE file= INVALID_HANDLE_VALUE;
|
||||
char *p;
|
||||
char tmpname[MAX_PATH];
|
||||
|
||||
process = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, (DWORD)pid);
|
||||
process= OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid);
|
||||
if (!process)
|
||||
{
|
||||
fprintf(stderr,"safe_kill : cannot open process pid=%u to create dump, last error %u\n",
|
||||
fprintf(stderr, "safe_kill : cannot open process pid=%u to create dump, last error %u\n",
|
||||
pid, GetLastError());
|
||||
goto exit;
|
||||
}
|
||||
|
||||
DWORD size = MAX_PATH;
|
||||
if (QueryFullProcessImageName(process, 0, path, &size) == 0)
|
||||
{
|
||||
fprintf(stderr,"safe_kill : cannot read process path for pid %u, last error %u\n",
|
||||
fprintf(stderr, "safe_kill : cannot read process path for pid %u, last error %u\n",
|
||||
pid, GetLastError());
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if ((p = strrchr(path, '.')) == 0)
|
||||
p= path + strlen(path);
|
||||
char *filename= strrchr(path, '\\');
|
||||
if (filename)
|
||||
{
|
||||
filename++;
|
||||
// We are not interested in dump of some proceses (my_safe_process.exe,cmd.exe)
|
||||
// since they are only used to start up other programs.
|
||||
// We're interested however in their children;
|
||||
const char *exclude_programs[] = {"my_safe_process.exe","cmd.exe", 0};
|
||||
for(size_t i=0; exclude_programs[i]; i++)
|
||||
if (_stricmp(filename, exclude_programs[i]) == 0)
|
||||
goto exit;
|
||||
}
|
||||
else
|
||||
filename= path;
|
||||
|
||||
// Add .dmp extension
|
||||
char *p;
|
||||
if ((p= strrchr(filename, '.')) == 0)
|
||||
p= filename + strlen(filename);
|
||||
|
||||
strncpy(p, ".dmp", path + MAX_PATH - p);
|
||||
|
||||
/* Create dump in current directory.*/
|
||||
const char *filename= strrchr(path, '\\');
|
||||
if (filename == 0)
|
||||
filename = path;
|
||||
else
|
||||
filename++;
|
||||
// Íf file with this name exist, generate unique name with .dmp extension
|
||||
if (GetFileAttributes(filename) != INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
if (!GetTempFileName(".", filename, 0, tmpname))
|
||||
{
|
||||
fprintf(stderr, "GetTempFileName failed, last error %u", GetLastError());
|
||||
goto exit;
|
||||
}
|
||||
strncat(tmpname, ".dmp", sizeof(tmpname));
|
||||
filename= tmpname;
|
||||
}
|
||||
|
||||
|
||||
if (!GetCurrentDirectory(MAX_PATH, working_dir))
|
||||
{
|
||||
fprintf(stderr, "GetCurrentDirectory failed, last error %u",GetLastError());
|
||||
fprintf(stderr, "GetCurrentDirectory failed, last error %u", GetLastError());
|
||||
goto exit;
|
||||
}
|
||||
|
||||
file = CreateFile(filename, GENERIC_READ | GENERIC_WRITE,
|
||||
file= CreateFile(filename, GENERIC_READ | GENERIC_WRITE,
|
||||
0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
|
||||
|
||||
if (file == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
fprintf(stderr,"safe_kill : CreateFile() failed for file %s, working dir %s, last error = %u\n",
|
||||
fprintf(stderr, "safe_kill : CreateFile() failed for file %s, working dir %s, last error = %u\n",
|
||||
filename, working_dir, GetLastError());
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!MiniDumpWriteDump(process, pid, file, MiniDumpNormal, 0,0,0))
|
||||
if (!MiniDumpWriteDump(process, pid, file, MiniDumpNormal, 0, 0, 0))
|
||||
{
|
||||
fprintf(stderr, "Failed to write minidump to %s, working dir %s, last error %u\n",
|
||||
filename, working_dir, GetLastError());
|
||||
goto exit;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
fprintf(stderr, "Minidump written to %s, directory %s\n", filename, working_dir);
|
||||
|
||||
exit:
|
||||
if(process!= 0 && process != INVALID_HANDLE_VALUE)
|
||||
if (process != 0 && process != INVALID_HANDLE_VALUE)
|
||||
CloseHandle(process);
|
||||
|
||||
if (file != 0 && file != INVALID_HANDLE_VALUE)
|
||||
CloseHandle(file);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static int create_dump(DWORD pid, int recursion_depth= 5)
|
||||
{
|
||||
if (recursion_depth < 0)
|
||||
return 0;
|
||||
|
||||
dump_single_process(pid);
|
||||
std::vector<DWORD> children= find_children(pid);
|
||||
for(size_t i=0; i < children.size(); i++)
|
||||
create_dump(children[i], recursion_depth -1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, const char** argv )
|
||||
{
|
||||
DWORD pid= -1;
|
||||
|
|
|
@ -1359,6 +1359,58 @@ rename table t2 to t1;
|
|||
execute stmt1;
|
||||
deallocate prepare stmt1;
|
||||
drop table t2;
|
||||
#
|
||||
# MDEV-8960 Can't refer the same column twice in one ALTER TABLE
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) DEFAULT CHARSET=utf8;
|
||||
ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL,
|
||||
ALTER COLUMN `consultant_id` DROP DEFAULT;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`consultant_id` int(11) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) DEFAULT CHARSET=utf8;
|
||||
ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL,
|
||||
ALTER COLUMN `consultant_id` SET DEFAULT 2;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`consultant_id` int(11) NOT NULL DEFAULT 2
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) DEFAULT CHARSET=utf8;
|
||||
ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2,
|
||||
ALTER COLUMN `consultant_id` DROP DEFAULT;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`consultant_id` int(11) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) DEFAULT CHARSET=utf8;
|
||||
ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2,
|
||||
ALTER COLUMN `consultant_id` DROP DEFAULT,
|
||||
MODIFY COLUMN `consultant_id` BIGINT;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`consultant_id` bigint(20) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
id INT(11) NOT NULL,
|
||||
x_param INT(11) DEFAULT NULL,
|
||||
|
@ -2125,59 +2177,7 @@ t1 CREATE TABLE `t1` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-8960 Can't refer the same column twice in one ALTER TABLE
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) DEFAULT CHARSET=utf8;
|
||||
ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL,
|
||||
ALTER COLUMN `consultant_id` DROP DEFAULT;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`consultant_id` int(11) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) DEFAULT CHARSET=utf8;
|
||||
ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL,
|
||||
ALTER COLUMN `consultant_id` SET DEFAULT 2;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`consultant_id` int(11) NOT NULL DEFAULT 2
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) DEFAULT CHARSET=utf8;
|
||||
ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2,
|
||||
ALTER COLUMN `consultant_id` DROP DEFAULT;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`consultant_id` int(11) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) DEFAULT CHARSET=utf8;
|
||||
ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2,
|
||||
ALTER COLUMN `consultant_id` DROP DEFAULT,
|
||||
MODIFY COLUMN `consultant_id` BIGINT;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`consultant_id` bigint(20) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Start of 10.1 tests
|
||||
# End of 10.0 tests
|
||||
#
|
||||
#
|
||||
# MDEV-7374 : Losing connection to MySQL while running ALTER TABLE
|
||||
|
@ -2201,6 +2201,9 @@ t1 CREATE TABLE `t1` (
|
|||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.1 tests
|
||||
#
|
||||
#
|
||||
# MDEV-10421 duplicate CHECK CONSTRAINTs
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT) engine=myisam;
|
||||
|
@ -2272,3 +2275,6 @@ t1 CREATE TABLE `t1` (
|
|||
`c` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
|
|
|
@ -228,6 +228,22 @@ a d
|
|||
3 11120436154190595086
|
||||
drop table t1, t2;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# Bug#19875294 ASSERTION `SRC' FAILED IN MY_STRNXFRM_UNICODE
|
||||
# (SIG 6 -STRINGS/CTYPE-UTF8.C:5151)
|
||||
#
|
||||
set @@sql_mode='';
|
||||
CREATE TABLE t1(c1 SET('','')CHARACTER SET ucs2);
|
||||
Warnings:
|
||||
Note 1291 Column 'c1' has duplicated value '' in SET
|
||||
INSERT INTO t1 VALUES(990101.102);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c1' at row 1
|
||||
SELECT COALESCE(c1)FROM t1 ORDER BY 1;
|
||||
COALESCE(c1)
|
||||
|
||||
DROP TABLE t1;
|
||||
set @@sql_mode=default;
|
||||
CREATE TABLE t1(a YEAR);
|
||||
SELECT 1 FROM t1 WHERE a=1 AND CASE 1 WHEN a THEN 1 ELSE 1 END;
|
||||
1
|
||||
|
|
|
@ -5078,6 +5078,24 @@ E05B
|
|||
DROP TABLE t1;
|
||||
# Start of ctype_E05C.inc
|
||||
#
|
||||
# MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant
|
||||
#
|
||||
SET NAMES latin1;
|
||||
CREATE TABLE t1 (a TEXT CHARACTER SET gbk);
|
||||
INSERT INTO t1 VALUES (0xEE5D);
|
||||
SELECT a<>0xEE5D AS a FROM t1;
|
||||
a
|
||||
0
|
||||
CREATE VIEW v1 AS SELECT a<>0xEE5D AS a FROM t1;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` <> 0xee5d AS `a` from `t1` latin1 latin1_swedish_ci
|
||||
SELECT * FROM v1;
|
||||
a
|
||||
0
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.0 tests
|
||||
#
|
||||
#
|
||||
|
|
|
@ -8005,6 +8005,24 @@ SELECT _latin1 0x7E, _latin1 X'7E', _latin1 B'01111110';
|
|||
_latin1 0x7E _latin1 X'7E' _latin1 B'01111110'
|
||||
~ ~ ~
|
||||
#
|
||||
# MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant
|
||||
#
|
||||
SET NAMES latin1;
|
||||
CREATE TABLE t1 (a TEXT CHARACTER SET latin1);
|
||||
INSERT INTO t1 VALUES (0xC0);
|
||||
SELECT a<>0xEE5D AS a FROM t1;
|
||||
a
|
||||
1
|
||||
CREATE VIEW v1 AS SELECT a<>0xC0 AS a FROM t1;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` <> 0xc0 AS `a` from `t1` latin1 latin1_swedish_ci
|
||||
SELECT * FROM v1;
|
||||
a
|
||||
0
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.0 tests
|
||||
#
|
||||
#
|
||||
|
|
|
@ -4564,6 +4564,38 @@ NO_ENGINE_SUBSTITUTION
|
|||
SET sql_mode=DEFAULT;
|
||||
SET NAMES utf8;
|
||||
#
|
||||
# MDEV-13972 crash in Item_func_sec_to_time::get_date
|
||||
#
|
||||
SELECT SEC_TO_TIME(CONVERT(900*24*60*60 USING ucs2));
|
||||
SEC_TO_TIME(CONVERT(900*24*60*60 USING ucs2))
|
||||
838:59:59.999999
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '77760000'
|
||||
#
|
||||
# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535
|
||||
#
|
||||
set sql_mode="";
|
||||
CREATE TABLE t1 (c1 VARCHAR(32766) CHARACTER SET ucs2);
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 varchar(32766) YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 VARCHAR(32767) CHARACTER SET ucs2);
|
||||
Warnings:
|
||||
Note 1246 Converting column 'c1' from VARCHAR to TEXT
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 text YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 VARCHAR(32768) CHARACTER SET ucs2);
|
||||
Warnings:
|
||||
Note 1246 Converting column 'c1' from VARCHAR to TEXT
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 mediumtext YES NULL
|
||||
DROP TABLE t1;
|
||||
set sql_mode=default;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
#
|
||||
|
|
|
@ -1680,6 +1680,23 @@ NO_ENGINE_SUBSTITUTION
|
|||
SET sql_mode=DEFAULT;
|
||||
SET NAMES utf8;
|
||||
#
|
||||
# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535
|
||||
#
|
||||
set sql_mode='';
|
||||
CREATE TABLE t1 (c1 VARCHAR(16383) CHARACTER SET utf32);
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 varchar(16383) YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 VARCHAR(16384) CHARACTER SET utf32);
|
||||
Warnings:
|
||||
Note 1246 Converting column 'c1' from VARCHAR to TEXT
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 mediumtext YES NULL
|
||||
DROP TABLE t1;
|
||||
set sql_mode=default;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
#
|
||||
|
|
|
@ -6278,6 +6278,30 @@ Warnings:
|
|||
SET sql_mode=DEFAULT;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535
|
||||
#
|
||||
SET sql_mode='';
|
||||
CREATE TABLE t1 (c1 VARCHAR(21844) CHARACTER SET utf8);
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 varchar(21844) YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 VARCHAR(21845) CHARACTER SET utf8);
|
||||
Warnings:
|
||||
Note 1246 Converting column 'c1' from VARCHAR to TEXT
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 text YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 VARCHAR(21846) CHARACTER SET utf8);
|
||||
Warnings:
|
||||
Note 1246 Converting column 'c1' from VARCHAR to TEXT
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 mediumtext YES NULL
|
||||
DROP TABLE t1;
|
||||
SET sql_mode=default;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
#
|
||||
|
|
|
@ -199,3 +199,15 @@ i
|
|||
2
|
||||
DROP PROCEDURE p1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-13776: DELETE ... RETURNING with sql_mode='ONLY_FULL_GROUP_BY'
|
||||
#
|
||||
set @sql_mode_save= @@sql_mode;
|
||||
set sql_mode='ONLY_FULL_GROUP_BY';
|
||||
CREATE TABLE t1 (id INT);
|
||||
INSERT INTO t1 VALUE(1),(2),(3);
|
||||
DELETE FROM t1 WHERE id > 2 RETURNING *;
|
||||
id
|
||||
3
|
||||
set sql_mode=@sql_mode_save;
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -27,7 +27,7 @@ create table t1 (a int(256));
|
|||
ERROR 42000: Display width out of range for 'a' (max = 255)
|
||||
set sql_mode='traditional';
|
||||
create table t1 (a varchar(66000));
|
||||
ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
|
||||
ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead
|
||||
set sql_mode=default;
|
||||
CREATE TABLE t1 (a INT);
|
||||
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
|
||||
|
|
|
@ -813,9 +813,17 @@ PREPARE s FROM "SELECT 1 FROM t1 WHERE 1 < ALL (SELECT @:= (1 IN (SELECT 1 FROM
|
|||
EXECUTE s;
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 5.3 tests
|
||||
#
|
||||
# Start of 10.0 tests
|
||||
create table t1 (a int);
|
||||
insert t1 values (1),(2),(3);
|
||||
select * from t1 where 1 in (a, name_const('a', null));
|
||||
a
|
||||
1
|
||||
drop table t1;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
#
|
||||
# MDEV-10020 InnoDB NOT IN Query Crash When One Item Is NULL
|
||||
|
@ -831,7 +839,7 @@ SELECT * FROM t1 WHERE b NOT IN (NULL, '', 'A');
|
|||
a b
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Start of 10.1 tests
|
||||
# End of 10.0 tests
|
||||
#
|
||||
#
|
||||
# MDEV-8755 Equal field propagation is not performed any longer for the IN list when multiple comparison types
|
||||
|
|
|
@ -885,32 +885,32 @@ SELECT 1 FROM dual WHERE ('Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,StrataCentral,
|
|||
1
|
||||
Warnings:
|
||||
Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp
|
||||
SELECT CONCAT(REPEAT('100,',133),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$';
|
||||
CONCAT(REPEAT('100,',133),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'
|
||||
SELECT CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$';
|
||||
CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'
|
||||
1
|
||||
SELECT CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$';
|
||||
CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'
|
||||
0
|
||||
Warnings:
|
||||
Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp
|
||||
SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$');
|
||||
REGEXP_INSTR(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')
|
||||
SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$');
|
||||
REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')
|
||||
1
|
||||
SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$');
|
||||
REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')
|
||||
0
|
||||
Warnings:
|
||||
Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp
|
||||
SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'));
|
||||
LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'))
|
||||
535
|
||||
SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'));
|
||||
LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'))
|
||||
243
|
||||
SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'));
|
||||
LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'))
|
||||
0
|
||||
Warnings:
|
||||
Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp
|
||||
SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''));
|
||||
LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''))
|
||||
SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''));
|
||||
LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''))
|
||||
0
|
||||
SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''));
|
||||
LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''))
|
||||
|
|
|
@ -2772,7 +2772,33 @@ SELECT 1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2;
|
|||
1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2
|
||||
3
|
||||
#
|
||||
# Start of 10.0 tests
|
||||
# MDEV-11819 NO_ZERO_IN_DATE: Incorrect generated column value
|
||||
#
|
||||
SET sql_mode='NO_ZERO_IN_DATE';
|
||||
CREATE TABLE t1 (a TIME(6));
|
||||
INSERT INTO t1 SELECT timediff(timestamp'2008-12-31 23:59:59.000001',timestamp'2008-12-30 01:01:01.000002');
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
46:58:57.999999
|
||||
DROP TABLE t1;
|
||||
SET sql_mode=DEFAULT;
|
||||
#
|
||||
# MDEV-13972 crash in Item_func_sec_to_time::get_date
|
||||
#
|
||||
DO TO_DAYS(SEC_TO_TIME(TIME(CEILING(UUID()))));
|
||||
DO TO_DAYS(SEC_TO_TIME(MAKEDATE('',RAND(~('')))));
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect time value: '20000101'
|
||||
SELECT SEC_TO_TIME(MAKEDATE(0,RAND(~0)));
|
||||
SEC_TO_TIME(MAKEDATE(0,RAND(~0)))
|
||||
838:59:59
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '20000101'
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
#
|
||||
# MDEV-8205 timediff returns null when comparing decimal time to time string value
|
||||
|
|
469
mysql-test/r/mdev13607.result
Normal file
469
mysql-test/r/mdev13607.result
Normal file
|
@ -0,0 +1,469 @@
|
|||
#
|
||||
# Bug mdev-13607: overflow of current_record_count
|
||||
#
|
||||
CREATE TABLE t1 (id INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES
|
||||
(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),
|
||||
(11),(12),(13),(14),(15),(16),(17),(18),(19),(20),
|
||||
(21),(22),(23),(24),(25),(26),(27),(28),(29),(30),
|
||||
(31),(32),(33),(34),(35),(36),(37),(38),(39),(40),
|
||||
(41),(42),(43),(44),(45),(46),(47),(48),(49),(50);
|
||||
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (1),(2);
|
||||
CREATE TABLE t3 (id INT) ENGINE=InnoDB;
|
||||
INSERT INTO t3 VALUES (1),(2);
|
||||
ANALYZE TABLE t1, t2, t3;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
test.t2 analyze status OK
|
||||
test.t3 analyze status OK
|
||||
explain SELECT * FROM
|
||||
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_1
|
||||
INNER JOIN
|
||||
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_2
|
||||
INNER JOIN
|
||||
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_3
|
||||
INNER JOIN
|
||||
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_4
|
||||
INNER JOIN
|
||||
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_5
|
||||
INNER JOIN
|
||||
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_6
|
||||
INNER JOIN
|
||||
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_7
|
||||
INNER JOIN
|
||||
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_8
|
||||
INNER JOIN
|
||||
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_9
|
||||
INNER JOIN
|
||||
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_10
|
||||
INNER JOIN
|
||||
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_11
|
||||
INNER JOIN
|
||||
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_12
|
||||
INNER JOIN
|
||||
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_13
|
||||
INNER JOIN
|
||||
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_14
|
||||
INNER JOIN
|
||||
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_15
|
||||
INNER JOIN
|
||||
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_16
|
||||
;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY r1 ALL NULL NULL NULL NULL 2
|
||||
1 PRIMARY d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
1 PRIMARY r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived3> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived4> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived5> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived6> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived7> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived8> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived9> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived10> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived11> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived12> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived13> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived14> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived15> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived16> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived17> ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join)
|
||||
17 DERIVED r1 ALL NULL NULL NULL NULL 2
|
||||
17 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
17 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED r1 ALL NULL NULL NULL NULL 2
|
||||
16 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
16 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
16 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED r1 ALL NULL NULL NULL NULL 2
|
||||
15 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
15 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
15 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED r1 ALL NULL NULL NULL NULL 2
|
||||
14 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
14 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
14 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED r1 ALL NULL NULL NULL NULL 2
|
||||
13 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
13 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
13 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED r1 ALL NULL NULL NULL NULL 2
|
||||
12 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
12 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
12 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED r1 ALL NULL NULL NULL NULL 2
|
||||
11 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
11 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
11 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED r1 ALL NULL NULL NULL NULL 2
|
||||
10 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
10 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
10 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED r1 ALL NULL NULL NULL NULL 2
|
||||
9 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
9 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
9 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED r1 ALL NULL NULL NULL NULL 2
|
||||
8 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
8 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
8 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED r1 ALL NULL NULL NULL NULL 2
|
||||
7 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
7 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
7 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED r1 ALL NULL NULL NULL NULL 2
|
||||
6 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
6 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
6 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED r1 ALL NULL NULL NULL NULL 2
|
||||
5 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
5 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
5 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED r1 ALL NULL NULL NULL NULL 2
|
||||
4 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
4 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED r1 ALL NULL NULL NULL NULL 2
|
||||
3 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
3 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
3 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
DROP TABLE t1,t2,t3;
|
|
@ -1717,8 +1717,16 @@ t1 CREATE TABLE `t1` (
|
|||
`v` mediumtext CHARACTER SET utf8 DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
set statement sql_mode='' for
|
||||
create table t1 (v varchar(65535));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
Warnings:
|
||||
Note 1246 Converting column 'v' from VARCHAR to TEXT
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`v` text DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
set storage_engine=MyISAM;
|
||||
set @save_concurrent_insert=@@concurrent_insert;
|
||||
set global concurrent_insert=1;
|
||||
|
|
|
@ -312,14 +312,18 @@ select * from t1 where a = 'bbbb';
|
|||
a
|
||||
bbbb
|
||||
drop table t1;
|
||||
set sql_mode='';
|
||||
create table t1 (a varchar(3070)) partition by key (a);
|
||||
ERROR HY000: The total length of the partitioning fields is too large
|
||||
create table t1 (a varchar(65532) not null) partition by key (a);
|
||||
ERROR HY000: The total length of the partitioning fields is too large
|
||||
create table t1 (a varchar(65533)) partition by key (a);
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
ERROR HY000: A BLOB field is not allowed in partition function
|
||||
create table t1 (a varchar(65534) not null) partition by key (a);
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
ERROR HY000: A BLOB field is not allowed in partition function
|
||||
create table t1 (a varchar(65535)) partition by key (a);
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
ERROR HY000: A BLOB field is not allowed in partition function
|
||||
set sql_mode=default;
|
||||
create table t1 (a bit(27), primary key (a)) engine=myisam
|
||||
partition by hash (a)
|
||||
(partition p0, partition p1, partition p2);
|
||||
|
|
|
@ -4202,6 +4202,149 @@ Warnings:
|
|||
Note 1003 /* select#1 */ select `test`.`t1`.`id` AS `id`,`test`.`t1`.`c` AS `c` from `test`.`t1` where 0
|
||||
deallocate prepare stmt2;
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-9208: Function->Function->View = Mysqld segfault
|
||||
# (Server crashes in Dependency_marker::visit_field on 2nd
|
||||
# execution with merged subquery)
|
||||
#
|
||||
CREATE TABLE t1 (i1 INT);
|
||||
insert into t1 values(1),(2);
|
||||
CREATE TABLE t2 (i2 INT);
|
||||
insert into t2 values(1),(2);
|
||||
prepare stmt from "
|
||||
select 1 from (
|
||||
select
|
||||
if (i1<0, 0, 0) as f1,
|
||||
(select f1) as f2
|
||||
from t1, t2
|
||||
) sq
|
||||
";
|
||||
execute stmt;
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
execute stmt;
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
drop table t1,t2;
|
||||
#
|
||||
# MDEV-9619: Assertion `null_ref_table' failed in virtual
|
||||
# table_map Item_direct_view_ref::used_tables() const on 2nd
|
||||
# execution of PS
|
||||
#
|
||||
CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=MyISAM;
|
||||
CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1;
|
||||
INSERT INTO t1 VALUES ('a'),('b');
|
||||
CREATE TABLE t2 (f2 VARCHAR(10)) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES ('c'),('d');
|
||||
PREPARE stmt FROM "SELECT * FROM v1 WHERE f1 = SOME ( SELECT f2 FROM t2 )";
|
||||
EXECUTE stmt;
|
||||
f1
|
||||
EXECUTE stmt;
|
||||
f1
|
||||
insert into t1 values ('c');
|
||||
EXECUTE stmt;
|
||||
f1
|
||||
c
|
||||
EXECUTE stmt;
|
||||
f1
|
||||
c
|
||||
deallocate prepare stmt;
|
||||
drop view v1;
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=MyISAM;
|
||||
CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1;
|
||||
INSERT INTO t1 VALUES ('a'),('b');
|
||||
CREATE TABLE t2 (f2 VARCHAR(10)) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES ('c'),('d');
|
||||
PREPARE stmt FROM "SELECT * FROM v1 WHERE (f1,f1) = SOME ( SELECT f2,f2 FROM t2 )";
|
||||
EXECUTE stmt;
|
||||
f1
|
||||
EXECUTE stmt;
|
||||
f1
|
||||
insert into t1 values ('c');
|
||||
EXECUTE stmt;
|
||||
f1
|
||||
c
|
||||
EXECUTE stmt;
|
||||
f1
|
||||
c
|
||||
deallocate prepare stmt;
|
||||
drop view v1;
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1 (column1 INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (3),(9);
|
||||
CREATE TABLE t2 (column2 INT) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES (1),(4);
|
||||
CREATE TABLE t3 (column3 INT) ENGINE=MyISAM;
|
||||
INSERT INTO t3 VALUES (6),(8);
|
||||
CREATE TABLE t4 (column4 INT) ENGINE=MyISAM;
|
||||
INSERT INTO t4 VALUES (2),(5);
|
||||
PREPARE stmt FROM "
|
||||
SELECT (
|
||||
SELECT MAX( table1.column1 ) AS field1
|
||||
FROM t1 AS table1
|
||||
WHERE (111,table3.column3) IN ( SELECT 111,table2.column2 AS field2 FROM t2 AS table2 )
|
||||
) AS sq
|
||||
FROM t3 AS table3, t4 AS table4 GROUP BY sq
|
||||
";
|
||||
EXECUTE stmt;
|
||||
sq
|
||||
NULL
|
||||
EXECUTE stmt;
|
||||
sq
|
||||
NULL
|
||||
deallocate prepare stmt;
|
||||
drop table t1,t2,t3,t4;
|
||||
create table t1 (a int, b int, c int);
|
||||
create table t2 (x int, y int, z int);
|
||||
create table t3 as select * from t1;
|
||||
insert into t1 values (1,2,3),(4,5,6),(100,200,300),(400,500,600);
|
||||
insert into t2 values (1,2,3),(7,8,9),(100,200,300),(400,500,600);
|
||||
insert into t3 values (1,2,3),(11,12,13),(100,0,0),(400,500,600);
|
||||
set @optimizer_switch_save=@@optimizer_switch;
|
||||
set @join_cache_level_save=@@join_cache_level;
|
||||
set optimizer_switch='materialization=off';
|
||||
set join_cache_level=0;
|
||||
select * from t1 where (select a,b from t3 where t3.c=t1.c) in (select x,y from t2 where t1.c= t2.z);
|
||||
a b c
|
||||
1 2 3
|
||||
400 500 600
|
||||
prepare stmt from "select * from t1 where (select a,b from t3 where t3.c=t1.c) in (select x,y from t2 where t1.c= t2.z)";
|
||||
EXECUTE stmt;
|
||||
a b c
|
||||
1 2 3
|
||||
400 500 600
|
||||
EXECUTE stmt;
|
||||
a b c
|
||||
1 2 3
|
||||
400 500 600
|
||||
create view v1 as select * from t1;
|
||||
create view v2 as select * from t2;
|
||||
create view v3 as select * from t3;
|
||||
select * from v1 where (select a,b from v3 where v3.c=v1.c) in (select x,y from v2 where v1.c= v2.z);
|
||||
a b c
|
||||
1 2 3
|
||||
400 500 600
|
||||
prepare stmt from "select * from v1 where (select a,b from v3 where v3.c=v1.c) in (select x,y from v2 where v1.c= v2.z)";
|
||||
EXECUTE stmt;
|
||||
a b c
|
||||
1 2 3
|
||||
400 500 600
|
||||
EXECUTE stmt;
|
||||
a b c
|
||||
1 2 3
|
||||
400 500 600
|
||||
set optimizer_switch=@optimizer_switch_save;
|
||||
set join_cache_level=@join_cache_level_save;
|
||||
deallocate prepare stmt;
|
||||
drop view v1,v2,v3;
|
||||
drop table t1,t2,t3;
|
||||
# End of 5.5 tests
|
||||
#
|
||||
# Start of 10.2 tests
|
||||
|
|
|
@ -1807,4 +1807,85 @@ id state capital
|
|||
7 Pennsylvania Harrisburg
|
||||
8 Virginia Richmond
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# mdev-11574: do not build index merge of two indexes when
|
||||
# one index is an infix of the other index
|
||||
#
|
||||
set names utf8;
|
||||
CREATE DATABASE world;
|
||||
use world;
|
||||
CREATE TABLE Country (
|
||||
Code char(3) NOT NULL default '',
|
||||
Name char(52) NOT NULL default '',
|
||||
SurfaceArea float(10,2) NOT NULL default '0.00',
|
||||
Population int(11) NOT NULL default '0',
|
||||
Capital int(11) default NULL,
|
||||
PRIMARY KEY (Code),
|
||||
UNIQUE INDEX (Name)
|
||||
);
|
||||
CREATE TABLE City (
|
||||
ID int(11) NOT NULL auto_increment,
|
||||
Name char(35) NOT NULL default '',
|
||||
Country char(3) NOT NULL default '',
|
||||
Population int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (ID),
|
||||
INDEX (Population),
|
||||
INDEX (Country)
|
||||
);
|
||||
CREATE TABLE CountryLanguage (
|
||||
Country char(3) NOT NULL default '',
|
||||
Language char(30) NOT NULL default '',
|
||||
Percentage float(3,1) NOT NULL default '0.0',
|
||||
PRIMARY KEY (Country, Language),
|
||||
INDEX (Percentage)
|
||||
);
|
||||
DROP INDEX Country ON City;
|
||||
CREATE INDEX CountryName ON City(Country,Name);
|
||||
CREATE INDEX Name ON City(Name);
|
||||
select * from City
|
||||
where
|
||||
Country='FIN' AND Name IN ('Lahti','Imatra') OR
|
||||
Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR
|
||||
Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR
|
||||
Country='DEU' AND Name IN ('Berlin', 'Bonn') OR
|
||||
Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR
|
||||
Country='PRT' AND Name IN ('Braga', 'Porto') OR
|
||||
Country='FRA' AND Name IN ('Paris', 'Marcel') OR
|
||||
Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR
|
||||
Country='NOR' AND Name IN ('Oslo', 'Bergen') OR
|
||||
Country='ITA' AND Name IN ('Napoli', 'Venezia');
|
||||
ID Name Country Population
|
||||
175 Antwerpen BEL 446525
|
||||
176 Gent BEL 224180
|
||||
3068 Berlin DEU 3386667
|
||||
3087 Bonn DEU 301048
|
||||
3242 Lahti FIN 96921
|
||||
2974 Paris FRA 2125246
|
||||
1466 Napoli ITA 1002619
|
||||
1474 Venezia ITA 277305
|
||||
2808 Bergen NOR 230948
|
||||
2807 Oslo NOR 508726
|
||||
2928 Warszawa POL 1615369
|
||||
2931 Wroclaw POL 636765
|
||||
2918 Braga PRT 90535
|
||||
2915 Porto PRT 273060
|
||||
3580 Moscow RUS 8389200
|
||||
3581 St Petersburg RUS 4694000
|
||||
3048 Stockholm SWE 750348
|
||||
3051 Uppsala SWE 189569
|
||||
explain select * from City
|
||||
where
|
||||
Country='FIN' AND Name IN ('Lahti','Imatra') OR
|
||||
Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR
|
||||
Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR
|
||||
Country='DEU' AND Name IN ('Berlin', 'Bonn') OR
|
||||
Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR
|
||||
Country='PRT' AND Name IN ('Braga', 'Porto') OR
|
||||
Country='FRA' AND Name IN ('Paris', 'Marcel') OR
|
||||
Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR
|
||||
Country='NOR' AND Name IN ('Oslo', 'Bergen') OR
|
||||
Country='ITA' AND Name IN ('Napoli', 'Venezia');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City range CountryName,Name CountryName 38 NULL 22 Using index condition; Using where
|
||||
DROP DATABASE world;
|
||||
set session optimizer_switch='index_merge_sort_intersection=default';
|
||||
|
|
|
@ -1808,5 +1808,86 @@ id state capital
|
|||
7 Pennsylvania Harrisburg
|
||||
8 Virginia Richmond
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# mdev-11574: do not build index merge of two indexes when
|
||||
# one index is an infix of the other index
|
||||
#
|
||||
set names utf8;
|
||||
CREATE DATABASE world;
|
||||
use world;
|
||||
CREATE TABLE Country (
|
||||
Code char(3) NOT NULL default '',
|
||||
Name char(52) NOT NULL default '',
|
||||
SurfaceArea float(10,2) NOT NULL default '0.00',
|
||||
Population int(11) NOT NULL default '0',
|
||||
Capital int(11) default NULL,
|
||||
PRIMARY KEY (Code),
|
||||
UNIQUE INDEX (Name)
|
||||
);
|
||||
CREATE TABLE City (
|
||||
ID int(11) NOT NULL auto_increment,
|
||||
Name char(35) NOT NULL default '',
|
||||
Country char(3) NOT NULL default '',
|
||||
Population int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (ID),
|
||||
INDEX (Population),
|
||||
INDEX (Country)
|
||||
);
|
||||
CREATE TABLE CountryLanguage (
|
||||
Country char(3) NOT NULL default '',
|
||||
Language char(30) NOT NULL default '',
|
||||
Percentage float(3,1) NOT NULL default '0.0',
|
||||
PRIMARY KEY (Country, Language),
|
||||
INDEX (Percentage)
|
||||
);
|
||||
DROP INDEX Country ON City;
|
||||
CREATE INDEX CountryName ON City(Country,Name);
|
||||
CREATE INDEX Name ON City(Name);
|
||||
select * from City
|
||||
where
|
||||
Country='FIN' AND Name IN ('Lahti','Imatra') OR
|
||||
Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR
|
||||
Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR
|
||||
Country='DEU' AND Name IN ('Berlin', 'Bonn') OR
|
||||
Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR
|
||||
Country='PRT' AND Name IN ('Braga', 'Porto') OR
|
||||
Country='FRA' AND Name IN ('Paris', 'Marcel') OR
|
||||
Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR
|
||||
Country='NOR' AND Name IN ('Oslo', 'Bergen') OR
|
||||
Country='ITA' AND Name IN ('Napoli', 'Venezia');
|
||||
ID Name Country Population
|
||||
175 Antwerpen BEL 446525
|
||||
176 Gent BEL 224180
|
||||
3068 Berlin DEU 3386667
|
||||
3087 Bonn DEU 301048
|
||||
3242 Lahti FIN 96921
|
||||
2974 Paris FRA 2125246
|
||||
1466 Napoli ITA 1002619
|
||||
1474 Venezia ITA 277305
|
||||
2808 Bergen NOR 230948
|
||||
2807 Oslo NOR 508726
|
||||
2928 Warszawa POL 1615369
|
||||
2931 Wroclaw POL 636765
|
||||
2918 Braga PRT 90535
|
||||
2915 Porto PRT 273060
|
||||
3580 Moscow RUS 8389200
|
||||
3581 St Petersburg RUS 4694000
|
||||
3048 Stockholm SWE 750348
|
||||
3051 Uppsala SWE 189569
|
||||
explain select * from City
|
||||
where
|
||||
Country='FIN' AND Name IN ('Lahti','Imatra') OR
|
||||
Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR
|
||||
Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR
|
||||
Country='DEU' AND Name IN ('Berlin', 'Bonn') OR
|
||||
Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR
|
||||
Country='PRT' AND Name IN ('Braga', 'Porto') OR
|
||||
Country='FRA' AND Name IN ('Paris', 'Marcel') OR
|
||||
Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR
|
||||
Country='NOR' AND Name IN ('Oslo', 'Bergen') OR
|
||||
Country='ITA' AND Name IN ('Napoli', 'Venezia');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City range CountryName,Name CountryName 38 NULL 20 Using index condition; Using where
|
||||
DROP DATABASE world;
|
||||
set session optimizer_switch='index_merge_sort_intersection=default';
|
||||
SET SESSION STORAGE_ENGINE=DEFAULT;
|
||||
|
|
|
@ -51,6 +51,9 @@ delete t1 from t1,t3 where t1.a=t3.a;
|
|||
drop table t1;
|
||||
insert into t1 values(1);
|
||||
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
|
||||
drop temporary table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 'test.t1'
|
||||
connection default;
|
||||
set global read_only=0;
|
||||
lock table t1 write;
|
||||
|
|
|
@ -972,7 +972,7 @@ def information_schema COLUMNS COLUMNS TABLE_CATALOG TABLE_CATALOG 253 1536 3 N
|
|||
def information_schema COLUMNS COLUMNS TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 1 0 33
|
||||
def information_schema COLUMNS COLUMNS TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33
|
||||
def information_schema COLUMNS COLUMNS COLUMN_NAME COLUMN_NAME 253 192 1 N 1 0 33
|
||||
def information_schema COLUMNS COLUMNS COLUMN_DEFAULT COLUMN_DEFAULT 252 589815 0 Y 16 0 33
|
||||
def information_schema COLUMNS COLUMNS COLUMN_DEFAULT COLUMN_DEFAULT 252 589788 0 Y 16 0 33
|
||||
def information_schema COLUMNS COLUMNS IS_NULLABLE IS_NULLABLE 253 9 2 N 1 0 33
|
||||
def information_schema COLUMNS COLUMNS DATA_TYPE DATA_TYPE 253 192 3 N 1 0 33
|
||||
def information_schema COLUMNS COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253 96 0 Y 0 0 33
|
||||
|
@ -997,7 +997,7 @@ def information_schema COLUMNS COLUMNS COLUMN_NAME Field 253 192 1 N 1 0 33
|
|||
def information_schema COLUMNS COLUMNS COLUMN_TYPE Type 252 589815 7 N 17 0 33
|
||||
def information_schema COLUMNS COLUMNS IS_NULLABLE Null 253 9 2 N 1 0 33
|
||||
def information_schema COLUMNS COLUMNS COLUMN_KEY Key 253 9 3 N 1 0 33
|
||||
def information_schema COLUMNS COLUMNS COLUMN_DEFAULT Default 252 589815 0 Y 16 0 33
|
||||
def information_schema COLUMNS COLUMNS COLUMN_DEFAULT Default 252 589788 0 Y 16 0 33
|
||||
def information_schema COLUMNS COLUMNS EXTRA Extra 253 90 0 N 1 0 33
|
||||
Field Type Null Key Default Extra
|
||||
c int(11) NO PRI NULL
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
create function f() returns int return 1;
|
||||
show function status;
|
||||
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
|
||||
T f T T T T T T T T T
|
||||
set sql_mode = 'PAD_CHAR_TO_FULL_LENGTH';
|
||||
show function status;
|
||||
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
|
||||
T f T T T T T T T T T
|
||||
drop function f;
|
||||
select @@sql_mode;
|
||||
@@sql_mode
|
||||
PAD_CHAR_TO_FULL_LENGTH
|
||||
create function f() returns int return 1;
|
||||
select ROUTINE_NAME from information_schema.ROUTINES where ROUTINE_NAME='f';
|
||||
ROUTINE_NAME
|
||||
f
|
||||
set sql_mode = 'PAD_CHAR_TO_FULL_LENGTH';
|
||||
select ROUTINE_NAME from information_schema.ROUTINES where ROUTINE_NAME='f';
|
||||
ROUTINE_NAME
|
||||
f
|
||||
drop function f;
|
||||
select @@sql_mode;
|
||||
@@sql_mode
|
||||
PAD_CHAR_TO_FULL_LENGTH
|
|
@ -1240,9 +1240,9 @@ Warning 1364 Field 'i' doesn't have a default value
|
|||
DROP TABLE t1;
|
||||
set @@sql_mode='traditional';
|
||||
create table t1(a varchar(65537));
|
||||
ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
|
||||
ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead
|
||||
create table t1(a varbinary(65537));
|
||||
ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
|
||||
ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead
|
||||
set @@sql_mode='traditional';
|
||||
create table t1(a int, b date not null);
|
||||
alter table t1 modify a bigint unsigned not null;
|
||||
|
|
|
@ -502,3 +502,20 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 PRIMARY t1 index idx idx 5 NULL 5 Using where; Using index
|
||||
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-13135: subquery with ON expression subject to
|
||||
# semi-join optimizations
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE ALGORITHM=MERGE VIEW v1 AS SELECT a AS v_a FROM t1;
|
||||
INSERT INTO t1 VALUES (1),(3);
|
||||
CREATE TABLE t2 (b INT, KEY(b));
|
||||
INSERT INTO t2 VALUES (3),(4);
|
||||
SELECT * FROM t1 WHERE a NOT IN (
|
||||
SELECT b FROM t2 INNER JOIN v1 ON (b IN ( SELECT a FROM t1 ))
|
||||
WHERE v_a = b
|
||||
);
|
||||
a
|
||||
1
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1,t2;
|
||||
|
|
|
@ -513,7 +513,80 @@ Warning 1292 Truncated incorrect DOUBLE value: 's '
|
|||
Warning 1292 Truncated incorrect DOUBLE value: ' '
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Start of 10.0 tests
|
||||
# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535
|
||||
#
|
||||
set sql_mode='';
|
||||
CREATE TABLE t1 (c1 VARBINARY(65532));
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 varbinary(65532) YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 VARBINARY(65533));
|
||||
Warnings:
|
||||
Note 1246 Converting column 'c1' from VARBINARY to BLOB
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 blob YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 VARBINARY(65534));
|
||||
Warnings:
|
||||
Note 1246 Converting column 'c1' from VARBINARY to BLOB
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 blob YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 VARBINARY(65535));
|
||||
Warnings:
|
||||
Note 1246 Converting column 'c1' from VARBINARY to BLOB
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 blob YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 VARBINARY(65536));
|
||||
Warnings:
|
||||
Note 1246 Converting column 'c1' from VARBINARY to BLOB
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 mediumblob YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 VARCHAR(65532));
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 varchar(65532) YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 VARCHAR(65533));
|
||||
Warnings:
|
||||
Note 1246 Converting column 'c1' from VARCHAR to TEXT
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 text YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 VARCHAR(65534));
|
||||
Warnings:
|
||||
Note 1246 Converting column 'c1' from VARCHAR to TEXT
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 text YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 VARCHAR(65535));
|
||||
Warnings:
|
||||
Note 1246 Converting column 'c1' from VARCHAR to TEXT
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 text YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 VARCHAR(65536));
|
||||
Warnings:
|
||||
Note 1246 Converting column 'c1' from VARCHAR to TEXT
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
c1 mediumtext YES NULL
|
||||
DROP TABLE t1;
|
||||
set sql_mode=default;
|
||||
CREATE TABLE t1 (c1 VARCHAR(65536));
|
||||
ERROR 42000: Column length too big for column 'c1' (max = 65532); use BLOB or TEXT instead
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
#
|
||||
# MDEV-6950 Bad results with joins comparing DATE and INT/ENUM/VARCHAR columns
|
||||
|
|
|
@ -259,10 +259,12 @@ END;
|
|||
/
|
||||
CALL p2(65535);
|
||||
LENGTH(f1(str,padlen))
|
||||
65535
|
||||
65532
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'pin' at row 1
|
||||
CALL p2(65536);
|
||||
LENGTH(f1(str,padlen))
|
||||
65535
|
||||
65532
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'pin' at row 1
|
||||
DROP PROCEDURE p2;
|
||||
|
@ -288,8 +290,7 @@ CALL p2(21844);
|
|||
length(pout)
|
||||
21844
|
||||
CALL p2(21845);
|
||||
length(pout)
|
||||
21845
|
||||
ERROR 22001: Data too long for column 'pin' at row 1
|
||||
CALL p2(21846);
|
||||
ERROR 22001: Data too long for column 'pin' at row 1
|
||||
DROP PROCEDURE p2;
|
||||
|
@ -311,9 +312,11 @@ p1(pout,str);
|
|||
SELECT length(pout);
|
||||
END;
|
||||
/
|
||||
CALL p2(21845);
|
||||
CALL p2(21844);
|
||||
length(pout)
|
||||
21845
|
||||
21844
|
||||
CALL p2(21845);
|
||||
ERROR 22001: Data too long for column 'pin' at row 1
|
||||
CALL p2(21846);
|
||||
ERROR 22001: Data too long for column 'pin' at row 1
|
||||
DROP PROCEDURE p2;
|
||||
|
@ -332,9 +335,15 @@ BEGIN
|
|||
SELECT LENGTH(f1(str,padlen));
|
||||
END;
|
||||
/
|
||||
CALL p2(65535);
|
||||
CALL p2(65532);
|
||||
LENGTH(f1(str,padlen))
|
||||
65535
|
||||
65532
|
||||
CALL p2(65533);
|
||||
ERROR 22001: Data too long for column 'pin' at row 1
|
||||
CALL p2(65534);
|
||||
ERROR 22001: Data too long for column 'pin' at row 1
|
||||
CALL p2(65535);
|
||||
ERROR 22001: Data too long for column 'pin' at row 1
|
||||
CALL p2(65536);
|
||||
ERROR 22001: Data too long for column 'pin' at row 1
|
||||
DROP PROCEDURE p2;
|
||||
|
@ -353,9 +362,11 @@ BEGIN
|
|||
SELECT LENGTH(f1(str,padlen));
|
||||
END;
|
||||
/
|
||||
CALL p2(21845);
|
||||
CALL p2(21844);
|
||||
LENGTH(f1(str,padlen))
|
||||
21845
|
||||
21844
|
||||
CALL p2(21845);
|
||||
ERROR 22001: Data too long for column 'pin' at row 1
|
||||
CALL p2(21846);
|
||||
ERROR 22001: Data too long for column 'pin' at row 1
|
||||
DROP PROCEDURE p2;
|
||||
|
@ -374,9 +385,11 @@ BEGIN
|
|||
SELECT LENGTH(f1(str,padlen));
|
||||
END;
|
||||
/
|
||||
CALL p2(21845);
|
||||
CALL p2(21844);
|
||||
LENGTH(f1(str,padlen))
|
||||
21845
|
||||
21844
|
||||
CALL p2(21845);
|
||||
ERROR 22001: Data too long for column 'pin' at row 1
|
||||
CALL p2(21846);
|
||||
ERROR 22001: Data too long for column 'pin' at row 1
|
||||
DROP PROCEDURE p2;
|
||||
|
@ -395,9 +408,15 @@ BEGIN
|
|||
SELECT LENGTH(f1(str,padlen));
|
||||
END;
|
||||
/
|
||||
CALL p2(65535);
|
||||
CALL p2(65532);
|
||||
LENGTH(f1(str,padlen))
|
||||
65535
|
||||
65532
|
||||
CALL p2(65533);
|
||||
ERROR 22001: Data too long for column 'pin' at row 1
|
||||
CALL p2(65534);
|
||||
ERROR 22001: Data too long for column 'pin' at row 1
|
||||
CALL p2(65535);
|
||||
ERROR 22001: Data too long for column 'pin' at row 1
|
||||
CALL p2(65536);
|
||||
ERROR 22001: Data too long for column 'pin' at row 1
|
||||
DROP PROCEDURE p2;
|
||||
|
|
|
@ -199,6 +199,7 @@ END;
|
|||
/
|
||||
DELIMITER ;/
|
||||
CALL p2(21844);
|
||||
--error ER_DATA_TOO_LONG
|
||||
CALL p2(21845);
|
||||
--error ER_DATA_TOO_LONG
|
||||
CALL p2(21846);
|
||||
|
@ -229,6 +230,8 @@ BEGIN
|
|||
END;
|
||||
/
|
||||
DELIMITER ;/
|
||||
CALL p2(21844);
|
||||
--error ER_DATA_TOO_LONG
|
||||
CALL p2(21845);
|
||||
--error ER_DATA_TOO_LONG
|
||||
CALL p2(21846);
|
||||
|
@ -256,6 +259,12 @@ BEGIN
|
|||
END;
|
||||
/
|
||||
DELIMITER ;/
|
||||
CALL p2(65532);
|
||||
--error ER_DATA_TOO_LONG
|
||||
CALL p2(65533);
|
||||
--error ER_DATA_TOO_LONG
|
||||
CALL p2(65534);
|
||||
--error ER_DATA_TOO_LONG
|
||||
CALL p2(65535);
|
||||
--error ER_DATA_TOO_LONG
|
||||
CALL p2(65536);
|
||||
|
@ -283,6 +292,8 @@ BEGIN
|
|||
END;
|
||||
/
|
||||
DELIMITER ;/
|
||||
CALL p2(21844);
|
||||
--error ER_DATA_TOO_LONG
|
||||
CALL p2(21845);
|
||||
--error ER_DATA_TOO_LONG
|
||||
CALL p2(21846);
|
||||
|
@ -310,6 +321,8 @@ BEGIN
|
|||
END;
|
||||
/
|
||||
DELIMITER ;/
|
||||
CALL p2(21844);
|
||||
--error ER_DATA_TOO_LONG
|
||||
CALL p2(21845);
|
||||
--error ER_DATA_TOO_LONG
|
||||
CALL p2(21846);
|
||||
|
@ -337,6 +350,12 @@ BEGIN
|
|||
END;
|
||||
/
|
||||
DELIMITER ;/
|
||||
CALL p2(65532);
|
||||
--error ER_DATA_TOO_LONG
|
||||
CALL p2(65533);
|
||||
--error ER_DATA_TOO_LONG
|
||||
CALL p2(65534);
|
||||
--error ER_DATA_TOO_LONG
|
||||
CALL p2(65535);
|
||||
--error ER_DATA_TOO_LONG
|
||||
CALL p2(65536);
|
||||
|
|
|
@ -14,6 +14,9 @@ wsrep-causal-reads=ON
|
|||
wsrep-sync-wait=15
|
||||
|
||||
[mysqld.1]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-cluster-address='gcomm://'
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
|
||||
|
||||
|
|
|
@ -10,5 +10,4 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
innodb-wl5980-alter : MDEV-9469 / MDEV-13668 extra crash in 10.2
|
||||
create-index-debug : MDEV-13680 InnoDB may crash when btr_page_alloc() fails
|
||||
|
|
|
@ -11,3 +11,14 @@ t1 CREATE TABLE `t1` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
|
||||
drop table t1;
|
||||
set @@sql_mode=default;
|
||||
create table t1 (
|
||||
id1 int(11) not null auto_increment,
|
||||
id2 varchar(30) not null,
|
||||
id3 datetime not null default current_timestamp,
|
||||
primary key (id1),
|
||||
unique key unique_id2 (id2)
|
||||
) engine=innodb;
|
||||
alter table t1 change column id2 id4 varchar(100) not null;
|
||||
select * from t1 where id4 like 'a';
|
||||
id1 id4 id3
|
||||
drop table t1;
|
||||
|
|
|
@ -332,9 +332,10 @@ CREATE INDEX t1e ON t1 (e(767));
|
|||
UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
|
||||
k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
|
||||
CREATE INDEX t1f ON t1 (f(767));
|
||||
BEGIN;
|
||||
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
|
||||
k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
|
||||
ERROR HY000: Undo log record is too big
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
|
||||
UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
|
||||
|
@ -367,8 +368,9 @@ UPDATE t1 SET r=@e;
|
|||
CREATE INDEX t1s ON t1 (s(767));
|
||||
UPDATE t1 SET s=@e;
|
||||
CREATE INDEX t1t ON t1 (t(767));
|
||||
BEGIN;
|
||||
UPDATE t1 SET t=@e;
|
||||
ERROR HY000: Undo log record is too big
|
||||
ROLLBACK;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
@ -537,11 +539,11 @@ PRIMARY KEY (b(10), a), INDEX (c(767)), INDEX(b(767))
|
|||
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
INSERT INTO bug12547647 VALUES (5,REPEAT('khdfo5AlOq',1900),REPEAT('g',7751));
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
UPDATE bug12547647 SET c = REPEAT('b',16928);
|
||||
ERROR HY000: Undo log record is too big
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1713 Undo log record is too big
|
||||
ROLLBACK;
|
||||
DROP TABLE bug12547647;
|
||||
SET SESSION innodb_strict_mode = on;
|
||||
CREATE TABLE t1(
|
||||
|
|
|
@ -223,13 +223,14 @@ aa=@c,ba=@c,ca=@c,da=@c,ea=@c,fa=@c,ga=@c,ha=@c,ia=@c,ja=@c,
|
|||
ka=@c,la=@c,ma=@c,na=@c,oa=@c,pa=@c,qa=@c,ra=@c,sa=@c,ta=@c,ua=@c,
|
||||
va=@c,wa=@c,xa=@c,ya=@c,za=@c;
|
||||
CREATE INDEX t1f17 ON t1 (v(767));
|
||||
BEGIN;
|
||||
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
|
||||
k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d,
|
||||
v=@d,w=@d,x=@d,y=@d,z=@d,
|
||||
aa=@d,ba=@d,ca=@d,da=@d,ea=@d,fa=@d,ga=@d,ha=@d,ia=@d,ja=@d,
|
||||
ka=@d,la=@d,ma=@d,na=@d,oa=@d,pa=@d,qa=@d,ra=@d,sa=@d,ta=@d,ua=@d,
|
||||
va=@d,wa=@d,xa=@d,ya=@d,za=@d;
|
||||
ERROR HY000: Undo log record is too big
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
|
||||
UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d;
|
||||
|
|
|
@ -258,6 +258,7 @@ kc=@c,lc=@c,mc=@c,nc=@c,oc=@c,pc=@c,qc=@c,rc=@c,sc=@c,tc=@c,uc=@c,
|
|||
vc=@c,wc=@c,xc=@c,yc=@c,zc=@c;
|
||||
COMMIT;
|
||||
CREATE INDEX tg1f2 ON t1 (ia(767),ja(767));
|
||||
BEGIN;
|
||||
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
|
||||
k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d,
|
||||
v=@d,w=@d,x=@d,y=@d,z=@d,
|
||||
|
@ -270,7 +271,7 @@ vb=@d,wb=@d,xb=@d,yb=@d,zb=@d,
|
|||
ac=@d,bc=@d,cc=@d,dc=@d,ec=@d,fc=@d,gc=@d,hc=@d,ic=@d,jc=@d,
|
||||
kc=@d,lc=@d,mc=@d,nc=@d,oc=@d,pc=@d,qc=@d,rc=@d,sc=@d,tc=@d,uc=@d,
|
||||
vc=@d,wc=@d,xc=@d,yc=@d,zc=@d;
|
||||
ERROR HY000: Undo log record is too big
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
|
||||
UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d;
|
||||
|
|
|
@ -185,3 +185,44 @@ ticket CREATE TABLE `ticket` (
|
|||
KEY `org_id` (`org_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE ticket;
|
||||
CREATE TABLE t (
|
||||
id bigint(20) unsigned NOT NULL auto_increment,
|
||||
d date NOT NULL,
|
||||
a bigint(20) unsigned NOT NULL,
|
||||
b smallint(5) unsigned DEFAULT NULL,
|
||||
PRIMARY KEY (id,d)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs STATS_SAMPLE_PAGES=2
|
||||
PARTITION BY RANGE COLUMNS(d)
|
||||
(
|
||||
PARTITION p20170914 VALUES LESS THAN ('2017-09-15') ENGINE = InnoDB,
|
||||
PARTITION p99991231 VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB);
|
||||
insert into t(d,a,b) values ('2017-09-15',rand()*10000,rand()*10);
|
||||
insert into t(d,a,b) values ('2017-09-15',rand()*10000,rand()*10);
|
||||
replace into t(d,a,b) select '2017-09-15',rand()*10000,rand()*10 from t t1, t t2, t t3, t t4;
|
||||
select count(*) from t where d ='2017-09-15';
|
||||
count(*)
|
||||
18
|
||||
ALTER TABLE t CHANGE b c smallint(5) unsigned , ADD KEY idx_d_a (d, a);
|
||||
SHOW CREATE TABLE t;
|
||||
Table Create Table
|
||||
t CREATE TABLE `t` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`d` date NOT NULL,
|
||||
`a` bigint(20) unsigned NOT NULL,
|
||||
`c` smallint(5) unsigned DEFAULT NULL,
|
||||
PRIMARY KEY (`id`,`d`),
|
||||
KEY `idx_d_a` (`d`,`a`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs STATS_SAMPLE_PAGES=2
|
||||
PARTITION BY RANGE COLUMNS(`d`)
|
||||
(PARTITION `p20170914` VALUES LESS THAN ('2017-09-15') ENGINE = InnoDB,
|
||||
PARTITION `p99991231` VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB)
|
||||
analyze table t;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t analyze status OK
|
||||
select count(*) from t where d ='2017-09-15';
|
||||
count(*)
|
||||
18
|
||||
select count(*) from t force index(primary) where d ='2017-09-15';
|
||||
count(*)
|
||||
18
|
||||
DROP TABLE t;
|
||||
|
|
|
@ -540,9 +540,6 @@ ERROR 42000: Key column 'c2' doesn't exist in table
|
|||
ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY;
|
||||
ERROR 42000: Key column 'c2' doesn't exist in table
|
||||
ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE;
|
||||
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY
|
||||
ALTER TABLE t1n CHANGE c2 c4 INT, LOCK=NONE;
|
||||
ALTER TABLE t1n ADD INDEX(c4), LOCK=NONE;
|
||||
SHOW CREATE TABLE t1n;
|
||||
Table Create Table
|
||||
t1n CREATE TABLE `t1n` (
|
||||
|
@ -559,9 +556,6 @@ ALTER TABLE t1n DROP INDEX c4;
|
|||
ALTER TABLE t1n CHANGE c4 c1 INT, ADD INDEX(c1), ALGORITHM=INPLACE;
|
||||
ERROR 42S21: Duplicate column name 'c1'
|
||||
ALTER TABLE t1n CHANGE c4 c11 INT, ADD INDEX(c11), ALGORITHM=INPLACE;
|
||||
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY
|
||||
ALTER TABLE t1n CHANGE c4 c11 INT, LOCK=NONE;
|
||||
ALTER TABLE t1n ADD INDEX(c11), LOCK=NONE;
|
||||
SHOW CREATE TABLE t1n;
|
||||
Table Create Table
|
||||
t1n CREATE TABLE `t1n` (
|
||||
|
@ -640,10 +634,8 @@ CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL;
|
|||
ALTER TABLE t1o DROP INDEX ct, DROP INDEX FTS_DOC_ID_INDEX,
|
||||
CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL;
|
||||
ALTER TABLE t1o ADD UNIQUE INDEX FTS_DOC_ID_INDEX(foo_id);
|
||||
call mtr.add_suppression("InnoDB: No matching column for `FTS_DOC_ID` in index `ct` of table `test`\\.`t1o`");
|
||||
ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL,
|
||||
ADD FULLTEXT INDEX(ct);
|
||||
ERROR HY000: Index for table 't1o' is corrupt; try to repair it
|
||||
DROP TABLE sys_indexes;
|
||||
CREATE TABLE sys_indexes SELECT i.* FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
|
||||
INNER JOIN sys_tables st ON i.TABLE_ID=st.TABLE_ID;
|
||||
|
@ -651,9 +643,16 @@ SELECT i.NAME,i.POS,i.MTYPE,i.PRTYPE,i.LEN
|
|||
FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS i
|
||||
INNER JOIN sys_tables st ON i.TABLE_ID=st.TABLE_ID;
|
||||
NAME POS MTYPE PRTYPE LEN
|
||||
FTS_DOC_ID 0 6 1800 8
|
||||
c2 1 6 1027 4
|
||||
ct 2 5 524540 10
|
||||
cu 3 5 524540 10
|
||||
SELECT si.NAME,i.POS,i.NAME FROM INFORMATION_SCHEMA.INNODB_SYS_FIELDS i
|
||||
INNER JOIN sys_indexes si ON i.INDEX_ID=si.INDEX_ID;
|
||||
NAME POS NAME
|
||||
PRIMARY 0 FTS_DOC_ID
|
||||
FTS_DOC_ID_INDEX 0 FTS_DOC_ID
|
||||
ct 0 ct
|
||||
SELECT i.* FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS i
|
||||
INNER JOIN sys_foreign sf ON i.ID = sf.ID;
|
||||
ID FOR_COL_NAME REF_COL_NAME POS
|
||||
|
|
|
@ -40,6 +40,9 @@ crew_role_assigned CREATE TABLE `crew_role_assigned` (
|
|||
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a comment about tables'
|
||||
SET GLOBAL innodb_buffer_pool_load_now = ON;
|
||||
SET GLOBAL innodb_buffer_pool_dump_now = ON;
|
||||
SET GLOBAL innodb_buffer_pool_load_abort = ON;
|
||||
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = "This is a new comment about tables";
|
||||
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
||||
Table Create Table
|
||||
|
|
|
@ -48,8 +48,8 @@ SHOW CREATE TABLE t1;
|
|||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL,
|
||||
`c2` int(11) DEFAULT '1',
|
||||
`ct` text,
|
||||
`c2` int(11) DEFAULT 1,
|
||||
`ct` text DEFAULT NULL,
|
||||
PRIMARY KEY (`c1`),
|
||||
KEY `c2` (`c2`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
|
||||
|
@ -59,7 +59,7 @@ Table Create Table
|
|||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL,
|
||||
`c2` int(11),
|
||||
`ct` text,
|
||||
`ct` text DEFAULT NULL,
|
||||
PRIMARY KEY (`c1`),
|
||||
KEY `c2` (`c2`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
|
||||
|
@ -267,7 +267,7 @@ Table Create Table
|
|||
t3 CREATE TABLE `t3` (
|
||||
`c1` int(11) NOT NULL,
|
||||
`c3` int(11) DEFAULT NULL,
|
||||
`ct` text,
|
||||
`ct` text DEFAULT NULL,
|
||||
PRIMARY KEY (`c1`),
|
||||
KEY `c2` (`c3`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
|
||||
|
@ -309,7 +309,7 @@ Table Create Table
|
|||
t3 CREATE TABLE `t3` (
|
||||
`c1` int(11) NOT NULL,
|
||||
`1234567890123456789012345678901234567890123456789012345678901234` int(11) DEFAULT NULL,
|
||||
`ct` text,
|
||||
`ct` text DEFAULT NULL,
|
||||
PRIMARY KEY (`c1`),
|
||||
KEY `c2` (`1234567890123456789012345678901234567890123456789012345678901234`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
|
||||
|
@ -360,9 +360,9 @@ t3.isl
|
|||
t1c.ibd
|
||||
t3.ibd
|
||||
ALTER TABLE t3 CHANGE c3 𐌀𐌁𐌂𐌃𐌄𐌅𐌆𐌇𐌈𐌉𐌊𐌋𐌌𐌍𐌎𐌏𐌐𐌑𐌒𐌓𐌔𐌕𐌖𐌗𐌘𐌙𐌚𐌛𐌜 INT;
|
||||
ERROR HY000: Invalid utf8 character string: '\xF0\x90\x8C\x80\xF0\x90\x8C\x81\xF0\x90\x8C\x82\xF0\x90\x8C\x83'
|
||||
ERROR HY000: Invalid utf8mb4 character string: '\xF0\x90\x8C\x80\xF0\x90\x8C\x81\xF0\x90\x8C\x82\xF0\x90\x8C\x83'
|
||||
ALTER TABLE t3 CHANGE c3 😲 INT;
|
||||
ERROR HY000: Invalid utf8 character string: '\xF0\x9F\x98\xB2'
|
||||
ERROR HY000: Invalid utf8mb4 character string: '\xF0\x9F\x98\xB2'
|
||||
ALTER TABLE t3 RENAME TO t2;
|
||||
### files in MYSQL_DATA_DIR/test
|
||||
sys_foreign.frm
|
||||
|
@ -390,7 +390,7 @@ Table Create Table
|
|||
t2 CREATE TABLE `t2` (
|
||||
`c1` int(11) NOT NULL,
|
||||
`c3` int(11) DEFAULT NULL,
|
||||
`ct` text,
|
||||
`ct` text DEFAULT NULL,
|
||||
PRIMARY KEY (`c1`),
|
||||
KEY `c2` (`c3`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
|
||||
|
@ -436,17 +436,17 @@ test/t1c3 c3 c2 0
|
|||
ALTER TABLE t1 DROP INDEX c2;
|
||||
ERROR HY000: Cannot drop index 'c2': needed in a foreign key constraint
|
||||
ALTER TABLE t1 DROP INDEX c4;
|
||||
ERROR 42000: Can't DROP 'c4'; check that column/key exists
|
||||
ERROR 42000: Can't DROP INDEX `c4`; check that it exists
|
||||
ALTER TABLE t1c DROP FOREIGN KEY c2;
|
||||
ERROR 42000: Can't DROP 'c2'; check that column/key exists
|
||||
ERROR 42000: Can't DROP FOREIGN KEY `c2`; check that it exists
|
||||
ALTER TABLE t1c DROP FOREIGN KEY t1c2, DROP FOREIGN KEY c2;
|
||||
ERROR 42000: Can't DROP 'c2'; check that column/key exists
|
||||
ERROR 42000: Can't DROP FOREIGN KEY `c2`; check that it exists
|
||||
ALTER TABLE t1c DROP FOREIGN KEY t1c2, DROP FOREIGN KEY c2, DROP INDEX c2;
|
||||
ERROR 42000: Can't DROP 'c2'; check that column/key exists
|
||||
ERROR 42000: Can't DROP FOREIGN KEY `c2`; check that it exists
|
||||
ALTER TABLE t1c DROP INDEX c2;
|
||||
ERROR HY000: Cannot drop index 'c2': needed in a foreign key constraint
|
||||
ALTER TABLE t1c DROP FOREIGN KEY ẗ1C2;
|
||||
ERROR 42000: Can't DROP 'ẗ1C2'; check that column/key exists
|
||||
ERROR 42000: Can't DROP FOREIGN KEY `ẗ1C2`; check that it exists
|
||||
SHOW CREATE TABLE t1c;
|
||||
Table Create Table
|
||||
t1c CREATE TABLE `t1c` (
|
||||
|
@ -680,24 +680,24 @@ CREATE TABLE t1o LIKE t1;
|
|||
ALTER TABLE t1 ADD FULLTEXT INDEX (ct),
|
||||
CHANGE c1 pk INT, ALTER c2 SET DEFAULT 42, RENAME TO tt,
|
||||
ALGORITHM=INPLACE, LOCK=NONE;
|
||||
ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED.
|
||||
ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
|
||||
ALTER TABLE t1 ADD FULLTEXT INDEX (ct),
|
||||
CHANGE c1 pk INT, ALTER c2 SET DEFAULT 42, RENAME TO tt,
|
||||
ALGORITHM=INPLACE, LOCK=SHARED;
|
||||
Warnings:
|
||||
Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID
|
||||
### files in MYSQL_DATA_DIR/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
FTS_AUX_INDEX_1.isl
|
||||
FTS_AUX_INDEX_2.isl
|
||||
FTS_AUX_INDEX_3.isl
|
||||
FTS_AUX_INDEX_4.isl
|
||||
FTS_AUX_INDEX_5.isl
|
||||
FTS_AUX_INDEX_6.isl
|
||||
FTS_AUX_BEING_DELETED.isl
|
||||
FTS_AUX_BEING_DELETED_CACHE.isl
|
||||
FTS_AUX_CONFIG.isl
|
||||
FTS_AUX_DELETED.isl
|
||||
FTS_AUX_DELETED_CACHE.isl
|
||||
sys_foreign.frm
|
||||
sys_foreign.ibd
|
||||
sys_indexes.frm
|
||||
|
@ -713,6 +713,17 @@ t1p.isl
|
|||
tt.frm
|
||||
tt.isl
|
||||
### files in MYSQL_TMP_DIR/alt_dir/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
t1c.ibd
|
||||
t1p.ibd
|
||||
tt.ibd
|
||||
|
@ -730,8 +741,8 @@ SHOW CREATE TABLE tt;
|
|||
Table Create Table
|
||||
tt CREATE TABLE `tt` (
|
||||
`pk` int(11) NOT NULL,
|
||||
`c2` int(11) DEFAULT '42',
|
||||
`ct` text,
|
||||
`c2` int(11) DEFAULT 42,
|
||||
`ct` text DEFAULT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
FULLTEXT KEY `ct` (`ct`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
|
||||
|
@ -755,23 +766,23 @@ ERROR 42000: Incorrect column name 'FTS_Doc_ID'
|
|||
ALTER TABLE t1o ADD FULLTEXT INDEX(ct),
|
||||
CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL,
|
||||
ALGORITHM=INPLACE;
|
||||
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type INPLACE. Try ALGORITHM=COPY.
|
||||
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type INPLACE. Try ALGORITHM=COPY
|
||||
CREATE TABLE t1n LIKE t1o;
|
||||
ALTER TABLE t1n ADD FULLTEXT INDEX(ct);
|
||||
Warnings:
|
||||
Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID
|
||||
### files in MYSQL_DATA_DIR/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
FTS_AUX_INDEX_1.isl
|
||||
FTS_AUX_INDEX_2.isl
|
||||
FTS_AUX_INDEX_3.isl
|
||||
FTS_AUX_INDEX_4.isl
|
||||
FTS_AUX_INDEX_5.isl
|
||||
FTS_AUX_INDEX_6.isl
|
||||
FTS_AUX_BEING_DELETED.isl
|
||||
FTS_AUX_BEING_DELETED_CACHE.isl
|
||||
FTS_AUX_CONFIG.isl
|
||||
FTS_AUX_DELETED.isl
|
||||
FTS_AUX_DELETED_CACHE.isl
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
|
@ -800,6 +811,17 @@ t1p.isl
|
|||
tt.frm
|
||||
tt.isl
|
||||
### files in MYSQL_TMP_DIR/alt_dir/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
t1c.ibd
|
||||
t1p.ibd
|
||||
tt.ibd
|
||||
|
@ -811,17 +833,17 @@ ALTER TABLE t1n CHANGE FTS_DOC_ID c11 INT, ALGORITHM=INPLACE;
|
|||
ERROR 42S22: Unknown column 'FTS_DOC_ID' in 't1n'
|
||||
ALTER TABLE t1n CHANGE c1 FTS_DOC_ïD INT, ALGORITHM=INPLACE;
|
||||
### files in MYSQL_DATA_DIR/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
FTS_AUX_INDEX_1.isl
|
||||
FTS_AUX_INDEX_2.isl
|
||||
FTS_AUX_INDEX_3.isl
|
||||
FTS_AUX_INDEX_4.isl
|
||||
FTS_AUX_INDEX_5.isl
|
||||
FTS_AUX_INDEX_6.isl
|
||||
FTS_AUX_BEING_DELETED.isl
|
||||
FTS_AUX_BEING_DELETED_CACHE.isl
|
||||
FTS_AUX_CONFIG.isl
|
||||
FTS_AUX_DELETED.isl
|
||||
FTS_AUX_DELETED_CACHE.isl
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
|
@ -850,22 +872,33 @@ t1p.isl
|
|||
tt.frm
|
||||
tt.isl
|
||||
### files in MYSQL_TMP_DIR/alt_dir/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
t1c.ibd
|
||||
t1p.ibd
|
||||
tt.ibd
|
||||
ALTER TABLE t1n CHANGE FTS_DOC_ÏD c1 INT, ALGORITHM=INPLACE;
|
||||
### files in MYSQL_DATA_DIR/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
FTS_AUX_INDEX_1.isl
|
||||
FTS_AUX_INDEX_2.isl
|
||||
FTS_AUX_INDEX_3.isl
|
||||
FTS_AUX_INDEX_4.isl
|
||||
FTS_AUX_INDEX_5.isl
|
||||
FTS_AUX_INDEX_6.isl
|
||||
FTS_AUX_BEING_DELETED.isl
|
||||
FTS_AUX_BEING_DELETED_CACHE.isl
|
||||
FTS_AUX_CONFIG.isl
|
||||
FTS_AUX_DELETED.isl
|
||||
FTS_AUX_DELETED_CACHE.isl
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
|
@ -894,23 +927,34 @@ t1p.isl
|
|||
tt.frm
|
||||
tt.isl
|
||||
### files in MYSQL_TMP_DIR/alt_dir/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
t1c.ibd
|
||||
t1p.ibd
|
||||
tt.ibd
|
||||
ALTER TABLE t1n CHANGE c1 c2 INT, CHANGE c2 ct INT, CHANGE ct c1 TEXT,
|
||||
ALGORITHM=INPLACE;
|
||||
### files in MYSQL_DATA_DIR/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
FTS_AUX_INDEX_1.isl
|
||||
FTS_AUX_INDEX_2.isl
|
||||
FTS_AUX_INDEX_3.isl
|
||||
FTS_AUX_INDEX_4.isl
|
||||
FTS_AUX_INDEX_5.isl
|
||||
FTS_AUX_INDEX_6.isl
|
||||
FTS_AUX_BEING_DELETED.isl
|
||||
FTS_AUX_BEING_DELETED_CACHE.isl
|
||||
FTS_AUX_CONFIG.isl
|
||||
FTS_AUX_DELETED.isl
|
||||
FTS_AUX_DELETED_CACHE.isl
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
|
@ -939,6 +983,17 @@ t1p.isl
|
|||
tt.frm
|
||||
tt.isl
|
||||
### files in MYSQL_TMP_DIR/alt_dir/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
t1c.ibd
|
||||
t1p.ibd
|
||||
tt.ibd
|
||||
|
@ -947,24 +1002,24 @@ Table Create Table
|
|||
t1n CREATE TABLE `t1n` (
|
||||
`c2` int(11) NOT NULL,
|
||||
`ct` int(11) DEFAULT NULL,
|
||||
`c1` text,
|
||||
`c1` text DEFAULT NULL,
|
||||
PRIMARY KEY (`c2`),
|
||||
FULLTEXT KEY `ct` (`c1`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1n CHANGE c2 c1 INT, CHANGE ct c2 INT, CHANGE c1 ct TEXT,
|
||||
ALGORITHM=COPY;
|
||||
### files in MYSQL_DATA_DIR/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
FTS_AUX_INDEX_1.isl
|
||||
FTS_AUX_INDEX_2.isl
|
||||
FTS_AUX_INDEX_3.isl
|
||||
FTS_AUX_INDEX_4.isl
|
||||
FTS_AUX_INDEX_5.isl
|
||||
FTS_AUX_INDEX_6.isl
|
||||
FTS_AUX_BEING_DELETED.isl
|
||||
FTS_AUX_BEING_DELETED_CACHE.isl
|
||||
FTS_AUX_CONFIG.isl
|
||||
FTS_AUX_DELETED.isl
|
||||
FTS_AUX_DELETED_CACHE.isl
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
|
@ -993,6 +1048,17 @@ t1p.isl
|
|||
tt.frm
|
||||
tt.isl
|
||||
### files in MYSQL_TMP_DIR/alt_dir/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
t1c.ibd
|
||||
t1p.ibd
|
||||
tt.ibd
|
||||
|
@ -1001,7 +1067,7 @@ Table Create Table
|
|||
t1n CREATE TABLE `t1n` (
|
||||
`c1` int(11) NOT NULL,
|
||||
`c2` int(11) DEFAULT NULL,
|
||||
`ct` text,
|
||||
`ct` text DEFAULT NULL,
|
||||
PRIMARY KEY (`c1`),
|
||||
FULLTEXT KEY `ct` (`ct`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
|
@ -1010,21 +1076,18 @@ ERROR 42000: Key column 'c2' doesn't exist in table
|
|||
ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY;
|
||||
ERROR 42000: Key column 'c2' doesn't exist in table
|
||||
ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE;
|
||||
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY.
|
||||
ALTER TABLE t1n CHANGE c2 c4 INT, LOCK=NONE;
|
||||
ALTER TABLE t1n ADD INDEX(c4), LOCK=NONE;
|
||||
### files in MYSQL_DATA_DIR/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
FTS_AUX_INDEX_1.isl
|
||||
FTS_AUX_INDEX_2.isl
|
||||
FTS_AUX_INDEX_3.isl
|
||||
FTS_AUX_INDEX_4.isl
|
||||
FTS_AUX_INDEX_5.isl
|
||||
FTS_AUX_INDEX_6.isl
|
||||
FTS_AUX_BEING_DELETED.isl
|
||||
FTS_AUX_BEING_DELETED_CACHE.isl
|
||||
FTS_AUX_CONFIG.isl
|
||||
FTS_AUX_DELETED.isl
|
||||
FTS_AUX_DELETED_CACHE.isl
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
|
@ -1053,6 +1116,17 @@ t1p.isl
|
|||
tt.frm
|
||||
tt.isl
|
||||
### files in MYSQL_TMP_DIR/alt_dir/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
t1c.ibd
|
||||
t1p.ibd
|
||||
tt.ibd
|
||||
|
@ -1061,24 +1135,24 @@ Table Create Table
|
|||
t1n CREATE TABLE `t1n` (
|
||||
`c1` int(11) NOT NULL,
|
||||
`c4` int(11) DEFAULT NULL,
|
||||
`ct` text,
|
||||
`ct` text DEFAULT NULL,
|
||||
PRIMARY KEY (`c1`),
|
||||
KEY `c4` (`c4`),
|
||||
FULLTEXT KEY `ct` (`ct`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1n DROP INDEX c4;
|
||||
### files in MYSQL_DATA_DIR/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
FTS_AUX_INDEX_1.isl
|
||||
FTS_AUX_INDEX_2.isl
|
||||
FTS_AUX_INDEX_3.isl
|
||||
FTS_AUX_INDEX_4.isl
|
||||
FTS_AUX_INDEX_5.isl
|
||||
FTS_AUX_INDEX_6.isl
|
||||
FTS_AUX_BEING_DELETED.isl
|
||||
FTS_AUX_BEING_DELETED_CACHE.isl
|
||||
FTS_AUX_CONFIG.isl
|
||||
FTS_AUX_DELETED.isl
|
||||
FTS_AUX_DELETED_CACHE.isl
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
|
@ -1107,27 +1181,35 @@ t1p.isl
|
|||
tt.frm
|
||||
tt.isl
|
||||
### files in MYSQL_TMP_DIR/alt_dir/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
t1c.ibd
|
||||
t1p.ibd
|
||||
tt.ibd
|
||||
ALTER TABLE t1n CHANGE c4 c1 INT, ADD INDEX(c1), ALGORITHM=INPLACE;
|
||||
ERROR 42S21: Duplicate column name 'c1'
|
||||
ALTER TABLE t1n CHANGE c4 c11 INT, ADD INDEX(c11), ALGORITHM=INPLACE;
|
||||
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY.
|
||||
ALTER TABLE t1n CHANGE c4 c11 INT, LOCK=NONE;
|
||||
ALTER TABLE t1n ADD INDEX(c11), LOCK=NONE;
|
||||
### files in MYSQL_DATA_DIR/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
FTS_AUX_INDEX_1.isl
|
||||
FTS_AUX_INDEX_2.isl
|
||||
FTS_AUX_INDEX_3.isl
|
||||
FTS_AUX_INDEX_4.isl
|
||||
FTS_AUX_INDEX_5.isl
|
||||
FTS_AUX_INDEX_6.isl
|
||||
FTS_AUX_BEING_DELETED.isl
|
||||
FTS_AUX_BEING_DELETED_CACHE.isl
|
||||
FTS_AUX_CONFIG.isl
|
||||
FTS_AUX_DELETED.isl
|
||||
FTS_AUX_DELETED_CACHE.isl
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
|
@ -1156,6 +1238,17 @@ t1p.isl
|
|||
tt.frm
|
||||
tt.isl
|
||||
### files in MYSQL_TMP_DIR/alt_dir/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
t1c.ibd
|
||||
t1p.ibd
|
||||
tt.ibd
|
||||
|
@ -1164,7 +1257,7 @@ Table Create Table
|
|||
t1n CREATE TABLE `t1n` (
|
||||
`c1` int(11) NOT NULL,
|
||||
`c11` int(11) DEFAULT NULL,
|
||||
`ct` text,
|
||||
`ct` text DEFAULT NULL,
|
||||
PRIMARY KEY (`c1`),
|
||||
KEY `c11` (`c11`),
|
||||
FULLTEXT KEY `ct` (`ct`)
|
||||
|
@ -1172,17 +1265,17 @@ t1n CREATE TABLE `t1n` (
|
|||
DROP TABLE t1n;
|
||||
ALTER TABLE t1o MODIFY c1 BIGINT UNSIGNED NOT NULL;
|
||||
### files in MYSQL_DATA_DIR/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
FTS_AUX_INDEX_1.isl
|
||||
FTS_AUX_INDEX_2.isl
|
||||
FTS_AUX_INDEX_3.isl
|
||||
FTS_AUX_INDEX_4.isl
|
||||
FTS_AUX_INDEX_5.isl
|
||||
FTS_AUX_INDEX_6.isl
|
||||
FTS_AUX_BEING_DELETED.isl
|
||||
FTS_AUX_BEING_DELETED_CACHE.isl
|
||||
FTS_AUX_CONFIG.isl
|
||||
FTS_AUX_DELETED.isl
|
||||
FTS_AUX_DELETED_CACHE.isl
|
||||
sys_foreign.frm
|
||||
sys_foreign.ibd
|
||||
sys_indexes.frm
|
||||
|
@ -1198,29 +1291,35 @@ t1p.isl
|
|||
tt.frm
|
||||
tt.isl
|
||||
### files in MYSQL_TMP_DIR/alt_dir/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
t1c.ibd
|
||||
t1p.ibd
|
||||
tt.ibd
|
||||
call mtr.add_suppression("Error: no matching column for .FTS_DOC_ID. in index .ct.--temporary-- of table .test...t1o");
|
||||
ALTER TABLE t1o ADD FULLTEXT INDEX(ct),
|
||||
CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL,
|
||||
ALGORITHM=INPLACE;
|
||||
ERROR HY000: Incorrect key file for table 't1o'; try to repair it
|
||||
# The following would crash 10.2. Re-enable this and test after merge!
|
||||
ALTER TABLE t1o CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL, LOCK=NONE;
|
||||
ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE;
|
||||
### files in MYSQL_DATA_DIR/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
FTS_AUX_INDEX_1.isl
|
||||
FTS_AUX_INDEX_2.isl
|
||||
FTS_AUX_INDEX_3.isl
|
||||
FTS_AUX_INDEX_4.isl
|
||||
FTS_AUX_INDEX_5.isl
|
||||
FTS_AUX_INDEX_6.isl
|
||||
FTS_AUX_BEING_DELETED.isl
|
||||
FTS_AUX_BEING_DELETED_CACHE.isl
|
||||
FTS_AUX_CONFIG.isl
|
||||
FTS_AUX_DELETED.isl
|
||||
FTS_AUX_DELETED_CACHE.isl
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
|
@ -1247,9 +1346,23 @@ t1p.isl
|
|||
tt.frm
|
||||
tt.isl
|
||||
### files in MYSQL_TMP_DIR/alt_dir/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
t1c.ibd
|
||||
t1p.ibd
|
||||
tt.ibd
|
||||
ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL,
|
||||
LOCK=NONE;
|
||||
ERROR 0A000: LOCK=NONE is not supported. Reason: Cannot drop or rename FTS_DOC_ID. Try LOCK=SHARED
|
||||
SELECT sc.pos FROM information_schema.innodb_sys_columns sc
|
||||
INNER JOIN information_schema.innodb_sys_tables st
|
||||
ON sc.TABLE_ID=st.TABLE_ID
|
||||
|
@ -1261,24 +1374,24 @@ Table Create Table
|
|||
t1o CREATE TABLE `t1o` (
|
||||
`FTS_DOC_ID` bigint(20) unsigned NOT NULL,
|
||||
`c2` int(11) DEFAULT NULL,
|
||||
`ct` text,
|
||||
`ct` text DEFAULT NULL,
|
||||
PRIMARY KEY (`FTS_DOC_ID`),
|
||||
FULLTEXT KEY `ct` (`ct`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL,
|
||||
DROP INDEX ct, LOCK=NONE;
|
||||
### files in MYSQL_DATA_DIR/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
FTS_AUX_INDEX_1.isl
|
||||
FTS_AUX_INDEX_2.isl
|
||||
FTS_AUX_INDEX_3.isl
|
||||
FTS_AUX_INDEX_4.isl
|
||||
FTS_AUX_INDEX_5.isl
|
||||
FTS_AUX_INDEX_6.isl
|
||||
FTS_AUX_BEING_DELETED.isl
|
||||
FTS_AUX_BEING_DELETED_CACHE.isl
|
||||
FTS_AUX_CONFIG.isl
|
||||
FTS_AUX_DELETED.isl
|
||||
FTS_AUX_DELETED_CACHE.isl
|
||||
sys_foreign.frm
|
||||
sys_foreign.ibd
|
||||
sys_indexes.frm
|
||||
|
@ -1294,6 +1407,17 @@ t1p.isl
|
|||
tt.frm
|
||||
tt.isl
|
||||
### files in MYSQL_TMP_DIR/alt_dir/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
t1c.ibd
|
||||
t1p.ibd
|
||||
tt.ibd
|
||||
|
@ -1302,7 +1426,7 @@ Table Create Table
|
|||
t1o CREATE TABLE `t1o` (
|
||||
`foo_id` bigint(20) unsigned NOT NULL,
|
||||
`c2` int(11) DEFAULT NULL,
|
||||
`ct` text,
|
||||
`ct` text DEFAULT NULL,
|
||||
PRIMARY KEY (`foo_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1c, t1p, sys_tables, sys_indexes, sys_foreign;
|
||||
|
@ -1328,17 +1452,17 @@ INNER JOIN sys_foreign sf ON i.ID = sf.ID;
|
|||
ID FOR_COL_NAME REF_COL_NAME POS
|
||||
ALTER TABLE t1o ADD UNIQUE INDEX FTS_DOC_ID_INDEX(foo_id);
|
||||
### files in MYSQL_DATA_DIR/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
FTS_AUX_INDEX_1.isl
|
||||
FTS_AUX_INDEX_2.isl
|
||||
FTS_AUX_INDEX_3.isl
|
||||
FTS_AUX_INDEX_4.isl
|
||||
FTS_AUX_INDEX_5.isl
|
||||
FTS_AUX_INDEX_6.isl
|
||||
FTS_AUX_BEING_DELETED.isl
|
||||
FTS_AUX_BEING_DELETED_CACHE.isl
|
||||
FTS_AUX_CONFIG.isl
|
||||
FTS_AUX_DELETED.isl
|
||||
FTS_AUX_DELETED_CACHE.isl
|
||||
sys_foreign.frm
|
||||
sys_foreign.ibd
|
||||
sys_indexes.frm
|
||||
|
@ -1350,24 +1474,32 @@ t1o.ibd
|
|||
tt.frm
|
||||
tt.isl
|
||||
### files in MYSQL_TMP_DIR/alt_dir/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
tt.ibd
|
||||
ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL,
|
||||
ADD FULLTEXT INDEX(ct);
|
||||
ERROR HY000: Incorrect key file for table 't1o'; try to repair it
|
||||
ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL, LOCK=NONE;
|
||||
ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE;
|
||||
### files in MYSQL_DATA_DIR/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
FTS_AUX_INDEX_1.isl
|
||||
FTS_AUX_INDEX_2.isl
|
||||
FTS_AUX_INDEX_3.isl
|
||||
FTS_AUX_INDEX_4.isl
|
||||
FTS_AUX_INDEX_5.isl
|
||||
FTS_AUX_INDEX_6.isl
|
||||
FTS_AUX_BEING_DELETED.isl
|
||||
FTS_AUX_BEING_DELETED_CACHE.isl
|
||||
FTS_AUX_CONFIG.isl
|
||||
FTS_AUX_DELETED.isl
|
||||
FTS_AUX_DELETED_CACHE.isl
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
|
@ -1390,6 +1522,17 @@ t1o.ibd
|
|||
tt.frm
|
||||
tt.isl
|
||||
### files in MYSQL_TMP_DIR/alt_dir/test
|
||||
FTS_AUX_INDEX_1.ibd
|
||||
FTS_AUX_INDEX_2.ibd
|
||||
FTS_AUX_INDEX_3.ibd
|
||||
FTS_AUX_INDEX_4.ibd
|
||||
FTS_AUX_INDEX_5.ibd
|
||||
FTS_AUX_INDEX_6.ibd
|
||||
FTS_AUX_BEING_DELETED.ibd
|
||||
FTS_AUX_BEING_DELETED_CACHE.ibd
|
||||
FTS_AUX_CONFIG.ibd
|
||||
FTS_AUX_DELETED.ibd
|
||||
FTS_AUX_DELETED_CACHE.ibd
|
||||
tt.ibd
|
||||
ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL;
|
||||
ERROR HY000: Index 'FTS_DOC_ID_INDEX' is of wrong type for an InnoDB FULLTEXT index
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
SET @save_tdc= @@GLOBAL.table_definition_cache;
|
||||
SET @save_toc= @@GLOBAL.table_open_cache;
|
||||
SET GLOBAL table_definition_cache= 400;
|
||||
SET GLOBAL table_open_cache= 1024;
|
||||
CREATE TABLE to_be_evicted(a INT PRIMARY KEY, b INT NOT NULL) ENGINE=InnoDB;
|
||||
INSERT INTO to_be_evicted VALUES(1,2),(2,1);
|
||||
connect ddl,localhost,root,,;
|
||||
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL scanned WAIT_FOR got_duplicate';
|
||||
ALTER TABLE to_be_evicted ADD UNIQUE INDEX(b);
|
||||
connection default;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR scanned';
|
||||
BEGIN;
|
||||
INSERT INTO to_be_evicted VALUES(3, 2);
|
||||
SET DEBUG_SYNC = 'now SIGNAL got_duplicate';
|
||||
connection ddl;
|
||||
ERROR 23000: Duplicate entry '2' for key 'b'
|
||||
disconnect ddl;
|
||||
connection default;
|
||||
COMMIT;
|
||||
SET DEBUG_SYNC = RESET;
|
||||
FLUSH TABLES;
|
142
mysql-test/suite/innodb/r/undo_log.result
Normal file
142
mysql-test/suite/innodb/r/undo_log.result
Normal file
|
@ -0,0 +1,142 @@
|
|||
CREATE TABLE test_tab (
|
||||
a_str_18 mediumtext,
|
||||
b_str_3 varchar(32) DEFAULT NULL,
|
||||
a_str_13 mediumtext,
|
||||
b_str_5 varchar(40) DEFAULT NULL,
|
||||
b_str_6 varchar(50) DEFAULT NULL,
|
||||
b_str_7 char(32) DEFAULT NULL,
|
||||
b_str_8 varchar(32) DEFAULT NULL,
|
||||
b_str_9 varchar(255) DEFAULT NULL,
|
||||
a_str_28 char(255) DEFAULT NULL,
|
||||
a_str_27 varchar(255) DEFAULT NULL,
|
||||
b_str_10 varchar(32) DEFAULT NULL,
|
||||
a_str_26 varchar(255) DEFAULT NULL,
|
||||
a_str_6 varchar(50) DEFAULT NULL,
|
||||
b_str_11 varchar(32) DEFAULT NULL,
|
||||
b_str_12 varchar(255) DEFAULT NULL,
|
||||
b_str_13 char(32) DEFAULT NULL,
|
||||
b_str_14 varchar(32) DEFAULT NULL,
|
||||
b_str_15 char(32) DEFAULT NULL,
|
||||
b_str_16 char(32) DEFAULT NULL,
|
||||
b_str_17 varchar(32) DEFAULT NULL,
|
||||
b_str_18 varchar(32) DEFAULT NULL,
|
||||
a_str_25 varchar(40) DEFAULT NULL,
|
||||
b_str_19 varchar(255) DEFAULT NULL,
|
||||
a_str_23 varchar(40) DEFAULT NULL,
|
||||
b_str_20 varchar(32) DEFAULT NULL,
|
||||
a_str_21 varchar(255) DEFAULT NULL,
|
||||
a_str_20 varchar(255) DEFAULT NULL,
|
||||
a_str_39 varchar(255) DEFAULT NULL,
|
||||
a_str_38 varchar(255) DEFAULT NULL,
|
||||
a_str_37 varchar(255) DEFAULT NULL,
|
||||
b_str_21 char(32) DEFAULT NULL,
|
||||
b_str_23 varchar(80) DEFAULT NULL,
|
||||
b_str_24 varchar(32) DEFAULT NULL,
|
||||
b_str_25 varchar(32) DEFAULT NULL,
|
||||
b_str_26 char(32) NOT NULL DEFAULT '',
|
||||
b_str_27 varchar(255) DEFAULT NULL,
|
||||
a_str_36 varchar(255) DEFAULT NULL,
|
||||
a_str_33 varchar(100) DEFAULT NULL,
|
||||
a_ref_10 char(32) DEFAULT NULL,
|
||||
b_str_28 char(32) DEFAULT NULL,
|
||||
b_str_29 char(32) DEFAULT NULL,
|
||||
a_ref_6 char(32) DEFAULT NULL,
|
||||
a_ref_12 varchar(32) DEFAULT NULL,
|
||||
a_ref_11 varchar(32) DEFAULT NULL,
|
||||
a_str_49 varchar(40) DEFAULT NULL,
|
||||
b_str_30 varchar(32) DEFAULT NULL,
|
||||
a_ref_3 varchar(32) DEFAULT NULL,
|
||||
a_str_48 varchar(40) DEFAULT NULL,
|
||||
a_ref_1 char(32) DEFAULT NULL,
|
||||
b_str_31 varchar(32) DEFAULT NULL,
|
||||
b_str_32 varchar(255) DEFAULT NULL,
|
||||
b_str_33 char(32) DEFAULT NULL,
|
||||
b_str_34 varchar(32) DEFAULT NULL,
|
||||
a_str_47 varchar(40) DEFAULT NULL,
|
||||
b_str_36 varchar(255) DEFAULT NULL,
|
||||
a_str_46 varchar(40) DEFAULT NULL,
|
||||
a_str_45 varchar(255) DEFAULT NULL,
|
||||
b_str_38 varchar(32) DEFAULT NULL,
|
||||
b_str_39 char(32) DEFAULT NULL,
|
||||
b_str_40 varchar(32) DEFAULT NULL,
|
||||
a_str_41 varchar(255) DEFAULT NULL,
|
||||
b_str_41 varchar(32) DEFAULT NULL,
|
||||
PRIMARY KEY (b_str_26),
|
||||
UNIQUE KEY a_str_47 (a_str_47),
|
||||
UNIQUE KEY a_str_49 (a_str_49),
|
||||
UNIQUE KEY a_str_33 (a_str_33),
|
||||
UNIQUE KEY a_str_46 (a_str_46),
|
||||
UNIQUE KEY a_str_48 (a_str_48),
|
||||
KEY b_str_18 (b_str_18),
|
||||
KEY a_str_26 (a_str_26),
|
||||
KEY b_str_27 (b_str_27,b_str_19),
|
||||
KEY b_str_41 (b_str_41),
|
||||
KEY b_str_15 (b_str_15),
|
||||
KEY a_str_20 (a_str_20),
|
||||
KEY b_str_17 (b_str_17),
|
||||
KEY b_str_40 (b_str_40),
|
||||
KEY b_str_24 (b_str_24),
|
||||
KEY b_str_10 (b_str_10),
|
||||
KEY b_str_16 (b_str_16),
|
||||
KEY b_str_29 (b_str_29),
|
||||
KEY a_str_41 (a_str_41),
|
||||
KEY b_str_7 (b_str_7),
|
||||
KEY a_str_45 (a_str_45),
|
||||
KEY a_str_28 (a_str_28),
|
||||
KEY a_str_37 (a_str_37),
|
||||
KEY b_str_6 (b_str_6),
|
||||
KEY a_ref_6 (a_ref_6),
|
||||
KEY b_str_34 (b_str_34),
|
||||
KEY b_str_38 (b_str_38),
|
||||
KEY a_ref_10 (a_ref_10),
|
||||
KEY b_str_21 (b_str_21),
|
||||
KEY b_str_23 (b_str_23,b_str_19),
|
||||
KEY b_str_33 (b_str_33),
|
||||
KEY a_ref_12 (a_ref_12),
|
||||
KEY a_str_18 (a_str_18(255)),
|
||||
KEY a_str_39 (a_str_39),
|
||||
KEY a_str_27 (a_str_27),
|
||||
KEY a_str_25 (a_str_25),
|
||||
KEY b_str_9 (b_str_9),
|
||||
KEY a_str_23 (a_str_23),
|
||||
KEY b_str_8 (b_str_8),
|
||||
KEY a_str_21 (a_str_21),
|
||||
KEY b_str_3 (b_str_3),
|
||||
KEY b_str_30 (b_str_30),
|
||||
KEY b_str_12 (b_str_12),
|
||||
KEY b_str_25 (b_str_25),
|
||||
KEY b_str_13 (b_str_13),
|
||||
KEY a_str_38 (a_str_38),
|
||||
KEY a_str_13 (a_str_13(255)),
|
||||
KEY a_str_36 (a_str_36),
|
||||
KEY b_str_28 (b_str_28),
|
||||
KEY b_str_19 (b_str_19),
|
||||
KEY b_str_11 (b_str_11),
|
||||
KEY a_ref_1 (a_ref_1),
|
||||
KEY b_str_20 (b_str_20),
|
||||
KEY b_str_14 (b_str_14),
|
||||
KEY a_ref_3 (a_ref_3),
|
||||
KEY b_str_39 (b_str_39),
|
||||
KEY b_str_32 (b_str_32),
|
||||
KEY a_str_6 (a_str_6),
|
||||
KEY b_str_5 (b_str_5),
|
||||
KEY b_str_31 (b_str_31),
|
||||
KEY a_ref_11 (a_ref_11)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
|
||||
BEGIN;
|
||||
INSERT INTO test_tab (b_str_26, a_str_13, a_str_18) VALUES
|
||||
('a', REPEAT('f',4031), REPEAT('g', 4031));
|
||||
UPDATE test_tab SET a_str_13=REPEAT('h',4032), a_str_18=REPEAT('i',4032);
|
||||
SELECT 'Reducing length to 4030';
|
||||
Reducing length to 4030
|
||||
Reducing length to 4030
|
||||
UPDATE test_tab SET a_str_13=REPEAT('j',4030), a_str_18=REPEAT('k',4030);
|
||||
UPDATE test_tab SET a_str_13=REPEAT('l',4031), a_str_18=REPEAT('m',4031);
|
||||
ROLLBACK;
|
||||
SELECT COUNT(*) FROM test_tab;
|
||||
COUNT(*)
|
||||
0
|
||||
CHECK TABLE test_tab;
|
||||
Table Op Msg_type Msg_text
|
||||
test.test_tab check status OK
|
||||
DROP TABLE test_tab;
|
|
@ -8,3 +8,17 @@ create index idx1 on t1(a(3073));
|
|||
show create table t1;
|
||||
drop table t1;
|
||||
set @@sql_mode=default;
|
||||
|
||||
#
|
||||
# MDEV-14081 ALTER TABLE CHANGE COLUMN Corrupts Index Leading to Crashes in 10.2
|
||||
#
|
||||
create table t1 (
|
||||
id1 int(11) not null auto_increment,
|
||||
id2 varchar(30) not null,
|
||||
id3 datetime not null default current_timestamp,
|
||||
primary key (id1),
|
||||
unique key unique_id2 (id2)
|
||||
) engine=innodb;
|
||||
alter table t1 change column id2 id4 varchar(100) not null;
|
||||
select * from t1 where id4 like 'a';
|
||||
drop table t1;
|
||||
|
|
|
@ -324,10 +324,10 @@ UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
|
|||
# because the UNDO records will be smaller.
|
||||
|
||||
CREATE INDEX t1f ON t1 (f(767));
|
||||
--error 1713
|
||||
BEGIN;
|
||||
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
|
||||
k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
|
||||
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
|
||||
UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
|
||||
|
@ -367,8 +367,9 @@ UPDATE t1 SET s=@e;
|
|||
# that CANNOT be updated.
|
||||
|
||||
CREATE INDEX t1t ON t1 (t(767));
|
||||
--error 1713
|
||||
BEGIN;
|
||||
UPDATE t1 SET t=@e;
|
||||
ROLLBACK;
|
||||
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
@ -496,9 +497,10 @@ INSERT INTO bug12547647 VALUES (5,REPEAT('khdfo5AlOq',1900),REPEAT('g',7751));
|
|||
COMMIT;
|
||||
|
||||
# The following used to cause a hang while doing infinite undo log allocation.
|
||||
--error 1713
|
||||
BEGIN;
|
||||
UPDATE bug12547647 SET c = REPEAT('b',16928);
|
||||
SHOW WARNINGS;
|
||||
ROLLBACK;
|
||||
DROP TABLE bug12547647;
|
||||
|
||||
SET SESSION innodb_strict_mode = on;
|
||||
|
|
|
@ -282,13 +282,14 @@ UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
|
|||
|
||||
CREATE INDEX t1f17 ON t1 (v(767));
|
||||
|
||||
--error 1713
|
||||
BEGIN;
|
||||
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
|
||||
k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d,
|
||||
v=@d,w=@d,x=@d,y=@d,z=@d,
|
||||
aa=@d,ba=@d,ca=@d,da=@d,ea=@d,fa=@d,ga=@d,ha=@d,ia=@d,ja=@d,
|
||||
ka=@d,la=@d,ma=@d,na=@d,oa=@d,pa=@d,qa=@d,ra=@d,sa=@d,ta=@d,ua=@d,
|
||||
va=@d,wa=@d,xa=@d,ya=@d,za=@d;
|
||||
ROLLBACK;
|
||||
|
||||
BEGIN;
|
||||
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
|
||||
|
|
|
@ -292,7 +292,7 @@ COMMIT;
|
|||
|
||||
CREATE INDEX tg1f2 ON t1 (ia(767),ja(767));
|
||||
|
||||
--error 1713
|
||||
BEGIN;
|
||||
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
|
||||
k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d,
|
||||
v=@d,w=@d,x=@d,y=@d,z=@d,
|
||||
|
@ -305,6 +305,7 @@ UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
|
|||
ac=@d,bc=@d,cc=@d,dc=@d,ec=@d,fc=@d,gc=@d,hc=@d,ic=@d,jc=@d,
|
||||
kc=@d,lc=@d,mc=@d,nc=@d,oc=@d,pc=@d,qc=@d,rc=@d,sc=@d,tc=@d,uc=@d,
|
||||
vc=@d,wc=@d,xc=@d,yc=@d,zc=@d;
|
||||
ROLLBACK;
|
||||
|
||||
BEGIN;
|
||||
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
--source include/innodb_page_size.inc
|
||||
--source include/have_partition.inc
|
||||
|
||||
#
|
||||
# MMDEV-8386: MariaDB creates very big tmp file and hangs on xtradb
|
||||
|
@ -171,3 +172,35 @@ ALTER TABLE ticket
|
|||
SHOW CREATE TABLE ticket;
|
||||
|
||||
DROP TABLE ticket;
|
||||
|
||||
#
|
||||
# MDEV-13838: Wrong result after altering a partitioned table
|
||||
#
|
||||
|
||||
CREATE TABLE t (
|
||||
id bigint(20) unsigned NOT NULL auto_increment,
|
||||
d date NOT NULL,
|
||||
a bigint(20) unsigned NOT NULL,
|
||||
b smallint(5) unsigned DEFAULT NULL,
|
||||
PRIMARY KEY (id,d)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs STATS_SAMPLE_PAGES=2
|
||||
PARTITION BY RANGE COLUMNS(d)
|
||||
(
|
||||
PARTITION p20170914 VALUES LESS THAN ('2017-09-15') ENGINE = InnoDB,
|
||||
PARTITION p99991231 VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB);
|
||||
|
||||
insert into t(d,a,b) values ('2017-09-15',rand()*10000,rand()*10);
|
||||
insert into t(d,a,b) values ('2017-09-15',rand()*10000,rand()*10);
|
||||
|
||||
replace into t(d,a,b) select '2017-09-15',rand()*10000,rand()*10 from t t1, t t2, t t3, t t4;
|
||||
|
||||
select count(*) from t where d ='2017-09-15';
|
||||
|
||||
ALTER TABLE t CHANGE b c smallint(5) unsigned , ADD KEY idx_d_a (d, a);
|
||||
SHOW CREATE TABLE t;
|
||||
analyze table t;
|
||||
|
||||
select count(*) from t where d ='2017-09-15';
|
||||
select count(*) from t force index(primary) where d ='2017-09-15';
|
||||
|
||||
DROP TABLE t;
|
||||
|
|
|
@ -298,21 +298,12 @@ SHOW CREATE TABLE t1n;
|
|||
ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=INPLACE;
|
||||
--error ER_KEY_COLUMN_DOES_NOT_EXITS
|
||||
ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY;
|
||||
# FIXME: MDEV-13668 InnoDB unnecessarily rebuilds table
|
||||
# when renaming a column and adding index
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||
ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE;
|
||||
ALTER TABLE t1n CHANGE c2 c4 INT, LOCK=NONE;
|
||||
ALTER TABLE t1n ADD INDEX(c4), LOCK=NONE;
|
||||
SHOW CREATE TABLE t1n;
|
||||
ALTER TABLE t1n DROP INDEX c4;
|
||||
--error ER_DUP_FIELDNAME
|
||||
ALTER TABLE t1n CHANGE c4 c1 INT, ADD INDEX(c1), ALGORITHM=INPLACE;
|
||||
# FIXME: MDEV-13668
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||
ALTER TABLE t1n CHANGE c4 c11 INT, ADD INDEX(c11), ALGORITHM=INPLACE;
|
||||
ALTER TABLE t1n CHANGE c4 c11 INT, LOCK=NONE;
|
||||
ALTER TABLE t1n ADD INDEX(c11), LOCK=NONE;
|
||||
|
||||
SHOW CREATE TABLE t1n;
|
||||
DROP TABLE t1n;
|
||||
|
@ -370,16 +361,8 @@ CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL;
|
|||
|
||||
ALTER TABLE t1o ADD UNIQUE INDEX FTS_DOC_ID_INDEX(foo_id);
|
||||
|
||||
# FIXME: MDEV-9469 'Incorrect key file' on ALTER TABLE
|
||||
call mtr.add_suppression("InnoDB: No matching column for `FTS_DOC_ID` in index `ct` of table `test`\\.`t1o`");
|
||||
--error ER_NOT_KEYFILE
|
||||
ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL,
|
||||
ADD FULLTEXT INDEX(ct);
|
||||
# FIXME: MDEV-9469 (enable this)
|
||||
#--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||
#ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL,
|
||||
#ALGORITHM=INPLACE;
|
||||
#end of MDEV-9469 FIXME
|
||||
|
||||
DROP TABLE sys_indexes;
|
||||
CREATE TABLE sys_indexes SELECT i.* FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
|
||||
|
@ -496,6 +479,9 @@ eval DROP DATABASE $source_db;
|
|||
eval DROP DATABASE $dest_db;
|
||||
USE test;
|
||||
|
||||
#
|
||||
# End of 10.1 tests
|
||||
#
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-14038 ALTER TABLE does not exit on error with InnoDB + bad default function
|
||||
|
@ -525,3 +511,7 @@ ALTER TABLE t1 ADD b TIME NOT NULL DEFAULT if(unix_timestamp()>1,TIMESTAMP'2001-
|
|||
--disable_info
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
|
|
|
@ -40,6 +40,11 @@ CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `rep
|
|||
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = 'innodb_read_only';
|
||||
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
||||
|
||||
# These should be ignored in innodb_read_only mode.
|
||||
SET GLOBAL innodb_buffer_pool_load_now = ON;
|
||||
SET GLOBAL innodb_buffer_pool_dump_now = ON;
|
||||
SET GLOBAL innodb_buffer_pool_load_abort = ON;
|
||||
|
||||
-- let $restart_parameters=
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
--disable_query_log
|
||||
# These values can change during the test
|
||||
LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
|
||||
LET $regexp=/FTS_([0-9a-f_]+)([A-Z0-9_]+)\.ibd/FTS_AUX_\2.ibd/;
|
||||
LET $regexp=/FTS_[0-9a-f_]+([A-Z0-9_]+)\.([islbd]{3})/FTS_AUX_\1.\2/;
|
||||
|
||||
# Set up some variables
|
||||
LET $MYSQL_DATA_DIR = `select @@datadir`;
|
||||
|
@ -447,12 +447,7 @@ ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=INPLACE;
|
|||
--error ER_KEY_COLUMN_DOES_NOT_EXITS
|
||||
ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY;
|
||||
|
||||
# FIXME: MDEV-13668 InnoDB unnecessarily rebuilds table
|
||||
# when renaming a column and adding index
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||
ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE;
|
||||
ALTER TABLE t1n CHANGE c2 c4 INT, LOCK=NONE;
|
||||
ALTER TABLE t1n ADD INDEX(c4), LOCK=NONE;
|
||||
|
||||
--echo ### files in MYSQL_DATA_DIR/test
|
||||
--replace_regex $regexp
|
||||
|
@ -474,11 +469,7 @@ ALTER TABLE t1n DROP INDEX c4;
|
|||
|
||||
--error ER_DUP_FIELDNAME
|
||||
ALTER TABLE t1n CHANGE c4 c1 INT, ADD INDEX(c1), ALGORITHM=INPLACE;
|
||||
# FIXME: MDEV-13668
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||
ALTER TABLE t1n CHANGE c4 c11 INT, ADD INDEX(c11), ALGORITHM=INPLACE;
|
||||
ALTER TABLE t1n CHANGE c4 c11 INT, LOCK=NONE;
|
||||
ALTER TABLE t1n ADD INDEX(c11), LOCK=NONE;
|
||||
|
||||
--echo ### files in MYSQL_DATA_DIR/test
|
||||
--replace_regex $regexp
|
||||
|
@ -500,18 +491,10 @@ ALTER TABLE t1o MODIFY c1 BIGINT UNSIGNED NOT NULL;
|
|||
--replace_regex $regexp
|
||||
--list_files $MYSQL_TMP_DIR/alt_dir/test
|
||||
|
||||
# FIXME: MDEV-9469 'Incorrect key file' on ALTER TABLE
|
||||
call mtr.add_suppression("Error: no matching column for .FTS_DOC_ID. in index .ct.--temporary-- of table .test...t1o");
|
||||
--error ER_NOT_KEYFILE
|
||||
ALTER TABLE t1o ADD FULLTEXT INDEX(ct),
|
||||
CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL,
|
||||
ALGORITHM=INPLACE;
|
||||
|
||||
--echo # The following would crash 10.2. Re-enable this and test after merge!
|
||||
ALTER TABLE t1o CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL, LOCK=NONE;
|
||||
ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE;
|
||||
# end of MDEV-9469 FIXME
|
||||
|
||||
--echo ### files in MYSQL_DATA_DIR/test
|
||||
--replace_regex $regexp
|
||||
--list_files $MYSQL_DATA_DIR/test
|
||||
|
@ -520,11 +503,9 @@ ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE;
|
|||
--list_files $MYSQL_TMP_DIR/alt_dir/test
|
||||
|
||||
# This would create a hidden FTS_DOC_ID column, which cannot be done online.
|
||||
# FIXME: MDEV-9469 (enable this)
|
||||
#--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||
#ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL,
|
||||
#LOCK=NONE;
|
||||
#end of MDEV-9469 FIXME
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||
ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL,
|
||||
LOCK=NONE;
|
||||
|
||||
# This should not show duplicates.
|
||||
SELECT sc.pos FROM information_schema.innodb_sys_columns sc
|
||||
|
@ -535,7 +516,6 @@ WHERE st.NAME='test/t1o' AND sc.NAME='FTS_DOC_ID';
|
|||
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
||||
SHOW CREATE TABLE t1o;
|
||||
|
||||
# FIXME: MDEV-13668
|
||||
ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL,
|
||||
DROP INDEX ct, LOCK=NONE;
|
||||
|
||||
|
@ -573,15 +553,9 @@ ALTER TABLE t1o ADD UNIQUE INDEX FTS_DOC_ID_INDEX(foo_id);
|
|||
--replace_regex $regexp
|
||||
--list_files $MYSQL_TMP_DIR/alt_dir/test
|
||||
|
||||
# FIXME: MDEV-9469 'Incorrect key file' on ALTER TABLE
|
||||
--error ER_NOT_KEYFILE
|
||||
ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL,
|
||||
ADD FULLTEXT INDEX(ct);
|
||||
|
||||
ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL, LOCK=NONE;
|
||||
ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE;
|
||||
#end of MDEV-9469 FIXME
|
||||
|
||||
--echo ### files in MYSQL_DATA_DIR/test
|
||||
--replace_regex $regexp
|
||||
--list_files $MYSQL_DATA_DIR/test
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
--innodb-open-files=13
|
66
mysql-test/suite/innodb/t/table_definition_cache_debug.test
Normal file
66
mysql-test/suite/innodb/t/table_definition_cache_debug.test
Normal file
|
@ -0,0 +1,66 @@
|
|||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
SET @save_tdc= @@GLOBAL.table_definition_cache;
|
||||
SET @save_toc= @@GLOBAL.table_open_cache;
|
||||
|
||||
# InnoDB plugin essentially ignores table_definition_cache size
|
||||
# and hard-wires it to 400, which also is the minimum allowed value.
|
||||
SET GLOBAL table_definition_cache= 400;
|
||||
SET GLOBAL table_open_cache= 1024;
|
||||
|
||||
CREATE TABLE to_be_evicted(a INT PRIMARY KEY, b INT NOT NULL) ENGINE=InnoDB;
|
||||
INSERT INTO to_be_evicted VALUES(1,2),(2,1);
|
||||
|
||||
connect(ddl,localhost,root,,);
|
||||
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL scanned WAIT_FOR got_duplicate';
|
||||
--send
|
||||
ALTER TABLE to_be_evicted ADD UNIQUE INDEX(b);
|
||||
|
||||
connection default;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR scanned';
|
||||
|
||||
# During the ADD UNIQUE INDEX, start a transaction that inserts a duplicate
|
||||
# and then hogs the table lock, so that the unique index cannot be dropped.
|
||||
BEGIN;
|
||||
INSERT INTO to_be_evicted VALUES(3, 2);
|
||||
SET DEBUG_SYNC = 'now SIGNAL got_duplicate';
|
||||
|
||||
connection ddl;
|
||||
--error ER_DUP_ENTRY
|
||||
reap;
|
||||
|
||||
disconnect ddl;
|
||||
connection default;
|
||||
# Release the table lock.
|
||||
COMMIT;
|
||||
SET DEBUG_SYNC = RESET;
|
||||
|
||||
# Allow cache eviction.
|
||||
FLUSH TABLES;
|
||||
--disable_query_log
|
||||
|
||||
# Pollute the cache with many tables, so that our table will be evicted.
|
||||
let $N=1000;
|
||||
let $loop=$N;
|
||||
while ($loop)
|
||||
{
|
||||
eval CREATE TABLE t_$loop(id INT)ENGINE=InnoDB;
|
||||
dec $loop;
|
||||
}
|
||||
|
||||
# Hopefully let InnoDB evict the tables.
|
||||
sleep 10;
|
||||
|
||||
let $loop=$N;
|
||||
while ($loop)
|
||||
{
|
||||
eval DROP TABLE t_$loop;
|
||||
dec $loop;
|
||||
}
|
||||
|
||||
SET GLOBAL table_definition_cache= @save_tdc;
|
||||
SET GLOBAL table_open_cache= @save_toc;
|
||||
|
||||
DROP TABLE to_be_evicted;
|
139
mysql-test/suite/innodb/t/undo_log.test
Normal file
139
mysql-test/suite/innodb/t/undo_log.test
Normal file
|
@ -0,0 +1,139 @@
|
|||
--source include/have_innodb.inc
|
||||
CREATE TABLE test_tab (
|
||||
a_str_18 mediumtext,
|
||||
b_str_3 varchar(32) DEFAULT NULL,
|
||||
a_str_13 mediumtext,
|
||||
b_str_5 varchar(40) DEFAULT NULL,
|
||||
b_str_6 varchar(50) DEFAULT NULL,
|
||||
b_str_7 char(32) DEFAULT NULL,
|
||||
b_str_8 varchar(32) DEFAULT NULL,
|
||||
b_str_9 varchar(255) DEFAULT NULL,
|
||||
a_str_28 char(255) DEFAULT NULL,
|
||||
a_str_27 varchar(255) DEFAULT NULL,
|
||||
b_str_10 varchar(32) DEFAULT NULL,
|
||||
a_str_26 varchar(255) DEFAULT NULL,
|
||||
a_str_6 varchar(50) DEFAULT NULL,
|
||||
b_str_11 varchar(32) DEFAULT NULL,
|
||||
b_str_12 varchar(255) DEFAULT NULL,
|
||||
b_str_13 char(32) DEFAULT NULL,
|
||||
b_str_14 varchar(32) DEFAULT NULL,
|
||||
b_str_15 char(32) DEFAULT NULL,
|
||||
b_str_16 char(32) DEFAULT NULL,
|
||||
b_str_17 varchar(32) DEFAULT NULL,
|
||||
b_str_18 varchar(32) DEFAULT NULL,
|
||||
a_str_25 varchar(40) DEFAULT NULL,
|
||||
b_str_19 varchar(255) DEFAULT NULL,
|
||||
a_str_23 varchar(40) DEFAULT NULL,
|
||||
b_str_20 varchar(32) DEFAULT NULL,
|
||||
a_str_21 varchar(255) DEFAULT NULL,
|
||||
a_str_20 varchar(255) DEFAULT NULL,
|
||||
a_str_39 varchar(255) DEFAULT NULL,
|
||||
a_str_38 varchar(255) DEFAULT NULL,
|
||||
a_str_37 varchar(255) DEFAULT NULL,
|
||||
b_str_21 char(32) DEFAULT NULL,
|
||||
b_str_23 varchar(80) DEFAULT NULL,
|
||||
b_str_24 varchar(32) DEFAULT NULL,
|
||||
b_str_25 varchar(32) DEFAULT NULL,
|
||||
b_str_26 char(32) NOT NULL DEFAULT '',
|
||||
b_str_27 varchar(255) DEFAULT NULL,
|
||||
a_str_36 varchar(255) DEFAULT NULL,
|
||||
a_str_33 varchar(100) DEFAULT NULL,
|
||||
a_ref_10 char(32) DEFAULT NULL,
|
||||
b_str_28 char(32) DEFAULT NULL,
|
||||
b_str_29 char(32) DEFAULT NULL,
|
||||
a_ref_6 char(32) DEFAULT NULL,
|
||||
a_ref_12 varchar(32) DEFAULT NULL,
|
||||
a_ref_11 varchar(32) DEFAULT NULL,
|
||||
a_str_49 varchar(40) DEFAULT NULL,
|
||||
b_str_30 varchar(32) DEFAULT NULL,
|
||||
a_ref_3 varchar(32) DEFAULT NULL,
|
||||
a_str_48 varchar(40) DEFAULT NULL,
|
||||
a_ref_1 char(32) DEFAULT NULL,
|
||||
b_str_31 varchar(32) DEFAULT NULL,
|
||||
b_str_32 varchar(255) DEFAULT NULL,
|
||||
b_str_33 char(32) DEFAULT NULL,
|
||||
b_str_34 varchar(32) DEFAULT NULL,
|
||||
a_str_47 varchar(40) DEFAULT NULL,
|
||||
b_str_36 varchar(255) DEFAULT NULL,
|
||||
a_str_46 varchar(40) DEFAULT NULL,
|
||||
a_str_45 varchar(255) DEFAULT NULL,
|
||||
b_str_38 varchar(32) DEFAULT NULL,
|
||||
b_str_39 char(32) DEFAULT NULL,
|
||||
b_str_40 varchar(32) DEFAULT NULL,
|
||||
a_str_41 varchar(255) DEFAULT NULL,
|
||||
b_str_41 varchar(32) DEFAULT NULL,
|
||||
PRIMARY KEY (b_str_26),
|
||||
UNIQUE KEY a_str_47 (a_str_47),
|
||||
UNIQUE KEY a_str_49 (a_str_49),
|
||||
UNIQUE KEY a_str_33 (a_str_33),
|
||||
UNIQUE KEY a_str_46 (a_str_46),
|
||||
UNIQUE KEY a_str_48 (a_str_48),
|
||||
KEY b_str_18 (b_str_18),
|
||||
KEY a_str_26 (a_str_26),
|
||||
KEY b_str_27 (b_str_27,b_str_19),
|
||||
KEY b_str_41 (b_str_41),
|
||||
KEY b_str_15 (b_str_15),
|
||||
KEY a_str_20 (a_str_20),
|
||||
KEY b_str_17 (b_str_17),
|
||||
KEY b_str_40 (b_str_40),
|
||||
KEY b_str_24 (b_str_24),
|
||||
KEY b_str_10 (b_str_10),
|
||||
KEY b_str_16 (b_str_16),
|
||||
KEY b_str_29 (b_str_29),
|
||||
KEY a_str_41 (a_str_41),
|
||||
KEY b_str_7 (b_str_7),
|
||||
KEY a_str_45 (a_str_45),
|
||||
KEY a_str_28 (a_str_28),
|
||||
KEY a_str_37 (a_str_37),
|
||||
KEY b_str_6 (b_str_6),
|
||||
KEY a_ref_6 (a_ref_6),
|
||||
KEY b_str_34 (b_str_34),
|
||||
KEY b_str_38 (b_str_38),
|
||||
KEY a_ref_10 (a_ref_10),
|
||||
KEY b_str_21 (b_str_21),
|
||||
KEY b_str_23 (b_str_23,b_str_19),
|
||||
KEY b_str_33 (b_str_33),
|
||||
KEY a_ref_12 (a_ref_12),
|
||||
KEY a_str_18 (a_str_18(255)),
|
||||
KEY a_str_39 (a_str_39),
|
||||
KEY a_str_27 (a_str_27),
|
||||
KEY a_str_25 (a_str_25),
|
||||
KEY b_str_9 (b_str_9),
|
||||
KEY a_str_23 (a_str_23),
|
||||
KEY b_str_8 (b_str_8),
|
||||
KEY a_str_21 (a_str_21),
|
||||
KEY b_str_3 (b_str_3),
|
||||
KEY b_str_30 (b_str_30),
|
||||
KEY b_str_12 (b_str_12),
|
||||
KEY b_str_25 (b_str_25),
|
||||
KEY b_str_13 (b_str_13),
|
||||
KEY a_str_38 (a_str_38),
|
||||
KEY a_str_13 (a_str_13(255)),
|
||||
KEY a_str_36 (a_str_36),
|
||||
KEY b_str_28 (b_str_28),
|
||||
KEY b_str_19 (b_str_19),
|
||||
KEY b_str_11 (b_str_11),
|
||||
KEY a_ref_1 (a_ref_1),
|
||||
KEY b_str_20 (b_str_20),
|
||||
KEY b_str_14 (b_str_14),
|
||||
KEY a_ref_3 (a_ref_3),
|
||||
KEY b_str_39 (b_str_39),
|
||||
KEY b_str_32 (b_str_32),
|
||||
KEY a_str_6 (a_str_6),
|
||||
KEY b_str_5 (b_str_5),
|
||||
KEY b_str_31 (b_str_31),
|
||||
KEY a_ref_11 (a_ref_11)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
|
||||
|
||||
BEGIN;
|
||||
INSERT INTO test_tab (b_str_26, a_str_13, a_str_18) VALUES
|
||||
('a', REPEAT('f',4031), REPEAT('g', 4031));
|
||||
|
||||
UPDATE test_tab SET a_str_13=REPEAT('h',4032), a_str_18=REPEAT('i',4032);
|
||||
SELECT 'Reducing length to 4030';
|
||||
UPDATE test_tab SET a_str_13=REPEAT('j',4030), a_str_18=REPEAT('k',4030);
|
||||
UPDATE test_tab SET a_str_13=REPEAT('l',4031), a_str_18=REPEAT('m',4031);
|
||||
ROLLBACK;
|
||||
SELECT COUNT(*) FROM test_tab;
|
||||
CHECK TABLE test_tab;
|
||||
DROP TABLE test_tab;
|
11
mysql-test/suite/innodb_fts/r/concurrent_insert.result
Normal file
11
mysql-test/suite/innodb_fts/r/concurrent_insert.result
Normal file
|
@ -0,0 +1,11 @@
|
|||
CREATE TABLE t1(a VARCHAR(5),FULLTEXT KEY(a)) ENGINE=InnoDB;
|
||||
SET DEBUG_SYNC = 'get_next_FTS_DOC_ID SIGNAL prepared WAIT_FOR race';
|
||||
REPLACE INTO t1(a) values('aaa');
|
||||
connect dml, localhost, root, ,;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR prepared';
|
||||
REPLACE INTO t1(a) VALUES('aaa');
|
||||
SET DEBUG_SYNC = 'now SIGNAL race';
|
||||
disconnect dml;
|
||||
connection default;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
DROP TABLE t1;
|
|
@ -1,4 +1,3 @@
|
|||
drop table if exists t1,t2,t3;
|
||||
CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)) ENGINE = InnoDB;
|
||||
INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'),
|
||||
('Full-text indexes', 'are called collections'),
|
||||
|
@ -637,3 +636,58 @@ EXECUTE stmt;
|
|||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
CREATE TABLE z(a INTEGER) engine=innodb;
|
||||
CREATE TABLE q(b TEXT CHARSET latin1, fulltext(b)) engine=innodb;
|
||||
EXPLAIN SELECT 1 FROM q WHERE (SELECT MATCH(b) AGAINST ('*') FROM z);
|
||||
ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*'
|
||||
SELECT 1 FROM q WHERE (SELECT MATCH(b) AGAINST ('*') FROM z);
|
||||
ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*'
|
||||
EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM z;
|
||||
ERROR 42S22: Unknown column 'b' in 'field list'
|
||||
SELECT MATCH(b) AGAINST ('*') FROM z;
|
||||
ERROR 42S22: Unknown column 'b' in 'field list'
|
||||
EXPLAIN SELECT MATCH(a) AGAINST ('*') FROM z;
|
||||
ERROR HY000: Can't find FULLTEXT index matching the column list
|
||||
SELECT MATCH(a) AGAINST ('*') FROM z;
|
||||
ERROR HY000: Can't find FULLTEXT index matching the column list
|
||||
EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM q;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE q ALL NULL NULL NULL NULL 1
|
||||
SELECT MATCH(b) AGAINST ('*') FROM q;
|
||||
ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*'
|
||||
DROP TABLE z, q;
|
||||
create table t (
|
||||
FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY, t TEXT, FULLTEXT KEY (t)
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO t values (1, 'foo bar'), (2, 'foo bar'), (3, 'foo');
|
||||
SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE)
|
||||
LIMIT 0;
|
||||
FTS_DOC_ID t
|
||||
SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE)
|
||||
LIMIT 1;
|
||||
FTS_DOC_ID t
|
||||
1 foo bar
|
||||
SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE)
|
||||
LIMIT 2;
|
||||
FTS_DOC_ID t
|
||||
1 foo bar
|
||||
2 foo bar
|
||||
SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE)
|
||||
LIMIT 3;
|
||||
FTS_DOC_ID t
|
||||
1 foo bar
|
||||
2 foo bar
|
||||
3 foo
|
||||
SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE)
|
||||
LIMIT 4;
|
||||
FTS_DOC_ID t
|
||||
1 foo bar
|
||||
2 foo bar
|
||||
3 foo
|
||||
SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE)
|
||||
LIMIT 5;
|
||||
FTS_DOC_ID t
|
||||
1 foo bar
|
||||
2 foo bar
|
||||
3 foo
|
||||
DROP TABLE t;
|
||||
|
|
145
mysql-test/suite/innodb_fts/r/sync.result
Normal file
145
mysql-test/suite/innodb_fts/r/sync.result
Normal file
|
@ -0,0 +1,145 @@
|
|||
connect con1,localhost,root,,;
|
||||
connection default;
|
||||
# Case 1: Test select and insert(row in both disk and cache)
|
||||
CREATE TABLE t1 (
|
||||
FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
title VARCHAR(200),
|
||||
FULLTEXT(title)
|
||||
) ENGINE = InnoDB;
|
||||
INSERT INTO t1(title) VALUES('mysql');
|
||||
INSERT INTO t1(title) VALUES('database');
|
||||
connection con1;
|
||||
SET @old_dbug = @@SESSION.debug_dbug;
|
||||
SET debug_dbug = '+d,fts_instrument_sync_debug';
|
||||
SET DEBUG_SYNC= 'fts_write_node SIGNAL written WAIT_FOR selected';
|
||||
INSERT INTO t1(title) VALUES('mysql database');
|
||||
connection default;
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR written';
|
||||
SET GLOBAL innodb_ft_aux_table="test/t1";
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
|
||||
WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION
|
||||
database 2 3 2 2 0
|
||||
database 2 3 2 3 6
|
||||
mysql 1 3 2 1 0
|
||||
mysql 1 3 2 3 0
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
|
||||
WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION
|
||||
SET GLOBAL innodb_ft_aux_table=default;
|
||||
SELECT * FROM t1 WHERE MATCH(title) AGAINST('mysql database');
|
||||
FTS_DOC_ID title
|
||||
1 mysql
|
||||
2 database
|
||||
SET DEBUG_SYNC= 'now SIGNAL selected';
|
||||
connection con1;
|
||||
SET @old_dbug = @@SESSION.debug_dbug;
|
||||
SET GLOBAL innodb_ft_aux_table="test/t1";
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
|
||||
WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
|
||||
WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION
|
||||
database 2 3 2 2 0
|
||||
database 2 3 2 3 6
|
||||
mysql 1 3 2 1 0
|
||||
mysql 1 3 2 3 0
|
||||
SET GLOBAL innodb_ft_aux_table=default;
|
||||
SELECT * FROM t1 WHERE MATCH(title) AGAINST('mysql database');
|
||||
FTS_DOC_ID title
|
||||
3 mysql database
|
||||
1 mysql
|
||||
2 database
|
||||
connection default;
|
||||
DROP TABLE t1;
|
||||
# Case 2: Test insert and insert(sync)
|
||||
CREATE TABLE t1 (
|
||||
FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
title VARCHAR(200),
|
||||
FULLTEXT(title)
|
||||
) ENGINE = InnoDB;
|
||||
INSERT INTO t1(title) VALUES('mysql');
|
||||
INSERT INTO t1(title) VALUES('database');
|
||||
connection con1;
|
||||
SET debug_dbug = '+d,fts_instrument_sync_debug';
|
||||
SET DEBUG_SYNC= 'fts_write_node SIGNAL written WAIT_FOR inserted';
|
||||
INSERT INTO t1(title) VALUES('mysql database');
|
||||
connection default;
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR written';
|
||||
INSERT INTO t1(title) VALUES('mysql database');
|
||||
SET DEBUG_SYNC= 'now SIGNAL inserted';
|
||||
connection con1;
|
||||
SET debug_dbug = @old_dbug;
|
||||
SET GLOBAL innodb_ft_aux_table="test/t1";
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
|
||||
WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
|
||||
WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION
|
||||
database 2 3 2 2 0
|
||||
database 2 3 2 3 6
|
||||
database 4 4 1 4 6
|
||||
mysql 1 4 3 1 0
|
||||
mysql 1 4 3 3 0
|
||||
mysql 1 4 3 4 0
|
||||
SET GLOBAL innodb_ft_aux_table=default;
|
||||
SELECT * FROM t1 WHERE MATCH(title) AGAINST('mysql database');
|
||||
FTS_DOC_ID title
|
||||
3 mysql database
|
||||
4 mysql database
|
||||
1 mysql
|
||||
2 database
|
||||
connection default;
|
||||
disconnect con1;
|
||||
DROP TABLE t1;
|
||||
# Case 3: Test insert crash recovery
|
||||
CREATE TABLE t1 (
|
||||
FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
title VARCHAR(200),
|
||||
FULLTEXT(title)
|
||||
) ENGINE = InnoDB;
|
||||
INSERT INTO t1(title) VALUES('database');
|
||||
SET debug_dbug = '+d,fts_instrument_sync_debug,fts_write_node_crash';
|
||||
INSERT INTO t1(title) VALUES('mysql');
|
||||
ERROR HY000: Lost connection to MySQL server during query
|
||||
After restart
|
||||
SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database');
|
||||
FTS_DOC_ID title
|
||||
1 database
|
||||
SET @old_dbug = @@SESSION.debug_dbug;
|
||||
SET debug_dbug = '+d,fts_instrument_sync_debug';
|
||||
INSERT INTO t1(title) VALUES('mysql');
|
||||
SET debug_dbug = @old_dbug;
|
||||
SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database');
|
||||
FTS_DOC_ID title
|
||||
1 database
|
||||
2 mysql
|
||||
DROP TABLE t1;
|
||||
# Case 4: Test sync commit & rollback in background
|
||||
CREATE TABLE t1(
|
||||
id INT AUTO_INCREMENT,
|
||||
title VARCHAR(100),
|
||||
FULLTEXT(title),
|
||||
PRIMARY KEY(id)) ENGINE=InnoDB;
|
||||
SET debug_dbug = '+d,fts_instrument_sync';
|
||||
INSERT INTO t1(title) VALUES('mysql');
|
||||
SET debug_dbug = @old_dbug;
|
||||
SET @old_global_dbug = @@GLOBAL.debug_dbug;
|
||||
SET @old_dbug = @@SESSION.debug_dbug;
|
||||
SET GLOBAL debug_dbug='+d,fts_instrument_sync,fts_instrument_sync_interrupted';
|
||||
INSERT INTO t1(title) VALUES('database');
|
||||
SET GLOBAL debug_dbug = @old_global_dbug;
|
||||
SET debug_dbug = '+d,fts_instrument_sync_debug';
|
||||
INSERT INTO t1(title) VALUES('good');
|
||||
SET debug_dbug = @old_dbug;
|
||||
SET GLOBAL innodb_ft_aux_table="test/t1";
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
|
||||
WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION
|
||||
database 2 2 1 2 0
|
||||
good 3 3 1 3 0
|
||||
mysql 1 1 1 1 0
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
|
||||
WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION
|
||||
SET GLOBAL innodb_ft_aux_table=default;
|
||||
SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database good');
|
||||
id title
|
||||
1 mysql
|
||||
2 database
|
||||
3 good
|
||||
DROP TABLE t1;
|
83
mysql-test/suite/innodb_fts/r/sync_block.result
Normal file
83
mysql-test/suite/innodb_fts/r/sync_block.result
Normal file
|
@ -0,0 +1,83 @@
|
|||
SET @old_log_output = @@global.log_output;
|
||||
SET @old_slow_query_log = @@global.slow_query_log;
|
||||
SET @old_general_log = @@global.general_log;
|
||||
SET @old_long_query_time = @@global.long_query_time;
|
||||
SET @old_debug = @@global.debug_dbug;
|
||||
SET GLOBAL log_output = 'TABLE';
|
||||
SET GLOBAL general_log = 1;
|
||||
SET GLOBAL slow_query_log = 1;
|
||||
SET GLOBAL long_query_time = 1;
|
||||
connect con1,localhost,root,,;
|
||||
connect con2,localhost,root,,;
|
||||
connection default;
|
||||
# Case 1: Sync blocks DML(insert) on the same table.
|
||||
CREATE TABLE t1 (
|
||||
FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
title VARCHAR(200),
|
||||
FULLTEXT(title)
|
||||
) ENGINE = InnoDB;
|
||||
connection con1;
|
||||
SET GLOBAL debug_dbug='+d,fts_instrument_sync_debug,fts_instrument_sync_sleep';
|
||||
SET DEBUG_SYNC= 'fts_sync_begin SIGNAL begin WAIT_FOR continue';
|
||||
INSERT INTO t1(title) VALUES('mysql database');
|
||||
connection con2;
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR begin';
|
||||
SELECT * FROM t1 WHERE MATCH(title) AGAINST('mysql database');
|
||||
connection default;
|
||||
SET DEBUG_SYNC= 'now SIGNAL continue';
|
||||
connection con1;
|
||||
/* connection con1 */ INSERT INTO t1(title) VALUES('mysql database');
|
||||
connection con2;
|
||||
/* conneciton con2 */ SELECT * FROM t1 WHERE MATCH(title) AGAINST('mysql database');
|
||||
FTS_DOC_ID title
|
||||
connection default;
|
||||
# make con1 & con2 show up in mysql.slow_log
|
||||
SELECT SLEEP(2);
|
||||
SLEEP(2)
|
||||
0
|
||||
# slow log results should only contain INSERT INTO t1.
|
||||
SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02';
|
||||
sql_text
|
||||
INSERT INTO t1(title) VALUES('mysql database')
|
||||
SET GLOBAL debug_dbug = @old_debug_dbug;
|
||||
TRUNCATE TABLE mysql.slow_log;
|
||||
DROP TABLE t1;
|
||||
# Case 2: Sync blocks DML(insert) on other tables.
|
||||
CREATE TABLE t1 (
|
||||
FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
title VARCHAR(200),
|
||||
FULLTEXT(title)
|
||||
) ENGINE = InnoDB;
|
||||
CREATE TABLE t2(id INT);
|
||||
connection con1;
|
||||
SET GLOBAL debug_dbug='+d,fts_instrument_sync_request,fts_instrument_sync_sleep';
|
||||
SET DEBUG_SYNC= 'fts_instrument_sync_request SIGNAL begin WAIT_FOR continue';
|
||||
INSERT INTO t1(title) VALUES('mysql database');
|
||||
connection con2;
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR begin';
|
||||
INSERT INTO t2 VALUES(1);
|
||||
connection default;
|
||||
SET DEBUG_SYNC= 'now SIGNAL continue';
|
||||
connection con1;
|
||||
/* connection con1 */ INSERT INTO t1(title) VALUES('mysql database');
|
||||
connection con2;
|
||||
/* conneciton con2 */ INSERT INTO t2 VALUES(1);
|
||||
connection default;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
# make con1 & con2 show up in mysql.slow_log
|
||||
SELECT SLEEP(2);
|
||||
SLEEP(2)
|
||||
0
|
||||
# slow log results should be empty here.
|
||||
SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02';
|
||||
sql_text
|
||||
SET GLOBAL debug_dbug = @old_debug_dbug;
|
||||
TRUNCATE TABLE mysql.slow_log;
|
||||
DROP TABLE t1,t2;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
# Restore slow log settings.
|
||||
SET GLOBAL log_output = @old_log_output;
|
||||
SET GLOBAL general_log = @old_general_log;
|
||||
SET GLOBAL slow_query_log = @old_slow_query_log;
|
||||
SET GLOBAL long_query_time = @old_long_query_time;
|
31
mysql-test/suite/innodb_fts/r/truncate.result
Normal file
31
mysql-test/suite/innodb_fts/r/truncate.result
Normal file
|
@ -0,0 +1,31 @@
|
|||
#
|
||||
# Bug#25053705 - INVALID I/O ON TABLE AFTER TRUNCATE
|
||||
#
|
||||
CREATE TABLE t1 (a INT, d INT, b VARCHAR(198), c CHAR(158), FULLTEXT fts1(c,b),
|
||||
FULLTEXT fts2(c));
|
||||
TRUNCATE TABLE t1;
|
||||
INSERT INTO t1 (a,d,b,c) VALUES (
|
||||
'79795','6',repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'),
|
||||
repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorc
|
||||
cuullucocraloracurooulrooauuar','1'));
|
||||
CREATE TABLE t2 (a INT, d INT, b VARCHAR(198), c CHAR(158), FULLTEXT fts1(c,b));
|
||||
INSERT INTO t2 VALUES (1, 1, repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'),
|
||||
repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorccuullucocraloracurooulrooauuar','1'));
|
||||
create procedure insert_t2(IN total int)
|
||||
begin
|
||||
declare i int default 1;
|
||||
while (i <= total) DO
|
||||
insert into t2 select * from t2;
|
||||
set i = i + 1;
|
||||
end while;
|
||||
end|
|
||||
CALL insert_t2(15);
|
||||
SET @save_dbug = @@SESSION.DEBUG_DBUG;
|
||||
SET DEBUG_DBUG = '+d,innodb_invalid_read_after_truncate';
|
||||
INSERT INTO t1 (a,d,b,c) VALUES (
|
||||
'7795','6',repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'),
|
||||
repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorc
|
||||
cuullucocraloracurooulrooauuar','1'));
|
||||
SET DEBUG_DBUG = @save_dbug;
|
||||
DROP PROCEDURE insert_t2;
|
||||
DROP TABLE t1,t2;
|
20
mysql-test/suite/innodb_fts/t/concurrent_insert.test
Normal file
20
mysql-test/suite/innodb_fts/t/concurrent_insert.test
Normal file
|
@ -0,0 +1,20 @@
|
|||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
CREATE TABLE t1(a VARCHAR(5),FULLTEXT KEY(a)) ENGINE=InnoDB;
|
||||
SET DEBUG_SYNC = 'get_next_FTS_DOC_ID SIGNAL prepared WAIT_FOR race';
|
||||
--send
|
||||
REPLACE INTO t1(a) values('aaa');
|
||||
|
||||
connect(dml, localhost, root, ,);
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR prepared';
|
||||
REPLACE INTO t1(a) VALUES('aaa');
|
||||
SET DEBUG_SYNC = 'now SIGNAL race';
|
||||
disconnect dml;
|
||||
|
||||
connection default;
|
||||
reap;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
|
||||
DROP TABLE t1;
|
|
@ -4,10 +4,6 @@
|
|||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)) ENGINE = InnoDB;
|
||||
INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'),
|
||||
('Full-text indexes', 'are called collections'),
|
||||
|
@ -679,3 +675,45 @@ DEALLOCATE PREPARE stmt;
|
|||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
# This is an adapted and extended version of an Oracle test for
|
||||
# Bug#21140111: Explain ... match against: Assertion failed: ret ...
|
||||
# No bug was repeatable for MariaDB.
|
||||
|
||||
CREATE TABLE z(a INTEGER) engine=innodb;
|
||||
CREATE TABLE q(b TEXT CHARSET latin1, fulltext(b)) engine=innodb;
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
EXPLAIN SELECT 1 FROM q WHERE (SELECT MATCH(b) AGAINST ('*') FROM z);
|
||||
--error ER_PARSE_ERROR
|
||||
SELECT 1 FROM q WHERE (SELECT MATCH(b) AGAINST ('*') FROM z);
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM z;
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
SELECT MATCH(b) AGAINST ('*') FROM z;
|
||||
--error ER_FT_MATCHING_KEY_NOT_FOUND
|
||||
EXPLAIN SELECT MATCH(a) AGAINST ('*') FROM z;
|
||||
--error ER_FT_MATCHING_KEY_NOT_FOUND
|
||||
SELECT MATCH(a) AGAINST ('*') FROM z;
|
||||
EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM q;
|
||||
--error ER_PARSE_ERROR
|
||||
SELECT MATCH(b) AGAINST ('*') FROM q;
|
||||
|
||||
DROP TABLE z, q;
|
||||
|
||||
create table t (
|
||||
FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY, t TEXT, FULLTEXT KEY (t)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t values (1, 'foo bar'), (2, 'foo bar'), (3, 'foo');
|
||||
let $limit=0;
|
||||
let $N=6;
|
||||
while ($N)
|
||||
{
|
||||
eval SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE)
|
||||
LIMIT $limit;
|
||||
inc $limit;
|
||||
dec $N;
|
||||
}
|
||||
|
||||
DROP TABLE t;
|
||||
|
|
2
mysql-test/suite/innodb_fts/t/sync.opt
Normal file
2
mysql-test/suite/innodb_fts/t/sync.opt
Normal file
|
@ -0,0 +1,2 @@
|
|||
--innodb-ft-index-cache
|
||||
--innodb-ft-index-table
|
170
mysql-test/suite/innodb_fts/t/sync.test
Normal file
170
mysql-test/suite/innodb_fts/t/sync.test
Normal file
|
@ -0,0 +1,170 @@
|
|||
#
|
||||
# BUG#22516559 MYSQL INSTANCE STALLS WHEN SYNCING FTS INDEX
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/not_valgrind.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/not_crashrep.inc
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connection default;
|
||||
|
||||
--echo # Case 1: Test select and insert(row in both disk and cache)
|
||||
CREATE TABLE t1 (
|
||||
FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
title VARCHAR(200),
|
||||
FULLTEXT(title)
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
INSERT INTO t1(title) VALUES('mysql');
|
||||
INSERT INTO t1(title) VALUES('database');
|
||||
|
||||
connection con1;
|
||||
|
||||
SET @old_dbug = @@SESSION.debug_dbug;
|
||||
SET debug_dbug = '+d,fts_instrument_sync_debug';
|
||||
|
||||
SET DEBUG_SYNC= 'fts_write_node SIGNAL written WAIT_FOR selected';
|
||||
|
||||
send INSERT INTO t1(title) VALUES('mysql database');
|
||||
|
||||
connection default;
|
||||
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR written';
|
||||
|
||||
SET GLOBAL innodb_ft_aux_table="test/t1";
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
|
||||
SET GLOBAL innodb_ft_aux_table=default;
|
||||
|
||||
SELECT * FROM t1 WHERE MATCH(title) AGAINST('mysql database');
|
||||
|
||||
SET DEBUG_SYNC= 'now SIGNAL selected';
|
||||
|
||||
connection con1;
|
||||
--reap
|
||||
|
||||
SET @old_dbug = @@SESSION.debug_dbug;
|
||||
|
||||
SET GLOBAL innodb_ft_aux_table="test/t1";
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
|
||||
SET GLOBAL innodb_ft_aux_table=default;
|
||||
|
||||
SELECT * FROM t1 WHERE MATCH(title) AGAINST('mysql database');
|
||||
|
||||
connection default;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # Case 2: Test insert and insert(sync)
|
||||
CREATE TABLE t1 (
|
||||
FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
title VARCHAR(200),
|
||||
FULLTEXT(title)
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
INSERT INTO t1(title) VALUES('mysql');
|
||||
INSERT INTO t1(title) VALUES('database');
|
||||
|
||||
connection con1;
|
||||
|
||||
SET debug_dbug = '+d,fts_instrument_sync_debug';
|
||||
|
||||
SET DEBUG_SYNC= 'fts_write_node SIGNAL written WAIT_FOR inserted';
|
||||
|
||||
send INSERT INTO t1(title) VALUES('mysql database');
|
||||
|
||||
connection default;
|
||||
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR written';
|
||||
|
||||
INSERT INTO t1(title) VALUES('mysql database');
|
||||
|
||||
SET DEBUG_SYNC= 'now SIGNAL inserted';
|
||||
|
||||
connection con1;
|
||||
--reap
|
||||
|
||||
SET debug_dbug = @old_dbug;
|
||||
|
||||
SET GLOBAL innodb_ft_aux_table="test/t1";
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
|
||||
SET GLOBAL innodb_ft_aux_table=default;
|
||||
|
||||
SELECT * FROM t1 WHERE MATCH(title) AGAINST('mysql database');
|
||||
|
||||
connection default;
|
||||
disconnect con1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # Case 3: Test insert crash recovery
|
||||
--let $_expect_file_name=$MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
|
||||
|
||||
CREATE TABLE t1 (
|
||||
FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
title VARCHAR(200),
|
||||
FULLTEXT(title)
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
INSERT INTO t1(title) VALUES('database');
|
||||
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
SET debug_dbug = '+d,fts_instrument_sync_debug,fts_write_node_crash';
|
||||
|
||||
--error 2013
|
||||
INSERT INTO t1(title) VALUES('mysql');
|
||||
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
-- echo After restart
|
||||
SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database');
|
||||
|
||||
SET @old_dbug = @@SESSION.debug_dbug;
|
||||
|
||||
SET debug_dbug = '+d,fts_instrument_sync_debug';
|
||||
|
||||
INSERT INTO t1(title) VALUES('mysql');
|
||||
|
||||
SET debug_dbug = @old_dbug;
|
||||
|
||||
SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database');
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # Case 4: Test sync commit & rollback in background
|
||||
CREATE TABLE t1(
|
||||
id INT AUTO_INCREMENT,
|
||||
title VARCHAR(100),
|
||||
FULLTEXT(title),
|
||||
PRIMARY KEY(id)) ENGINE=InnoDB;
|
||||
|
||||
SET debug_dbug = '+d,fts_instrument_sync';
|
||||
INSERT INTO t1(title) VALUES('mysql');
|
||||
SET debug_dbug = @old_dbug;
|
||||
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
SET @old_global_dbug = @@GLOBAL.debug_dbug;
|
||||
SET @old_dbug = @@SESSION.debug_dbug;
|
||||
SET GLOBAL debug_dbug='+d,fts_instrument_sync,fts_instrument_sync_interrupted';
|
||||
INSERT INTO t1(title) VALUES('database');
|
||||
SET GLOBAL debug_dbug = @old_global_dbug;
|
||||
|
||||
SET debug_dbug = '+d,fts_instrument_sync_debug';
|
||||
INSERT INTO t1(title) VALUES('good');
|
||||
SET debug_dbug = @old_dbug;
|
||||
|
||||
SET GLOBAL innodb_ft_aux_table="test/t1";
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
|
||||
SET GLOBAL innodb_ft_aux_table=default;
|
||||
|
||||
SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database good');
|
||||
|
||||
DROP TABLE t1;
|
124
mysql-test/suite/innodb_fts/t/sync_block.test
Normal file
124
mysql-test/suite/innodb_fts/t/sync_block.test
Normal file
|
@ -0,0 +1,124 @@
|
|||
#
|
||||
# BUG#22516559 MYSQL INSTANCE STALLS WHEN SYNCING FTS INDEX
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/have_log_bin.inc
|
||||
--source include/count_sessions.inc
|
||||
|
||||
SET @old_log_output = @@global.log_output;
|
||||
SET @old_slow_query_log = @@global.slow_query_log;
|
||||
SET @old_general_log = @@global.general_log;
|
||||
SET @old_long_query_time = @@global.long_query_time;
|
||||
SET @old_debug = @@global.debug_dbug;
|
||||
|
||||
SET GLOBAL log_output = 'TABLE';
|
||||
SET GLOBAL general_log = 1;
|
||||
SET GLOBAL slow_query_log = 1;
|
||||
SET GLOBAL long_query_time = 1;
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connect (con2,localhost,root,,);
|
||||
connection default;
|
||||
|
||||
--echo # Case 1: Sync blocks DML(insert) on the same table.
|
||||
CREATE TABLE t1 (
|
||||
FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
title VARCHAR(200),
|
||||
FULLTEXT(title)
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
connection con1;
|
||||
|
||||
SET GLOBAL debug_dbug='+d,fts_instrument_sync_debug,fts_instrument_sync_sleep';
|
||||
|
||||
SET DEBUG_SYNC= 'fts_sync_begin SIGNAL begin WAIT_FOR continue';
|
||||
|
||||
send INSERT INTO t1(title) VALUES('mysql database');
|
||||
|
||||
connection con2;
|
||||
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR begin';
|
||||
|
||||
send SELECT * FROM t1 WHERE MATCH(title) AGAINST('mysql database');
|
||||
|
||||
connection default;
|
||||
SET DEBUG_SYNC= 'now SIGNAL continue';
|
||||
|
||||
connection con1;
|
||||
--echo /* connection con1 */ INSERT INTO t1(title) VALUES('mysql database');
|
||||
--reap
|
||||
|
||||
connection con2;
|
||||
--echo /* conneciton con2 */ SELECT * FROM t1 WHERE MATCH(title) AGAINST('mysql database');
|
||||
--reap
|
||||
|
||||
connection default;
|
||||
-- echo # make con1 & con2 show up in mysql.slow_log
|
||||
SELECT SLEEP(2);
|
||||
-- echo # slow log results should only contain INSERT INTO t1.
|
||||
SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02';
|
||||
|
||||
SET GLOBAL debug_dbug = @old_debug_dbug;
|
||||
TRUNCATE TABLE mysql.slow_log;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # Case 2: Sync blocks DML(insert) on other tables.
|
||||
CREATE TABLE t1 (
|
||||
FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
title VARCHAR(200),
|
||||
FULLTEXT(title)
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
CREATE TABLE t2(id INT);
|
||||
|
||||
connection con1;
|
||||
|
||||
SET GLOBAL debug_dbug='+d,fts_instrument_sync_request,fts_instrument_sync_sleep';
|
||||
|
||||
SET DEBUG_SYNC= 'fts_instrument_sync_request SIGNAL begin WAIT_FOR continue';
|
||||
|
||||
send INSERT INTO t1(title) VALUES('mysql database');
|
||||
|
||||
connection con2;
|
||||
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR begin';
|
||||
|
||||
send INSERT INTO t2 VALUES(1);
|
||||
|
||||
connection default;
|
||||
SET DEBUG_SYNC= 'now SIGNAL continue';
|
||||
|
||||
connection con1;
|
||||
--echo /* connection con1 */ INSERT INTO t1(title) VALUES('mysql database');
|
||||
--reap
|
||||
|
||||
connection con2;
|
||||
--echo /* conneciton con2 */ INSERT INTO t2 VALUES(1);
|
||||
--reap
|
||||
|
||||
connection default;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
-- echo # make con1 & con2 show up in mysql.slow_log
|
||||
SELECT SLEEP(2);
|
||||
-- echo # slow log results should be empty here.
|
||||
SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02';
|
||||
|
||||
SET GLOBAL debug_dbug = @old_debug_dbug;
|
||||
TRUNCATE TABLE mysql.slow_log;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
-- echo # Restore slow log settings.
|
||||
SET GLOBAL log_output = @old_log_output;
|
||||
SET GLOBAL general_log = @old_general_log;
|
||||
SET GLOBAL slow_query_log = @old_slow_query_log;
|
||||
SET GLOBAL long_query_time = @old_long_query_time;
|
1
mysql-test/suite/innodb_fts/t/truncate.opt
Normal file
1
mysql-test/suite/innodb_fts/t/truncate.opt
Normal file
|
@ -0,0 +1 @@
|
|||
--innodb-random-read-ahead=1
|
50
mysql-test/suite/innodb_fts/t/truncate.test
Normal file
50
mysql-test/suite/innodb_fts/t/truncate.test
Normal file
|
@ -0,0 +1,50 @@
|
|||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
|
||||
--echo #
|
||||
--echo # Bug#25053705 - INVALID I/O ON TABLE AFTER TRUNCATE
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT, d INT, b VARCHAR(198), c CHAR(158), FULLTEXT fts1(c,b),
|
||||
FULLTEXT fts2(c));
|
||||
|
||||
TRUNCATE TABLE t1;
|
||||
|
||||
INSERT INTO t1 (a,d,b,c) VALUES (
|
||||
'79795','6',repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'),
|
||||
repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorc
|
||||
cuullucocraloracurooulrooauuar','1'));
|
||||
|
||||
# The following CREATE TABLE and INSERTs are used to remove the pages related to table t1
|
||||
# from the buffer pool.
|
||||
CREATE TABLE t2 (a INT, d INT, b VARCHAR(198), c CHAR(158), FULLTEXT fts1(c,b));
|
||||
|
||||
INSERT INTO t2 VALUES (1, 1, repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'),
|
||||
repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorccuullucocraloracurooulrooauuar','1'));
|
||||
|
||||
delimiter |;
|
||||
create procedure insert_t2(IN total int)
|
||||
begin
|
||||
declare i int default 1;
|
||||
while (i <= total) DO
|
||||
insert into t2 select * from t2;
|
||||
set i = i + 1;
|
||||
end while;
|
||||
end|
|
||||
delimiter ;|
|
||||
|
||||
CALL insert_t2(15);
|
||||
|
||||
SET @save_dbug = @@SESSION.DEBUG_DBUG;
|
||||
SET DEBUG_DBUG = '+d,innodb_invalid_read_after_truncate';
|
||||
|
||||
INSERT INTO t1 (a,d,b,c) VALUES (
|
||||
'7795','6',repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'),
|
||||
repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorc
|
||||
cuullucocraloracurooulrooauuar','1'));
|
||||
|
||||
SET DEBUG_DBUG = @save_dbug;
|
||||
|
||||
DROP PROCEDURE insert_t2;
|
||||
|
||||
DROP TABLE t1,t2;
|
26
mysql-test/suite/innodb_gis/disabled.def
Normal file
26
mysql-test/suite/innodb_gis/disabled.def
Normal file
|
@ -0,0 +1,26 @@
|
|||
##############################################################################
|
||||
#
|
||||
# List the test cases that are to be disabled temporarily.
|
||||
#
|
||||
# Separate the test case name and the comment with ':'.
|
||||
#
|
||||
# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
|
||||
#
|
||||
# Do not use any TAB characters for whitespace.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
gis_split_inf : MDEV-14057 InnoDB GIS tests fail
|
||||
row_format : MDEV-14057 InnoDB GIS tests fail
|
||||
rtree_estimate : MDEV-14057 InnoDB GIS tests fail
|
||||
rtree_multi_pk : MDEV-14057 InnoDB GIS tests fail
|
||||
rtree_recovery : MDEV-14058 InnoDB Assertion failure !leaf on rem0rec.cc line 566 on test innodb_gis.rtree_recovery
|
||||
tree_search : MDEV-14057 InnoDB GIS tests fail
|
||||
rtree_concurrent_srch: MDEV-14059 InnoDB assertion failure offset >= ((38U + 36 + 2 * 10) + 5) at page0page.h line 318
|
||||
point_big : MDEV-14057 InnoDB GIS tests fail
|
||||
geometry : MDEV-14057 InnoDB GIS tests fail
|
||||
bug17057168 : MDEV-14057 InnoDB GIS tests fail
|
||||
bug16236208 : MDEV-14057 InnoDB GIS tests fail
|
||||
bug16266012 : MDEV-14057 InnoDB GIS tests fail
|
||||
rtree_search : MDEV-14057 InnoDB GIS tests fail
|
||||
rtree_old : MDEV-14057 InnoDB GIS tests fail
|
43
mysql-test/suite/innodb_gis/r/bug16236208.result
Normal file
43
mysql-test/suite/innodb_gis/r/bug16236208.result
Normal file
|
@ -0,0 +1,43 @@
|
|||
DROP TABLE IF EXISTS linestring;
|
||||
CREATE TABLE linestring (pk INTEGER NOT NULL PRIMARY KEY, linestring_key
|
||||
GEOMETRY NOT NULL, linestring_nokey GEOMETRY NOT NULL) ENGINE=InnoDB ;
|
||||
INSERT INTO linestring (pk, linestring_key, linestring_nokey) VALUES (1,
|
||||
ST_GeomFromText('POINT(10 10) '), ST_GeomFromText('POINT(10 10) '));
|
||||
INSERT INTO linestring (pk, linestring_key, linestring_nokey) VALUES (2,
|
||||
ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'), ST_GeomFromText('LINESTRING(10
|
||||
10,20 20,30 30)'));
|
||||
INSERT INTO linestring (pk, linestring_key, linestring_nokey) VALUES (3,
|
||||
ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10
|
||||
10))'), ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40
|
||||
40,10 10))'));
|
||||
INSERT INTO linestring (pk, linestring_key, linestring_nokey) VALUES (4,
|
||||
ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '), ST_GeomFromText('MULTIPOINT(0
|
||||
0,5 5,10 10,20 20) '));
|
||||
INSERT INTO linestring (pk, linestring_key, linestring_nokey) VALUES (5,
|
||||
ST_GeomFromText('MULTILINESTRING((1 1,2 2,3 3),(10 10,20 20,30 30))'),
|
||||
ST_GeomFromText('MULTILINESTRING((1 1,2 2,3 3),(10 10,20 20,30 30))'));
|
||||
INSERT INTO linestring (pk, linestring_key, linestring_nokey) VALUES (6,
|
||||
ST_GeomFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73
|
||||
9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))'),
|
||||
ST_GeomFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73
|
||||
9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))'));
|
||||
INSERT INTO linestring (pk, linestring_key, linestring_nokey) VALUES (7,
|
||||
ST_GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))'),
|
||||
ST_GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))'));
|
||||
CREATE INDEX linestring_index ON linestring(linestring_nokey(5));
|
||||
ALTER TABLE linestring ADD KEY (linestring_key(5));
|
||||
SELECT ST_AsText(linestring_nokey) FROM linestring FORCE KEY (
|
||||
linestring_key ) WHERE ST_CONTAINS( ST_GeomFromText('POLYGON( ( 3923 2815 , 4246
|
||||
2122 , 4028 2971 , 4017 3019 , 3923 2815 ) )') , linestring_key ) AND
|
||||
ST_WITHIN( ST_GeomFromText('POLYGON( ( 4135 3009 , 4914 3087 , 4236 3194 , 4091
|
||||
3036 , 4022 3004 , 4087 3004 , 3853 2825 , 3490 3118 , 3784 3141 , 4052 3072
|
||||
, 4205 2787 , 4024 2951 , 4076 3036 , 4041 3053 , 3789 3401 , 4080 3100 ,
|
||||
4169 2867 , 4056 3029 , 4715 3943 , 4052 3098 , 4035 3080 , 4013 3077 , 4218
|
||||
2915 , 3789 2980 , 4058 3046 , 4042 3043 , 4135 3009 ) )') , linestring_nokey
|
||||
) AND ST_CONTAINS( ST_GeomFromText('POLYGON( ( 4082 2842 , 3678 3647 , 3420 3068
|
||||
, 4018 3030 , 4082 2842 ) )') , linestring_key ) OR ST_INTERSECTS(
|
||||
ST_GeomFromText('MULTILINESTRING( ( 4147 2871 , 4072 3042 , 4081 3099 , 3796
|
||||
3021 , 4007 3463 ) , ( 4042 2808 , 4109 2816 , 3730 3673 ) )') ,
|
||||
linestring_key ) AND ST_Length( linestring_nokey ) > 1;
|
||||
ERROR 22023: Invalid GIS data provided to function st_within.
|
||||
DROP TABLE linestring;
|
9
mysql-test/suite/innodb_gis/r/bug16266012.result
Normal file
9
mysql-test/suite/innodb_gis/r/bug16266012.result
Normal file
|
@ -0,0 +1,9 @@
|
|||
SELECT ST_WITHIN( LINESTRINGFROMTEXT(' LINESTRING( 5 9 , 3 4 , 4 1 , 4
|
||||
4 , 4 9 ) ') , ST_SYMDIFFERENCE( ST_UNION( ST_ENVELOPE( POLYGONFROMTEXT('
|
||||
POLYGON( ( 3 2 , 0 6 , 2 3 , 8 0 , 4 6 , 7 2 , 3 2 ) ) ') ) ,
|
||||
MULTIPOLYGONFROMTEXT('
|
||||
MULTIPOLYGON( ( ( 0 0 , 7 1 , 6 8 , 0 0 ) ) , ( ( 9 9 , 4 0 , 4 7 , 9 9) ) )
|
||||
') ) , ST_SYMDIFFERENCE( POLYGONFROMTEXT(' POLYGON( ( 9 9 , 6 5 , 2 3 , 9 9
|
||||
) ) ') , MULTIPOLYGONFROMTEXT(' MULTIPOLYGON( ( ( 2 2 , 5 2 , 5 2 , 2 6 , 2
|
||||
2 ) ) , ( ( 7 7 , 3 7 , 2 9 , 7 1 , 7 7 ) ) ) ') ) ) );
|
||||
ERROR HY000: Geometry overlay calculation error: geometry data is invalid in function st_union.
|
24
mysql-test/suite/innodb_gis/r/bug17057168.result
Normal file
24
mysql-test/suite/innodb_gis/r/bug17057168.result
Normal file
|
@ -0,0 +1,24 @@
|
|||
CREATE DATABASE geotest;
|
||||
use geotest;
|
||||
CREATE TABLE tmp (id int unsigned NOT NULL PRIMARY KEY);
|
||||
INSERT INTO tmp VALUES (0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
|
||||
INSERT INTO tmp SELECT 10+id FROM tmp;
|
||||
INSERT INTO tmp SELECT 20+id FROM tmp;
|
||||
INSERT INTO tmp SELECT 40+id FROM tmp;
|
||||
INSERT INTO tmp SELECT 80+id FROM tmp;
|
||||
CREATE TABLE t1 (id int unsigned NOT NULL auto_increment PRIMARY KEY,
|
||||
location point, INDEX (location)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 (location) SELECT POINT(tmp1.id, tmp2.id) FROM tmp tmp1,
|
||||
tmp tmp2 ORDER BY tmp1.id, tmp2.id;
|
||||
EXPLAIN SELECT id, ST_AsText(location) FROM t1 WHERE location = POINT(1,
|
||||
2);
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 NULL ref location location 28 const 1 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `geotest`.`t1`.`id` AS `id`,st_astext(`geotest`.`t1`.`location`) AS `ST_AsText(location)` from `geotest`.`t1` where (`geotest`.`t1`.`location` = <cache>(point(1,2)))
|
||||
SELECT id, ST_AsText(location) FROM t1 WHERE location = POINT(1, 2);
|
||||
id ST_AsText(location)
|
||||
163 POINT(1 2)
|
||||
DROP TABLE t1;
|
||||
DROP TABLE tmp;
|
||||
DROP DATABASE geotest;
|
1150
mysql-test/suite/innodb_gis/r/geometry.result
Normal file
1150
mysql-test/suite/innodb_gis/r/geometry.result
Normal file
File diff suppressed because it is too large
Load diff
23
mysql-test/suite/innodb_gis/r/gis_split_inf.result
Normal file
23
mysql-test/suite/innodb_gis/r/gis_split_inf.result
Normal file
|
@ -0,0 +1,23 @@
|
|||
create table t1(a geometrycollection not null,spatial key(a))engine=innodb;
|
||||
insert into t1(a) values( geometrycollection(multipolygon(polygon(linestring(point(-14,98), point(-14,98)), linestring(point(-97,64), point(-70,99), point(-97,64)), linestring(point(143851215403059150000000000000000000000.000000,13040009882500140000000000000000000000.000000), point(-73,85), point(-88,-29)))), multipolygon(polygon(linestring(point(41,95), point(4294967298,2050)), linestring(point(-61,85), point(-75,93), point(14,-2), point(1,84), point(-61,85)), linestring(point(-62,52), point(39,5), point(-18,12), point(-62,52))), polygon(linestring(point(-77,1), point(66,61), point(-77,1)), linestring(point(18446744073709551615,1125899906842622), point(-72,49), point(24,-66), point(82,73), point(68,22))), polygon(linestring(point(1048576,17179869181), point(-18,95), point(-90,-3), point(-33,82), point(20,-85)), linestring(point(-43,-97), point(-7,-3), point(39,-82), point(-65,-58), point(-43,-97)), linestring(point(44,-34), point(-69,58), point(44,-34)), linestring(point(57,-13), point(-17,74), point(57,-13)), linestring(point(3,71), point(-58,81), point(3,71)), linestring(point(9,25), point(77,-71), point(8388607,67108864), point(46,46), point(9,25)), linestring(point(98,-82), point(98,-82))))) ) ;
|
||||
ERROR 22023: Invalid GIS data provided to function polygon.
|
||||
insert into t1(a) values( geometrycollection(multilinestring(linestring(point(39,-60), point(-62,-11), point(-24,35), point(54,1)), linestring(point(-4,69), point(-22,-64), point(1.694824e+308,5.688896e+307), point(-33,-58), point(-64,-80), point(-15,-44), point(40,54)), linestring(point(-86,-54), point(11,41), point(-46,-38), point(-21,-8), point(10,70), point(-81,22), point(-46,-100)), linestring(point(-30,-48), point(50,58), point(-53,92), point(10,41), point(-46,-8)), linestring(point(-65,34), point(-92,93), point(-33,-74), point(75,-28)), linestring(point(25,-55), point(22,-10), point(-42,0), point(-86,-59), point(2,-37), point(63,-44), point(-55,-22)), linestring(point(28,0), point(-94,99), point(-32,-86)), linestring(point(9,-12), point(16,9), point(80,-73)), linestring(point(6,-55), point(83,-4)), linestring(point(-15,21), point(144115188075855876,16777212), point(-85,-31), point(-90,-50)), linestring(point(-33,33), point(21,90), point(-89,32)), linestring(point(16,24), point(73,-13), point(25,-48), point(71,52), point(-54,-78), point(-84,59), point(53,29)), linestring(point(-15,-81), point(83,43), point(-71,33), point(-8,0), point(84,-54), point(-35,38), point(-10,-50)), linestring(point(38,-50), point(20,-2), point(-57,-92)), linestring(point(5,-93), point(231601833467477080000000000000000000000.000000,51914987457169239000000000000000000000.000000), point(-94,62))), point(2,0)) ) ;
|
||||
insert into t1(a) values( geometrycollection(multilinestring(linestring(point(80,-15), point(65,-57), point(-59,16), point(22,-67)), linestring(point(20,-55), point(-38,-64), point(19,-53), point(-63,-36), point(56,-37)), linestring(point(27,-8), point(-85,-75), point(4398046511106,2251799813685245)), linestring(point(45,32), point(-79,46))), multilinestring(linestring(point(8,-4), point(40,-38), point(100,95), point(5,-80), point(82,88)), linestring(point(-14,30), point(-94,51), point(-16,-29), point(37,-97), point(-26,92)), linestring(point(32,34), point(83,-23), point(-55,57), point(-15,90), point(32,-50), point(-20,-73), point(77,28)), linestring(point(4,88), point(87,74), point(-67,-58)), linestring(point(5.660747e+307,6.385657e+307), point(-58,-15), point(1.172095e+308,1.448533e+308)), linestring(point(-21,-37), point(-52,79), point(-16,-76), point(-65,-94), point(36,7), point(37,74), point(100,-57)), linestring(point(-23,-82), point(-73,23), point(18,-34)), linestring(point(20,-51), point(93,62), point(-65,84)), linestring(point(-48,31), point(-69,-96)), linestring(point(-5,78), point(10,-99), point(36,-33)), linestring(point(-84,55), point(96,1), point(-98,-29), point(-15,81), point(-27,-6), point(58,-32), point(54,-16)), linestring(point(2,5), point(2199023255553,8192)), linestring(point(12,-78), point(-97,-83)), linestring(point(-74,79), point(35,-56), point(50,95)), linestring(point(28,16), point(-39,-40), point(48,-3)), linestring(point(2199023255550,-65539), point(62,-25), point(94,-62)), linestring(point(-74,83), point(-18,75), point(91,17), point(-11,-48), point(30,100)), linestring(point(57,-13), point(88,-45)), linestring(point(20,-64), point(-37,13), point(20,35))), point(-3,-4)) ) ;
|
||||
insert into t1(a) values( geometrycollection(multipolygon(polygon(linestring(point(-34,19), point(-25,92), point(61921390294166805000000000000000000000.000000,319674749161701840000000000000000000000.000000), point(56,50), point(-34,19)), linestring(point(-26,-58), point(99,-50), point(34,-20), point(-26,-58)), linestring(point(-42,45), point(-63,-7), point(5,-89), point(-97,36), point(-42,45)), linestring(point(94,11), point(-71,4), point(94,11)), linestring(point(16,25), point(4,-33), point(-45,-33), point(-64,-77), point(16,25)), linestring(point(19,45), point(36,45), point(-83,-96), point(19,45)), linestring(point(85,-31), point(-87,52), point(85,-31))), polygon(linestring(point(55,-88), point(63,-12), point(55,-88)), linestring(point(-49,10), point(-49,10)), linestring(point(-51,-32), point(-51,-32)))), multipolygon(polygon(linestring(point(-21,-8), point(66,-58), point(100,-27), point(-21,-8)), linestring(point(-29,-13), point(-29,-13))), polygon(linestring(point(91307574660224730000000000000000000000.000000,101214152547755520000000000000000000000.000000), point(89,64), point(77,87), point(66,29), point(-71,-53)), linestring(point(38,-78), point(-43,-90), point(37,20), point(81,65), point(38,-78))), polygon(linestring(point(51,0), point(-62,8), point(-11,22), point(51,0)), linestring(point(-4,-44), point(6,82), point(-19,-90), point(131,32)))), point(-4,-7)) ) ;
|
||||
ERROR 22023: Invalid GIS data provided to function polygon.
|
||||
insert into t1(a) values( geometrycollection(point(10,9), linestring(point(2305843009213693955,-1125899906842621), point(78,15)), multipoint(point(-1,3), point(4,-6))) ) ;
|
||||
insert into t1(a) values( geometrycollection(polygon(linestring(point(0,13), point(-12,5), point(0,13)), linestring(point(11,-2), point(6,6), point(20,-14), point(-3,-10), point(1.330588e+308,2.666476e+307)), linestring(point(16382,67), point(7,4)), linestring(point(2,7), point(-14,15), point(2,7)), linestring(point(-14,12), point(-8,-8), point(-17,-2), point(-14,12)), linestring(point(-20,-10), point(-8,-13), point(-19,-17), point(13,-3), point(-20,-10)), linestring(point(-5,13), point(7,-9), point(6,8), point(-5,13))), linestring(point(-87,19), point(-64,51), point(-16,12)), multipoint(point(-1,-10), point(2,-10), point(3.670354e+307,2.501459e+307))) ) ;
|
||||
ERROR 22023: Invalid GIS data provided to function polygon.
|
||||
insert into t1(a) values( geometrycollection(multipoint(point(-3,7), point(4,-3), point(-6,-2), point(-9,1)), polygon(linestring(point(-17,-5), point(2,-8), point(-6,9), point(-9,19), point(-17,-5)), linestring(point(10,-1), point(15,-7), point(-13,6), point(10,-1))), multipolygon(polygon(linestring(point(69,-69), point(-90,-64), point(-17,4), point(47,-73), point(69,-69)), linestring(point(-35,-77), point(-35,-77)), linestring(point(95,-76), point(1.636688e+308,1.828723e+307), point(68719476740,536870916), point(95,-76)), linestring(point(-26,-85), point(-26,-85)), linestring(point(-53,57), point(-53,57)), linestring(point(-98,-64), point(79,-57), point(-98,-64)), linestring(point(-91,59), point(16,0), point(73,97), point(-35,-70), point(-91,59))))) ) ;
|
||||
ERROR 22023: Invalid GIS data provided to function polygon.
|
||||
insert into t1(a) values( geometrycollection(linestring(point(85,-29), point(15,84), point(39,-92), point(-99,19)), multilinestring(linestring(point(63,10), point(-47,95), point(10,-49), point(16,-65), point(-98,40), point(25,44), point(-55,-92)), linestring(point(5.266810e+307,6.648813e+307), point(47,33), point(-15,-13), point(-92,-58), point(36,73)), linestring(point(77,-56), point(-53,-10), point(-28,76), point(-51,6), point(51,-31), point(-95,81), point(92,26)), linestring(point(-91,7), point(58,53)), linestring(point(18,5), point(18,40), point(71,89), point(7.898707e+307,1.202585e+308), point(53,100)), linestring(point(-60,-18), point(-10,-31), point(-6,-25), point(-57,-95), point(16,77)))) ) ;
|
||||
insert into t1(a) values( geometrycollection(polygon(linestring(point(-9,0), point(-17,-15), point(-9,0)), linestring(point(-11,1), point(18,12), point(15,3), point(7,0), point(-11,1)), linestring(point(19,5), point(19,5)), linestring(point(17,-11), point(8,4), point(17,-11)), linestring(point(14914539334033432000000000000000000000.000000,127247994336690690000000000000000000000.000000), point(-14,-7), point(13,-2))), point(-4,-7), polygon(linestring(point(-18,9), point(11,-1), point(-18,9)), linestring(point(9,-3), point(9,-3)), linestring(point(-7,-9), point(9,-11), point(11,14), point(1.663324e+308,1.572127e+308)), linestring(point(-15,4), point(18,12), point(7,2), point(-15,4)), linestring(point(-15,-18), point(-20,-15), point(1152921504606846972,34359738370))), polygon(linestring(point(-5,-19), point(-11,11), point(10,5), point(-7,13), point(-5,-19)), linestring(point(-8,-6), point(-4,16), point(-8,-6)), linestring(point(-6,-10), point(3,-12), point(-6,-10)), linestring(point(-16,1), point(20,-12), point(-16,1)), linestring(point(-8,5), point(-20,-4), point(4,1), point(-6,-6), point(-8,5)), linestring(point(-8,-11), point(-5,-14), point(-8,-11)), linestring(point(3,-16), point(-15,-13), point(1.166708e+308,1.901147e+307), point(-8,6), point(3,-16))), point(0,-5)) ) ;
|
||||
ERROR 22023: Invalid GIS data provided to function polygon.
|
||||
insert into t1(a) values( geometrycollection(linestring(point(-33,99), point(99,-87), point(38,-79), point(33,-39), point(-91,-8), point(46,-87))) ) ;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
drop table t1;
|
292
mysql-test/suite/innodb_gis/r/gis_split_nan.result
Normal file
292
mysql-test/suite/innodb_gis/r/gis_split_nan.result
Normal file
|
@ -0,0 +1,292 @@
|
|||
# Creating the spatial objects
|
||||
USE test;
|
||||
CREATE TABLE gis_point (fid INTEGER NOT NULL PRIMARY KEY, g POINT);
|
||||
CREATE TABLE gis_linestring (fid INTEGER NOT NULL PRIMARY KEY, g LINESTRING);
|
||||
CREATE TABLE gis_polygon (fid INTEGER NOT NULL PRIMARY KEY, g POLYGON);
|
||||
CREATE TABLE gis_multi_point (fid INTEGER NOT NULL PRIMARY KEY, g MULTIPOINT);
|
||||
CREATE TABLE gis_multi_linestring (fid INTEGER NOT NULL PRIMARY KEY, g MULTILINESTRING);
|
||||
CREATE TABLE gis_multi_polygon (fid INTEGER NOT NULL PRIMARY KEY, g MULTIPOLYGON);
|
||||
CREATE TABLE gis_geometrycollection (fid INTEGER NOT NULL PRIMARY KEY, g GEOMETRYCOLLECTION);
|
||||
# Inserting POINT Geometry Values
|
||||
INSERT INTO gis_point VALUES
|
||||
(101, ST_POINTFROMTEXT('POINT(0 0)')),
|
||||
(102, ST_POINTFROMTEXT('POINT(1 0)')),
|
||||
(103, ST_POINTFROMTEXT('POINT(0 1)')),
|
||||
(104, ST_POINTFROMTEXT('POINT(1 1)')),
|
||||
(105, ST_POINTFROMTEXT('POINT(-1 1)'));
|
||||
INSERT INTO gis_point VALUES
|
||||
(106, ST_POINTFROMWKB(POINT(0,0))),
|
||||
(107, ST_POINTFROMWKB(POINT(10,0))),
|
||||
(108, ST_POINTFROMWKB(POINT(0,10))),
|
||||
(109, ST_POINTFROMWKB(POINT(-10,0))),
|
||||
(110, ST_POINTFROMWKB(POINT(0,-10)));
|
||||
Warnings:
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
INSERT INTO gis_point VALUES
|
||||
(111, ST_POINTFROMWKB(ST_ASWKB(ST_POINTFROMTEXT('POINT(1 1)')))),
|
||||
(112, ST_POINTFROMWKB(ST_ASWKB(ST_POINTFROMTEXT('POINT(1e308 1e308)')))),
|
||||
(113, ST_POINTFROMWKB(ST_ASWKB(ST_POINTFROMTEXT('POINT(1e308 -1e308)')))),
|
||||
(114, ST_POINTFROMWKB(ST_ASWKB(ST_POINTFROMTEXT('POINT(-1e308 1e308)')))),
|
||||
(115, ST_POINTFROMWKB(ST_ASWKB(ST_POINTFROMTEXT('POINT(-1e308 -1e308)'))));
|
||||
# Inserting LINESTRING Geometry Values
|
||||
INSERT INTO gis_linestring VALUES
|
||||
(201, ST_LINEFROMTEXT('LINESTRING(0 0,5 5)')),
|
||||
(202, ST_LINEFROMTEXT('LINESTRING(0 0,2 2,4 4)')),
|
||||
(203, ST_LINEFROMTEXT('LINESTRING(0 0,5 5,10 10)'));
|
||||
INSERT INTO gis_linestring VALUES
|
||||
(204, ST_LINESTRINGFROMTEXT('LINESTRING(10 10,5 5)')),
|
||||
(205, ST_LINESTRINGFROMTEXT('LINESTRING(0 0,12 12,24 24)')),
|
||||
(206, ST_LINESTRINGFROMTEXT('LINESTRING(0 0,50 50,100 100)'));
|
||||
INSERT INTO gis_linestring VALUES
|
||||
(207, ST_LINEFROMWKB(LINESTRING(POINT(0,0), POINT(5,5)))),
|
||||
(208, ST_LINEFROMWKB(LINESTRING(POINT(0,0), POINT(-5,-5), POINT(-10,10)))),
|
||||
(209, ST_LINEFROMWKB(LINESTRING(POINT(0,0), POINT(2,2), POINT(4,4), POINT(6,6), POINT(8,8))));
|
||||
Warnings:
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
INSERT INTO gis_linestring VALUES
|
||||
(210, ST_LINESTRINGFROMWKB(LINESTRING(POINT(0,0), POINT(5,5)))),
|
||||
(211, ST_LINESTRINGFROMWKB(LINESTRING(POINT(0,0), POINT(-50,-50), POINT(10,-10)))),
|
||||
(212, ST_LINESTRINGFROMWKB(LINESTRING(POINT(0,0), POINT(1e308,1e308), POINT(1e308,-1e308))));
|
||||
Warnings:
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
INSERT INTO gis_linestring VALUES
|
||||
(213, ST_LINEFROMWKB(ST_ASWKB(ST_LINEFROMTEXT('LINESTRING(1e308 1e308,1e308 -1e308)')))),
|
||||
(214, ST_LINEFROMWKB(ST_ASWKB(ST_LINEFROMTEXT('LINESTRING(1 1,2 2,3 3,4 4,5 5,6 6,7 7,8 8,9 9)')))),
|
||||
(215, ST_LINESTRINGFROMWKB(ST_ASWKB(ST_LINESTRINGFROMTEXT('LINESTRING(10 10,10 -10,-10 -10,-10 10,10 10)'))));
|
||||
# Inserting POLYGON Geometry Values
|
||||
INSERT INTO gis_polygon VALUES
|
||||
(301, ST_POLYFROMTEXT('POLYGON((0 0,0 5,5 5,0 0))')),
|
||||
(302, ST_POLYFROMTEXT('POLYGON((0 0,0 5,5 5,5 0,0 0))')),
|
||||
(303, ST_POLYFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0))'));
|
||||
INSERT INTO gis_polygon VALUES
|
||||
(304, ST_POLYGONFROMTEXT('POLYGON((0 0,0 50,50 50,50 0,0 0))')),
|
||||
(305, ST_POLYGONFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0,0 0,0 0),(4 4,4 6,6 6,6 4,4 4))')),
|
||||
(306, ST_POLYGONFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0,0 0,0 0),(2 2,2 4,4 4,4 2,2 2),(6 6,6 8,8 8,8 6,6 6))'));
|
||||
INSERT INTO gis_polygon VALUES
|
||||
(307, ST_POLYFROMWKB(POLYGON(LINESTRING(POINT(0,0), POINT(0,5), POINT(5,5), POINT(0,0))))),
|
||||
(308, ST_POLYFROMWKB(POLYGON(LINESTRING(POINT(0,0), POINT(0,15), POINT(15,15), POINT(15,0), POINT(0,0))))),
|
||||
(309, ST_POLYFROMWKB(POLYGON(LINESTRING(POINT(0,0), POINT(0,10), POINT(10,10), POINT(10,0), POINT(0,0)),
|
||||
LINESTRING(POINT(4,4), POINT(4,6), POINT(6,6), POINT(6,4), POINT(4,4)))));
|
||||
Warnings:
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
INSERT INTO gis_polygon VALUES
|
||||
(310, ST_POLYGONFROMWKB(POLYGON(LINESTRING(POINT(0,0), POINT(0,5), POINT(5,5), POINT(0,0))))),
|
||||
(311, ST_POLYGONFROMWKB(POLYGON(LINESTRING(POINT(10,10), POINT(10,15), POINT(15,15), POINT(15,10), POINT(10,10))))),
|
||||
(312, ST_POLYGONFROMWKB(POLYGON(LINESTRING(POINT(10,10), POINT(10,20), POINT(20,20), POINT(20,10), POINT(10,10)),
|
||||
LINESTRING(POINT(14,14), POINT(14,16), POINT(16,16), POINT(16,14), POINT(14,14)))));
|
||||
Warnings:
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
INSERT INTO gis_polygon VALUES
|
||||
(313, ST_POLYFROMWKB(ST_ASWKB(ST_POLYFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0,0 0,5 5,0 0))')))),
|
||||
(314, ST_POLYFROMWKB(ST_ASWKB(ST_POLYGONFROMTEXT('POLYGON((10 0,10 10,0 10,-10 10,-10 0,-10 -10,0 10,10 -10,10 0))')))),
|
||||
(315, ST_POLYGONFROMWKB(ST_ASWKB(ST_POLYGONFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0,0 0,0 0),(2 2,2 4,4 4,4 2,2 2),(6 6,6 8,8 8,8 6,6 6))'))));
|
||||
# Inserting MULTIPOINT Geometry Values
|
||||
INSERT INTO gis_multi_point VALUES
|
||||
(401, ST_GEOMFROMTEXT('MULTIPOINT(0 0)')),
|
||||
(402, ST_GEOMFROMTEXT('MULTIPOINT(0 0,2 2,4 4)')),
|
||||
(403, ST_GEOMFROMTEXT('MULTIPOINT(0 0,5 5,10 10)'));
|
||||
INSERT INTO gis_multi_point VALUES
|
||||
(404, ST_GEOMFROMTEXT('MULTIPOINT(0 0,100 100)')),
|
||||
(405, ST_GEOMFROMTEXT('MULTIPOINT(0 0,1e308 1e308)')),
|
||||
(406, ST_GEOMFROMTEXT('MULTIPOINT(1e308 1e308,1e308 -1e308,-1e308 1e308,-1e308 -1e308)'));
|
||||
INSERT INTO gis_multi_point VALUES
|
||||
(407, ST_GEOMFROMWKB(MULTIPOINT(POINT(0,0)))),
|
||||
(408, ST_GEOMFROMWKB(MULTIPOINT(POINT(0,0), POINT(10,10)))),
|
||||
(409, ST_GEOMFROMWKB(MULTIPOINT(POINT(0,0), POINT(2,2), POINT(4,4), POINT(6,6))));
|
||||
Warnings:
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
INSERT INTO gis_multi_point VALUES
|
||||
(410, ST_GEOMFROMWKB(MULTIPOINT(POINT(0,0)))),
|
||||
(411, ST_GEOMFROMWKB(MULTIPOINT(POINT(0,0), POINT(1e308,1e308)))),
|
||||
(412, ST_GEOMFROMWKB(MULTIPOINT(POINT(1e308,1e308), POINT(-1e308,1e308), POINT(1e308,-1e308), POINT(-1e308,-1e308))));
|
||||
Warnings:
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
INSERT INTO gis_multi_point VALUES
|
||||
(413, ST_GEOMFROMWKB(ST_ASWKB(ST_GEOMFROMTEXT('MULTIPOINT(0 0)')))),
|
||||
(414, ST_GEOMFROMWKB(ST_ASWKB(ST_GEOMFROMTEXT('MULTIPOINT(0 0,1e308 1e308,-1e308 -1e308)')))),
|
||||
(415, ST_GEOMFROMWKB(ST_ASWKB(ST_GEOMFROMTEXT('MULTIPOINT(1e308 1e308,1e308 -1e308,-1e308 1e308,-1e308 -1e308,1e308 1e308)'))));
|
||||
# Inserting MULTILINESTRING Geometry Values
|
||||
INSERT INTO gis_multi_linestring VALUES
|
||||
(501, ST_GEOMFROMTEXT('MULTILINESTRING((0 0,2 2))')),
|
||||
(502, ST_GEOMFROMTEXT('MULTILINESTRING((0 0,2 2,4 4))')),
|
||||
(503, ST_GEOMFROMTEXT('MULTILINESTRING((0 0,2 2,4 4),(6 6,8 8,10 10))'));
|
||||
INSERT INTO gis_multi_linestring VALUES
|
||||
(504, ST_GEOMFROMTEXT('MULTILINESTRING((0 0,100 100,-100 -100))')),
|
||||
(505, ST_GEOMFROMTEXT('MULTILINESTRING((1e308 1e308,-1e308 -1e308))')),
|
||||
(506, ST_GEOMFROMTEXT('MULTILINESTRING((1e308 1e308,-1e308 -1e308),(1e308 -1e308,-1e308 1e308))'));
|
||||
INSERT INTO gis_multi_linestring VALUES
|
||||
(507, ST_GEOMFROMWKB(MULTILINESTRING(LINESTRING(POINT(0,0), POINT(2,2))))),
|
||||
(508, ST_GEOMFROMWKB(MULTILINESTRING(LINESTRING(POINT(0,0), POINT(12,12), POINT(24,24))))),
|
||||
(509, ST_GEOMFROMWKB(MULTILINESTRING(LINESTRING(POINT(0,0), POINT(2,2), POINT(4,4)),
|
||||
LINESTRING(POINT(6,6), POINT(8,8), POINT(10,10)))));
|
||||
Warnings:
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
INSERT INTO gis_multi_linestring VALUES
|
||||
(510, ST_GEOMFROMWKB(MULTILINESTRING(LINESTRING(POINT(0,0), POINT(2,2), POINT(4,4))))),
|
||||
(511, ST_GEOMFROMWKB(MULTILINESTRING(LINESTRING(POINT(0,0), POINT(1,1), POINT(2,2))))),
|
||||
(512, ST_GEOMFROMWKB(MULTILINESTRING(LINESTRING(POINT(0,0), POINT(12,12), POINT(24,24)),
|
||||
LINESTRING(POINT(36,36), POINT(48,48), POINT(50,50)))));
|
||||
Warnings:
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
INSERT INTO gis_multi_linestring VALUES
|
||||
(513, ST_GEOMFROMWKB(ST_ASWKB(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,10 10),(0 10,10 0))')))),
|
||||
(514, ST_GEOMFROMWKB(ST_ASWKB(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,10 10,-10 10,0 0),(0 0,-10 -10,10 -10,0 0))')))),
|
||||
(515, ST_GEOMFROMWKB(ST_ASWKB(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,0 100),(0 0,100 0),(0 0,0 -100),(0 0,-100 0))'))));
|
||||
# Inserting MULTIPOLGYON Geometry Values
|
||||
INSERT INTO gis_multi_polygon VALUES
|
||||
(601, ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 5,5 5,0 0)))')),
|
||||
(602, ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 5,5 5,0 0)),((5 5,5 10,10 10,5 5)))')),
|
||||
(603, ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0,0 0,0 0),(4 4,4 6,6 6,6 4,4 4)))'));
|
||||
INSERT INTO gis_multi_polygon VALUES
|
||||
(604, ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 5,5 5,0 0)))')),
|
||||
(605, ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0,0 0,0 0),(4 4,4 6,6 6,6 4,4 4)),((0 0,0 -2,-2 -2,0 0)))')),
|
||||
(606, ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,5 5,-5 5,0 0)),((0 0,-5 -5,5 -5,0 0)))'));
|
||||
INSERT INTO gis_multi_polygon VALUES
|
||||
(607, ST_GEOMFROMWKB(MULTIPOLYGON(POLYGON(LINESTRING(POINT(0,0), POINT(5,0), POINT(5,5), POINT(0,5), POINT(0,0)))))),
|
||||
(608, ST_GEOMFROMWKB(MULTIPOLYGON(POLYGON(LINESTRING(POINT(0,0), POINT(10,0), POINT(10,10), POINT(0,10), POINT(0,0)),
|
||||
LINESTRING(POINT(4,4), POINT(4,6), POINT(6,6), POINT(6,4), POINT(4,4)))))),
|
||||
(609, ST_GEOMFROMWKB(MULTIPOLYGON(POLYGON(LINESTRING(POINT(0,0), POINT(5,0), POINT(5,5), POINT(0,5), POINT(0,0))),
|
||||
POLYGON(LINESTRING(POINT(0,0), POINT(-5,0), POINT(-5,-5), POINT(0,-5), POINT(0,0))))));
|
||||
Warnings:
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
INSERT INTO gis_multi_polygon VALUES
|
||||
(610, ST_GEOMFROMWKB(MULTIPOLYGON(POLYGON(LINESTRING(POINT(0,0), POINT(-5,0), POINT(-5,-5), POINT(0,-5), POINT(0,0)))))),
|
||||
(611, ST_GEOMFROMWKB(MULTIPOLYGON(POLYGON(LINESTRING(POINT(10,10), POINT(20,10), POINT(20,20), POINT(10,20), POINT(10,10)),
|
||||
LINESTRING(POINT(14,14), POINT(14,16), POINT(16,16), POINT(16,14), POINT(14,14)))))),
|
||||
(612, ST_GEOMFROMWKB(MULTIPOLYGON(POLYGON(LINESTRING(POINT(0,0), POINT(0,10), POINT(10,10), POINT(10,0), POINT(0,0)),
|
||||
LINESTRING(POINT(4,4), POINT(4,6), POINT(6,6), POINT(6,4), POINT(4,4))),
|
||||
POLYGON(LINESTRING(POINT(0,0), POINT(-5,0), POINT(-5,-5), POINT(0,-5), POINT(0,0))))));
|
||||
Warnings:
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
INSERT INTO gis_multi_polygon VALUES
|
||||
(613, ST_GEOMFROMWKB(ST_ASWKB(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,5 5,5 -5,0 0)),((0 0,-5 5,-5 -5,0 0)))')))),
|
||||
(614, ST_GEOMFROMWKB(ST_ASWKB(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 10,-10 10,0 0)),((0 0,-10 -10,10 -10,0 0)))')))),
|
||||
(615, ST_GEOMFROMWKB(ST_ASWKB(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,5 5,10 0,5 -5,0 0)))'))));
|
||||
# Inserting GEOMETRYCOLLECTION Geometry Values
|
||||
INSERT INTO gis_geometrycollection VALUES
|
||||
(701, ST_GEOMCOLLFROMTEXT('GEOMETRYCOLLECTION(POINT(0 0))')),
|
||||
(702, ST_GEOMCOLLFROMTEXT('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')),
|
||||
(703, ST_GEOMCOLLFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5), POLYGON((0 0,0 10,10 10,10 0,0 0)))'));
|
||||
INSERT INTO gis_geometrycollection VALUES
|
||||
(704, ST_GEOMETRYCOLLECTIONFROMTEXT('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')),
|
||||
(705, ST_GEOMETRYCOLLECTIONFROMTEXT('GEOMETRYCOLLECTION(POINT(0 0),'
|
||||
'LINESTRING(0 0,10 10),'
|
||||
'POLYGON((0 0,0 10,10 10,10 0,0 0,0 0, 0 0)))')),
|
||||
(706, ST_GEOMETRYCOLLECTIONFROMTEXT('GEOMETRYCOLLECTION(MULTIPOINT(0 0,5 5,10 10),'
|
||||
'MULTILINESTRING((0 0,10 10),(0 10,10 0)),'
|
||||
'MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),'
|
||||
'((0 0,-10 0,-10 -10,0 -10,0 0))))'));
|
||||
INSERT INTO gis_geometrycollection VALUES
|
||||
(707, ST_GEOMCOLLFROMWKB(GEOMETRYCOLLECTION(POINT(0,0)))),
|
||||
(708, ST_GEOMCOLLFROMWKB(GEOMETRYCOLLECTION(POINT(0,0),
|
||||
LINESTRING(POINT(0,0), POINT(2,2), POINT(4,4), POINT(6,6), POINT(8,8)),
|
||||
POLYGON(LINESTRING(POINT(0,0), POINT(0,10), POINT(10,10), POINT(10,0), POINT(0,0)),
|
||||
LINESTRING(POINT(4,4), POINT(4,6), POINT(6,6), POINT(6,4), POINT(4,4)))))),
|
||||
(709, ST_GEOMCOLLFROMWKB(GEOMETRYCOLLECTION(MULTIPOINT(POINT(0,0), POINT(5,5), POINT(10,10)),
|
||||
MULTILINESTRING(LINESTRING(POINT(0,0), POINT(2,2), POINT(4,4), POINT(6,6), POINT(8,8)),
|
||||
LINESTRING(POINT(10,10), POINT(5,5), POINT(0,10))),
|
||||
MULTIPOLYGON(POLYGON(LINESTRING(POINT(0,0), POINT(0,10), POINT(10,10), POINT(10,0), POINT(0,0)),
|
||||
LINESTRING(POINT(4,4), POINT(4,6), POINT(6,6), POINT(6,4), POINT(4,4))),
|
||||
POLYGON(LINESTRING(POINT(0,0), POINT(-10,0), POINT(-10,-10), POINT(0,0)))))));
|
||||
Warnings:
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
INSERT INTO gis_geometrycollection VALUES
|
||||
(710, ST_GEOMETRYCOLLECTIONFROMWKB(GEOMETRYCOLLECTION(POINT(0,0),
|
||||
LINESTRING(POINT(0,0), POINT(100,100))))),
|
||||
(711, ST_GEOMETRYCOLLECTIONFROMWKB(GEOMETRYCOLLECTION(POINT(10,10),
|
||||
LINESTRING(POINT(10,10), POINT(12,12), POINT(14,14), POINT(16,16), POINT(18,18)),
|
||||
POLYGON(LINESTRING(POINT(0,0), POINT(0,10), POINT(10,10), POINT(10,0), POINT(0,0)),
|
||||
LINESTRING(POINT(4,4), POINT(4,6), POINT(6,6), POINT(6,4), POINT(4,4)))))),
|
||||
(712, ST_GEOMETRYCOLLECTIONFROMWKB(GEOMETRYCOLLECTION(MULTIPOINT(POINT(10,10), POINT(15,15), POINT(20,20)),
|
||||
MULTILINESTRING(LINESTRING(POINT(0,0), POINT(2,2), POINT(4,4), POINT(6,6), POINT(8,8)),
|
||||
LINESTRING(POINT(10,10), POINT(5,5), POINT(0,10))),
|
||||
MULTIPOLYGON(POLYGON(LINESTRING(POINT(0,0), POINT(0,10), POINT(10,10), POINT(10,0), POINT(0,0)),
|
||||
LINESTRING(POINT(4,4), POINT(4,6), POINT(6,6), POINT(6,4), POINT(4,4))),
|
||||
POLYGON(LINESTRING(POINT(0,0), POINT(-10,0), POINT(-10,-10), POINT(0,0)))))));
|
||||
Warnings:
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
Warning 3195 st_geometryfromwkb(geometry) is deprecated and will be replaced by st_srid(geometry, 0) in a future version. Use st_geometryfromwkb(st_aswkb(geometry), 0) instead.
|
||||
INSERT INTO gis_geometrycollection VALUES
|
||||
(713, ST_GEOMCOLLFROMWKB(ST_ASWKB(ST_GEOMCOLLFROMTEXT('GEOMETRYCOLLECTION('
|
||||
'POINT(0 0),'
|
||||
'LINESTRING(0 0,10 10),'
|
||||
'POLYGON((0 0,0 10,10 10,10 0,0 0)),'
|
||||
'MULTIPOINT(0 0,2 2,4 4,6 6,8 8,10 10),'
|
||||
'MULTILINESTRING((0 0,10 10),(0 10,10 0)),'
|
||||
'MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5))))')))),
|
||||
(714, ST_GEOMCOLLFROMWKB(ST_ASWKB(ST_GEOMCOLLFROMTEXT('GEOMETRYCOLLECTION('
|
||||
'GEOMETRYCOLLECTION('
|
||||
'POINT(0 0)),'
|
||||
'GEOMETRYCOLLECTION('
|
||||
'LINESTRING(0 0,10 10)),'
|
||||
'GEOMETRYCOLLECTION('
|
||||
'POLYGON((0 0,0 10,10 10,10 0,0 0))),'
|
||||
'GEOMETRYCOLLECTION('
|
||||
'MULTIPOINT(0 0,2 2,4 4,6 6,8 8,10 10)),'
|
||||
'GEOMETRYCOLLECTION('
|
||||
'MULTILINESTRING((0 0,10 10),(0 10,10 0))),'
|
||||
'GEOMETRYCOLLECTION('
|
||||
'MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5)))))')))),
|
||||
(715, ST_GEOMCOLLFROMWKB(ST_ASWKB(ST_GEOMCOLLFROMTEXT('GEOMETRYCOLLECTION('
|
||||
'GEOMETRYCOLLECTION(),'
|
||||
'POINT(0 0),'
|
||||
'GEOMETRYCOLLECTION('
|
||||
'LINESTRING(0 0,10 10),'
|
||||
'GEOMETRYCOLLECTION('
|
||||
'GEOMETRYCOLLECTION())),'
|
||||
'GEOMETRYCOLLECTION(),'
|
||||
'GEOMETRYCOLLECTION('
|
||||
'GEOMETRYCOLLECTION()),'
|
||||
'POLYGON((0 0,0 10,10 10,10 0,0 0)),'
|
||||
'MULTIPOINT(0 0,2 2,4 4,6 6,8 8,10 10),'
|
||||
'MULTILINESTRING((0 0,10 10),(0 10,10 0)),'
|
||||
'MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)),((5 5,5 10,10 10,10 5,5 5))))'))));
|
||||
# Creating a table with spatial index column
|
||||
CREATE TABLE geom_index (fid INTEGER NOT NULL PRIMARY KEY, g GEOMETRY NOT NULL, SPATIAL INDEX(g));
|
||||
# Inserting geometry values
|
||||
INSERT INTO geom_index SELECT * FROM gis_point;
|
||||
INSERT INTO geom_index SELECT * FROM gis_linestring;
|
||||
INSERT INTO geom_index SELECT * FROM gis_polygon;
|
||||
INSERT INTO geom_index SELECT * FROM gis_multi_point;
|
||||
INSERT INTO geom_index SELECT * FROM gis_multi_linestring;
|
||||
INSERT INTO geom_index SELECT * FROM gis_multi_polygon;
|
||||
INSERT INTO geom_index SELECT * FROM gis_geometrycollection;
|
||||
check table geom_index;
|
||||
Table Op Msg_type Msg_text
|
||||
test.geom_index check status OK
|
||||
# Final cleanup
|
||||
DROP TABLE gis_point;
|
||||
DROP TABLE gis_linestring;
|
||||
DROP TABLE gis_polygon;
|
||||
DROP TABLE gis_multi_point;
|
||||
DROP TABLE gis_multi_linestring;
|
||||
DROP TABLE gis_multi_polygon;
|
||||
DROP TABLE gis_geometrycollection;
|
||||
DROP TABLE geom_index;
|
41
mysql-test/suite/innodb_gis/r/kill_server.result
Normal file
41
mysql-test/suite/innodb_gis/r/kill_server.result
Normal file
|
@ -0,0 +1,41 @@
|
|||
create table t1 (c1 int, c2 geometry not null, spatial index (c2))engine=innodb;
|
||||
create procedure insert_t1(IN total int)
|
||||
begin
|
||||
declare i int default 1;
|
||||
while (i <= total) DO
|
||||
insert into t1 values (i, Point(i, i));
|
||||
set i = i + 1;
|
||||
end while;
|
||||
end|
|
||||
CALL insert_t1(5000);
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
5000
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
truncate table t1;
|
||||
CALL insert_t1(10000);
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
10000
|
||||
drop index c2 on t1;
|
||||
create spatial index idx on t1(c2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` geometry NOT NULL,
|
||||
SPATIAL KEY `idx` (`c2`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
truncate table t1;
|
||||
call mtr.add_suppression("InnoDB: A copy of page \[page id: space=[0-9]+, page number=[0-9]+\] in the doublewrite buffer slot [0-9]+ is not within space bounds");
|
||||
START TRANSACTION;
|
||||
CALL insert_t1(5000);
|
||||
COMMIT;
|
||||
# Kill and restart
|
||||
drop procedure insert_t1;
|
||||
drop table t1;
|
57
mysql-test/suite/innodb_gis/r/multi_pk.result
Normal file
57
mysql-test/suite/innodb_gis/r/multi_pk.result
Normal file
|
@ -0,0 +1,57 @@
|
|||
create table t1 (c1 int, c2 varchar(255), c3 geometry not null, primary key(c1, c2), spatial index (c3))engine=innodb;
|
||||
create function rand_string(str_length tinyint unsigned, str_type tinyint unsigned) returns varchar(255)
|
||||
begin
|
||||
declare counter int unsigned default 0;
|
||||
declare const_chars varchar(64) default '0123456789';
|
||||
declare result varchar(255) default '';
|
||||
if str_type = 1 then
|
||||
set const_chars = '0123456789';
|
||||
elseif str_type = 2 then
|
||||
set const_chars = 'abcdefghijklmnopqrstuvwxyz';
|
||||
elseif str_type = 3 then
|
||||
set const_chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
elseif str_type = 4 then
|
||||
set const_chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
elseif str_type = 5 then
|
||||
set const_chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
else
|
||||
set const_chars = '0123456789';
|
||||
end if;
|
||||
while counter < str_length do
|
||||
set result = concat(result,substr(const_chars,ceil(rand()*(length(const_chars)-1)),1));
|
||||
set counter = counter + 1;
|
||||
end while;
|
||||
return result;
|
||||
end|
|
||||
create procedure insert_t1(IN total int)
|
||||
begin
|
||||
declare i int default 1;
|
||||
declare i2 int default 1;
|
||||
declare str varchar(100) default '';
|
||||
declare dup_key int default 1;
|
||||
while i <= total DO
|
||||
set i2 = floor(0+(rand()*100));
|
||||
set str = rand_string(i2, 5);
|
||||
select count(*) into dup_key from t1 where c2 = str and c1 = i;
|
||||
while dup_key <> 0 do
|
||||
set i2 = floor(0+(rand()*100));
|
||||
set str = rand_string(i2, 5);
|
||||
select count(*) into dup_key from t1 where c2 = str and c1 = i;
|
||||
end while;
|
||||
insert into t1 values (i, str, Point(i, i));
|
||||
set i = i + 1;
|
||||
end while;
|
||||
end|
|
||||
CALL insert_t1(10000);
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
start transaction;
|
||||
CALL insert_t1(30000);
|
||||
rollback;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop procedure insert_t1;
|
||||
drop function rand_string;
|
||||
drop table t1;
|
1570
mysql-test/suite/innodb_gis/r/point_basic.result
Normal file
1570
mysql-test/suite/innodb_gis/r/point_basic.result
Normal file
File diff suppressed because it is too large
Load diff
549
mysql-test/suite/innodb_gis/r/point_big.result
Normal file
549
mysql-test/suite/innodb_gis/r/point_big.result
Normal file
|
@ -0,0 +1,549 @@
|
|||
#
|
||||
# Test when the POINT is on B-TREE
|
||||
#
|
||||
CREATE TABLE t1(fid INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, p POINT, KEY(p)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES
|
||||
(101, ST_PointFromText('POINT(10 10)')),
|
||||
(102, ST_PointFromText('POINT(20 10)')),
|
||||
(103, ST_PointFromText('POINT(20 20)')),
|
||||
(104, ST_PointFromWKB(ST_AsWKB(ST_PointFromText('POINT(10 20)'))));
|
||||
SELECT ST_AsText(p) FROM t1;
|
||||
ST_AsText(p)
|
||||
POINT(10 10)
|
||||
POINT(20 10)
|
||||
POINT(20 20)
|
||||
POINT(10 20)
|
||||
SELECT ST_AsText(p) FROM t1 WHERE p = ST_PointFromText('POINT(20 20)');
|
||||
ST_AsText(p)
|
||||
POINT(20 20)
|
||||
INSERT INTO t1 VALUES
|
||||
(201, ST_PointFromText('POINT(100.32374832 101.23741821)')),
|
||||
(202, ST_PointFromText('POINT(102.43287328 100.23489233)')),
|
||||
(203, ST_PointFromText('POINT(101.43284962 100.45892392)')),
|
||||
(204, ST_PointFromWKB(ST_AsWKB(ST_PointFromText('POINT(103.43718640 105.248206478)')))),
|
||||
(205, ST_PointFromText('POINT(101.43284962 100.45892392)')),
|
||||
(206, ST_PointFromWKB(ST_AsWKB(ST_PointFromText('POINT(103.43718640 105.248206478)'))));
|
||||
SELECT ST_AsText(p), COUNT(*) FROM t1 GROUP BY p;
|
||||
ST_AsText(p) COUNT(*)
|
||||
POINT(10 10) 1
|
||||
POINT(10 20) 1
|
||||
POINT(20 10) 1
|
||||
POINT(20 20) 1
|
||||
POINT(101.43284962 100.45892392) 2
|
||||
POINT(100.32374832 101.23741821) 1
|
||||
POINT(102.43287328 100.23489233) 1
|
||||
POINT(103.4371864 105.248206478) 2
|
||||
TRUNCATE t1;
|
||||
SELECT * FROM t1;
|
||||
fid p
|
||||
INSERT INTO t1(p) VALUES(ST_PointFromText('POINT(10 10)')),
|
||||
(ST_PointFromText('POINT(10 20)')),
|
||||
(ST_PointFromText('POINT(10 40)')),
|
||||
(ST_PointFromText('POINT(10 60)')),
|
||||
(ST_PointFromText('POINT(20 15)')),
|
||||
(ST_PointFromText('POINT(30 10)')),
|
||||
(ST_PointFromText('POINT(40 10)')),
|
||||
(ST_PointFromText('POINT(50 10)')),
|
||||
(ST_PointFromText('POINT(60 5)')),
|
||||
(ST_PointFromText('POINT(60 10)')),
|
||||
(ST_PointFromText('POINT(60 20)')),
|
||||
(ST_PointFromText('POINT(60 100)')),
|
||||
(ST_PointFromText('POINT(100 100)')),
|
||||
(ST_PointFromText('POINT(80 60)')),
|
||||
(ST_PointFromText('POINT(81 50)')),
|
||||
(ST_PointFromText('POINT(82 70)')),
|
||||
(ST_PointFromText('POINT(83 30)')),
|
||||
(ST_PointFromText('POINT(20 100)')),
|
||||
(ST_PointFromText('POINT(150 2000)')),
|
||||
(ST_PointFromText('POINT(109 230)')),
|
||||
(ST_PointFromText('POINT(280 250)')),
|
||||
(ST_PointFromText('POINT(176 175)')),
|
||||
(ST_PointFromText('POINT(200 10)')),
|
||||
(NULL),
|
||||
(NULL);
|
||||
SELECT ST_AsText(p) FROM t1;
|
||||
ST_AsText(p)
|
||||
POINT(10 10)
|
||||
POINT(10 20)
|
||||
POINT(10 40)
|
||||
POINT(10 60)
|
||||
POINT(20 15)
|
||||
POINT(30 10)
|
||||
POINT(40 10)
|
||||
POINT(50 10)
|
||||
POINT(60 5)
|
||||
POINT(60 10)
|
||||
POINT(60 20)
|
||||
POINT(60 100)
|
||||
POINT(100 100)
|
||||
POINT(80 60)
|
||||
POINT(81 50)
|
||||
POINT(82 70)
|
||||
POINT(83 30)
|
||||
POINT(20 100)
|
||||
POINT(150 2000)
|
||||
POINT(109 230)
|
||||
POINT(280 250)
|
||||
POINT(176 175)
|
||||
POINT(200 10)
|
||||
NULL
|
||||
NULL
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
25
|
||||
SELECT ST_AsText(p) FROM t1;
|
||||
ST_AsText(p)
|
||||
POINT(10 10)
|
||||
POINT(10 20)
|
||||
POINT(10 40)
|
||||
POINT(10 60)
|
||||
POINT(20 15)
|
||||
POINT(30 10)
|
||||
POINT(40 10)
|
||||
POINT(50 10)
|
||||
POINT(60 5)
|
||||
POINT(60 10)
|
||||
POINT(60 20)
|
||||
POINT(60 100)
|
||||
POINT(100 100)
|
||||
POINT(80 60)
|
||||
POINT(81 50)
|
||||
POINT(82 70)
|
||||
POINT(83 30)
|
||||
POINT(20 100)
|
||||
POINT(150 2000)
|
||||
POINT(109 230)
|
||||
POINT(280 250)
|
||||
POINT(176 175)
|
||||
POINT(200 10)
|
||||
NULL
|
||||
NULL
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
25
|
||||
INSERT INTO t1(p) SELECT p FROM t1;
|
||||
INSERT INTO t1(p) SELECT p FROM t1;
|
||||
INSERT INTO t1(p) SELECT p FROM t1;
|
||||
INSERT INTO t1(p) SELECT p FROM t1;
|
||||
INSERT INTO t1(p) SELECT p FROM t1;
|
||||
INSERT INTO t1(p) SELECT p FROM t1;
|
||||
INSERT INTO t1(p) SELECT p FROM t1;
|
||||
INSERT INTO t1(p) SELECT p FROM t1;
|
||||
INSERT INTO t1(p) SELECT p FROM t1;
|
||||
INSERT INTO t1(p) SELECT p FROM t1;
|
||||
INSERT INTO t1(p) SELECT p FROM t1;
|
||||
INSERT INTO t1(p) SELECT p FROM t1;
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
102400
|
||||
SELECT ST_AsText(p), COUNT(*) FROM t1 GROUP BY p;
|
||||
ST_AsText(p) COUNT(*)
|
||||
NULL 8192
|
||||
POINT(10 10) 4096
|
||||
POINT(10 20) 4096
|
||||
POINT(10 40) 4096
|
||||
POINT(10 60) 4096
|
||||
POINT(20 15) 4096
|
||||
POINT(20 100) 4096
|
||||
POINT(30 10) 4096
|
||||
POINT(40 10) 4096
|
||||
POINT(50 10) 4096
|
||||
POINT(60 5) 4096
|
||||
POINT(60 10) 4096
|
||||
POINT(60 20) 4096
|
||||
POINT(60 100) 4096
|
||||
POINT(80 60) 4096
|
||||
POINT(100 100) 4096
|
||||
POINT(176 175) 4096
|
||||
POINT(200 10) 4096
|
||||
POINT(81 50) 4096
|
||||
POINT(109 230) 4096
|
||||
POINT(82 70) 4096
|
||||
POINT(280 250) 4096
|
||||
POINT(83 30) 4096
|
||||
POINT(150 2000) 4096
|
||||
SELECT COUNT(*) FROM t1 WHERE p = ST_PointFromText('POINT(280 250)');
|
||||
COUNT(*)
|
||||
4096
|
||||
DELETE FROM t1 WHERE p = ST_PointFromText('POINT(280 250)');
|
||||
SELECT COUNT(*) FROM t1 WHERE p = ST_PointFromText('POINT(280 250)');
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t1 WHERE p = ST_PointFromText('POINT(60 5)');
|
||||
COUNT(*)
|
||||
4096
|
||||
DELETE FROM t1 WHERE P = ST_PointFromText('POINT(60 5)');
|
||||
SELECT COUNT(*) FROM t1 WHERE p = ST_PointFromText('POINT(60 5)');
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT ST_AsText(p), COUNT(*) FROM t1 WHERE p = ST_PointFromText('POINT(60 10)') OR p = ST_PointFromText('POINT(60 20)') OR p = ST_PointFromText('POINT(60 30)') GROUP BY p;
|
||||
ST_AsText(p) COUNT(*)
|
||||
POINT(60 10) 4096
|
||||
POINT(60 20) 4096
|
||||
UPDATE t1 SET p = ST_PointFromText('POINT(101 102)') WHERE p = ST_PointFromText('POINT(60 10)') OR p = ST_PointFromText('POINT(60 20)') OR p = ST_PointFromText('POINT(60 30)');
|
||||
SELECT ST_AsText(p), COUNT(*) FROM t1 WHERE p = ST_PointFromText('POINT(60 10)') OR p = ST_PointFromText('POINT(60 20)') OR p = ST_PointFromText('POINT(60 30)') GROUP BY p;
|
||||
ST_AsText(p) COUNT(*)
|
||||
SELECT COUNT(*) FROM t1 WHERE p = ST_PointFromText('POINT(101 102)');
|
||||
COUNT(*)
|
||||
8192
|
||||
SELECT COUNT(*) FROM t1 WHERE p IS NULL;
|
||||
COUNT(*)
|
||||
8192
|
||||
UPDATE t1 SET p = ST_PointFromText('POINT(160 160)') WHERE p IS NULL;
|
||||
SELECT COUNT(*) FROM t1 WHERE p IS NULL;
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t1 WHERE p = ST_PointFromText('POINT(160 160)');
|
||||
COUNT(*)
|
||||
8192
|
||||
SELECT ST_AsText(p), COUNT(*) FROM t1 GROUP BY p;
|
||||
ST_AsText(p) COUNT(*)
|
||||
POINT(10 10) 4096
|
||||
POINT(10 20) 4096
|
||||
POINT(10 40) 4096
|
||||
POINT(10 60) 4096
|
||||
POINT(20 15) 4096
|
||||
POINT(20 100) 4096
|
||||
POINT(30 10) 4096
|
||||
POINT(40 10) 4096
|
||||
POINT(50 10) 4096
|
||||
POINT(60 100) 4096
|
||||
POINT(80 60) 4096
|
||||
POINT(100 100) 4096
|
||||
POINT(160 160) 8192
|
||||
POINT(176 175) 4096
|
||||
POINT(200 10) 4096
|
||||
POINT(81 50) 4096
|
||||
POINT(101 102) 8192
|
||||
POINT(109 230) 4096
|
||||
POINT(82 70) 4096
|
||||
POINT(83 30) 4096
|
||||
POINT(150 2000) 4096
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
94208
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Test when POINT is used in spatial index
|
||||
#
|
||||
SET @ls1 = ST_GeomFromText('LINESTRING(0 20, 10 0)');
|
||||
SET @ls2 = ST_GeomFromText('LINESTRING(0 0, 10 20)');
|
||||
SET @ls3 = ST_GeomFromText('LINESTRING(20 -40, 21 -42)');
|
||||
SET @ls4 = ST_GeomFromText('LINESTRING(20 -42, 21 -40)');
|
||||
SET @poly1 = ST_GeomFromText('POLYGON((2 2, 2 10, 10 10, 10 2, 2 2))');
|
||||
SET @poly2 = ST_GeomFromText('POLYGON((0 0, -5 0, -4 -1, -6 -15, -3 -15, 0 0))');
|
||||
SET @poly3 = ST_GeomFromText('POLYGON((10.0 10.0, 20.5 20, 20.5 50, 32.0 64.0, 32.3 64.6, 5 60, 10 10))');
|
||||
SET @poly4 = ST_GeomFromText('POLYGON((0 10, -10 10, -10 -10, 0 -10, 0 10))');
|
||||
SET @p1 = ST_PointFromText('POINT(0 0)');
|
||||
SET @mpoly = ST_GeomFromText('MULTIPOLYGON(((3 3, 3 16, 16 16, 16 3, 3 3)), ((10 10, 10 50, 50 50, 50 10, 10 10)))');
|
||||
CREATE TABLE gis_point (p1 POINT NOT NULL, p2 POINT NOT NULL, SPATIAL KEY k1 (p1), SPATIAL KEY k2 (p2)) ENGINE=InnoDB;
|
||||
INSERT INTO gis_point VALUES
|
||||
(ST_PointFromText('POINT(1 2)'), ST_PointFromText('POINT(-1 -3)')),
|
||||
(ST_PointFromText('POINT(2 4)'), ST_PointFromText('POINT(-2 -6)')),
|
||||
(ST_PointFromText('POINT(3 6)'), ST_PointFromText('POINT(-3 -9)')),
|
||||
(ST_PointFromText('POINT(4 8)'), ST_PointFromText('POINT(-4 -12)')),
|
||||
(ST_PointFromText('POINT(5 10)'), ST_PointFromText('POINT(-5 -15)')),
|
||||
(ST_PointFromText('POINT(6 12)'), ST_PointFromText('POINT(-6 -18)')),
|
||||
(ST_PointFromText('POINT(7 14)'), ST_PointFromText('POINT(-7 -21)')),
|
||||
(ST_PointFromText('POINT(8 16)'), ST_PointFromText('POINT(0 0)')),
|
||||
(ST_PointFromText('POINT(9 18)'), ST_PointFromText('POINT(-4 2)')),
|
||||
(ST_PointFromText('POINT(10 21)'), ST_PointFromText('POINT(-6 3)')),
|
||||
(ST_PointFromText('POINT(20.5 41)'), ST_PointFromText('POINT(-8 4)')),
|
||||
(ST_PointFromText('POINT(26.25 57)'), ST_PointFromText('POINT(1 2)')),
|
||||
(ST_PointFromText('POINT(32.1234 64.2468)'), ST_PointFromText('POINT(-1 -1)'));
|
||||
'The ORDER BY for spatial index will use filesort'
|
||||
EXPLAIN SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point ORDER BY p1, p2;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE gis_point NULL ALL NULL NULL NULL NULL # 100.00 Using filesort
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select st_astext(`test`.`gis_point`.`p1`) AS `ST_AsText(p1)`,st_astext(`test`.`gis_point`.`p2`) AS `ST_AsText(p2)` from `test`.`gis_point` order by `test`.`gis_point`.`p1`,`test`.`gis_point`.`p2`
|
||||
SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point ORDER BY p1, p2;
|
||||
ST_AsText(p1) ST_AsText(p2)
|
||||
POINT(2 4) POINT(-2 -6)
|
||||
POINT(3 6) POINT(-3 -9)
|
||||
POINT(4 8) POINT(-4 -12)
|
||||
POINT(5 10) POINT(-5 -15)
|
||||
POINT(6 12) POINT(-6 -18)
|
||||
POINT(7 14) POINT(-7 -21)
|
||||
POINT(8 16) POINT(0 0)
|
||||
POINT(9 18) POINT(-4 2)
|
||||
POINT(10 21) POINT(-6 3)
|
||||
POINT(1 2) POINT(-1 -3)
|
||||
POINT(26.25 57) POINT(1 2)
|
||||
POINT(20.5 41) POINT(-8 4)
|
||||
POINT(32.1234 64.2468) POINT(-1 -1)
|
||||
'Try to do IDU on the table and verify the result'
|
||||
DELETE FROM gis_point WHERE ST_Equals(p2, ST_PointFromText('POINT(-8 4)'));
|
||||
INSERT INTO gis_point VALUES(ST_PointFromText('POINT(20.5 -41)'), ST_PointFromText('POINT(8 -4)'));
|
||||
SELECT ST_AsText(p1) AS 'Expect (32.1234 64.2468)' FROM gis_point WHERE ST_TOUCHES(@poly3, p1) AND MBRWithin(p2, @poly4);
|
||||
Expect (32.1234 64.2468)
|
||||
POINT(32.1234 64.2468)
|
||||
UPDATE gis_point SET p1 = ST_PointFromText('POINT(20.5 41)'), p2 = ST_PointFromText('POINT(-8 4)') WHERE ST_Intersection(@ls3, @ls4) = p1;
|
||||
SELECT ST_AsText(p1) AS 'Expect (32.1234 64.2468) AND (20.5 41)' FROM gis_point WHERE ST_TOUCHES(@poly3, p1) AND MBRWithin(p2, @poly4);
|
||||
Expect (32.1234 64.2468) AND (20.5 41)
|
||||
POINT(32.1234 64.2468)
|
||||
POINT(20.5 41)
|
||||
CHECK TABLE gis_point;
|
||||
Table Op Msg_type Msg_text
|
||||
test.gis_point check status OK
|
||||
============================================================
|
||||
Use a trx to test the IDU on the table and verify the result
|
||||
============================================================
|
||||
START TRANSACTION;
|
||||
DELETE FROM gis_point WHERE ST_Equals(p2, ST_PointFromText('POINT(-8 4)'));
|
||||
INSERT INTO gis_point VALUES(ST_PointFromText('POINT(20.5 -41)'), ST_PointFromText('POINT(8 -4)'));
|
||||
SELECT ST_AsText(p1) AS 'Expect (32.1234 64.2468)' FROM gis_point WHERE ST_TOUCHES(@poly3, p1) AND MBRWithin(p2, @poly4);
|
||||
Expect (32.1234 64.2468)
|
||||
POINT(32.1234 64.2468)
|
||||
UPDATE gis_point SET p1 = ST_PointFromText('POINT(20.5 49)'), p2 = ST_PointFromText('POINT(-8 4)') WHERE ST_Intersection(@ls3, @ls4) = p1;
|
||||
SELECT ST_AsText(p1) AS 'Expect (32.1234 64.2468) AND (20.5 49)' FROM gis_point WHERE ST_TOUCHES(@poly3, p1) AND MBRWithin(p2, @poly4);
|
||||
Expect (32.1234 64.2468) AND (20.5 49)
|
||||
POINT(32.1234 64.2468)
|
||||
POINT(20.5 49)
|
||||
ROLLBACK;
|
||||
SELECT ST_AsText(p1) AS 'Expect (32.1234 64.2468) AND (20.5 41)' FROM gis_point WHERE ST_TOUCHES(@poly3, p1) AND MBRWithin(p2, @poly4);
|
||||
Expect (32.1234 64.2468) AND (20.5 41)
|
||||
POINT(32.1234 64.2468)
|
||||
POINT(20.5 41)
|
||||
CHECK TABLE gis_point;
|
||||
Table Op Msg_type Msg_text
|
||||
test.gis_point check status OK
|
||||
=======================================================
|
||||
Enlarge the table by inserting the same data and verify
|
||||
=======================================================
|
||||
INSERT INTO gis_point SELECT * FROM gis_point;
|
||||
INSERT INTO gis_point SELECT * FROM gis_point;
|
||||
INSERT INTO gis_point SELECT * FROM gis_point;
|
||||
INSERT INTO gis_point SELECT * FROM gis_point;
|
||||
INSERT INTO gis_point SELECT * FROM gis_point;
|
||||
INSERT INTO gis_point SELECT * FROM gis_point;
|
||||
INSERT INTO gis_point SELECT * FROM gis_point;
|
||||
INSERT INTO gis_point SELECT * FROM gis_point;
|
||||
INSERT INTO gis_point SELECT * FROM gis_point;
|
||||
INSERT INTO gis_point SELECT * FROM gis_point;
|
||||
CHECK TABLE gis_point;
|
||||
Table Op Msg_type Msg_text
|
||||
test.gis_point check status OK
|
||||
SELECT COUNT(*), ST_AsText(p1), ST_AsText(p2) FROM gis_point GROUP BY p1, p2;
|
||||
COUNT(*) ST_AsText(p1) ST_AsText(p2)
|
||||
1024 POINT(2 4) POINT(-2 -6)
|
||||
1024 POINT(3 6) POINT(-3 -9)
|
||||
1024 POINT(4 8) POINT(-4 -12)
|
||||
1024 POINT(5 10) POINT(-5 -15)
|
||||
1024 POINT(6 12) POINT(-6 -18)
|
||||
1024 POINT(7 14) POINT(-7 -21)
|
||||
1024 POINT(8 16) POINT(0 0)
|
||||
1024 POINT(9 18) POINT(-4 2)
|
||||
1024 POINT(10 21) POINT(-6 3)
|
||||
1024 POINT(1 2) POINT(-1 -3)
|
||||
1024 POINT(26.25 57) POINT(1 2)
|
||||
1024 POINT(20.5 41) POINT(-8 4)
|
||||
1024 POINT(32.1234 64.2468) POINT(-1 -1)
|
||||
SELECT COUNT(*), ST_AsText(p1) FROM gis_point WHERE ST_Intersection(@ls1, @ls2) = p1 GROUP BY p1;
|
||||
COUNT(*) ST_AsText(p1)
|
||||
1024 POINT(5 10)
|
||||
SELECT COUNT(*), ST_AsText(p1) FROM gis_point WHERE MBRWithin(p1, @poly1) GROUP BY p1;
|
||||
COUNT(*) ST_AsText(p1)
|
||||
1024 POINT(3 6)
|
||||
1024 POINT(4 8)
|
||||
SELECT COUNT(*), ST_AsText(p2) FROM gis_point WHERE ST_Contains(@poly2, p2) GROUP BY p2;
|
||||
COUNT(*) ST_AsText(p2)
|
||||
1024 POINT(-2 -6)
|
||||
1024 POINT(-3 -9)
|
||||
1024 POINT(-4 -12)
|
||||
1024 POINT(-1 -3)
|
||||
1024 POINT(-1 -1)
|
||||
SELECT COUNT(*), ST_AsText(p2) FROM gis_point WHERE ST_Equals(p2, @p1) GROUP BY p2;
|
||||
COUNT(*) ST_AsText(p2)
|
||||
1024 POINT(0 0)
|
||||
SELECT COUNT(*), ST_AsText(p1) FROM gis_point WHERE ST_TOUCHES(@poly3, p1) AND MBRWithin(p2, @poly4) GROUP BY p1;
|
||||
COUNT(*) ST_AsText(p1)
|
||||
1024 POINT(20.5 41)
|
||||
1024 POINT(32.1234 64.2468)
|
||||
SELECT COUNT(*), ST_AsText(p1), ST_AsText(p2) FROM gis_point WHERE ST_Contains(@mpoly, p1) GROUP BY p1, p2;
|
||||
COUNT(*) ST_AsText(p1) ST_AsText(p2)
|
||||
1024 POINT(4 8) POINT(-4 -12)
|
||||
1024 POINT(5 10) POINT(-5 -15)
|
||||
1024 POINT(6 12) POINT(-6 -18)
|
||||
1024 POINT(7 14) POINT(-7 -21)
|
||||
1024 POINT(20.5 41) POINT(-8 4)
|
||||
SELECT COUNT(*), ST_AsText(p1), ST_AsText(p2) FROM gis_point WHERE ST_Contains(@mpoly, p1) AND NOT MBRWithin(p1, @mpoly) GROUP BY p1, p2;
|
||||
COUNT(*) ST_AsText(p1) ST_AsText(p2)
|
||||
======================================================================
|
||||
Build another new table with the same schema, will insert data from this table to the orignal one
|
||||
======================================================================
|
||||
CREATE TABLE p(p1 POINT NOT NULL, p2 POINT NOT NULL, SPATIAL INDEX k1(p2)) ENGINE=InnoDB;
|
||||
INSERT INTO p VALUES(ST_PointFromText('POINT(1000 -1000)'), ST_PointFromText('POINT(-201 203.56)'));
|
||||
INSERT INTO p VALUES(ST_PointFromText('POINT(20.5 43.9832)'), ST_PointFromText('POINT(-0 0)'));
|
||||
INSERT INTO p VALUES(ST_PointFromText('POINT(-4.2 -6.98)'), ST_PointFromText('POINT(-120.5 343.9832)'));
|
||||
INSERT INTO p SELECT * FROM p WHERE MBRWithin(p1, ST_GeomFromText('POLYGON((0 0, 0 2000, 2000 2000, 2000 -2000, 0 -2000, 0 0))'));
|
||||
INSERT INTO p SELECT * FROM p WHERE MBRWithin(p1, ST_GeomFromText('POLYGON((0 0, -10 0, -100 -100, 0 -50, 0 0))'));
|
||||
SELECT COUNT(*), ST_AsText(p1), ST_AsText(p2) FROM p GROUP BY p1, p2;
|
||||
COUNT(*) ST_AsText(p1) ST_AsText(p2)
|
||||
2 POINT(1000 -1000) POINT(-201 203.56)
|
||||
2 POINT(20.5 43.9832) POINT(-0 0)
|
||||
2 POINT(-4.2 -6.98) POINT(-120.5 343.9832)
|
||||
INSERT INTO gis_point SELECT * FROM p;
|
||||
INSERT INTO gis_point SELECT * FROM p;
|
||||
INSERT INTO gis_point SELECT * FROM p;
|
||||
INSERT INTO gis_point SELECT * FROM p;
|
||||
INSERT INTO gis_point SELECT * FROM p;
|
||||
INSERT INTO gis_point SELECT * FROM p;
|
||||
INSERT INTO gis_point SELECT * FROM p;
|
||||
CHECK TABLE gis_point;
|
||||
Table Op Msg_type Msg_text
|
||||
test.gis_point check status OK
|
||||
SELECT COUNT(*), ST_AsText(p1), ST_AsText(p2) FROM gis_point GROUP BY p1, p2;
|
||||
COUNT(*) ST_AsText(p1) ST_AsText(p2)
|
||||
1024 POINT(2 4) POINT(-2 -6)
|
||||
1024 POINT(3 6) POINT(-3 -9)
|
||||
1024 POINT(4 8) POINT(-4 -12)
|
||||
1024 POINT(5 10) POINT(-5 -15)
|
||||
1024 POINT(6 12) POINT(-6 -18)
|
||||
1024 POINT(7 14) POINT(-7 -21)
|
||||
1024 POINT(8 16) POINT(0 0)
|
||||
1024 POINT(9 18) POINT(-4 2)
|
||||
1024 POINT(10 21) POINT(-6 3)
|
||||
1024 POINT(1 2) POINT(-1 -3)
|
||||
1024 POINT(26.25 57) POINT(1 2)
|
||||
14 POINT(1000 -1000) POINT(-201 203.56)
|
||||
1024 POINT(20.5 41) POINT(-8 4)
|
||||
14 POINT(20.5 43.9832) POINT(-0 0)
|
||||
1024 POINT(32.1234 64.2468) POINT(-1 -1)
|
||||
14 POINT(-4.2 -6.98) POINT(-120.5 343.9832)
|
||||
SELECT COUNT(*), ST_AsText(p1) FROM gis_point WHERE ST_TOUCHES(@poly3, p1) AND MBRWithin(p2, @poly4) GROUP BY p1;
|
||||
COUNT(*) ST_AsText(p1)
|
||||
1024 POINT(20.5 41)
|
||||
1024 POINT(32.1234 64.2468)
|
||||
SELECT COUNT(*), ST_AsText(p2) FROM gis_point WHERE MBRWithin(p2, @poly2) GROUP BY p2;
|
||||
COUNT(*) ST_AsText(p2)
|
||||
1024 POINT(-2 -6)
|
||||
1024 POINT(-3 -9)
|
||||
1024 POINT(-4 -12)
|
||||
1024 POINT(-1 -3)
|
||||
1024 POINT(-1 -1)
|
||||
DROP TABLE p;
|
||||
================================
|
||||
Use a trx to test IUD and verify
|
||||
================================
|
||||
=============================================
|
||||
Delete those rows selected from another table
|
||||
=============================================
|
||||
SELECT COUNT(*), ST_AsText(p1), ST_AsText(p2) FROM gis_point GROUP BY p1, p2;
|
||||
COUNT(*) ST_AsText(p1) ST_AsText(p2)
|
||||
1024 POINT(2 4) POINT(-2 -6)
|
||||
1024 POINT(3 6) POINT(-3 -9)
|
||||
1024 POINT(4 8) POINT(-4 -12)
|
||||
1024 POINT(5 10) POINT(-5 -15)
|
||||
1024 POINT(6 12) POINT(-6 -18)
|
||||
1024 POINT(7 14) POINT(-7 -21)
|
||||
1024 POINT(8 16) POINT(0 0)
|
||||
1024 POINT(9 18) POINT(-4 2)
|
||||
1024 POINT(10 21) POINT(-6 3)
|
||||
1024 POINT(1 2) POINT(-1 -3)
|
||||
1024 POINT(26.25 57) POINT(1 2)
|
||||
14 POINT(1000 -1000) POINT(-201 203.56)
|
||||
1024 POINT(20.5 41) POINT(-8 4)
|
||||
14 POINT(20.5 43.9832) POINT(-0 0)
|
||||
1024 POINT(32.1234 64.2468) POINT(-1 -1)
|
||||
14 POINT(-4.2 -6.98) POINT(-120.5 343.9832)
|
||||
UPDATE gis_point SET p2 = ST_PointFromText('POINT(2000 2000)') WHERE ST_Contains(ST_GeomFromText('POLYGON((-100 100, -400 100, -400 400, -100 400, -100 100))'), p2) OR ST_Contains(ST_GeomFromText('POLYGON((-0.0001 -0.0002, -0.0001 0.00002, 0.00000005 0.000001, 0.0000025 -0.001, -0.0001 -0.0002))'), p2);
|
||||
CHECK TABLE gis_point;
|
||||
Table Op Msg_type Msg_text
|
||||
test.gis_point check status OK
|
||||
'To remove all the just updated rows'
|
||||
DELETE FROM gis_point WHERE ST_Intersection(ST_GeomFromText('LINESTRING(1800 1900, 2200 2100)'), ST_GeomFromText('LINESTRING(0 0, 2001 2001)')) = p2;
|
||||
INSERT INTO gis_point VALUES
|
||||
(ST_PointFromText('POINT(8 16)'), ST_PointFromText('POINT(0 0)')),
|
||||
(ST_PointFromText('POINT(8 16)'), ST_PointFromText('POINT(0 0)'));
|
||||
======================================================================
|
||||
Following results should be almost the same with those at the beginning
|
||||
======================================================================
|
||||
SELECT COUNT(*), ST_AsText(p1), ST_AsText(p2) FROM gis_point GROUP BY p1, p2;
|
||||
COUNT(*) ST_AsText(p1) ST_AsText(p2)
|
||||
1024 POINT(2 4) POINT(-2 -6)
|
||||
1024 POINT(3 6) POINT(-3 -9)
|
||||
1024 POINT(4 8) POINT(-4 -12)
|
||||
1024 POINT(5 10) POINT(-5 -15)
|
||||
1024 POINT(6 12) POINT(-6 -18)
|
||||
1024 POINT(7 14) POINT(-7 -21)
|
||||
2 POINT(8 16) POINT(0 0)
|
||||
1024 POINT(9 18) POINT(-4 2)
|
||||
1024 POINT(10 21) POINT(-6 3)
|
||||
1024 POINT(1 2) POINT(-1 -3)
|
||||
1024 POINT(26.25 57) POINT(1 2)
|
||||
1024 POINT(20.5 41) POINT(-8 4)
|
||||
1024 POINT(32.1234 64.2468) POINT(-1 -1)
|
||||
SELECT COUNT(*), ST_AsText(p1), ST_AsText(p2)
|
||||
FROM gis_point
|
||||
WHERE ST_Contains(ST_GeomFromText('POLYGON((-1000 -1000, -1000 1000, 1000 1000, 1001 -1001, -1000 -1000))'), p1)
|
||||
GROUP BY p1, p2;
|
||||
COUNT(*) ST_AsText(p1) ST_AsText(p2)
|
||||
1024 POINT(2 4) POINT(-2 -6)
|
||||
1024 POINT(3 6) POINT(-3 -9)
|
||||
1024 POINT(4 8) POINT(-4 -12)
|
||||
1024 POINT(5 10) POINT(-5 -15)
|
||||
1024 POINT(6 12) POINT(-6 -18)
|
||||
1024 POINT(7 14) POINT(-7 -21)
|
||||
2 POINT(8 16) POINT(0 0)
|
||||
1024 POINT(9 18) POINT(-4 2)
|
||||
1024 POINT(10 21) POINT(-6 3)
|
||||
1024 POINT(1 2) POINT(-1 -3)
|
||||
1024 POINT(26.25 57) POINT(1 2)
|
||||
1024 POINT(20.5 41) POINT(-8 4)
|
||||
1024 POINT(32.1234 64.2468) POINT(-1 -1)
|
||||
SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point GROUP BY p1, p2;
|
||||
ST_AsText(p1) ST_AsText(p2)
|
||||
POINT(2 4) POINT(-2 -6)
|
||||
POINT(3 6) POINT(-3 -9)
|
||||
POINT(4 8) POINT(-4 -12)
|
||||
POINT(5 10) POINT(-5 -15)
|
||||
POINT(6 12) POINT(-6 -18)
|
||||
POINT(7 14) POINT(-7 -21)
|
||||
POINT(8 16) POINT(0 0)
|
||||
POINT(9 18) POINT(-4 2)
|
||||
POINT(10 21) POINT(-6 3)
|
||||
POINT(1 2) POINT(-1 -3)
|
||||
POINT(26.25 57) POINT(1 2)
|
||||
POINT(20.5 41) POINT(-8 4)
|
||||
POINT(32.1234 64.2468) POINT(-1 -1)
|
||||
SELECT COUNT(*), ST_AsText(p1) FROM gis_point WHERE ST_Intersection(@ls1, @ls2) = p1 GROUP BY p1;
|
||||
COUNT(*) ST_AsText(p1)
|
||||
1024 POINT(5 10)
|
||||
SELECT COUNT(*), ST_AsText(p1) FROM gis_point WHERE MBRWithin(p1, @poly1) GROUP BY p1;
|
||||
COUNT(*) ST_AsText(p1)
|
||||
1024 POINT(3 6)
|
||||
1024 POINT(4 8)
|
||||
SELECT COUNT(*), ST_AsText(p2) FROM gis_point WHERE ST_Contains(@poly2, p2) GROUP BY p2;
|
||||
COUNT(*) ST_AsText(p2)
|
||||
1024 POINT(-2 -6)
|
||||
1024 POINT(-3 -9)
|
||||
1024 POINT(-4 -12)
|
||||
1024 POINT(-1 -3)
|
||||
1024 POINT(-1 -1)
|
||||
SELECT COUNT(*), ST_AsText(p2) FROM gis_point WHERE ST_Equals(p2, @p1) GROUP BY p2;
|
||||
COUNT(*) ST_AsText(p2)
|
||||
2 POINT(0 0)
|
||||
SELECT COUNT(*), ST_AsText(p1) FROM gis_point WHERE ST_TOUCHES(@poly3, p1) AND MBRWithin(p2, @poly4) GROUP BY p1;
|
||||
COUNT(*) ST_AsText(p1)
|
||||
1024 POINT(20.5 41)
|
||||
1024 POINT(32.1234 64.2468)
|
||||
SELECT COUNT(*), ST_AsText(p1), ST_AsText(p2) FROM gis_point WHERE ST_Contains(@mpoly, p1) GROUP BY p1, p2;
|
||||
COUNT(*) ST_AsText(p1) ST_AsText(p2)
|
||||
1024 POINT(4 8) POINT(-4 -12)
|
||||
1024 POINT(5 10) POINT(-5 -15)
|
||||
1024 POINT(6 12) POINT(-6 -18)
|
||||
1024 POINT(7 14) POINT(-7 -21)
|
||||
1024 POINT(20.5 41) POINT(-8 4)
|
||||
SELECT COUNT(*), ST_AsText(p1), ST_AsText(p2) FROM gis_point WHERE ST_Contains(@mpoly, p1) AND NOT MBRWithin(p1, @mpoly) GROUP BY p1, p2;
|
||||
COUNT(*) ST_AsText(p1) ST_AsText(p2)
|
||||
CHECK TABLE gis_point;
|
||||
Table Op Msg_type Msg_text
|
||||
test.gis_point check status OK
|
||||
DROP TABLE gis_point;
|
174
mysql-test/suite/innodb_gis/r/repeatable_spatial.result
Normal file
174
mysql-test/suite/innodb_gis/r/repeatable_spatial.result
Normal file
|
@ -0,0 +1,174 @@
|
|||
CREATE TABLE tab(c1 int NOT NULL PRIMARY KEY,c2 POINT NOT NULL,
|
||||
c3 LINESTRING NOT NULL,c4 POLYGON NOT NULL,c5 GEOMETRY NOT NULL)
|
||||
ENGINE=InnoDB;
|
||||
ALTER TABLE tab ADD SPATIAL INDEX idx2(c2 ASC);
|
||||
ALTER TABLE tab ADD SPATIAL KEY idx3(c3 DESC);
|
||||
ALTER TABLE tab ADD SPATIAL INDEX idx4(c4 ASC) COMMENT 'testing spatial index on Polygon';
|
||||
ALTER TABLE tab ADD SPATIAL KEY idx5(c5 ASC) COMMENT 'testing spatial index on Geometry';
|
||||
INSERT INTO tab(c1,c2,c3,c4,c5)
|
||||
VALUES(1,ST_GeomFromText('POINT(10 10)'),ST_GeomFromText('LINESTRING(5 5,20 20,30 30)'),
|
||||
ST_GeomFromText('POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))'),
|
||||
ST_GeomFromText('POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))'));
|
||||
SELECT c1,ST_AsText(c2),ST_AsText(c3),ST_AsText(c4),ST_AsText(c5) FROM tab;
|
||||
c1 ST_AsText(c2) ST_AsText(c3) ST_AsText(c4) ST_AsText(c5)
|
||||
1 POINT(10 10) LINESTRING(5 5,20 20,30 30) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
|
||||
SELECT COUNT(*) FROM tab;
|
||||
COUNT(*)
|
||||
1
|
||||
"In connection 1"
|
||||
connect con1,localhost,root,,;
|
||||
connection con1;
|
||||
SET GLOBAL TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
||||
SELECT @@tx_isolation;
|
||||
@@tx_isolation
|
||||
REPEATABLE-READ
|
||||
SELECT COUNT(*) FROM tab;
|
||||
COUNT(*)
|
||||
1
|
||||
SELECT c1,ST_AsText(c2),ST_AsText(c3),ST_AsText(c4),ST_AsText(c5) FROM tab;
|
||||
c1 ST_AsText(c2) ST_AsText(c3) ST_AsText(c4) ST_AsText(c5)
|
||||
1 POINT(10 10) LINESTRING(5 5,20 20,30 30) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
|
||||
"In connection 2"
|
||||
connect con2,localhost,root,,;
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
SELECT @@tx_isolation;
|
||||
@@tx_isolation
|
||||
READ-COMMITTED
|
||||
START TRANSACTION;
|
||||
INSERT INTO tab(c1,c2,c3,c4,c5)
|
||||
VALUES(2,ST_GeomFromText('POINT(20 20)'),ST_GeomFromText('LINESTRING(20 20,30 30,40 40)'),
|
||||
ST_GeomFromText('POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))'),
|
||||
ST_GeomFromText('POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))'));
|
||||
SET @g1 = ST_GeomFromText('POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))');
|
||||
SET @g2 = ST_GeomFromText('POINT(10 10)');
|
||||
UPDATE tab SET C5 = ST_GeomFromText('POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))')
|
||||
WHERE MBREquals(tab.c4, @g1) AND MBREquals(tab.c2, @g2);
|
||||
"In connection 1"
|
||||
connection con1;
|
||||
SET @g3 = ST_GeomFromText('POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))');
|
||||
SELECT c1,ST_AsText(c2),ST_AsText(c4),ST_AsText(c5) FROM tab WHERE MBREquals(tab.c5, @g3);
|
||||
c1 ST_AsText(c2) ST_AsText(c4) ST_AsText(c5)
|
||||
SELECT COUNT(*) FROM tab;
|
||||
COUNT(*)
|
||||
1
|
||||
START TRANSACTION;
|
||||
SELECT COUNT(*) FROM tab;
|
||||
COUNT(*)
|
||||
1
|
||||
"In connection 2"
|
||||
connection con2;
|
||||
SELECT COUNT(*) FROM tab;
|
||||
COUNT(*)
|
||||
2
|
||||
COMMIT;
|
||||
disconnect con2;
|
||||
"In connection 1"
|
||||
connection con1;
|
||||
SELECT COUNT(*) FROM tab;
|
||||
COUNT(*)
|
||||
1
|
||||
SET @g4 = ST_GeomFromText('POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))');
|
||||
SELECT ST_AsText(c5) FROM tab WHERE MBREquals(tab.c5, @g4);
|
||||
ST_AsText(c5)
|
||||
COMMIT;
|
||||
SELECT ST_AsText(c5) FROM tab WHERE MBREquals(tab.c5, @g4);
|
||||
ST_AsText(c5)
|
||||
POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
|
||||
SELECT COUNT(*) FROM tab;
|
||||
COUNT(*)
|
||||
2
|
||||
SELECT c1,ST_AsText(c2),ST_AsText(c4),ST_AsText(c5) FROM tab;
|
||||
c1 ST_AsText(c2) ST_AsText(c4) ST_AsText(c5)
|
||||
1 POINT(10 10) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
|
||||
2 POINT(20 20) POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50)) POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
|
||||
disconnect con1;
|
||||
connection default;
|
||||
DROP TABLE tab;
|
||||
CREATE TABLE tab(c1 int NOT NULL PRIMARY KEY,c2 POINT NOT NULL,
|
||||
c3 LINESTRING NOT NULL,c4 POLYGON NOT NULL,c5 GEOMETRY NOT NULL)
|
||||
ENGINE=InnoDB;
|
||||
ALTER TABLE tab ADD SPATIAL INDEX idx2(c2 ASC);
|
||||
ALTER TABLE tab ADD SPATIAL KEY idx3(c3 DESC);
|
||||
ALTER TABLE tab ADD SPATIAL INDEX idx4(c4 ASC) COMMENT 'testing spatial index on Polygon';
|
||||
ALTER TABLE tab ADD SPATIAL KEY idx5(c5 ASC) COMMENT 'testing spatial index on Geometry';
|
||||
INSERT INTO tab(c1,c2,c3,c4,c5)
|
||||
VALUES(1,ST_GeomFromText('POINT(10 10)'),ST_GeomFromText('LINESTRING(5 5,20 20,30 30)'),
|
||||
ST_GeomFromText('POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))'),
|
||||
ST_GeomFromText('POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))'));
|
||||
SELECT c1,ST_AsText(c2),ST_AsText(c3),ST_AsText(c4),ST_AsText(c5) FROM tab;
|
||||
c1 ST_AsText(c2) ST_AsText(c3) ST_AsText(c4) ST_AsText(c5)
|
||||
1 POINT(10 10) LINESTRING(5 5,20 20,30 30) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
|
||||
SELECT COUNT(*) FROM tab;
|
||||
COUNT(*)
|
||||
1
|
||||
"In connection 1"
|
||||
connect con1,localhost,root,,;
|
||||
connection con1;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
||||
SELECT @@tx_isolation;
|
||||
@@tx_isolation
|
||||
REPEATABLE-READ
|
||||
SELECT COUNT(*) FROM tab;
|
||||
COUNT(*)
|
||||
1
|
||||
SELECT c1,ST_AsText(c2),ST_AsText(c3),ST_AsText(c4),ST_AsText(c5) FROM tab;
|
||||
c1 ST_AsText(c2) ST_AsText(c3) ST_AsText(c4) ST_AsText(c5)
|
||||
1 POINT(10 10) LINESTRING(5 5,20 20,30 30) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))
|
||||
"In connection 2"
|
||||
connect con2,localhost,root,,;
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
SELECT @@tx_isolation;
|
||||
@@tx_isolation
|
||||
READ-COMMITTED
|
||||
START TRANSACTION;
|
||||
INSERT INTO tab(c1,c2,c3,c4,c5)
|
||||
VALUES(2,ST_GeomFromText('POINT(20 20)'),ST_GeomFromText('LINESTRING(20 20,30 30,40 40)'),
|
||||
ST_GeomFromText('POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))'),
|
||||
ST_GeomFromText('POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))'));
|
||||
SET @g1 = ST_GeomFromText('POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))');
|
||||
SET @g2 = ST_GeomFromText('POINT(10 10)');
|
||||
UPDATE tab SET C5 = ST_GeomFromText('POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))')
|
||||
WHERE MBREquals(tab.c4, @g1) AND MBREquals(tab.c2, @g2);
|
||||
"In connection 1"
|
||||
connection con1;
|
||||
SET @g3 = ST_GeomFromText('POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))');
|
||||
SELECT c1,ST_AsText(c2),ST_AsText(c4),ST_AsText(c5) FROM tab WHERE MBREquals(tab.c5, @g3);
|
||||
c1 ST_AsText(c2) ST_AsText(c4) ST_AsText(c5)
|
||||
SELECT COUNT(*) FROM tab;
|
||||
COUNT(*)
|
||||
1
|
||||
START TRANSACTION;
|
||||
SELECT COUNT(*) FROM tab;
|
||||
COUNT(*)
|
||||
1
|
||||
"In connection 2"
|
||||
connection con2;
|
||||
SELECT COUNT(*) FROM tab;
|
||||
COUNT(*)
|
||||
2
|
||||
COMMIT;
|
||||
disconnect con2;
|
||||
"In connection 1"
|
||||
connection con1;
|
||||
SELECT COUNT(*) FROM tab;
|
||||
COUNT(*)
|
||||
1
|
||||
SET @g4 = ST_GeomFromText('POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))');
|
||||
SELECT ST_AsText(c5) FROM tab WHERE MBREquals(tab.c5, @g4);
|
||||
ST_AsText(c5)
|
||||
COMMIT;
|
||||
SELECT ST_AsText(c5) FROM tab WHERE MBREquals(tab.c5, @g4);
|
||||
ST_AsText(c5)
|
||||
POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
|
||||
SELECT COUNT(*) FROM tab;
|
||||
COUNT(*)
|
||||
2
|
||||
SELECT c1,ST_AsText(c2),ST_AsText(c4),ST_AsText(c5) FROM tab;
|
||||
c1 ST_AsText(c2) ST_AsText(c4) ST_AsText(c5)
|
||||
1 POINT(10 10) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) POLYGON((300 300,400 400,500 500,300 500,300 400,300 300))
|
||||
2 POINT(20 20) POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50)) POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50))
|
||||
disconnect con1;
|
||||
connection default;
|
||||
DROP TABLE tab;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue