mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
auto-merge
This commit is contained in:
commit
25abeed586
223 changed files with 3574 additions and 4033 deletions
15
.bzrignore
15
.bzrignore
|
@ -9,6 +9,7 @@
|
|||
*.core
|
||||
*.d
|
||||
*.da
|
||||
*.dir
|
||||
*.dll
|
||||
*.exe
|
||||
*.exp
|
||||
|
@ -30,6 +31,7 @@
|
|||
*.pdb
|
||||
*.reject
|
||||
*.res
|
||||
*.rule
|
||||
*.sbr
|
||||
*.so
|
||||
*.so.*
|
||||
|
@ -37,7 +39,13 @@
|
|||
*.user
|
||||
*.vcproj
|
||||
*.vcproj.cmake
|
||||
*.vcxproj
|
||||
*.vcxproj.filters
|
||||
*/*.dir/*
|
||||
*.dir
|
||||
Debug
|
||||
MySql.sdf
|
||||
Win32
|
||||
*/*_pure_*warnings
|
||||
*/.deps
|
||||
*/.libs/*
|
||||
|
@ -45,7 +53,7 @@
|
|||
*/debug/*
|
||||
*/minsizerel/*
|
||||
*/release/*
|
||||
*/relwithdebinfo/*
|
||||
RelWithDebInfo
|
||||
*~
|
||||
.*.swp
|
||||
./CMakeCache.txt
|
||||
|
@ -607,6 +615,7 @@ include/mysql_h.ic
|
|||
include/mysql_version.h
|
||||
include/mysqld_ername.h
|
||||
include/mysqld_error.h
|
||||
include/mysqld_error.h.rule
|
||||
include/openssl
|
||||
include/readline
|
||||
include/readline/*.h
|
||||
|
@ -1879,7 +1888,9 @@ scripts/mysql_find_rows
|
|||
scripts/mysql_fix_extensions
|
||||
scripts/mysql_fix_privilege_tables
|
||||
scripts/mysql_fix_privilege_tables.sql
|
||||
scripts/mysql_fix_privilege_tables.sql.rule
|
||||
scripts/mysql_fix_privilege_tables_sql.c
|
||||
scripts/mysql_fix_privilege_tables_sql.c.rule
|
||||
scripts/mysql_install_db
|
||||
scripts/mysql_secure_installation
|
||||
scripts/mysql_setpermission
|
||||
|
@ -2116,6 +2127,7 @@ sql/handlerton.cc
|
|||
sql/html
|
||||
sql/latex
|
||||
sql/lex_hash.h
|
||||
sql/lex_hash.h.rule
|
||||
sql/link_sources
|
||||
sql/max/*
|
||||
sql/message.h
|
||||
|
@ -2147,6 +2159,7 @@ sql/sql_builtin.cc
|
|||
sql/sql_select.cc.orig
|
||||
sql/sql_yacc.cc
|
||||
sql/sql_yacc.h
|
||||
sql/sql_yacc.h.rule
|
||||
sql/sql_yacc.output
|
||||
sql/sql_yacc.yy.orig
|
||||
sql/test_time
|
||||
|
|
|
@ -59,6 +59,7 @@ ADD_DEFINITIONS(-D__NT__)
|
|||
|
||||
IF(CYBOZU)
|
||||
ADD_DEFINITIONS(-DCYBOZU)
|
||||
ADD_DEFINITIONS(-DHAVE_UTF8_GENERAL_CS)
|
||||
ENDIF(CYBOZU)
|
||||
|
||||
IF(EXTRA_DEBUG)
|
||||
|
|
|
@ -116,10 +116,10 @@ link_sources:
|
|||
@LN_CP_F@ $(top_srcdir)/sql/$$f $$f; \
|
||||
done; \
|
||||
for f in $(strings_src) ; do \
|
||||
rm -f $(srcdir)/$$f; \
|
||||
rm -f $$f; \
|
||||
@LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \
|
||||
done; \
|
||||
rm -f $(srcdir)/my_user.c; \
|
||||
rm -f my_user.c; \
|
||||
@LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c;
|
||||
echo timestamp > link_sources;
|
||||
|
||||
|
|
|
@ -85,6 +85,7 @@ enum options_client
|
|||
OPT_SLAP_POST_SYSTEM,
|
||||
OPT_SLAP_COMMIT,
|
||||
OPT_SLAP_DETACH,
|
||||
OPT_SLAP_NO_DROP,
|
||||
OPT_MYSQL_REPLACE_INTO, OPT_BASE64_OUTPUT_MODE, OPT_SERVER_ID,
|
||||
OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT,
|
||||
OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE,
|
||||
|
|
|
@ -705,10 +705,18 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
|||
*/
|
||||
start_datetime= 0;
|
||||
offset= 0; // print everything and protect against cycling rec_count
|
||||
/*
|
||||
Skip events according to the --server-id flag. However, don't
|
||||
skip format_description or rotate events, because they they
|
||||
are really "global" events that are relevant for the entire
|
||||
binlog, even if they have a server_id. Also, we have to read
|
||||
the format_description event so that we can parse subsequent
|
||||
events.
|
||||
*/
|
||||
if (ev_type != ROTATE_EVENT &&
|
||||
server_id && (server_id != ev->server_id))
|
||||
goto end;
|
||||
}
|
||||
if (server_id && (server_id != ev->server_id))
|
||||
/* skip just this event, continue processing the log. */
|
||||
goto end;
|
||||
if (((my_time_t)(ev->when) >= stop_datetime)
|
||||
|| (pos >= stop_position_mot))
|
||||
{
|
||||
|
@ -943,7 +951,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
|||
passed --short-form, because --short-form disables printing
|
||||
row events.
|
||||
*/
|
||||
if (!print_event_info->printed_fd_event && !short_form)
|
||||
if (!print_event_info->printed_fd_event && !short_form &&
|
||||
opt_base64_output_mode != BASE64_OUTPUT_DECODE_ROWS)
|
||||
{
|
||||
const char* type_str= ev->get_type_str();
|
||||
if (opt_base64_output_mode == BASE64_OUTPUT_NEVER)
|
||||
|
|
|
@ -131,7 +131,7 @@ const char *delimiter= "\n";
|
|||
|
||||
const char *create_schema_string= "mysqlslap";
|
||||
|
||||
static my_bool opt_preserve= TRUE;
|
||||
static my_bool opt_preserve= TRUE, opt_no_drop= FALSE;
|
||||
static my_bool debug_info_flag= 0, debug_check_flag= 0;
|
||||
static my_bool opt_only_print= FALSE;
|
||||
static my_bool opt_compress= FALSE, tty_password= FALSE,
|
||||
|
@ -599,6 +599,8 @@ static struct my_option my_long_options[] =
|
|||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"iterations", 'i', "Number of times to run the tests.", &iterations,
|
||||
&iterations, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"no-drop", OPT_SLAP_NO_DROP, "Do not drop the schema after the test.",
|
||||
&opt_no_drop, &opt_no_drop, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"number-char-cols", 'x',
|
||||
"Number of VARCHAR columns to create in table if specifying --auto-generate-sql.",
|
||||
&num_char_cols_opt, &num_char_cols_opt, 0, GET_STR, REQUIRED_ARG,
|
||||
|
@ -1147,8 +1149,11 @@ get_options(int *argc,char ***argv)
|
|||
if (!user)
|
||||
user= (char *)"root";
|
||||
|
||||
/* If something is created we clean it up, otherwise we leave schemas alone */
|
||||
if (create_string || auto_generate_sql)
|
||||
/*
|
||||
If something is created and --no-drop is not specified, we drop the
|
||||
schema.
|
||||
*/
|
||||
if (!opt_no_drop && (create_string || auto_generate_sql))
|
||||
opt_preserve= FALSE;
|
||||
|
||||
if (auto_generate_sql && (create_string || user_supplied_query))
|
||||
|
|
|
@ -4461,13 +4461,14 @@ static int my_kill(int pid, int sig)
|
|||
command called command
|
||||
|
||||
DESCRIPTION
|
||||
shutdown [<timeout>]
|
||||
shutdown_server [<timeout>]
|
||||
|
||||
*/
|
||||
|
||||
void do_shutdown_server(struct st_command *command)
|
||||
{
|
||||
int timeout=60, pid;
|
||||
long timeout=60;
|
||||
int pid;
|
||||
DYNAMIC_STRING ds_pidfile_name;
|
||||
MYSQL* mysql = &cur_con->mysql;
|
||||
static DYNAMIC_STRING ds_timeout;
|
||||
|
@ -4482,8 +4483,9 @@ void do_shutdown_server(struct st_command *command)
|
|||
|
||||
if (ds_timeout.length)
|
||||
{
|
||||
timeout= atoi(ds_timeout.str);
|
||||
if (timeout == 0)
|
||||
char* endptr;
|
||||
timeout= strtol(ds_timeout.str, &endptr, 10);
|
||||
if (*endptr != '\0')
|
||||
die("Illegal argument for timeout: '%s'", ds_timeout.str);
|
||||
}
|
||||
dynstr_free(&ds_timeout);
|
||||
|
@ -4525,7 +4527,7 @@ void do_shutdown_server(struct st_command *command)
|
|||
DBUG_PRINT("info", ("Process %d does not exist anymore", pid));
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
DBUG_PRINT("info", ("Sleeping, timeout: %d", timeout));
|
||||
DBUG_PRINT("info", ("Sleeping, timeout: %ld", timeout));
|
||||
my_sleep(1000000L);
|
||||
}
|
||||
|
||||
|
@ -8032,13 +8034,15 @@ int main(int argc, char **argv)
|
|||
cur_file->lineno= 1;
|
||||
}
|
||||
init_re();
|
||||
|
||||
/* Cursor protcol implies ps protocol */
|
||||
if (cursor_protocol)
|
||||
ps_protocol= 1;
|
||||
|
||||
ps_protocol_enabled= ps_protocol;
|
||||
sp_protocol_enabled= sp_protocol;
|
||||
view_protocol_enabled= view_protocol;
|
||||
cursor_protocol_enabled= cursor_protocol;
|
||||
/* Cursor protcol implies ps protocol */
|
||||
if (cursor_protocol_enabled)
|
||||
ps_protocol_enabled= 1;
|
||||
|
||||
st_connection *con= connections;
|
||||
if (!( mysql_init(&con->mysql)))
|
||||
|
@ -9735,7 +9739,7 @@ int find_set(REP_SETS *sets,REP_SET *find)
|
|||
return i;
|
||||
}
|
||||
}
|
||||
return i; /* return new postion */
|
||||
return i; /* return new position */
|
||||
}
|
||||
|
||||
/* find if there is a found_set with same table_offset & found_offset
|
||||
|
@ -9755,7 +9759,7 @@ int find_found(FOUND_SET *found_set,uint table_offset, int found_offset)
|
|||
found_set[i].table_offset=table_offset;
|
||||
found_set[i].found_offset=found_offset;
|
||||
found_sets++;
|
||||
return -i-2; /* return new postion */
|
||||
return -i-2; /* return new position */
|
||||
}
|
||||
|
||||
/* Return 1 if regexp starts with \b or ends with \b*/
|
||||
|
|
|
@ -478,7 +478,13 @@ el_source(EditLine *el, const char *fname)
|
|||
|
||||
fp = NULL;
|
||||
if (fname == NULL) {
|
||||
#ifdef HAVE_ISSETUGID
|
||||
/* XXXMYSQL: Bug#49967 */
|
||||
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID) && \
|
||||
defined(HAVE_GETGID) && defined(HAVE_GETEGID)
|
||||
#define HAVE_IDENTITY_FUNCS 1
|
||||
#endif
|
||||
|
||||
#if (defined(HAVE_ISSETUGID) || defined(HAVE_IDENTITY_FUNCS))
|
||||
static const char elpath[] = "/.editrc";
|
||||
/* XXXMYSQL: Portability fix (for which platforms?) */
|
||||
#ifdef MAXPATHLEN
|
||||
|
@ -486,9 +492,13 @@ el_source(EditLine *el, const char *fname)
|
|||
#else
|
||||
char path[4096];
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ISSETUGID
|
||||
if (issetugid())
|
||||
return (-1);
|
||||
#elif defined(HAVE_IDENTITY_FUNCS)
|
||||
if (getuid() != geteuid() || getgid() != getegid())
|
||||
return (-1);
|
||||
#endif
|
||||
if ((ptr = getenv("HOME")) == NULL)
|
||||
return (-1);
|
||||
if (strlcpy(path, ptr, sizeof(path)) >= sizeof(path))
|
||||
|
@ -498,9 +508,10 @@ el_source(EditLine *el, const char *fname)
|
|||
fname = path;
|
||||
#else
|
||||
/*
|
||||
* If issetugid() is missing, always return an error, in order
|
||||
* to keep from inadvertently opening up the user to a security
|
||||
* hole.
|
||||
* If issetugid() or the above mentioned get[e][u|g]id()
|
||||
* functions are missing, always return an error, in order
|
||||
* to keep from inadvertently opening up the user to a
|
||||
* security hole.
|
||||
*/
|
||||
return (-1);
|
||||
#endif
|
||||
|
|
|
@ -1012,8 +1012,10 @@ vi_histedit(EditLine *el, int c __attribute__((__unused__)))
|
|||
if (fd < 0)
|
||||
return CC_ERROR;
|
||||
cp = el->el_line.buffer;
|
||||
write(fd, cp, el->el_line.lastchar - cp +0u);
|
||||
write(fd, "\n", 1);
|
||||
if (write(fd, cp, el->el_line.lastchar - cp +0u) == -1)
|
||||
goto error;
|
||||
if (write(fd, "\n", 1) == -1)
|
||||
goto error;
|
||||
pid = fork();
|
||||
switch (pid) {
|
||||
case -1:
|
||||
|
@ -1041,6 +1043,12 @@ vi_histedit(EditLine *el, int c __attribute__((__unused__)))
|
|||
unlink(tempfile);
|
||||
/* return CC_REFRESH; */
|
||||
return ed_newline(el, 0);
|
||||
|
||||
/* XXXMYSQL: Avoid compiler warnings. */
|
||||
error:
|
||||
close(fd);
|
||||
unlink(tempfile);
|
||||
return CC_ERROR;
|
||||
}
|
||||
|
||||
/* vi_history_word():
|
||||
|
|
|
@ -12,7 +12,7 @@ dnl
|
|||
dnl When changing the major version number please also check the switch
|
||||
dnl statement in mysqlbinlog::check_master_version(). You may also need
|
||||
dnl to update version.c in ndb.
|
||||
AC_INIT([MySQL Server], [5.1.57], [], [mysql])
|
||||
AC_INIT([MySQL Server], [5.1.58], [], [mysql])
|
||||
|
||||
AC_CONFIG_SRCDIR([sql/mysqld.cc])
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
@ -1963,7 +1963,7 @@ AC_CHECK_HEADER(vis.h,
|
|||
[AC_DEFINE([HAVE_VIS_H], [1],[Found vis.h and the strvis() function])])])
|
||||
|
||||
AC_CHECK_FUNCS(strlcat strlcpy)
|
||||
AC_CHECK_FUNCS(issetugid)
|
||||
AC_CHECK_FUNCS(issetugid getuid geteuid getgid getegid)
|
||||
AC_CHECK_FUNCS(fgetln)
|
||||
AC_CHECK_FUNCS(getline flockfile)
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ static my_bool verbose, print_all_codes;
|
|||
|
||||
#include "../include/my_base.h"
|
||||
#include "../mysys/my_handler_errors.h"
|
||||
#include "../include/my_handler.h"
|
||||
|
||||
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
|
||||
static my_bool ndb_code;
|
||||
|
@ -185,6 +184,36 @@ static const char *get_ha_error_msg(int code)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
Register handler error messages for usage with my_error()
|
||||
|
||||
NOTES
|
||||
This is safe to call multiple times as my_error_register()
|
||||
will ignore calls to register already registered error numbers.
|
||||
*/
|
||||
void my_handler_error_register(void)
|
||||
{
|
||||
/*
|
||||
If you got compilation error here about compile_time_assert array, check
|
||||
that every HA_ERR_xxx constant has a corresponding error message in
|
||||
handler_error_messages[] list (check mysys/ma_handler_errors.h and
|
||||
include/my_base.h).
|
||||
*/
|
||||
compile_time_assert(HA_ERR_FIRST + array_elements(handler_error_messages) ==
|
||||
HA_ERR_LAST + 1);
|
||||
my_error_register(handler_error_messages, HA_ERR_FIRST,
|
||||
HA_ERR_FIRST+ array_elements(handler_error_messages)-1);
|
||||
}
|
||||
|
||||
|
||||
void my_handler_error_unregister(void)
|
||||
{
|
||||
my_error_unregister(HA_ERR_FIRST,
|
||||
HA_ERR_FIRST+ array_elements(handler_error_messages)-1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if defined(__WIN__)
|
||||
static my_bool print_win_error_msg(DWORD error, my_bool verbose)
|
||||
{
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
/* Copyright (C) 2000 MySQL AB
|
||||
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; version 2 of
|
||||
the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
02110-1301 USA */
|
||||
|
||||
/*
|
||||
Replace strings in textfile
|
||||
|
@ -819,7 +821,7 @@ static short find_set(REP_SETS *sets,REP_SET *find)
|
|||
return (short) i;
|
||||
}
|
||||
}
|
||||
return (short) i; /* return new postion */
|
||||
return (short) i; /* return new position */
|
||||
}
|
||||
|
||||
|
||||
|
@ -842,7 +844,7 @@ static short find_found(FOUND_SET *found_set,uint table_offset,
|
|||
found_set[i].table_offset=table_offset;
|
||||
found_set[i].found_offset=found_offset;
|
||||
found_sets++;
|
||||
return (short) (-i-2); /* return new postion */
|
||||
return (short) (-i-2); /* return new position */
|
||||
}
|
||||
|
||||
/* Return 1 if regexp starts with \b or ends with \b*/
|
||||
|
|
|
@ -37,7 +37,7 @@ noinst_HEADERS = config-win.h config-netware.h my_bit.h \
|
|||
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \
|
||||
my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \
|
||||
thr_lock.h t_ctype.h violite.h my_md5.h base64.h \
|
||||
my_handler.h my_time.h my_vle.h my_user.h \
|
||||
my_compare.h my_time.h my_vle.h my_user.h \
|
||||
my_libwrap.h my_stacktrace.h
|
||||
|
||||
EXTRA_DIST = mysql.h.pp mysql/plugin.h.pp
|
||||
|
|
|
@ -30,7 +30,7 @@ extern "C" {
|
|||
#include <thr_lock.h>
|
||||
#endif
|
||||
|
||||
#include "my_handler.h"
|
||||
#include "my_compare.h"
|
||||
#include "my_tree.h"
|
||||
|
||||
/* defines used by heap-funktions */
|
||||
|
|
89
include/my_compare.h
Normal file
89
include/my_compare.h
Normal file
|
@ -0,0 +1,89 @@
|
|||
/* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _my_compare_h
|
||||
#define _my_compare_h
|
||||
|
||||
#include "my_base.h"
|
||||
#include "m_ctype.h"
|
||||
#include "myisampack.h"
|
||||
|
||||
typedef struct st_HA_KEYSEG /* Key-portion */
|
||||
{
|
||||
CHARSET_INFO *charset;
|
||||
uint32 start; /* Start of key in record */
|
||||
uint32 null_pos; /* position to NULL indicator */
|
||||
uint16 bit_pos; /* Position to bit part */
|
||||
uint16 flag;
|
||||
uint16 length; /* Keylength */
|
||||
uint8 type; /* Type of key (for sort) */
|
||||
uint8 language;
|
||||
uint8 null_bit; /* bitmask to test for NULL */
|
||||
uint8 bit_start,bit_end; /* if bit field */
|
||||
uint8 bit_length; /* Length of bit part */
|
||||
} HA_KEYSEG;
|
||||
|
||||
#define get_key_length(length,key) \
|
||||
{ if ((uchar) *(key) != 255) \
|
||||
length= (uint) (uchar) *((key)++); \
|
||||
else \
|
||||
{ length=mi_uint2korr((key)+1); (key)+=3; } \
|
||||
}
|
||||
|
||||
#define get_key_length_rdonly(length,key) \
|
||||
{ if ((uchar) *(key) != 255) \
|
||||
length= ((uint) (uchar) *((key))); \
|
||||
else \
|
||||
{ length=mi_uint2korr((key)+1); } \
|
||||
}
|
||||
|
||||
#define get_key_pack_length(length,length_pack,key) \
|
||||
{ if ((uchar) *(key) != 255) \
|
||||
{ length= (uint) (uchar) *((key)++); length_pack=1; }\
|
||||
else \
|
||||
{ length=mi_uint2korr((key)+1); (key)+=3; length_pack=3; } \
|
||||
}
|
||||
|
||||
#define store_key_length_inc(key,length) \
|
||||
{ if ((length) < 255) \
|
||||
{ *(key)++=(length); } \
|
||||
else \
|
||||
{ *(key)=255; mi_int2store((key)+1,(length)); (key)+=3; } \
|
||||
}
|
||||
|
||||
#define get_rec_bits(bit_ptr, bit_ofs, bit_len) \
|
||||
(((((uint16) (bit_ptr)[1] << 8) | (uint16) (bit_ptr)[0]) >> (bit_ofs)) & \
|
||||
((1 << (bit_len)) - 1))
|
||||
|
||||
#define set_rec_bits(bits, bit_ptr, bit_ofs, bit_len) \
|
||||
{ \
|
||||
(bit_ptr)[0]= ((bit_ptr)[0] & ~(((1 << (bit_len)) - 1) << (bit_ofs))) | \
|
||||
((bits) << (bit_ofs)); \
|
||||
if ((bit_ofs) + (bit_len) > 8) \
|
||||
(bit_ptr)[1]= ((bit_ptr)[1] & ~((1 << ((bit_len) - 8 + (bit_ofs))) - 1)) | \
|
||||
((bits) >> (8 - (bit_ofs))); \
|
||||
}
|
||||
|
||||
#define clr_rec_bits(bit_ptr, bit_ofs, bit_len) \
|
||||
set_rec_bits(0, bit_ptr, bit_ofs, bit_len)
|
||||
|
||||
extern int ha_compare_text(CHARSET_INFO *, uchar *, uint, uchar *, uint ,
|
||||
my_bool, my_bool);
|
||||
extern int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
|
||||
register uchar *b, uint key_length, uint nextflag,
|
||||
uint *diff_pos);
|
||||
|
||||
|
||||
#endif /* _my_compare_h */
|
|
@ -359,7 +359,7 @@ C_MODE_END
|
|||
#define ulonglong2double(A) my_ulonglong2double(A)
|
||||
#define my_off_t2double(A) my_ulonglong2double(A)
|
||||
C_MODE_START
|
||||
double my_ulonglong2double(unsigned long long A);
|
||||
inline double my_ulonglong2double(unsigned long long A) { return (double) A; }
|
||||
C_MODE_END
|
||||
#endif /* _AIX */
|
||||
|
||||
|
|
|
@ -1,128 +0,0 @@
|
|||
/* Copyright (C) 2002-2006 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; version 2
|
||||
of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA */
|
||||
|
||||
#ifndef _my_handler_h
|
||||
#define _my_handler_h
|
||||
|
||||
#include "myisampack.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
There is a hard limit for the maximum number of keys as there are only
|
||||
8 bits in the index file header for the number of keys in a table.
|
||||
This means that 0..255 keys can exist for a table. The idea of
|
||||
HA_MAX_POSSIBLE_KEY is to ensure that one can use myisamchk & tools on
|
||||
a MyISAM table for which one has more keys than MyISAM is normally
|
||||
compiled for. If you don't have this, you will get a core dump when
|
||||
running myisamchk compiled for 128 keys on a table with 255 keys.
|
||||
*/
|
||||
|
||||
#define HA_MAX_POSSIBLE_KEY 255 /* For myisamchk */
|
||||
/*
|
||||
The following defines can be increased if necessary.
|
||||
But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH.
|
||||
*/
|
||||
|
||||
#define HA_MAX_KEY_LENGTH 1000 /* Max length in bytes */
|
||||
#define HA_MAX_KEY_SEG 16 /* Max segments for key */
|
||||
|
||||
#define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24+ 6+6)
|
||||
#define HA_MAX_KEY_BUFF (HA_MAX_KEY_LENGTH+HA_MAX_KEY_SEG*6+8+8)
|
||||
|
||||
typedef struct st_HA_KEYSEG /* Key-portion */
|
||||
{
|
||||
CHARSET_INFO *charset;
|
||||
uint32 start; /* Start of key in record */
|
||||
uint32 null_pos; /* position to NULL indicator */
|
||||
uint16 bit_pos; /* Position to bit part */
|
||||
uint16 flag;
|
||||
uint16 length; /* Keylength */
|
||||
uint8 type; /* Type of key (for sort) */
|
||||
uint8 language;
|
||||
uint8 null_bit; /* bitmask to test for NULL */
|
||||
uint8 bit_start,bit_end; /* if bit field */
|
||||
uint8 bit_length; /* Length of bit part */
|
||||
} HA_KEYSEG;
|
||||
|
||||
#define get_key_length(length,key) \
|
||||
{ if (*(uchar*) (key) != 255) \
|
||||
length= (uint) *(uchar*) ((key)++); \
|
||||
else \
|
||||
{ length= mi_uint2korr((key)+1); (key)+=3; } \
|
||||
}
|
||||
|
||||
#define get_key_length_rdonly(length,key) \
|
||||
{ if (*(uchar*) (key) != 255) \
|
||||
length= ((uint) *(uchar*) ((key))); \
|
||||
else \
|
||||
{ length= mi_uint2korr((key)+1); } \
|
||||
}
|
||||
|
||||
#define get_key_pack_length(length,length_pack,key) \
|
||||
{ if (*(uchar*) (key) != 255) \
|
||||
{ length= (uint) *(uchar*) ((key)++); length_pack= 1; }\
|
||||
else \
|
||||
{ length=mi_uint2korr((key)+1); (key)+= 3; length_pack= 3; } \
|
||||
}
|
||||
|
||||
#define store_key_length_inc(key,length) \
|
||||
{ if ((length) < 255) \
|
||||
{ *(key)++= (length); } \
|
||||
else \
|
||||
{ *(key)=255; mi_int2store((key)+1,(length)); (key)+=3; } \
|
||||
}
|
||||
|
||||
#define size_to_store_key_length(length) ((length) < 255 ? 1 : 3)
|
||||
|
||||
#define get_rec_bits(bit_ptr, bit_ofs, bit_len) \
|
||||
(((((uint16) (bit_ptr)[1] << 8) | (uint16) (bit_ptr)[0]) >> (bit_ofs)) & \
|
||||
((1 << (bit_len)) - 1))
|
||||
|
||||
#define set_rec_bits(bits, bit_ptr, bit_ofs, bit_len) \
|
||||
{ \
|
||||
(bit_ptr)[0]= ((bit_ptr)[0] & ~(((1 << (bit_len)) - 1) << (bit_ofs))) | \
|
||||
((bits) << (bit_ofs)); \
|
||||
if ((bit_ofs) + (bit_len) > 8) \
|
||||
(bit_ptr)[1]= ((bit_ptr)[1] & ~((1 << ((bit_len) - 8 + (bit_ofs))) - 1)) | \
|
||||
((bits) >> (8 - (bit_ofs))); \
|
||||
}
|
||||
|
||||
#define clr_rec_bits(bit_ptr, bit_ofs, bit_len) \
|
||||
set_rec_bits(0, bit_ptr, bit_ofs, bit_len)
|
||||
|
||||
extern int ha_compare_text(CHARSET_INFO *, uchar *, uint, uchar *, uint ,
|
||||
my_bool, my_bool);
|
||||
extern int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
|
||||
register uchar *b, uint key_length, uint nextflag,
|
||||
uint *diff_pos);
|
||||
|
||||
extern HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a);
|
||||
extern void my_handler_error_register(void);
|
||||
extern void my_handler_error_unregister(void);
|
||||
/*
|
||||
Inside an in-memory data record, memory pointers to pieces of the
|
||||
record (like BLOBs) are stored in their native byte order and in
|
||||
this amount of bytes.
|
||||
*/
|
||||
#define portable_sizeof_char_ptr 8
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _my_handler_h */
|
|
@ -30,8 +30,30 @@ extern "C" {
|
|||
#ifndef _keycache_h
|
||||
#include "keycache.h"
|
||||
#endif
|
||||
#include "my_handler.h"
|
||||
#include <mysql/plugin.h>
|
||||
#include "my_compare.h"
|
||||
|
||||
/*
|
||||
There is a hard limit for the maximum number of keys as there are only
|
||||
8 bits in the index file header for the number of keys in a table.
|
||||
This means that 0..255 keys can exist for a table. The idea of
|
||||
HA_MAX_POSSIBLE_KEY is to ensure that one can use myisamchk & tools on
|
||||
a MyISAM table for which one has more keys than MyISAM is normally
|
||||
compiled for. If you don't have this, you will get a core dump when
|
||||
running myisamchk compiled for 128 keys on a table with 255 keys.
|
||||
*/
|
||||
|
||||
#define HA_MAX_POSSIBLE_KEY 255 /* For myisamchk */
|
||||
/*
|
||||
The following defines can be increased if necessary.
|
||||
But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH.
|
||||
*/
|
||||
|
||||
#define HA_MAX_KEY_LENGTH 1000 /* Max length in bytes */
|
||||
#define HA_MAX_KEY_SEG 16 /* Max segments for key */
|
||||
|
||||
#define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24+ 6+6)
|
||||
#define HA_MAX_KEY_BUFF (HA_MAX_KEY_LENGTH+HA_MAX_KEY_SEG*6+8+8)
|
||||
|
||||
/*
|
||||
Limit max keys according to HA_MAX_POSSIBLE_KEY
|
||||
|
|
|
@ -82,7 +82,7 @@ SET(CLIENT_SOURCES ../mysys/array.c ../strings/bchange.c ../strings/bmove.c
|
|||
../mysys/mf_wcomp.c ../mysys/mulalloc.c ../mysys/my_access.c ../mysys/my_alloc.c
|
||||
../mysys/my_chsize.c ../mysys/my_compress.c ../mysys/my_create.c
|
||||
../mysys/my_delete.c ../mysys/my_div.c ../mysys/my_error.c ../mysys/my_file.c
|
||||
../mysys/my_fopen.c ../mysys/my_fstream.c ../mysys/my_gethostbyname.c
|
||||
../mysys/my_fopen.c ../mysys/my_fstream.c
|
||||
../mysys/my_getopt.c ../mysys/my_getwd.c ../mysys/my_init.c ../mysys/my_lib.c
|
||||
../mysys/my_malloc.c ../mysys/my_messnc.c ../mysys/my_net.c ../mysys/my_once.c
|
||||
../mysys/my_open.c ../mysys/my_pread.c ../mysys/my_pthread.c ../mysys/my_read.c
|
||||
|
|
|
@ -66,7 +66,7 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
|
|||
charset.lo charset-def.lo hash.lo mf_iocache.lo \
|
||||
mf_iocache2.lo my_seek.lo my_sleep.lo \
|
||||
my_pread.lo mf_cache.lo md5.lo sha1.lo \
|
||||
my_getopt.lo my_gethostbyname.lo my_port.lo \
|
||||
my_getopt.lo \
|
||||
my_rename.lo my_chsize.lo my_sync.lo my_getsystime.lo
|
||||
sqlobjects = net.lo
|
||||
sql_cmn_objects = pack.lo client.lo my_time.lo
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
# in alphabetical order. This also helps with merge conflict resolution.
|
||||
|
||||
binlog.binlog_multi_engine # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
binlog.binlog_bug23533 # skozlov: BUG#12371924
|
||||
|
||||
|
||||
funcs_1.charset_collation_1 # depends on compile-time decisions
|
||||
funcs_1.is_cml_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
|
@ -22,7 +24,8 @@ main.outfile_loaddata @solaris # joro : Bug #46895
|
|||
ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
|
||||
rpl.rpl_innodb_bug28430 @solaris # Bug#46029
|
||||
rpl.rpl_row_sp011 @solaris # Joro : Bug #54138
|
||||
rpl.rpl_row_sp011 @solaris # Joro : Bug #45445
|
||||
rpl.rpl_stop_slave # Sven : BUG#12345981
|
||||
|
||||
rpl_ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
rpl_ndb.rpl_ndb_log # Bug#38998
|
||||
|
|
|
@ -122,10 +122,14 @@ SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9,
|
|||
|
||||
#connection slave;
|
||||
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
|
||||
call mtr.add_suppression("Slave.*Can.t DROP .c7.; check that column.key exists.* Error_code: 1091");
|
||||
call mtr.add_suppression("Slave.*Unknown column .c7. in .t15.* Error_code: 1054");
|
||||
call mtr.add_suppression("Slave.*Key column .c6. doesn.t exist in table.* Error_code: 1072");
|
||||
call mtr.add_suppression("Slave I/O: Get master clock failed with error:.* Error_code: 2013");
|
||||
call mtr.add_suppression("Slave I/O: Get master SERVER_ID failed with error:.* Error_code: 2013");
|
||||
--enable_query_log
|
||||
|
||||
sync_slave_with_master;
|
||||
--echo
|
||||
|
|
|
@ -62,4 +62,24 @@ UPDATE t1 SET c1= 0;
|
|||
DROP TABLE t1;
|
||||
-- sync_slave_with_master
|
||||
|
||||
#
|
||||
# BUG#11766865: 60091: RBR + NO PK + UPDATE NULL VALUE --> SLAVE BREAK WITH ERROR HA_ERR_END_OF_
|
||||
#
|
||||
|
||||
--connection master
|
||||
--source include/rpl_reset.inc
|
||||
--connection master
|
||||
|
||||
--eval CREATE TABLE t1 (c1 int(11) NOT NULL, c2 int(11) NOT NULL, c3 int(11) DEFAULT '-1') ENGINE=$engine DEFAULT CHARSET=latin1
|
||||
|
||||
INSERT INTO t1 VALUES (1,2,NULL);
|
||||
UPDATE t1 SET c1=1, c2=2, c3=-1 WHERE c1=1 AND c2=2 AND ISNULL(c3);
|
||||
|
||||
--sync_slave_with_master
|
||||
|
||||
--let $diff_tables=master:test.t1, slave:test.t1
|
||||
--source include/diff_tables.inc
|
||||
|
||||
--connection master
|
||||
DROP TABLE t1;
|
||||
--sync_slave_with_master
|
||||
|
|
|
@ -634,6 +634,10 @@ drop table t1;
|
|||
drop table bug29807;
|
||||
create table bug29807 (a int);
|
||||
drop table bug29807;
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("InnoDB: Error: table .test...bug29807. does not exist in the InnoDB internal");
|
||||
call mtr.add_suppression("Cannot find or open table test\/bug29807 from");
|
||||
--enable_query_log
|
||||
|
||||
|
||||
#
|
||||
|
|
|
@ -53,7 +53,7 @@ END
|
|||
-- Insert patterns that should always be suppressed
|
||||
--
|
||||
INSERT INTO global_suppressions VALUES
|
||||
("'SELECT UNIX_TIMESTAMP\\(\\)' failed on master"),
|
||||
(".SELECT UNIX_TIMESTAMP... failed on master"),
|
||||
("Aborted connection"),
|
||||
("Client requested master to start replication from impossible position"),
|
||||
("Could not find first log file name in binary log"),
|
||||
|
@ -110,7 +110,6 @@ INSERT INTO global_suppressions VALUES
|
|||
("Sort aborted"),
|
||||
("Time-out in NDB"),
|
||||
("Warning:\s+One can only use the --user.*root"),
|
||||
("Warning:\s+Setting lower_case_table_names=2"),
|
||||
("Warning:\s+Table:.* on (delete|rename)"),
|
||||
("You have an error in your SQL syntax"),
|
||||
("deprecated"),
|
||||
|
@ -123,55 +122,21 @@ INSERT INTO global_suppressions VALUES
|
|||
("slave SQL thread aborted"),
|
||||
("Slave: .*Duplicate entry"),
|
||||
|
||||
/*
|
||||
Special case, made as specific as possible, for:
|
||||
Bug #28436: Incorrect position in SHOW BINLOG EVENTS causes
|
||||
server coredump
|
||||
*/
|
||||
|
||||
("Error in Log_event::read_log_event\\\(\\\): 'Sanity check failed', data_len: 258, event_type: 49"),
|
||||
|
||||
("Statement may not be safe to log in statement format"),
|
||||
|
||||
/* test case for Bug#bug29807 copies a stray frm into database */
|
||||
("InnoDB: Error: table `test`.`bug29807` does not exist in the InnoDB internal"),
|
||||
("Cannot find or open table test\/bug29807 from"),
|
||||
|
||||
/* innodb foreign key tests that fail in ALTER or RENAME produce this */
|
||||
("InnoDB: Error: in ALTER TABLE `test`.`t[123]`"),
|
||||
("InnoDB: Error: in RENAME TABLE table `test`.`t1`"),
|
||||
("InnoDB: Error: table `test`.`t[123]` does not exist in the InnoDB internal"),
|
||||
|
||||
/* Test case for Bug#14233 produces the following warnings: */
|
||||
("Stored routine 'test'.'bug14233_1': invalid value in column mysql.proc"),
|
||||
("Stored routine 'test'.'bug14233_2': invalid value in column mysql.proc"),
|
||||
("Stored routine 'test'.'bug14233_3': invalid value in column mysql.proc"),
|
||||
|
||||
/*
|
||||
BUG#32080 - Excessive warnings on Solaris: setrlimit could not
|
||||
change the size of core files
|
||||
*/
|
||||
("setrlimit could not change the size of core files to 'infinity'"),
|
||||
|
||||
/*
|
||||
rpl_extrColmaster_*.test, the slave thread produces warnings
|
||||
when it get updates to a table that has more columns on the
|
||||
master
|
||||
*/
|
||||
("Slave: Unknown column 'c7' in 't15' Error_code: 1054"),
|
||||
("Slave: Can't DROP 'c7'.* 1091"),
|
||||
("Slave: Key column 'c6'.* 1072"),
|
||||
("The slave I.O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master."),
|
||||
(".SELECT UNIX_TIMESTAMP... failed on master, do not trust column Seconds_Behind_Master of SHOW SLAVE STATUS"),
|
||||
|
||||
/* Test case for Bug#31590 in order_by.test produces the following error */
|
||||
("Out of sort memory; increase server sort buffer size"),
|
||||
|
||||
/* Special case for Bug #26402 in show_check.test
|
||||
- Question marks are not valid file name parts on Windows. Ignore
|
||||
this error message.
|
||||
*/
|
||||
("Can't find file: '.\\\\test\\\\\\?{8}.frm'"),
|
||||
("Slave: Unknown table 't1' Error_code: 1051"),
|
||||
|
||||
/* Messages from valgrind */
|
||||
|
@ -189,15 +154,6 @@ INSERT INTO global_suppressions VALUES
|
|||
("==[0-9]*== Warning: invalid file descriptor -1 in syscall write()"),
|
||||
("==[0-9]*== Warning: invalid file descriptor -1 in syscall read()"),
|
||||
|
||||
/*
|
||||
Transient network failures that cause warnings on reconnect.
|
||||
BUG#47743 and BUG#47983.
|
||||
*/
|
||||
("Slave I/O: Get master SERVER_ID failed with error:.*"),
|
||||
("Slave I/O: Get master clock failed with error:.*"),
|
||||
("Slave I/O: Get master COLLATION_SERVER failed with error:.*"),
|
||||
("Slave I/O: Get master TIME_ZONE failed with error:.*"),
|
||||
|
||||
("THE_LAST_SUPPRESSION")||
|
||||
|
||||
|
||||
|
|
24
mysql-test/include/not_crashrep.inc
Normal file
24
mysql-test/include/not_crashrep.inc
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Check if CrashReporter is enabled and would open a window
|
||||
|
||||
perl;
|
||||
sub skip_test {
|
||||
# Only relevant on Mac OS X
|
||||
return 0 unless $^O eq 'darwin';
|
||||
my $crep= `defaults read com.apple.CrashReporter DialogType`;
|
||||
return 0 if $?;
|
||||
chomp ($crep);
|
||||
$crep= lc $crep;
|
||||
return ($crep eq 'basic' || $crep eq 'developer');
|
||||
}
|
||||
my $skip= skip_test();
|
||||
open (F, ">" . $ENV{'MYSQL_TMP_DIR'} . "/crashrep.inc");
|
||||
print F "let \$crashrep= $skip;\n";
|
||||
close F;
|
||||
EOF
|
||||
|
||||
--source $MYSQL_TMP_DIR/crashrep.inc
|
||||
--remove_file $MYSQL_TMP_DIR/crashrep.inc
|
||||
|
||||
if ($crashrep) {
|
||||
--skip CrashReporter would popup a window
|
||||
}
|
|
@ -7,7 +7,7 @@ let $counter= 500;
|
|||
let $mysql_errno= 0;
|
||||
while (!$mysql_errno)
|
||||
{
|
||||
--error 0,1053,2002,2006,2013
|
||||
--error 0,1040,1053,2002,2003,2006,2013
|
||||
show status;
|
||||
|
||||
dec $counter;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- cperl -*-
|
||||
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
|
@ -141,7 +141,11 @@ sub fix_tmpdir {
|
|||
sub fix_log_error {
|
||||
my ($self, $config, $group_name, $group)= @_;
|
||||
my $dir= $self->{ARGS}->{vardir};
|
||||
return "$dir/log/$group_name.err";
|
||||
if ( $::opt_valgrind and $::opt_debug ) {
|
||||
return "$dir/log/$group_name.trace";
|
||||
} else {
|
||||
return "$dir/log/$group_name.err";
|
||||
}
|
||||
}
|
||||
|
||||
sub fix_log {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- cperl -*-
|
||||
# Copyright (C) 2008 MySQL AB
|
||||
# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# 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
|
||||
|
@ -28,8 +28,6 @@ use My::Platform;
|
|||
use base qw(Exporter);
|
||||
our @EXPORT= qw(my_find_bin my_find_dir my_find_file NOT_REQUIRED);
|
||||
|
||||
our $vs_config_dir;
|
||||
|
||||
my $bin_extension= ".exe" if IS_WINDOWS;
|
||||
|
||||
# Helper function to be used for fourth parameter to find functions
|
||||
|
@ -158,7 +156,7 @@ sub my_find_paths {
|
|||
# User can select to look in a special build dir
|
||||
# which is a subdirectory of any of the paths
|
||||
my @extra_dirs;
|
||||
my $build_dir= $vs_config_dir || $ENV{MTR_VS_CONFIG} || $ENV{MTR_BUILD_DIR};
|
||||
my $build_dir= $::opt_vs_config || $ENV{MTR_VS_CONFIG} || $ENV{MTR_BUILD_DIR};
|
||||
push(@extra_dirs, $build_dir) if defined $build_dir;
|
||||
|
||||
if (defined $extension){
|
||||
|
|
|
@ -94,7 +94,7 @@ eval {
|
|||
local $SIG{INT}= \&handle_signal;
|
||||
local $SIG{CHLD}= sub {
|
||||
message("Got signal @_");
|
||||
kill(9, -$child_pid);
|
||||
kill('KILL', -$child_pid);
|
||||
my $ret= waitpid($child_pid, 0);
|
||||
if ($? & 127){
|
||||
exit(65); # Killed by signal
|
||||
|
@ -134,7 +134,7 @@ if ( $@ ) {
|
|||
# Use negative pid in order to kill the whole
|
||||
# process group
|
||||
#
|
||||
my $ret= kill(9, -$child_pid);
|
||||
my $ret= kill('KILL', -$child_pid);
|
||||
message("Killed child: $child_pid, ret: $ret");
|
||||
if ($ret > 0) {
|
||||
message("Killed child: $child_pid");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
|
@ -256,7 +256,7 @@ my $opt_strace_client;
|
|||
|
||||
our $opt_user = "root";
|
||||
|
||||
my $opt_valgrind= 0;
|
||||
our $opt_valgrind= 0;
|
||||
my $opt_valgrind_mysqld= 0;
|
||||
my $opt_valgrind_mysqltest= 0;
|
||||
my @default_valgrind_args= ("--show-reachable=yes");
|
||||
|
@ -893,7 +893,7 @@ sub command_line_setup {
|
|||
'ssl|with-openssl' => \$opt_ssl,
|
||||
'skip-ssl' => \$opt_skip_ssl,
|
||||
'compress' => \$opt_compress,
|
||||
'vs-config' => \$opt_vs_config,
|
||||
'vs-config=s' => \$opt_vs_config,
|
||||
|
||||
# Max number of parallel threads to use
|
||||
'parallel=s' => \$opt_parallel,
|
||||
|
@ -1123,7 +1123,7 @@ sub command_line_setup {
|
|||
chomp;
|
||||
# remove comments (# foo) at the beginning of the line, or after a
|
||||
# blank at the end of the line
|
||||
s/( +|^)#.*$//;
|
||||
s/(\s+|^)#.*$//;
|
||||
# If @ platform specifier given, use this entry only if it contains
|
||||
# @<platform> or @!<xxx> where xxx != platform
|
||||
if (/\@.*/)
|
||||
|
@ -1134,8 +1134,8 @@ sub command_line_setup {
|
|||
s/\@.*$//;
|
||||
}
|
||||
# remove whitespace
|
||||
s/^ +//;
|
||||
s/ +$//;
|
||||
s/^\s+//;
|
||||
s/\s+$//;
|
||||
# if nothing left, don't need to remember this line
|
||||
if ( $_ eq "" ) {
|
||||
next;
|
||||
|
@ -4544,13 +4544,6 @@ sub mysqld_start ($$) {
|
|||
unlink($mysqld->value('pid-file'));
|
||||
|
||||
my $output= $mysqld->value('#log-error');
|
||||
if ( $opt_valgrind and $opt_debug )
|
||||
{
|
||||
# When both --valgrind and --debug is selected, send
|
||||
# all output to the trace file, making it possible to
|
||||
# see the exact location where valgrind complains
|
||||
$output= "$opt_vardir/log/".$mysqld->name().".trace";
|
||||
}
|
||||
# Remember this log file for valgrind error report search
|
||||
$mysqld_logs{$output}= 1 if $opt_valgrind;
|
||||
# Remember data dir for gmon.out files if using gprof
|
||||
|
|
|
@ -135,4 +135,17 @@ SELECT * FROM t1 PROCEDURE ANALYSE();
|
|||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t1.a e e- 1 2 0 0 1.3333 NULL ENUM('e','e-') NOT NULL
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11756242 48137: PROCEDURE ANALYSE() LEAKS MEMORY WHEN RETURNING NULL
|
||||
#
|
||||
CREATE TABLE t1(f1 INT) ENGINE=MYISAM;
|
||||
CREATE TABLE t2(f2 INT) ENGINE=INNODB;
|
||||
INSERT INTO t2 VALUES (1);
|
||||
SELECT DISTINCTROW f1 FROM t1 NATURAL RIGHT OUTER JOIN t2 PROCEDURE ANALYSE();
|
||||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t1.f1 NULL NULL 0 0 0 1 0.0 0.0 CHAR(0)
|
||||
SELECT * FROM t2 LIMIT 1 PROCEDURE ANALYSE();
|
||||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t2.f2 1 1 1 1 0 0 1.0000 0.0000 ENUM('1') NOT NULL
|
||||
DROP TABLE t1, t2;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -12756,3 +12756,19 @@ a
|
|||
1
|
||||
2
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# BUG#57162 - valgrind errors, random data when returning
|
||||
# ordered data from archive tables
|
||||
#
|
||||
SET sort_buffer_size=32804;
|
||||
CREATE TABLE t1(a INT, b CHAR(255), c CHAR(255), d CHAR(255),
|
||||
e CHAR(255), f INT) ENGINE=ARCHIVE DEFAULT CHARSET utf8;
|
||||
INSERT INTO t1 VALUES(-1,'b','c','d','e',1);
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT t1.* FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6;
|
||||
SELECT * FROM t1 ORDER BY f LIMIT 1;
|
||||
a b c d e f
|
||||
-1 b c d e 1
|
||||
DROP TABLE t1;
|
||||
SET sort_buffer_size=DEFAULT;
|
||||
|
|
|
@ -451,4 +451,21 @@ SELECT CONVERT(t2.a USING UTF8) FROM t1, t1 t2 LIMIT 1
|
|||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #11765023: 57934: DOS POSSIBLE SINCE BINARY CASTING
|
||||
# DOESN'T ADHERE TO MAX_ALLOWED_PACKET
|
||||
SET @@GLOBAL.max_allowed_packet=2048;
|
||||
Warnings:
|
||||
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
||||
SELECT CONVERT('a', BINARY(2049));
|
||||
CONVERT('a', BINARY(2049))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1301 Result of cast_as_binary() was larger than max_allowed_packet (2048) - truncated
|
||||
SELECT CONVERT('a', CHAR(2049));
|
||||
CONVERT('a', CHAR(2049))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1301 Result of cast_as_char() was larger than max_allowed_packet (2048) - truncated
|
||||
SET @@GLOBAL.max_allowed_packet=default;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -44,6 +44,7 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t4 VALUES ( NAME_CONST('in
|
|||
master-bin.000001 # Query # # use `test`; DROP PROCEDURE bug18293
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t4
|
||||
End of 5.0 tests
|
||||
call mtr.add_suppression("Error in Log_event::read_log_event\\\(\\\): 'Sanity check failed', data_len: 258, event_type: 49");
|
||||
SHOW BINLOG EVENTS FROM 365;
|
||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
|
||||
Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted");
|
||||
drop database if exists events_test;
|
||||
drop database if exists db_x;
|
||||
drop database if exists mysqltest_db2;
|
||||
|
@ -259,33 +260,36 @@ events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLE
|
|||
Try to alter mysql.event: the server should fail to load
|
||||
event information after mysql.event was tampered with.
|
||||
|
||||
First, let's add a column to the end and make sure everything
|
||||
works as before
|
||||
First, let's add a column to the end and check the error is emitted.
|
||||
|
||||
ALTER TABLE mysql.event ADD dummy INT;
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SELECT event_name FROM INFORMATION_SCHEMA.events;
|
||||
event_name
|
||||
intact_check
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SHOW CREATE EVENT intact_check;
|
||||
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
|
||||
intact_check SYSTEM CREATE EVENT `intact_check` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO SELECT "nothing" latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT no_such_event;
|
||||
ERROR HY000: Unknown event 'no_such_event'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 RENAME TO intact_check_2;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_1;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_2;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP DATABASE IF EXISTS mysqltest_no_such_database;
|
||||
Warnings:
|
||||
Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist
|
||||
CREATE DATABASE mysqltest_db2;
|
||||
DROP DATABASE mysqltest_db2;
|
||||
Warnings:
|
||||
Error 1545 Failed to open mysql.event
|
||||
SELECT @@event_scheduler;
|
||||
@@event_scheduler
|
||||
OFF
|
||||
|
@ -294,6 +298,7 @@ Variable_name Value
|
|||
event_scheduler OFF
|
||||
SET GLOBAL event_scheduler=OFF;
|
||||
ALTER TABLE mysql.event DROP dummy;
|
||||
DROP EVENT intact_check;
|
||||
CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing";
|
||||
|
||||
Now let's add a column to the first position: the server
|
||||
|
@ -301,30 +306,32 @@ expects to see event schema name there
|
|||
|
||||
ALTER TABLE mysql.event ADD dummy INT FIRST;
|
||||
SHOW EVENTS;
|
||||
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SELECT event_name FROM INFORMATION_SCHEMA.events;
|
||||
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SHOW CREATE EVENT intact_check;
|
||||
ERROR HY000: Unknown event 'intact_check'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT no_such_event;
|
||||
ERROR HY000: Unknown event 'no_such_event'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
ERROR HY000: Failed to store event name. Error code 2 from storage engine.
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 RENAME TO intact_check_2;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_1;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_2;
|
||||
ERROR HY000: Unknown event 'intact_check_2'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check;
|
||||
ERROR HY000: Unknown event 'intact_check'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP DATABASE IF EXISTS mysqltest_no_such_database;
|
||||
Warnings:
|
||||
Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist
|
||||
CREATE DATABASE mysqltest_db2;
|
||||
DROP DATABASE mysqltest_db2;
|
||||
Warnings:
|
||||
Error 1545 Failed to open mysql.event
|
||||
SELECT @@event_scheduler;
|
||||
@@event_scheduler
|
||||
OFF
|
||||
|
@ -345,29 +352,32 @@ Drop some columns and try more checks.
|
|||
|
||||
ALTER TABLE mysql.event DROP comment, DROP starts;
|
||||
SHOW EVENTS;
|
||||
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
|
||||
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SHOW CREATE EVENT intact_check;
|
||||
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT no_such_event;
|
||||
ERROR HY000: Unknown event 'no_such_event'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
ERROR HY000: Column count of mysql.event is wrong. Expected 22, found 20. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 RENAME TO intact_check_2;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_1;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_2;
|
||||
ERROR HY000: Unknown event 'intact_check_2'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP DATABASE IF EXISTS mysqltest_no_such_database;
|
||||
Warnings:
|
||||
Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist
|
||||
CREATE DATABASE mysqltest_db2;
|
||||
DROP DATABASE mysqltest_db2;
|
||||
Warnings:
|
||||
Error 1545 Failed to open mysql.event
|
||||
SELECT @@event_scheduler;
|
||||
@@event_scheduler
|
||||
OFF
|
||||
|
@ -425,4 +435,42 @@ CREATE TABLE mysql.event like event_like;
|
|||
DROP TABLE event_like;
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
|
||||
#
|
||||
# Bug#12394306: the sever may crash if mysql.event is corrupted
|
||||
#
|
||||
|
||||
CREATE EVENT ev1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
ALTER EVENT ev1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
|
||||
|
||||
CREATE TABLE event_original LIKE mysql.event;
|
||||
INSERT INTO event_original SELECT * FROM mysql.event;
|
||||
|
||||
ALTER TABLE mysql.event MODIFY modified CHAR(1);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'modified' at row 1
|
||||
|
||||
SHOW EVENTS;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
|
||||
SELECT event_name, created, last_altered FROM information_schema.events;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
|
||||
CREATE EVENT ev2 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
|
||||
ALTER EVENT ev1 ON SCHEDULE EVERY 9 HOUR DO SELECT 9;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
|
||||
DROP TABLE mysql.event;
|
||||
RENAME TABLE event_original TO mysql.event;
|
||||
|
||||
DROP EVENT ev1;
|
||||
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
|
||||
#
|
||||
# End of tests
|
||||
#
|
||||
drop database events_test;
|
||||
|
|
|
@ -747,6 +747,15 @@ event_name originator
|
|||
ev1 4294967295
|
||||
DROP EVENT ev1;
|
||||
SET GLOBAL server_id = @old_server_id;
|
||||
CREATE DATABASE event_test12;
|
||||
USE event_test12;
|
||||
CREATE EVENT ev1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
|
||||
CREATE DATABASE event_test1;
|
||||
USE event_test1;
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
DROP DATABASE event_test1;
|
||||
DROP DATABASE event_test12;
|
||||
DROP DATABASE events_test;
|
||||
SET GLOBAL event_scheduler= 'ON';
|
||||
SET @@global.concurrent_insert= @concurrent_insert;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted");
|
||||
set global event_scheduler=off;
|
||||
drop database if exists events_test;
|
||||
create database events_test;
|
||||
|
@ -52,6 +53,8 @@ Warnings:
|
|||
Note 1008 Can't drop database 'mysqltest_database_not_exists'; database doesn't exist
|
||||
create database mysqltest_db1;
|
||||
drop database mysqltest_db1;
|
||||
Warnings:
|
||||
Error 1545 Failed to open mysql.event
|
||||
Restore the original mysql.event table
|
||||
drop table mysql.event;
|
||||
rename table event_like to mysql.event;
|
||||
|
|
|
@ -1737,4 +1737,24 @@ SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b11111111111111111111111111111111
|
|||
SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND()));
|
||||
SELECT RELEASE_LOCK('aaaaaaaaaaaaaaaaa');
|
||||
#
|
||||
# Bug #11766094 - 59132: MIN() AND MAX() REMOVE UNSIGNEDNESS
|
||||
#
|
||||
CREATE TABLE t1 (a BIGINT UNSIGNED);
|
||||
INSERT INTO t1 VALUES (18446668621106209655);
|
||||
SELECT MAX(LENGTH(a)), LENGTH(MAX(a)), MIN(a), MAX(a), CONCAT(MIN(a)), CONCAT(MAX(a)) FROM t1;
|
||||
MAX(LENGTH(a)) LENGTH(MAX(a)) MIN(a) MAX(a) CONCAT(MIN(a)) CONCAT(MAX(a))
|
||||
20 20 18446668621106209655 18446668621106209655 18446668621106209655 18446668621106209655
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #11766270 59343: YEAR(4): INCORRECT RESULT AND VALGRIND WARNINGS WITH MIN/MAX, UNION
|
||||
#
|
||||
CREATE TABLE t1(f1 YEAR(4));
|
||||
INSERT INTO t1 VALUES (0000),(2001);
|
||||
(SELECT MAX(f1) FROM t1) UNION (SELECT MAX(f1) FROM t1);
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def MAX(f1) MAX(f1) 13 4 4 Y 32864 0 63
|
||||
MAX(f1)
|
||||
2001
|
||||
DROP TABLE t1;
|
||||
#
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -770,4 +770,10 @@ CASE a WHEN a THEN a END
|
|||
NULL
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #11766212 59270: NOT IN (YEAR( ... ), ... ) PRODUCES MANY VALGRIND WARNINGS
|
||||
#
|
||||
SELECT 1 IN (YEAR(FROM_UNIXTIME(NULL)) ,1);
|
||||
1 IN (YEAR(FROM_UNIXTIME(NULL)) ,1)
|
||||
1
|
||||
#
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -511,4 +511,33 @@ t1 CREATE TABLE `t1` (
|
|||
`C` varchar(23) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11764994 57900: CREATE TABLE .. SELECT ASSERTS SCALE >= 0 && PRECISION > 0 && SCALE <= PR
|
||||
#
|
||||
CREATE TABLE t1 SELECT CEIL(LINESTRINGFROMWKB(1) DIV NULL);
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 SELECT FLOOR(LINESTRINGFROMWKB(1) DIV NULL);
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11765923 58937: MANY VALGRIND ERRORS AFTER GROUPING BY RESULT OF DECIMAL COLUMN FUNCTION
|
||||
#
|
||||
CREATE TABLE t1(f1 DECIMAL(22,1));
|
||||
INSERT INTO t1 VALUES (0),(1);
|
||||
SELECT ROUND(f1, f1) FROM t1;
|
||||
ROUND(f1, f1)
|
||||
0.0
|
||||
1.0
|
||||
SELECT ROUND(f1, f1) FROM t1 GROUP BY 1;
|
||||
ROUND(f1, f1)
|
||||
0.0
|
||||
1.0
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11764671 57533: UNINITIALISED VALUES IN COPY_AND_CONVERT (SQL_STRING.CC) WITH CERTAIN CHA
|
||||
#
|
||||
SELECT ROUND(LEAST(15, -4939092, 0.2704), STDDEV('a'));
|
||||
ROUND(LEAST(15, -4939092, 0.2704), STDDEV('a'))
|
||||
-4939092.0000
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -1375,4 +1375,46 @@ Warning 1292 Truncated incorrect time value: ''
|
|||
Warning 1292 Truncated incorrect time value: ''
|
||||
Warning 1292 Truncated incorrect time value: ''
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11766112 59151:UNINITIALIZED VALUES IN EXTRACT_DATE_TIME WITH STR_TO_DATE(SPACE(..) ...
|
||||
#
|
||||
SELECT STR_TO_DATE(SPACE(2),'1');
|
||||
STR_TO_DATE(SPACE(2),'1')
|
||||
0000-00-00
|
||||
#
|
||||
# Bug#11765216 58154: UNINITIALIZED VARIABLE FORMAT IN STR_TO_DATE FUNCTION
|
||||
#
|
||||
SET GLOBAL SQL_MODE='';
|
||||
DO STR_TO_DATE((''), FROM_DAYS(@@GLOBAL.SQL_MODE));
|
||||
SET GLOBAL SQL_MODE=DEFAULT;
|
||||
#
|
||||
# Bug#11766087 59125: VALGRIND UNINITIALISED VALUE WARNING IN ULL2DEC, LONGLONG2DECIMAL
|
||||
#
|
||||
SELECT FORMAT(YEAR(STR_TO_DATE('',GET_FORMAT(TIME,''))),1);
|
||||
FORMAT(YEAR(STR_TO_DATE('',GET_FORMAT(TIME,''))),1)
|
||||
NULL
|
||||
#
|
||||
# Bug#11766126 59166: ANOTHER DATETIME VALGRIND UNINITIALIZED WARNING
|
||||
#
|
||||
SELECT CAST((MONTH(FROM_UNIXTIME(@@GLOBAL.SQL_MODE))) AS BINARY(1025));
|
||||
CAST((MONTH(FROM_UNIXTIME(@@GLOBAL.SQL_MODE))) AS BINARY(1025))
|
||||
NULL
|
||||
#
|
||||
# Bug#11766124 59164: VALGRIND: UNINITIALIZED VALUE IN NUMBER_TO_DATETIME
|
||||
#
|
||||
SELECT ADDDATE(MONTH(FROM_UNIXTIME(NULL)),INTERVAL 1 HOUR);
|
||||
ADDDATE(MONTH(FROM_UNIXTIME(NULL)),INTERVAL 1 HOUR)
|
||||
NULL
|
||||
#
|
||||
# Bug#11889186 60503: CRASH IN MAKE_DATE_TIME WITH DATE_FORMAT / STR_TO_DATE COMBINATION
|
||||
#
|
||||
SELECT DATE_FORMAT('0000-00-11', '%W');
|
||||
DATE_FORMAT('0000-00-11', '%W')
|
||||
NULL
|
||||
SELECT DATE_FORMAT('0000-00-11', '%a');
|
||||
DATE_FORMAT('0000-00-11', '%a')
|
||||
NULL
|
||||
SELECT DATE_FORMAT('0000-00-11', '%w');
|
||||
DATE_FORMAT('0000-00-11', '%w')
|
||||
NULL
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -1040,6 +1040,39 @@ drop table t1;
|
|||
#
|
||||
create table t1(a char(32) not null) engine=myisam;
|
||||
create spatial index i on t1 (a);
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 140)
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
drop table t1;
|
||||
CREATE TABLE t0 (a BINARY(32) NOT NULL);
|
||||
CREATE SPATIAL INDEX i on t0 (a);
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
INSERT INTO t0 VALUES (1);
|
||||
CREATE TABLE t1(
|
||||
col0 BINARY NOT NULL,
|
||||
col2 TIMESTAMP,
|
||||
SPATIAL INDEX i1 (col0)
|
||||
) ENGINE=MyISAM;
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
CREATE TABLE t1 (
|
||||
col0 BINARY NOT NULL,
|
||||
col2 TIMESTAMP
|
||||
) ENGINE=MyISAM;
|
||||
CREATE SPATIAL INDEX idx0 ON t1(col0);
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
ALTER TABLE t1 ADD SPATIAL INDEX i1 (col0);
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
CREATE TABLE t2 (
|
||||
col0 INTEGER NOT NULL,
|
||||
col1 POINT,
|
||||
col2 POINT
|
||||
);
|
||||
CREATE SPATIAL INDEX idx0 ON t2 (col1, col2);
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
CREATE TABLE t3 (
|
||||
col0 INTEGER NOT NULL,
|
||||
col1 POINT,
|
||||
col2 LINESTRING,
|
||||
SPATIAL INDEX i1 (col1, col2)
|
||||
);
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
DROP TABLE t0, t1, t2;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -545,4 +545,26 @@ FROM t1 JOIN t2 ON t2.f2 LIKE 'x'
|
|||
HAVING field1 < 7;
|
||||
field1
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# Bug#48916 Server incorrectly processing HAVING clauses with an ORDER BY clause
|
||||
#
|
||||
CREATE TABLE t1 (f1 INT, f2 INT);
|
||||
INSERT INTO t1 VALUES (1, 0), (2, 1), (3, 2);
|
||||
CREATE TABLE t2 (f1 INT, f2 INT);
|
||||
SELECT t1.f1
|
||||
FROM t1
|
||||
HAVING (3, 2) IN (SELECT f1, f2 FROM t2) AND t1.f1 >= 0
|
||||
ORDER BY t1.f1;
|
||||
f1
|
||||
SELECT t1.f1
|
||||
FROM t1
|
||||
HAVING (3, 2) IN (SELECT 4, 2) AND t1.f1 >= 0
|
||||
ORDER BY t1.f1;
|
||||
f1
|
||||
SELECT t1.f1
|
||||
FROM t1
|
||||
HAVING 2 IN (SELECT f2 FROM t2) AND t1.f1 >= 0
|
||||
ORDER BY t1.f1;
|
||||
f1
|
||||
DROP TABLE t1,t2;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -532,4 +532,20 @@ a
|
|||
0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11765139 58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS AND WRITES WITH U
|
||||
#
|
||||
CREATE TABLE t1(f1 INT);
|
||||
SELECT 0xE1BB30 INTO OUTFILE 't1.dat';
|
||||
LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11765141 - 58072: LOAD DATA INFILE: LEAKS IO CACHE MEMORY
|
||||
# WHEN ERROR OCCURS
|
||||
#
|
||||
SELECT '1\n' INTO DUMPFILE 'MYSQLTEST_VARDIR/tmp/bug11735141.txt';
|
||||
create table t1(a point);
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug11735141.txt' INTO TABLE t1;
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -629,3 +629,30 @@ drop procedure p1;
|
|||
drop procedure p2;
|
||||
drop table t1, t2, t3, t4, t5, te;
|
||||
set @@global.concurrent_insert= @old_concurrent_insert;
|
||||
#
|
||||
# Bug#11763784 56541: ASSERTION TABLE->DB_STAT FAILED IN
|
||||
# SQL_BASE.CC::OPEN_TABLE() DURING I_S Q
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1(a int);
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW BEGIN END;
|
||||
# Connection con2
|
||||
SET DEBUG_SYNC= 'before_open_in_get_all_tables SIGNAL is_waits WAIT_FOR is_cont';
|
||||
# Sending:
|
||||
SELECT * FROM information_schema.table_constraints JOIN t1 ON table_name = a;
|
||||
# Connection con1
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR is_waits';
|
||||
# Sending:
|
||||
DROP TRIGGER t1_bi;
|
||||
# Connection default
|
||||
# Wait until DROP TRIGGER is blocked, waiting for t1
|
||||
SET DEBUG_SYNC= 'now SIGNAL is_cont';
|
||||
# Connection con2
|
||||
# Reaping SELECT * FROM information_schema.table_constraints JOIN t1...
|
||||
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE a
|
||||
# Connection con1
|
||||
# Reaping DROP TRIGGER t1_bi
|
||||
# Connection default
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
|
|
|
@ -175,3 +175,33 @@ TABLE_SCHEMA TABLE_NAME
|
|||
mysqltest_lc2 myUC
|
||||
use test;
|
||||
drop database mysqltest_LC2;
|
||||
#
|
||||
# Bug #11758687: 50924: object names not resolved correctly
|
||||
# on lctn2 systems
|
||||
#
|
||||
CREATE DATABASE BUP_XPFM_COMPAT_DB2;
|
||||
CREATE TABLE BUP_XPFM_COMPAT_DB2.TABLE2 (c13 INT) DEFAULT CHARSET latin1;
|
||||
CREATE TABLE BUP_XPFM_COMPAT_DB2.table1 (c13 INT) DEFAULT CHARSET latin1;
|
||||
CREATE TABLE bup_xpfm_compat_db2.table3 (c13 INT) DEFAULT CHARSET latin1;
|
||||
CREATE TRIGGER BUP_XPFM_COMPAT_DB2.trigger1 AFTER INSERT
|
||||
ON BUP_XPFM_COMPAT_DB2.table1 FOR EACH ROW
|
||||
update BUP_XPFM_COMPAT_DB2.table1 set c13=12;
|
||||
|
|
||||
CREATE TRIGGER BUP_XPFM_COMPAT_DB2.TRIGGER2 AFTER INSERT
|
||||
ON BUP_XPFM_COMPAT_DB2.TABLE2 FOR EACH ROW
|
||||
update BUP_XPFM_COMPAT_DB2.table1 set c13=12;
|
||||
|
|
||||
CREATE TRIGGER BUP_XPFM_COMPAT_DB2.TrigGer3 AFTER INSERT
|
||||
ON BUP_XPFM_COMPAT_DB2.TaBle3 FOR EACH ROW
|
||||
update BUP_XPFM_COMPAT_DB2.table1 set c13=12;
|
||||
|
|
||||
SELECT trigger_schema, trigger_name, event_object_table FROM
|
||||
INFORMATION_SCHEMA.TRIGGERS
|
||||
WHERE trigger_schema COLLATE utf8_bin = 'BUP_XPFM_COMPAT_DB2'
|
||||
ORDER BY trigger_schema, trigger_name;
|
||||
trigger_schema trigger_name event_object_table
|
||||
BUP_XPFM_COMPAT_DB2 trigger1 table1
|
||||
BUP_XPFM_COMPAT_DB2 TRIGGER2 TABLE2
|
||||
BUP_XPFM_COMPAT_DB2 TrigGer3 table3
|
||||
DROP DATABASE BUP_XPFM_COMPAT_DB2;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -658,3 +658,15 @@ master-bin.000002 # Query # # CREATE DATABASE test1
|
|||
master-bin.000002 # Query # # use `test1`; CREATE TABLE t1(id int)
|
||||
master-bin.000002 # Query # # use `test1`; DROP TABLE t1
|
||||
master-bin.000002 # Query # # DROP DATABASE test1
|
||||
RESET MASTER;
|
||||
USE test;
|
||||
CREATE TABLE t1 (a INT);
|
||||
SET GLOBAL SERVER_ID = 2;
|
||||
DROP TABLE t1;
|
||||
FLUSH LOGS;
|
||||
SHOW TABLES IN test;
|
||||
Tables_in_test
|
||||
t1
|
||||
SHOW TABLES IN test;
|
||||
Tables_in_test
|
||||
SET GLOBAL SERVER_ID = 1;
|
||||
|
|
|
@ -109,3 +109,13 @@ count(*)
|
|||
35840
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
RESET MASTER;
|
||||
USE test;
|
||||
SET @old_binlog_format= @@binlog_format;
|
||||
SET SESSION binlog_format=ROW;
|
||||
CREATE TABLE t1(c1 INT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
FLUSH LOGS;
|
||||
DROP TABLE t1;
|
||||
SET SESSION binlog_format= @old_binlog_format;
|
||||
RESET MASTER;
|
||||
|
|
|
@ -4626,6 +4626,7 @@ DELIMITER ;
|
|||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE `test-database` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
DROP DATABASE `test-database`;
|
||||
USE `test`;
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
|
|
@ -225,3 +225,23 @@ DROP SCHEMA IF EXISTS `mysqlslap`;
|
|||
DROP PROCEDURE IF EXISTS p1;
|
||||
CREATE PROCEDURE p1() SELECT 1;
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug #11765157 - 58090: mysqlslap drops schema specified in
|
||||
# create_schema if auto-generate-sql also set.
|
||||
#
|
||||
# 'bug58090' database should not be present.
|
||||
SHOW DATABASES;
|
||||
Database
|
||||
information_schema
|
||||
mtr
|
||||
mysql
|
||||
test
|
||||
# 'bug58090' database should be present.
|
||||
SHOW DATABASES;
|
||||
Database
|
||||
information_schema
|
||||
bug58090
|
||||
mtr
|
||||
mysql
|
||||
test
|
||||
DROP DATABASE bug58090;
|
||||
|
|
|
@ -1428,6 +1428,7 @@ set session max_sort_length= 2180;
|
|||
select * from t1 order by b;
|
||||
ERROR HY001: Out of sort memory; increase server sort buffer size
|
||||
drop table t1;
|
||||
call mtr.add_suppression("Out of sort memory; increase server sort buffer size");
|
||||
#
|
||||
# Bug #39844: Query Crash Mysql Server 5.0.67
|
||||
#
|
||||
|
|
|
@ -3,6 +3,7 @@ set @net_buffer_length=@@global.net_buffer_length;
|
|||
set global max_allowed_packet=100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect max_allowed_packet value: '100'
|
||||
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
||||
set global net_buffer_length=100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect net_buffer_length value: '100'
|
||||
|
|
|
@ -79,3 +79,12 @@ a
|
|||
DROP TABLE t1;
|
||||
# Should not be any files left here
|
||||
# End of bug#30102 test.
|
||||
# Test of post-push fix for bug#11766249/59316
|
||||
CREATE TABLE t1 (a INT, b VARCHAR(255), PRIMARY KEY (a))
|
||||
ENGINE = MyISAM
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION p0 VALUES LESS THAN (0) MAX_ROWS=100,
|
||||
PARTITION p1 VALUES LESS THAN (100) MAX_ROWS=100,
|
||||
PARTITION pMax VALUES LESS THAN MAXVALUE);
|
||||
INSERT INTO t1 VALUES (1, "Partition p1, first row");
|
||||
DROP TABLE t1;
|
|
@ -2155,6 +2155,8 @@ mysqld is alive
|
|||
SET @max_allowed_packet= @@global.max_allowed_packet;
|
||||
SET @net_buffer_length= @@global.net_buffer_length;
|
||||
SET GLOBAL max_allowed_packet= 1024;
|
||||
Warnings:
|
||||
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
||||
SET GLOBAL net_buffer_length= 1024;
|
||||
ERROR 1153 (08S01) at line 1: Got a packet bigger than 'max_allowed_packet' bytes
|
||||
SET GLOBAL max_allowed_packet= @max_allowed_packet;
|
||||
|
|
|
@ -1339,6 +1339,7 @@ drop table `été`;
|
|||
set names latin1;
|
||||
show columns from `#mysql50#????????`;
|
||||
Got one of the listed errors
|
||||
call mtr.add_suppression("Can.t find file: '.\\\\test\\\\\\?{8}.frm'");
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
CREATE TABLE t1(c1 INT);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
call mtr.add_suppression("Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted");
|
||||
call mtr.add_suppression("Stored routine .test...bug14233_[123].: invalid value in column mysql.proc");
|
||||
use test;
|
||||
drop procedure if exists bug14233;
|
||||
drop function if exists bug14233;
|
||||
|
|
|
@ -4734,3 +4734,21 @@ SELECT * FROM t2 UNION SELECT * FROM t2
|
|||
ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
|
||||
DROP TABLE t1,t2;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug #11765713 58705:
|
||||
# OPTIMIZER LET ENGINE DEPEND ON UNINITIALIZED VALUES
|
||||
# CREATED BY OPT_SUM_QUERY
|
||||
#
|
||||
CREATE TABLE t1(a INT NOT NULL, KEY (a));
|
||||
INSERT INTO t1 VALUES (0), (1);
|
||||
SELECT 1 as foo FROM t1 WHERE a < SOME
|
||||
(SELECT a FROM t1 WHERE a <=>
|
||||
(SELECT a FROM t1)
|
||||
);
|
||||
ERROR 21000: Subquery returns more than 1 row
|
||||
SELECT 1 as foo FROM t1 WHERE a < SOME
|
||||
(SELECT a FROM t1 WHERE a <=>
|
||||
(SELECT a FROM t1 where a is null)
|
||||
);
|
||||
foo
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -547,4 +547,67 @@ a
|
|||
2000-01-01 00:00:01
|
||||
2000-01-01 00:00:01
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#50774: failed to get the correct resultset when timestamp values
|
||||
# are appended with .0
|
||||
#
|
||||
CREATE TABLE t1 ( a TIMESTAMP, KEY ( a ) );
|
||||
INSERT INTO t1 VALUES( '2010-02-01 09:31:01' );
|
||||
INSERT INTO t1 VALUES( '2010-02-01 09:31:02' );
|
||||
INSERT INTO t1 VALUES( '2010-02-01 09:31:03' );
|
||||
INSERT INTO t1 VALUES( '2010-02-01 09:31:04' );
|
||||
SELECT * FROM t1 WHERE a >= '2010-02-01 09:31:02.0';
|
||||
a
|
||||
2010-02-01 09:31:02
|
||||
2010-02-01 09:31:03
|
||||
2010-02-01 09:31:04
|
||||
SELECT * FROM t1 WHERE '2010-02-01 09:31:02.0' <= a;
|
||||
a
|
||||
2010-02-01 09:31:02
|
||||
2010-02-01 09:31:03
|
||||
2010-02-01 09:31:04
|
||||
SELECT * FROM t1 WHERE a <= '2010-02-01 09:31:02.0';
|
||||
a
|
||||
2010-02-01 09:31:01
|
||||
2010-02-01 09:31:02
|
||||
SELECT * FROM t1 WHERE '2010-02-01 09:31:02.0' >= a;
|
||||
a
|
||||
2010-02-01 09:31:01
|
||||
2010-02-01 09:31:02
|
||||
EXPLAIN
|
||||
SELECT * FROM t1 WHERE a >= '2010-02-01 09:31:02.0';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
x x x range x x x x x x
|
||||
SELECT * FROM t1 WHERE a >= '2010-02-01 09:31:02.0';
|
||||
a
|
||||
2010-02-01 09:31:02
|
||||
2010-02-01 09:31:03
|
||||
2010-02-01 09:31:04
|
||||
CREATE TABLE t2 ( a TIMESTAMP, KEY ( a DESC ) );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:01' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:02' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:03' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:04' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:05' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:06' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:07' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:08' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:09' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:10' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:11' );
|
||||
# The bug would cause the range optimizer's comparison to use an open
|
||||
# interval here. This reveals itself only in the number of reads
|
||||
# performed.
|
||||
FLUSH STATUS;
|
||||
EXPLAIN
|
||||
SELECT * FROM t2 WHERE a < '2010-02-01 09:31:02.0';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
x x x range x x x x x x
|
||||
SELECT * FROM t2 WHERE a < '2010-02-01 09:31:02.0';
|
||||
a
|
||||
2010-02-01 09:31:01
|
||||
SHOW STATUS LIKE 'Handler_read_next';
|
||||
Variable_name Value
|
||||
Handler_read_next 1
|
||||
DROP TABLE t1, t2;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -108,3 +108,27 @@ SET @@session.slave_skip_errors= 7;
|
|||
ERROR HY000: Variable 'slave_skip_errors' is a read only variable
|
||||
SET @@global.slave_skip_errors= 7;
|
||||
ERROR HY000: Variable 'slave_skip_errors' is a read only variable
|
||||
#
|
||||
# Bug #11766769 : 59959: SMALL VALUES OF --MAX-ALLOWED-PACKET
|
||||
# ARE NOT BEING HONORED
|
||||
#
|
||||
CREATE TABLE t1 (a MEDIUMTEXT);
|
||||
SET GLOBAL max_allowed_packet=2048;
|
||||
Warnings:
|
||||
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
||||
SET GLOBAL net_buffer_length=4096;
|
||||
Warnings:
|
||||
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
||||
SHOW SESSION VARIABLES LIKE 'max_allowed_packet';
|
||||
Variable_name Value
|
||||
max_allowed_packet 2048
|
||||
SHOW SESSION VARIABLES LIKE 'net_buffer_length';
|
||||
Variable_name Value
|
||||
net_buffer_length 4096
|
||||
ERROR 08S01: Got a packet bigger than 'max_allowed_packet' bytes
|
||||
SELECT LENGTH(a) FROM t1;
|
||||
LENGTH(a)
|
||||
SET GLOBAL max_allowed_packet=default;
|
||||
SET GLOBAL net_buffer_length=default;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -280,6 +280,7 @@ NET_BUFFER_LENGTH 1024
|
|||
set global net_buffer_length=2000000000;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect net_buffer_length value: '2000000000'
|
||||
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
||||
show global variables like 'net_buffer_length';
|
||||
Variable_name Value
|
||||
net_buffer_length 1048576
|
||||
|
@ -502,6 +503,7 @@ set low_priority_updates=1;
|
|||
set global max_allowed_packet=100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect max_allowed_packet value: '100'
|
||||
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
||||
set global max_binlog_cache_size=100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect max_binlog_cache_size value: '100'
|
||||
|
@ -1059,6 +1061,8 @@ set global max_write_lock_count =default;
|
|||
set global myisam_data_pointer_size =@my_myisam_data_pointer_size;
|
||||
set global myisam_max_sort_file_size =@my_myisam_max_sort_file_size;
|
||||
set global net_buffer_length =@my_net_buffer_length;
|
||||
Warnings:
|
||||
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
||||
set global net_write_timeout =@my_net_write_timeout;
|
||||
set global net_read_timeout =@my_net_read_timeout;
|
||||
set global query_cache_limit =@my_query_cache_limit;
|
||||
|
@ -1543,6 +1547,22 @@ Warning 1292 Truncated incorrect key_cache_block_size value: '0'
|
|||
select @@max_long_data_size;
|
||||
@@max_long_data_size
|
||||
1048576
|
||||
#
|
||||
# Bug#11766424 59527: DECIMAL_BIN_SIZE: ASSERTION `SCALE >= 0 && PRECISION > 0 && SCALE <= PRE
|
||||
#
|
||||
CREATE TABLE t1(f1 DECIMAL(1,1) UNSIGNED);
|
||||
INSERT INTO t1 VALUES (0.2),(0.1);
|
||||
SELECT 1 FROM t1 GROUP BY @a:= (SELECT ROUND(f1) FROM t1 WHERE @a=f1);
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 AS SELECT @a:= CAST(1 AS UNSIGNED) AS a;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(1) unsigned NOT NULL DEFAULT '0'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
SET @@global.max_binlog_cache_size=DEFAULT;
|
||||
SET @@global.max_join_size=DEFAULT;
|
||||
SET @@global.key_buffer_size=@kbs;
|
||||
|
|
|
@ -3897,6 +3897,15 @@ DROP TABLE t1;
|
|||
#
|
||||
CREATE VIEW v1 AS SELECT 1 IN (1 LIKE 2,0) AS f;
|
||||
DROP VIEW v1;
|
||||
#
|
||||
# Bug 11829681 - 60295: ERROR 1356 ON VIEW THAT EXECUTES FINE AS A QUERY
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE VIEW v1 AS SELECT s.* FROM t1 s, t1 b HAVING a;
|
||||
SELECT * FROM v1;
|
||||
a
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
# -----------------------------------------------------------------
|
||||
# -- End of 5.1 tests.
|
||||
# -----------------------------------------------------------------
|
||||
|
|
15
mysql-test/suite/binlog/r/binlog_bug23533.result
Normal file
15
mysql-test/suite/binlog/r/binlog_bug23533.result
Normal file
|
@ -0,0 +1,15 @@
|
|||
SET AUTOCOMMIT=0;
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1000
|
||||
SET GLOBAL binlog_cache_size=4096;
|
||||
SET GLOBAL max_binlog_cache_size=4096;
|
||||
START TRANSACTION;
|
||||
CREATE TABLE t2 SELECT * FROM t1;
|
||||
ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again
|
||||
COMMIT;
|
||||
SHOW TABLES LIKE 't%';
|
||||
Tables_in_test (t%)
|
||||
t1
|
||||
DROP TABLE t1;
|
10
mysql-test/suite/binlog/r/binlog_bug36391.result
Normal file
10
mysql-test/suite/binlog/r/binlog_bug36391.result
Normal file
|
@ -0,0 +1,10 @@
|
|||
CREATE TABLE t1(id INT);
|
||||
SHOW TABLES;
|
||||
Tables_in_test
|
||||
t1
|
||||
FLUSH LOGS;
|
||||
DROP TABLE t1;
|
||||
SHOW TABLES;
|
||||
Tables_in_test
|
||||
t1
|
||||
DROP TABLE t1;
|
|
@ -4,33 +4,47 @@
|
|||
#############################################################
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_log_bin.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
SET AUTOCOMMIT=0;
|
||||
SET GLOBAL max_binlog_cache_size=4096;
|
||||
SHOW VARIABLES LIKE 'max_binlog_cache_size';
|
||||
|
||||
# Create 1st table
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB;
|
||||
|
||||
--disable_query_log
|
||||
let $i= 1000;
|
||||
while ($i)
|
||||
{
|
||||
BEGIN;
|
||||
eval INSERT INTO t1 VALUES($i, REPEAT('x', 4096));
|
||||
COMMIT;
|
||||
dec $i;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
# Set small value for max_binlog_cache_size
|
||||
let $saved_binlog_cache_size= query_get_value(SELECT @@binlog_cache_size AS Value, Value, 1);
|
||||
let $saved_max_binlog_cache_size= query_get_value(SELECT @@max_binlog_cache_size AS Value, Value, 1);
|
||||
SET GLOBAL binlog_cache_size=4096;
|
||||
SET GLOBAL max_binlog_cache_size=4096;
|
||||
|
||||
# New value of max_binlog_cache_size will apply to new session
|
||||
disconnect default;
|
||||
connect(default,localhost,root,,test);
|
||||
|
||||
# Copied data from t1 into t2 large than max_binlog_cache_size
|
||||
START TRANSACTION;
|
||||
--error 1534
|
||||
--error ER_TRANS_CACHE_FULL
|
||||
CREATE TABLE t2 SELECT * FROM t1;
|
||||
COMMIT;
|
||||
SHOW TABLES LIKE 't%';
|
||||
|
||||
|
||||
# 5.1 End of Test
|
||||
--source include/rpl_end.inc
|
||||
--disable_query_log
|
||||
eval SET GLOBAL max_binlog_cache_size=$saved_max_binlog_cache_size;
|
||||
eval SET GLOBAL binlog_cache_size=$saved_binlog_cache_size;
|
||||
--enable_query_log
|
||||
DROP TABLE t1;
|
||||
disconnect default;
|
||||
connect(default,localhost,root,,test);
|
|
@ -13,17 +13,18 @@
|
|||
#
|
||||
#
|
||||
|
||||
--source include/master-slave.inc
|
||||
--source include/have_log_bin.inc
|
||||
--source include/have_binlog_format_mixed.inc
|
||||
|
||||
create table t1(id int);
|
||||
CREATE TABLE t1(id INT);
|
||||
let $binlog= query_get_value(SHOW MASTER STATUS, File, 1);
|
||||
let $binlog_path= `SELECT CONCAT(@@DATADIR, '$binlog')`;
|
||||
SHOW TABLES;
|
||||
FLUSH LOGS;
|
||||
DROP TABLE t1;
|
||||
|
||||
show tables;
|
||||
--exec $MYSQL_BINLOG $binlog_path | $MYSQL test
|
||||
SHOW TABLES;
|
||||
|
||||
--source include/show_master_status.inc
|
||||
|
||||
flush logs;
|
||||
|
||||
--exec $MYSQL_BINLOG $MYSQL_TEST_DIR/var/log/master-bin.000001 | $MYSQL test
|
||||
|
||||
drop table t1;
|
||||
--source include/rpl_end.inc
|
||||
# Clean up
|
||||
DROP TABLE t1;
|
|
@ -6,6 +6,8 @@ source include/not_embedded.inc;
|
|||
# Don't test this under valgrind, memory leaks will occur
|
||||
--source include/not_valgrind.inc
|
||||
source include/have_debug.inc;
|
||||
# Avoid CrashReporter popup on Mac
|
||||
--source include/not_crashrep.inc
|
||||
call mtr.add_suppression('Attempting backtrace');
|
||||
call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
|
||||
call mtr.add_suppression('MSYQL_BIN_LOG::open failed to sync the index file');
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
[row]
|
||||
binlog-format=row
|
||||
|
||||
[stmt]
|
||||
binlog-format=statement
|
||||
|
||||
[mix]
|
||||
binlog-format=mixed
|
|
@ -1,3 +0,0 @@
|
|||
a
|
||||
b
|
||||
c
|
|
@ -1,33 +0,0 @@
|
|||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
|
||||
**** On Master ****
|
||||
CREATE TABLE t1 (b CHAR(10));
|
||||
|
||||
**** On Slave ****
|
||||
STOP SLAVE;
|
||||
|
||||
**** On Master ****
|
||||
LOAD DATA INFILE FILENAME
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
3
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (b CHAR(10))
|
||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat' INTO TABLE `t1` FIELDS TERMINATED BY '|' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`b`) ;file_id=#
|
||||
|
||||
**** On Slave ****
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
START SLAVE;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
|
||||
**** On Master ****
|
||||
DROP TABLE t1;
|
|
@ -1,23 +0,0 @@
|
|||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
DROP TABLE IF EXISTS t1,t2;
|
||||
SET AUTOCOMMIT=0;
|
||||
SET GLOBAL max_binlog_cache_size=4096;
|
||||
SHOW VARIABLES LIKE 'max_binlog_cache_size';
|
||||
Variable_name Value
|
||||
max_binlog_cache_size 4096
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1000
|
||||
START TRANSACTION;
|
||||
CREATE TABLE t2 SELECT * FROM t1;
|
||||
ERROR HY000: Writing one row to the row-based binary log failed
|
||||
COMMIT;
|
||||
SHOW TABLES LIKE 't%';
|
||||
Tables_in_test (t%)
|
||||
t1
|
|
@ -1,16 +0,0 @@
|
|||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('a');
|
||||
UPDATE t1 SET a = 'MyISAM';
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
MyISAM
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
MyISAM
|
||||
DROP TABLE t1;
|
|
@ -1,16 +0,0 @@
|
|||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE t1 ( a INT, b INT DEFAULT -3 );
|
||||
INSERT INTO t1 VALUES (1, DEFAULT);
|
||||
UPDATE t1 SET a = 3;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
3 -3
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
3 -3
|
||||
DROP TABLE t1;
|
|
@ -1,15 +0,0 @@
|
|||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
create table `t1` (`id` int not null auto_increment primary key);
|
||||
create trigger `trg` before insert on `t1` for each row begin end;
|
||||
set @@global.debug="+d,simulate_bug33029";
|
||||
stop slave;
|
||||
start slave;
|
||||
insert into `t1` values ();
|
||||
select * from t1;
|
||||
id
|
||||
1
|
|
@ -1,18 +0,0 @@
|
|||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
drop table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
create table t1(id int);
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t1
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
|
||||
flush logs;
|
||||
drop table t1;
|
|
@ -1,17 +0,0 @@
|
|||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE char128_utf8 (
|
||||
i1 INT NOT NULL,
|
||||
c CHAR(128) CHARACTER SET utf8 NOT NULL,
|
||||
i2 INT NOT NULL);
|
||||
INSERT INTO char128_utf8 VALUES ( 1, "123", 1 );
|
||||
SELECT * FROM char128_utf8;
|
||||
i1 c i2
|
||||
1 123 1
|
||||
SELECT * FROM char128_utf8;
|
||||
i1 c i2
|
||||
1 123 1
|
|
@ -1,56 +0,0 @@
|
|||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
create table t1i(n int primary key) engine=innodb;
|
||||
create table t2m(n int primary key) engine=myisam;
|
||||
begin;
|
||||
insert into t1i values (1);
|
||||
insert into t1i values (2);
|
||||
insert into t1i values (3);
|
||||
commit;
|
||||
begin;
|
||||
insert into t1i values (5);
|
||||
begin;
|
||||
insert into t1i values (4);
|
||||
insert into t2m values (1);
|
||||
update t1i set n = 5 where n = 4;
|
||||
commit;
|
||||
zero
|
||||
0
|
||||
*** kill sql thread ***
|
||||
rollback;
|
||||
*** sql thread is *not* running: No ***
|
||||
*** the prove: the killed slave has not finished the current transaction ***
|
||||
three
|
||||
3
|
||||
one
|
||||
1
|
||||
zero
|
||||
0
|
||||
delete from t2m;
|
||||
start slave sql_thread;
|
||||
delete from t1i;
|
||||
delete from t2m;
|
||||
begin;
|
||||
insert into t1i values (5);
|
||||
begin;
|
||||
insert into t1i values (4);
|
||||
update t1i set n = 5 where n = 4;
|
||||
commit;
|
||||
zero
|
||||
0
|
||||
stop slave sql_thread;
|
||||
rollback;
|
||||
*** sql thread is *not* running: No ***
|
||||
*** the prove: the stopped slave has rolled back the current transaction ***
|
||||
zero
|
||||
0
|
||||
zero
|
||||
0
|
||||
one
|
||||
1
|
||||
start slave sql_thread;
|
||||
drop table t1i, t2m;
|
|
@ -1,49 +0,0 @@
|
|||
# Bug#12691: Exec_master_log_pos corrupted with SQL_SLAVE_SKIP_COUNTER
|
||||
|
||||
--source include/master-slave.inc
|
||||
--connection master
|
||||
--source include/have_binlog_format_mixed_or_statement.inc
|
||||
|
||||
--echo
|
||||
--echo **** On Master ****
|
||||
CREATE TABLE t1 (b CHAR(10));
|
||||
--echo
|
||||
--echo **** On Slave ****
|
||||
--sync_slave_with_master
|
||||
STOP SLAVE;
|
||||
--source include/wait_for_slave_to_stop.inc
|
||||
|
||||
--connection master
|
||||
|
||||
--echo
|
||||
--echo **** On Master ****
|
||||
--exec cp $MYSQL_TEST_DIR/suite/bugs/data/rpl_bug12691.dat $MYSQLTEST_VARDIR/tmp/
|
||||
--echo LOAD DATA INFILE FILENAME
|
||||
--disable_query_log
|
||||
--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat' INTO TABLE t1 FIELDS TERMINATED BY '|'
|
||||
--enable_query_log
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat
|
||||
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
--save_master_pos
|
||||
|
||||
--connection slave
|
||||
--echo
|
||||
--echo **** On Slave ****
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
START SLAVE;
|
||||
--source include/wait_for_slave_to_start.inc
|
||||
--sync_with_master
|
||||
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
# Clean up
|
||||
--connection master
|
||||
--echo
|
||||
--echo **** On Master ****
|
||||
DROP TABLE t1;
|
||||
|
||||
--source include/rpl_end.inc
|
|
@ -1,25 +0,0 @@
|
|||
|
||||
# BUG#31582: 5.1-telco-6.1 -> 5.1.22. Slave crashes when reading
|
||||
# UPDATE for VARCHAR
|
||||
|
||||
# This is a problem for any update statement replicating from an old
|
||||
# server to a new server. The bug consisted of a new slave trying to
|
||||
# read two column bitmaps, but there is only one available in the old
|
||||
# format.
|
||||
|
||||
# This test case should be executed replicating from an old server to
|
||||
# a new server, so make sure you have one handy.
|
||||
|
||||
source include/master-slave.inc;
|
||||
|
||||
CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('a');
|
||||
UPDATE t1 SET a = 'MyISAM';
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
sync_slave_with_master;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
|
||||
--source include/rpl_end.inc
|
|
@ -1,25 +0,0 @@
|
|||
#
|
||||
# BUG#31583: 5.1-telco-6.1 -> 5.1.22. Slave returns Error in unknown event
|
||||
|
||||
# This is a problem for any update statement replicating from an old
|
||||
# server to a new server. The bug consisted of a new slave trying to
|
||||
# read two column bitmaps, but there is only one available in the old
|
||||
# format.
|
||||
|
||||
# This test case should be executed replicating from an old server to
|
||||
# a new server, so make sure you have one handy.
|
||||
|
||||
source include/master-slave.inc;
|
||||
|
||||
CREATE TABLE t1 ( a INT, b INT DEFAULT -3 );
|
||||
|
||||
INSERT INTO t1 VALUES (1, DEFAULT);
|
||||
UPDATE t1 SET a = 3;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
sync_slave_with_master;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
|
||||
--source include/rpl_end.inc
|
|
@ -1,26 +0,0 @@
|
|||
#
|
||||
# Bug #36443 Server crashes when executing insert when insert trigger on table
|
||||
#
|
||||
# Emulating the former bug#33029 situation to see that there is no crash anymore.
|
||||
#
|
||||
|
||||
|
||||
source include/master-slave.inc;
|
||||
|
||||
create table `t1` (`id` int not null auto_increment primary key);
|
||||
create trigger `trg` before insert on `t1` for each row begin end;
|
||||
|
||||
sync_slave_with_master;
|
||||
set @@global.debug="+d,simulate_bug33029";
|
||||
|
||||
stop slave;
|
||||
start slave;
|
||||
|
||||
connection master;
|
||||
|
||||
insert into `t1` values ();
|
||||
|
||||
sync_slave_with_master;
|
||||
select * from t1;
|
||||
|
||||
--source include/rpl_end.inc
|
|
@ -1,166 +0,0 @@
|
|||
#
|
||||
# Bug #38205 Row-based Replication (RBR) causes inconsistencies: HA_ERR_FOUND_DUPP_KEY
|
||||
# Bug#319 if while a non-transactional slave is replicating a transaction possible problem
|
||||
#
|
||||
# Verifying the fact that STOP SLAVE in the middle of a group execution waits
|
||||
# for the end of the group before the slave sql thread will stop.
|
||||
# The patch refines STOP SLAVE to not interrupt a transaction or other type of
|
||||
# the replication events group (the part I).
|
||||
# Killing the sql thread continues to provide a "hard" stop (the part II).
|
||||
#
|
||||
# Non-deterministic tests
|
||||
#
|
||||
|
||||
source include/master-slave.inc;
|
||||
source include/have_innodb.inc;
|
||||
|
||||
|
||||
#
|
||||
# Part II, killed sql slave leaves instantly
|
||||
#
|
||||
|
||||
# A. multi-statement transaction as the replication group
|
||||
|
||||
connection master;
|
||||
|
||||
create table t1i(n int primary key) engine=innodb;
|
||||
create table t2m(n int primary key) engine=myisam;
|
||||
|
||||
sync_slave_with_master;
|
||||
|
||||
connection master;
|
||||
|
||||
begin;
|
||||
insert into t1i values (1);
|
||||
insert into t1i values (2);
|
||||
insert into t1i values (3);
|
||||
commit;
|
||||
|
||||
sync_slave_with_master;
|
||||
|
||||
#
|
||||
# todo: first challenge is to find out the SQL thread id
|
||||
# the following is not fully reliable
|
||||
#
|
||||
|
||||
let $id=`SELECT id from information_schema.processlist where user like 'system user' and state like '%Has read all relay log%' or user like 'system user' and state like '%Reading event from the relay log%'`;
|
||||
connection slave;
|
||||
begin;
|
||||
insert into t1i values (5);
|
||||
|
||||
connection master;
|
||||
let $pos0_master= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
begin;
|
||||
insert into t1i values (4);
|
||||
insert into t2m values (1); # non-ta update
|
||||
update t1i set n = 5 where n = 4; # to block at. can't be played with killed
|
||||
commit;
|
||||
let $pos1_master= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
|
||||
connection slave;
|
||||
# slave sql thread must be locked out by the conn `slave' explicit lock
|
||||
let $pos0_slave= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
|
||||
--disable_query_log
|
||||
eval select $pos0_master - $pos0_slave as zero;
|
||||
--enable_query_log
|
||||
|
||||
connection slave1;
|
||||
|
||||
let $count= 1;
|
||||
let $table= t2m;
|
||||
source include/wait_until_rows_count.inc;
|
||||
#
|
||||
# todo: may fail as said above
|
||||
#
|
||||
--echo *** kill sql thread ***
|
||||
--disable_query_log
|
||||
eval kill connection $id;
|
||||
--enable_query_log
|
||||
|
||||
connection slave;
|
||||
rollback; # release the sql thread
|
||||
|
||||
connection slave1;
|
||||
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
let $sql_status= query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1);
|
||||
--echo *** sql thread is *not* running: $sql_status ***
|
||||
let $pos1_slave= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
|
||||
|
||||
connection slave;
|
||||
--echo *** the prove: the killed slave has not finished the current transaction ***
|
||||
|
||||
--disable_query_log
|
||||
select count(*) as three from t1i;
|
||||
eval select $pos1_master > $pos1_slave as one;
|
||||
eval select $pos1_slave - $pos0_slave as zero;
|
||||
--enable_query_log
|
||||
|
||||
delete from t2m; # remove the row to be able to replay
|
||||
start slave sql_thread;
|
||||
|
||||
#
|
||||
# Part I: B The homogenous transaction remains interuptable in between
|
||||
#
|
||||
|
||||
connection master;
|
||||
delete from t1i;
|
||||
delete from t2m;
|
||||
|
||||
sync_slave_with_master;
|
||||
begin;
|
||||
insert into t1i values (5);
|
||||
|
||||
connection master;
|
||||
let $pos0_master= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
begin;
|
||||
insert into t1i values (4);
|
||||
update t1i set n = 5 where n = 4; # to block at. not to be played
|
||||
commit;
|
||||
let $pos1_master= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
|
||||
|
||||
connection slave1;
|
||||
# slave sql can't advance as must be locked by the conn `slave' trans
|
||||
let $pos0_slave= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
|
||||
--disable_query_log
|
||||
eval select $pos0_master - $pos0_slave as zero;
|
||||
--enable_query_log
|
||||
|
||||
#
|
||||
# the replicated trans is blocked by the slave's local.
|
||||
# However, it's not easy to catch the exact moment when it happens.
|
||||
# The test issues sleep which makes the test either non-deterministic or
|
||||
# wasting too much time.
|
||||
#
|
||||
--sleep 3
|
||||
|
||||
send stop slave sql_thread;
|
||||
|
||||
connection slave;
|
||||
rollback; # release the sql thread
|
||||
|
||||
connection slave1;
|
||||
reap;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
let $sql_status= query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1);
|
||||
--echo *** sql thread is *not* running: $sql_status ***
|
||||
|
||||
let $pos1_slave= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
|
||||
|
||||
--echo *** the prove: the stopped slave has rolled back the current transaction ***
|
||||
|
||||
--disable_query_log
|
||||
select count(*) as zero from t1i;
|
||||
eval select $pos0_master - $pos0_slave as zero;
|
||||
eval select $pos1_master > $pos0_slave as one;
|
||||
--enable_query_log
|
||||
|
||||
start slave sql_thread;
|
||||
|
||||
# clean-up
|
||||
|
||||
connection master;
|
||||
drop table t1i, t2m;
|
||||
|
||||
--source include/rpl_end.inc
|
|
@ -15,8 +15,8 @@ NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 u
|
|||
NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3)
|
||||
NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32)
|
||||
NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32)
|
||||
NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32)
|
||||
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32)
|
||||
NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255)
|
||||
|
@ -27,9 +27,9 @@ NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 42949
|
|||
NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema COLUMNS EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27)
|
||||
NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3)
|
||||
NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80)
|
||||
NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512)
|
||||
NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
|
@ -71,14 +71,14 @@ NULL information_schema EVENTS SQL_MODE 12 NO varchar 8192 24576 NULL NULL utf8
|
|||
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime
|
||||
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18)
|
||||
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime
|
||||
NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime
|
||||
NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime
|
||||
NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES DELETED_ROWS 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4)
|
||||
NULL information_schema FILES ENGINE 10 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4)
|
||||
|
@ -88,27 +88,27 @@ NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8
|
|||
NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20)
|
||||
NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4)
|
||||
NULL information_schema FILES FULLTEXT_KEYS 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime
|
||||
NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime
|
||||
NULL information_schema FILES LOGFILE_GROUP_NAME 8 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema FILES LOGFILE_GROUP_NUMBER 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4)
|
||||
NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4)
|
||||
NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10)
|
||||
NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20)
|
||||
NULL information_schema FILES TABLESPACE_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema FILES TABLE_CATALOG 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema FILES TABLE_NAME 7 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES TABLE_SCHEMA 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4)
|
||||
NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4)
|
||||
NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4)
|
||||
NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime
|
||||
NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema GLOBAL_STATUS VARIABLE_VALUE 2 NULL YES varchar 1024 3072 NULL NULL utf8 utf8_general_ci varchar(1024)
|
||||
NULL information_schema GLOBAL_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
|
@ -125,29 +125,29 @@ NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES var
|
|||
NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512)
|
||||
NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime
|
||||
NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime
|
||||
NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12)
|
||||
NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80)
|
||||
NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext
|
||||
NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext
|
||||
NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12)
|
||||
NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext
|
||||
NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12)
|
||||
NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema PARTITIONS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512)
|
||||
NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime
|
||||
NULL information_schema PLUGINS PLUGIN_AUTHOR 8 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
|
@ -231,27 +231,27 @@ NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NU
|
|||
NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512)
|
||||
NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime
|
||||
NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255)
|
||||
NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime
|
||||
NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10)
|
||||
NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512)
|
||||
NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32)
|
||||
NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80)
|
||||
NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime
|
||||
NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned
|
||||
NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512)
|
||||
NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64)
|
||||
|
|
|
@ -479,9 +479,9 @@ NULL test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zero
|
|||
NULL test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill
|
||||
NULL test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20)
|
||||
NULL test tb1 f3 3 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1)
|
||||
NULL test tb1 f30 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned
|
||||
NULL test tb1 f31 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill
|
||||
NULL test tb1 f32 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill
|
||||
NULL test tb1 f30 30 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
|
||||
NULL test tb1 f31 31 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned zerofill
|
||||
NULL test tb1 f32 32 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned zerofill
|
||||
NULL test tb1 f33 33 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0)
|
||||
NULL test tb1 f34 34 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned
|
||||
NULL test tb1 f35 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill
|
||||
|
@ -602,9 +602,9 @@ NULL test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned
|
|||
NULL test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill
|
||||
NULL test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill
|
||||
NULL test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20)
|
||||
NULL test tb3 f147 30 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned
|
||||
NULL test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill
|
||||
NULL test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill
|
||||
NULL test tb3 f147 30 999999 NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
|
||||
NULL test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned zerofill
|
||||
NULL test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned zerofill
|
||||
NULL test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0)
|
||||
NULL test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned
|
||||
NULL test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill
|
||||
|
|
|
@ -97,13 +97,13 @@ NULL mysql host Select_priv 3 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum(
|
|||
NULL mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
|
||||
NULL mysql host Trigger_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
|
||||
NULL mysql host Update_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
|
||||
NULL mysql ndb_binlog_index deletes 6 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned
|
||||
NULL mysql ndb_binlog_index epoch 3 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned PRI
|
||||
NULL mysql ndb_binlog_index deletes 6 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
|
||||
NULL mysql ndb_binlog_index epoch 3 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned PRI
|
||||
NULL mysql ndb_binlog_index File 2 NULL NO varchar 255 255 NULL NULL latin1 latin1_swedish_ci varchar(255)
|
||||
NULL mysql ndb_binlog_index inserts 4 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned
|
||||
NULL mysql ndb_binlog_index Position 1 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned
|
||||
NULL mysql ndb_binlog_index schemaops 7 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned
|
||||
NULL mysql ndb_binlog_index updates 5 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned
|
||||
NULL mysql ndb_binlog_index inserts 4 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
|
||||
NULL mysql ndb_binlog_index Position 1 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
|
||||
NULL mysql ndb_binlog_index schemaops 7 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
|
||||
NULL mysql ndb_binlog_index updates 5 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
|
||||
NULL mysql plugin dl 2 NO char 128 384 NULL NULL utf8 utf8_bin char(128)
|
||||
NULL mysql plugin name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI
|
||||
NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob
|
||||
|
@ -130,7 +130,7 @@ NULL mysql procs_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI
|
|||
NULL mysql procs_priv Grantor 6 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL
|
||||
NULL mysql procs_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI
|
||||
NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant')
|
||||
NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI
|
||||
NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI
|
||||
NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI
|
||||
NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP
|
||||
NULL mysql procs_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI
|
||||
|
@ -411,7 +411,7 @@ NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp
|
|||
3.0000 mysql procs_priv Host char 60 180 utf8 utf8_bin char(60)
|
||||
3.0000 mysql procs_priv Db char 64 192 utf8 utf8_bin char(64)
|
||||
3.0000 mysql procs_priv User char 16 48 utf8 utf8_bin char(16)
|
||||
3.0000 mysql procs_priv Routine_name char 64 192 utf8 utf8_bin char(64)
|
||||
3.0000 mysql procs_priv Routine_name char 64 192 utf8 utf8_general_ci char(64)
|
||||
3.0000 mysql procs_priv Routine_type enum 9 27 utf8 utf8_bin enum('FUNCTION','PROCEDURE')
|
||||
3.0000 mysql procs_priv Grantor char 77 231 utf8 utf8_bin char(77)
|
||||
3.0000 mysql procs_priv Proc_priv set 27 81 utf8 utf8_general_ci set('Execute','Alter Routine','Grant')
|
||||
|
|
17
mysql-test/suite/innodb/r/innodb_bug59410.result
Normal file
17
mysql-test/suite/innodb/r/innodb_bug59410.result
Normal file
|
@ -0,0 +1,17 @@
|
|||
create table `bug59410_1`(`a` int)engine=innodb;
|
||||
insert into `bug59410_1` values (1),(2),(3);
|
||||
select 1 from `bug59410_1` where `a` <> any (
|
||||
select 1 from `bug59410_1` where `a` <> 1 for update)
|
||||
for update;
|
||||
1
|
||||
1
|
||||
1
|
||||
drop table bug59410_1;
|
||||
create table bug59410_2(`a` char(1),`b` int)engine=innodb;
|
||||
insert into bug59410_2 values('0',0);
|
||||
set transaction isolation level read uncommitted;
|
||||
start transaction;
|
||||
set @a=(select b from bug59410_2 where
|
||||
(select 1 from bug59410_2 where a group by @a=b)
|
||||
group by @a:=b);
|
||||
drop table bug59410_2;
|
57
mysql-test/suite/innodb/r/innodb_bug59641.result
Normal file
57
mysql-test/suite/innodb/r/innodb_bug59641.result
Normal file
|
@ -0,0 +1,57 @@
|
|||
CREATE TABLE t(a INT PRIMARY KEY, b INT)ENGINE=InnoDB;
|
||||
INSERT INTO t VALUES(2,2),(4,4),(8,8),(16,16),(32,32);
|
||||
COMMIT;
|
||||
XA START '123';
|
||||
INSERT INTO t VALUES(1,1);
|
||||
XA END '123';
|
||||
XA PREPARE '123';
|
||||
XA START '456';
|
||||
INSERT INTO t VALUES(3,47),(5,67);
|
||||
UPDATE t SET b=2*b WHERE a BETWEEN 5 AND 8;
|
||||
XA END '456';
|
||||
XA PREPARE '456';
|
||||
XA START '789';
|
||||
UPDATE t SET b=4*a WHERE a=32;
|
||||
XA END '789';
|
||||
XA PREPARE '789';
|
||||
call mtr.add_suppression("Found 3 prepared XA transactions");
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
3 47
|
||||
4 4
|
||||
5 134
|
||||
8 16
|
||||
16 16
|
||||
32 128
|
||||
COMMIT;
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
3 47
|
||||
4 4
|
||||
5 134
|
||||
8 16
|
||||
16 16
|
||||
32 128
|
||||
COMMIT;
|
||||
XA RECOVER;
|
||||
formatID gtrid_length bqual_length data
|
||||
1 3 0 789
|
||||
1 3 0 456
|
||||
1 3 0 123
|
||||
XA ROLLBACK '123';
|
||||
XA ROLLBACK '456';
|
||||
XA COMMIT '789';
|
||||
SELECT * FROM t;
|
||||
a b
|
||||
2 2
|
||||
4 4
|
||||
8 8
|
||||
16 16
|
||||
32 128
|
||||
DROP TABLE t;
|
|
@ -17,6 +17,9 @@
|
|||
# This test case needs InnoDB.
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# Avoid CrashReporter popup on Mac
|
||||
--source include/not_crashrep.inc
|
||||
|
||||
#
|
||||
# Precautionary clean up.
|
||||
#
|
||||
|
|
24
mysql-test/suite/innodb/t/innodb_bug59410.test
Normal file
24
mysql-test/suite/innodb/t/innodb_bug59410.test
Normal file
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Bug#59410 read uncommitted: unlock row could not find a 3 mode lock on the record
|
||||
#
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
# only interested that the following do not produce something like
|
||||
# InnoDB: Error: unlock row could not find a 2 mode lock on the record
|
||||
# in the error log
|
||||
|
||||
create table `bug59410_1`(`a` int)engine=innodb;
|
||||
insert into `bug59410_1` values (1),(2),(3);
|
||||
select 1 from `bug59410_1` where `a` <> any (
|
||||
select 1 from `bug59410_1` where `a` <> 1 for update)
|
||||
for update;
|
||||
drop table bug59410_1;
|
||||
|
||||
create table bug59410_2(`a` char(1),`b` int)engine=innodb;
|
||||
insert into bug59410_2 values('0',0);
|
||||
set transaction isolation level read uncommitted;
|
||||
start transaction;
|
||||
set @a=(select b from bug59410_2 where
|
||||
(select 1 from bug59410_2 where a group by @a=b)
|
||||
group by @a:=b);
|
||||
drop table bug59410_2;
|
66
mysql-test/suite/innodb/t/innodb_bug59641.test
Normal file
66
mysql-test/suite/innodb/t/innodb_bug59641.test
Normal file
|
@ -0,0 +1,66 @@
|
|||
# Bug #59641 Prepared XA transaction causes shutdown hang after a crash
|
||||
|
||||
-- source include/not_embedded.inc
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
CREATE TABLE t(a INT PRIMARY KEY, b INT)ENGINE=InnoDB;
|
||||
INSERT INTO t VALUES(2,2),(4,4),(8,8),(16,16),(32,32);
|
||||
COMMIT;
|
||||
XA START '123';
|
||||
INSERT INTO t VALUES(1,1);
|
||||
XA END '123';
|
||||
XA PREPARE '123';
|
||||
|
||||
CONNECT (con1,localhost,root,,);
|
||||
CONNECTION con1;
|
||||
|
||||
XA START '456';
|
||||
INSERT INTO t VALUES(3,47),(5,67);
|
||||
UPDATE t SET b=2*b WHERE a BETWEEN 5 AND 8;
|
||||
XA END '456';
|
||||
XA PREPARE '456';
|
||||
|
||||
CONNECT (con2,localhost,root,,);
|
||||
CONNECTION con2;
|
||||
|
||||
XA START '789';
|
||||
UPDATE t SET b=4*a WHERE a=32;
|
||||
XA END '789';
|
||||
XA PREPARE '789';
|
||||
|
||||
# The server would issue this warning on restart.
|
||||
call mtr.add_suppression("Found 3 prepared XA transactions");
|
||||
|
||||
# Kill the server without sending a shutdown command
|
||||
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
-- shutdown_server 0
|
||||
-- source include/wait_until_disconnected.inc
|
||||
|
||||
# Restart the server.
|
||||
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
-- enable_reconnect
|
||||
-- source include/wait_until_connected_again.inc
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t;
|
||||
COMMIT;
|
||||
|
||||
# Shut down the server. This would hang because of the bug.
|
||||
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
-- shutdown_server
|
||||
-- source include/wait_until_disconnected.inc
|
||||
|
||||
# Restart the server.
|
||||
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
-- enable_reconnect
|
||||
-- source include/wait_until_connected_again.inc
|
||||
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t;
|
||||
COMMIT;
|
||||
XA RECOVER;
|
||||
XA ROLLBACK '123';
|
||||
XA ROLLBACK '456';
|
||||
XA COMMIT '789';
|
||||
SELECT * FROM t;
|
||||
|
||||
DROP TABLE t;
|
17
mysql-test/suite/innodb_plugin/r/innodb_bug59410.result
Normal file
17
mysql-test/suite/innodb_plugin/r/innodb_bug59410.result
Normal file
|
@ -0,0 +1,17 @@
|
|||
create table `bug59410_1`(`a` int)engine=innodb;
|
||||
insert into `bug59410_1` values (1),(2),(3);
|
||||
select 1 from `bug59410_1` where `a` <> any (
|
||||
select 1 from `bug59410_1` where `a` <> 1 for update)
|
||||
for update;
|
||||
1
|
||||
1
|
||||
1
|
||||
drop table bug59410_1;
|
||||
create table bug59410_2(`a` char(1),`b` int)engine=innodb;
|
||||
insert into bug59410_2 values('0',0);
|
||||
set transaction isolation level read uncommitted;
|
||||
start transaction;
|
||||
set @a=(select b from bug59410_2 where
|
||||
(select 1 from bug59410_2 where a group by @a=b)
|
||||
group by @a:=b);
|
||||
drop table bug59410_2;
|
57
mysql-test/suite/innodb_plugin/r/innodb_bug59641.result
Normal file
57
mysql-test/suite/innodb_plugin/r/innodb_bug59641.result
Normal file
|
@ -0,0 +1,57 @@
|
|||
CREATE TABLE t(a INT PRIMARY KEY, b INT)ENGINE=InnoDB;
|
||||
INSERT INTO t VALUES(2,2),(4,4),(8,8),(16,16),(32,32);
|
||||
COMMIT;
|
||||
XA START '123';
|
||||
INSERT INTO t VALUES(1,1);
|
||||
XA END '123';
|
||||
XA PREPARE '123';
|
||||
XA START '456';
|
||||
INSERT INTO t VALUES(3,47),(5,67);
|
||||
UPDATE t SET b=2*b WHERE a BETWEEN 5 AND 8;
|
||||
XA END '456';
|
||||
XA PREPARE '456';
|
||||
XA START '789';
|
||||
UPDATE t SET b=4*a WHERE a=32;
|
||||
XA END '789';
|
||||
XA PREPARE '789';
|
||||
call mtr.add_suppression("Found 3 prepared XA transactions");
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
3 47
|
||||
4 4
|
||||
5 134
|
||||
8 16
|
||||
16 16
|
||||
32 128
|
||||
COMMIT;
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
3 47
|
||||
4 4
|
||||
5 134
|
||||
8 16
|
||||
16 16
|
||||
32 128
|
||||
COMMIT;
|
||||
XA RECOVER;
|
||||
formatID gtrid_length bqual_length data
|
||||
1 3 0 789
|
||||
1 3 0 456
|
||||
1 3 0 123
|
||||
XA ROLLBACK '123';
|
||||
XA ROLLBACK '456';
|
||||
XA COMMIT '789';
|
||||
SELECT * FROM t;
|
||||
a b
|
||||
2 2
|
||||
4 4
|
||||
8 8
|
||||
16 16
|
||||
32 128
|
||||
DROP TABLE t;
|
|
@ -17,6 +17,9 @@
|
|||
# This test case needs InnoDB.
|
||||
-- source include/have_innodb_plugin.inc
|
||||
|
||||
# Avoid CrashReporter popup on Mac
|
||||
--source include/not_crashrep.inc
|
||||
|
||||
#
|
||||
# Precautionary clean up.
|
||||
#
|
||||
|
|
24
mysql-test/suite/innodb_plugin/t/innodb_bug59410.test
Normal file
24
mysql-test/suite/innodb_plugin/t/innodb_bug59410.test
Normal file
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Bug#59410 read uncommitted: unlock row could not find a 3 mode lock on the record
|
||||
#
|
||||
-- source include/have_innodb_plugin.inc
|
||||
|
||||
# only interested that the following do not produce something like
|
||||
# InnoDB: Error: unlock row could not find a 2 mode lock on the record
|
||||
# in the error log
|
||||
|
||||
create table `bug59410_1`(`a` int)engine=innodb;
|
||||
insert into `bug59410_1` values (1),(2),(3);
|
||||
select 1 from `bug59410_1` where `a` <> any (
|
||||
select 1 from `bug59410_1` where `a` <> 1 for update)
|
||||
for update;
|
||||
drop table bug59410_1;
|
||||
|
||||
create table bug59410_2(`a` char(1),`b` int)engine=innodb;
|
||||
insert into bug59410_2 values('0',0);
|
||||
set transaction isolation level read uncommitted;
|
||||
start transaction;
|
||||
set @a=(select b from bug59410_2 where
|
||||
(select 1 from bug59410_2 where a group by @a=b)
|
||||
group by @a:=b);
|
||||
drop table bug59410_2;
|
70
mysql-test/suite/innodb_plugin/t/innodb_bug59641.test
Normal file
70
mysql-test/suite/innodb_plugin/t/innodb_bug59641.test
Normal file
|
@ -0,0 +1,70 @@
|
|||
# Bug #59641 Prepared XA transaction causes shutdown hang after a crash
|
||||
|
||||
-- source include/not_embedded.inc
|
||||
-- source include/have_innodb_plugin.inc
|
||||
|
||||
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
|
||||
|
||||
CREATE TABLE t(a INT PRIMARY KEY, b INT)ENGINE=InnoDB;
|
||||
INSERT INTO t VALUES(2,2),(4,4),(8,8),(16,16),(32,32);
|
||||
COMMIT;
|
||||
XA START '123';
|
||||
INSERT INTO t VALUES(1,1);
|
||||
XA END '123';
|
||||
XA PREPARE '123';
|
||||
|
||||
CONNECT (con1,localhost,root,,);
|
||||
CONNECTION con1;
|
||||
|
||||
XA START '456';
|
||||
INSERT INTO t VALUES(3,47),(5,67);
|
||||
UPDATE t SET b=2*b WHERE a BETWEEN 5 AND 8;
|
||||
XA END '456';
|
||||
XA PREPARE '456';
|
||||
|
||||
CONNECT (con2,localhost,root,,);
|
||||
CONNECTION con2;
|
||||
|
||||
XA START '789';
|
||||
UPDATE t SET b=4*a WHERE a=32;
|
||||
XA END '789';
|
||||
XA PREPARE '789';
|
||||
|
||||
# The server would issue this warning on restart.
|
||||
call mtr.add_suppression("Found 3 prepared XA transactions");
|
||||
|
||||
# Kill the server without sending a shutdown command
|
||||
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
-- shutdown_server 0
|
||||
-- source include/wait_until_disconnected.inc
|
||||
|
||||
# Restart the server.
|
||||
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
-- enable_reconnect
|
||||
-- source include/wait_until_connected_again.inc
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t;
|
||||
COMMIT;
|
||||
|
||||
# Shut down the server. This would hang because of the bug.
|
||||
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
-- shutdown_server
|
||||
-- source include/wait_until_disconnected.inc
|
||||
|
||||
# Restart the server.
|
||||
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
-- enable_reconnect
|
||||
-- source include/wait_until_connected_again.inc
|
||||
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t;
|
||||
COMMIT;
|
||||
XA RECOVER;
|
||||
XA ROLLBACK '123';
|
||||
XA ROLLBACK '456';
|
||||
XA COMMIT '789';
|
||||
SELECT * FROM t;
|
||||
|
||||
DROP TABLE t;
|
||||
--disable_query_log
|
||||
eval set global innodb_file_format_check=$innodb_file_format_check_orig;
|
12
mysql-test/suite/rpl/r/rpl_bug37426.result
Normal file
12
mysql-test/suite/rpl/r/rpl_bug37426.result
Normal file
|
@ -0,0 +1,12 @@
|
|||
include/master-slave.inc
|
||||
[connection master]
|
||||
CREATE TABLE char128_utf8 (i1 INT NOT NULL, c CHAR(128) CHARACTER SET utf8 NOT NULL, i2 INT NOT NULL);
|
||||
INSERT INTO char128_utf8 VALUES ( 1, "123", 1 );
|
||||
SELECT * FROM char128_utf8;
|
||||
i1 c i2
|
||||
1 123 1
|
||||
SELECT * FROM char128_utf8;
|
||||
i1 c i2
|
||||
1 123 1
|
||||
DROP TABLE char128_utf8;
|
||||
include/rpl_end.inc
|
|
@ -58,10 +58,6 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
|
|||
27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
|
||||
|
||||
* Select count and 20 rows from Slave *
|
||||
|
||||
|
@ -933,10 +929,6 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
|
|||
27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
|
||||
|
||||
* Select count and 20 rows from Slave *
|
||||
|
||||
|
@ -1808,10 +1800,6 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
|
|||
27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
|
||||
|
||||
* Select count and 20 rows from Slave *
|
||||
|
||||
|
|
|
@ -58,10 +58,6 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
|
|||
27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
|
||||
|
||||
* Select count and 20 rows from Slave *
|
||||
|
||||
|
@ -933,10 +929,6 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
|
|||
27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
|
||||
|
||||
* Select count and 20 rows from Slave *
|
||||
|
||||
|
@ -1808,10 +1800,6 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
|
|||
27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
|
||||
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
|
||||
|
||||
* Select count and 20 rows from Slave *
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue