Updated/added copyright headers
This commit is contained in:
commit
027b5f1ed4
@ -1,4 +1,4 @@
|
||||
[MYSQL]
|
||||
post_commit_to = "dbg_mysql_security@sun.com"
|
||||
post_push_to = "dbg_mysql_security@sun.com"
|
||||
tree_name = "mysql-5.1-security"
|
||||
post_commit_to = "commits@lists.mysql.com"
|
||||
post_push_to = "commits@lists.mysql.com"
|
||||
tree_name = "mysql-5.1"
|
||||
|
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
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2006, 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
|
||||
@ -59,6 +59,7 @@ ADD_DEFINITIONS(-D__NT__)
|
||||
|
||||
IF(CYBOZU)
|
||||
ADD_DEFINITIONS(-DCYBOZU)
|
||||
ADD_DEFINITIONS(-DHAVE_UTF8_GENERAL_CS)
|
||||
ENDIF(CYBOZU)
|
||||
|
||||
IF(EXTRA_DEBUG)
|
||||
|
@ -1,5 +1,4 @@
|
||||
# Copyright (c) 2000-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
# 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
|
||||
@ -117,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;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2001-2007 MySQL AB, 2010 Sun Microsystems, Inc.
|
||||
Use is subject to license terms.
|
||||
Copyright (c) 2001, 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
|
||||
@ -88,6 +87,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,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
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
|
||||
@ -707,10 +707,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))
|
||||
{
|
||||
@ -945,7 +953,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)
|
||||
|
@ -1136,6 +1136,9 @@ static int switch_db_collation(FILE *sql_file,
|
||||
{
|
||||
if (strcmp(current_db_cl_name, required_db_cl_name) != 0)
|
||||
{
|
||||
char quoted_db_buf[NAME_LEN * 2 + 3];
|
||||
char *quoted_db_name= quote_name(db_name, quoted_db_buf, FALSE);
|
||||
|
||||
CHARSET_INFO *db_cl= get_charset_by_name(required_db_cl_name, MYF(0));
|
||||
|
||||
if (!db_cl)
|
||||
@ -1143,7 +1146,7 @@ static int switch_db_collation(FILE *sql_file,
|
||||
|
||||
fprintf(sql_file,
|
||||
"ALTER DATABASE %s CHARACTER SET %s COLLATE %s %s\n",
|
||||
(const char *) db_name,
|
||||
(const char *) quoted_db_name,
|
||||
(const char *) db_cl->csname,
|
||||
(const char *) db_cl->name,
|
||||
(const char *) delimiter);
|
||||
@ -1164,6 +1167,9 @@ static int restore_db_collation(FILE *sql_file,
|
||||
const char *delimiter,
|
||||
const char *db_cl_name)
|
||||
{
|
||||
char quoted_db_buf[NAME_LEN * 2 + 3];
|
||||
char *quoted_db_name= quote_name(db_name, quoted_db_buf, FALSE);
|
||||
|
||||
CHARSET_INFO *db_cl= get_charset_by_name(db_cl_name, MYF(0));
|
||||
|
||||
if (!db_cl)
|
||||
@ -1171,7 +1177,7 @@ static int restore_db_collation(FILE *sql_file,
|
||||
|
||||
fprintf(sql_file,
|
||||
"ALTER DATABASE %s CHARACTER SET %s COLLATE %s %s\n",
|
||||
(const char *) db_name,
|
||||
(const char *) quoted_db_name,
|
||||
(const char *) db_cl->csname,
|
||||
(const char *) db_cl->name,
|
||||
(const char *) delimiter);
|
||||
|
@ -132,7 +132,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,
|
||||
@ -600,6 +600,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,
|
||||
@ -1148,8 +1150,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))
|
||||
|
@ -4463,13 +4463,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;
|
||||
@ -4484,8 +4485,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);
|
||||
@ -4527,7 +4529,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);
|
||||
}
|
||||
|
||||
@ -8034,13 +8036,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)))
|
||||
@ -9737,7 +9741,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
|
||||
@ -9757,7 +9761,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():
|
||||
|
14
configure.in
14
configure.in
@ -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.56], [], [mysql])
|
||||
AC_INIT([MySQL Server], [5.1.59], [], [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)
|
||||
|
||||
@ -2042,12 +2042,7 @@ MYSQL_TYPE_QSORT
|
||||
AC_FUNC_UTIME_NULL
|
||||
AC_FUNC_VPRINTF
|
||||
|
||||
AC_CHECK_DECLS([fdatasync],,,
|
||||
[
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
])
|
||||
AC_CHECK_DECLS([fdatasync, bzero])
|
||||
|
||||
AC_CHECK_FUNCS(alarm bfill bmove bsearch bzero \
|
||||
chsize cuserid fchmod fcntl \
|
||||
@ -2066,7 +2061,8 @@ AC_CHECK_FUNCS(alarm bfill bmove bsearch bzero \
|
||||
sighold sigset sigthreadmask port_create sleep \
|
||||
snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr \
|
||||
strtol strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr \
|
||||
posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd printstack)
|
||||
posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd printstack \
|
||||
fedisableexcept)
|
||||
|
||||
#
|
||||
#
|
||||
|
@ -1,6 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2005-2007 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Use is subject to license terms.
|
||||
Copyright (c) 2005, 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
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
|
||||
@ -34,7 +34,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;
|
||||
@ -187,6 +186,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,13 +1,14 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
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
|
||||
@ -821,7 +822,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 */
|
||||
}
|
||||
|
||||
|
||||
@ -844,7 +845,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*/
|
||||
|
@ -1,6 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2005-2007 MySQL AB, 2008, 2010 Sun Microsystems, Inc.
|
||||
Use is subject to license terms.
|
||||
Copyright (c) 2005, 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
|
||||
@ -128,7 +127,7 @@ void SetErrorString(unsigned long error, char* buffer)
|
||||
break;
|
||||
|
||||
case badVersion_error :
|
||||
strncpy(buffer, "protocl version mismatch", max);
|
||||
strncpy(buffer, "protocol version mismatch", max);
|
||||
break;
|
||||
|
||||
case compress_error :
|
||||
|
@ -1,6 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2005-2007 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
|
||||
Use is subject to license terms.
|
||||
Copyright (c) 2005, 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
|
||||
@ -308,7 +307,7 @@ SSL::SSL(SSL_CTX* ctx)
|
||||
SetError(YasslError(err));
|
||||
return;
|
||||
}
|
||||
else if (serverSide) {
|
||||
else if (serverSide && !(ctx->GetCiphers().setSuites_)) {
|
||||
// remove RSA or DSA suites depending on cert key type
|
||||
ProtocolVersion pv = secure_.get_connection().version_;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# 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 Library General Public
|
||||
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000,2004 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
|
||||
@ -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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
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
|
||||
@ -60,7 +60,7 @@
|
||||
# define bfill(A,B,C) memset((A),(C),(B))
|
||||
#endif
|
||||
|
||||
#if !defined(bzero) && !defined(HAVE_BZERO)
|
||||
#if !defined(bzero) && (!defined(HAVE_BZERO) || !defined(HAVE_DECL_BZERO))
|
||||
# define bzero(A,B) memset((A),0,(B))
|
||||
#endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2007 MySQL AB
|
||||
Use is subject to license terms.
|
||||
/*
|
||||
Copyright (c) 2007, 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
|
||||
@ -58,9 +58,12 @@ STATIC_INLINE uint my_count_bits(ulonglong v)
|
||||
#endif
|
||||
}
|
||||
|
||||
STATIC_INLINE uint my_count_bits_ushort(ushort v)
|
||||
STATIC_INLINE uint my_count_bits_uint32(uint32 v)
|
||||
{
|
||||
return _my_bits_nbits[v];
|
||||
return (uint) (uchar) (_my_bits_nbits[(uchar) v] +
|
||||
_my_bits_nbits[(uchar) (v >> 8)] +
|
||||
_my_bits_nbits[(uchar) (v >> 16)] +
|
||||
_my_bits_nbits[(uchar) (v >> 24)]);
|
||||
}
|
||||
|
||||
|
||||
@ -120,6 +123,6 @@ extern uint32 my_round_up_to_next_power(uint32 v);
|
||||
uint32 my_clear_highest_bit(uint32 v);
|
||||
uint32 my_reverse_bits(uint32 key);
|
||||
extern uint my_count_bits(ulonglong v);
|
||||
extern uint my_count_bits_ushort(ushort v);
|
||||
extern uint my_count_bits_uint32(uint32 v);
|
||||
#endif /* HAVE_INLINE */
|
||||
C_MODE_END
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2001, 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
|
||||
@ -151,9 +151,10 @@ bitmap_is_set(const MY_BITMAP *map,uint bit)
|
||||
|
||||
static inline my_bool bitmap_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2)
|
||||
{
|
||||
*(map1)->last_word_ptr|= (map1)->last_word_mask;
|
||||
*(map2)->last_word_ptr|= (map2)->last_word_mask;
|
||||
return memcmp((map1)->bitmap, (map2)->bitmap, 4*no_words_in_map((map1)))==0;
|
||||
if (memcmp(map1->bitmap, map2->bitmap, 4*(no_words_in_map(map1)-1)) != 0)
|
||||
return FALSE;
|
||||
return ((*map1->last_word_ptr | map1->last_word_mask) ==
|
||||
(*map2->last_word_ptr | map2->last_word_mask));
|
||||
}
|
||||
|
||||
#define bitmap_clear_all(MAP) \
|
||||
|
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 */
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2002, 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
|
||||
@ -61,7 +61,9 @@ struct my_option
|
||||
};
|
||||
|
||||
typedef my_bool (*my_get_one_option)(int, const struct my_option *, char *);
|
||||
typedef void (*my_error_reporter)(enum loglevel level, const char *format, ...);
|
||||
typedef void (*my_error_reporter)(enum loglevel level, const char *format, ...)
|
||||
ATTRIBUTE_FORMAT_FPTR(printf, 2, 3);
|
||||
|
||||
/**
|
||||
Used to retrieve a reference to the object (variable) that holds the value
|
||||
for the given option. For example, if var_type is GET_UINT, the function
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2001, 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
|
||||
@ -361,7 +361,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 */
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
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
|
||||
@ -32,8 +32,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
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2006 MySQL AB
|
||||
# Copyright (c) 2006, 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
|
||||
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# 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 version 2 GNU General Public License as
|
||||
@ -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
|
||||
|
@ -51,6 +51,23 @@ extern "C" void unireg_clear(int exit_code)
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
/*
|
||||
Wrapper error handler for embedded server to call client/server error
|
||||
handler based on whether thread is in client/server context
|
||||
*/
|
||||
|
||||
static int embedded_error_handler(uint error, const char *str, myf MyFlags)
|
||||
{
|
||||
DBUG_ENTER("embedded_error_handler");
|
||||
|
||||
/*
|
||||
If current_thd is NULL, it means restore_global has been called and
|
||||
thread is in client context, then call client error handler else call
|
||||
server error handler.
|
||||
*/
|
||||
DBUG_RETURN(current_thd ? my_message_sql(error, str, MyFlags):
|
||||
my_message_no_curses(error, str, MyFlags));
|
||||
}
|
||||
|
||||
/*
|
||||
Reads error information from the MYSQL_DATA and puts
|
||||
@ -107,7 +124,8 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
|
||||
if (mysql->status != MYSQL_STATUS_READY)
|
||||
{
|
||||
set_mysql_error(mysql, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate);
|
||||
return 1;
|
||||
result= 1;
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* Clear result variables */
|
||||
@ -147,6 +165,9 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
|
||||
#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
|
||||
thd->profiling.finish_current_query();
|
||||
#endif
|
||||
|
||||
end:
|
||||
thd->restore_globals();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -525,7 +546,10 @@ int init_embedded_server(int argc, char **argv, char **groups)
|
||||
return 1;
|
||||
}
|
||||
|
||||
error_handler_hook = my_message_sql;
|
||||
/*
|
||||
set error_handler_hook to embedded_error_handler wrapper.
|
||||
*/
|
||||
error_handler_hook= embedded_error_handler;
|
||||
|
||||
acl_error= 0;
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# 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 Library General Public
|
||||
@ -80,7 +80,6 @@ TEST_DIRS = t r include std_data std_data/parts collections \
|
||||
std_data/funcs_1 \
|
||||
extra/binlog_tests/ extra/rpl_tests \
|
||||
suite/binlog suite/binlog/t suite/binlog/r suite/binlog/std_data \
|
||||
suite/bugs suite/bugs/data suite/bugs/t suite/bugs/r \
|
||||
suite/federated \
|
||||
suite/funcs_1 suite/funcs_1/bitdata \
|
||||
suite/funcs_1/include suite/funcs_1/lib suite/funcs_1/r \
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
binlog.binlog_multi_engine # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
|
||||
|
||||
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
|
||||
funcs_1.is_columns_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
@ -12,20 +13,22 @@ funcs_1.ndb* # joro : NDB tests marked as experiment
|
||||
|
||||
funcs_2.ndb_charset # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
|
||||
innodb_plugin.* @solaris # Bug#56063 InnoDB Plugin mysql-tests fail on Solaris
|
||||
innodb_plugin.* @solaris # Bug#11763366 InnoDB Plugin mysql-tests fail on Solaris
|
||||
|
||||
main.ctype_gbk_binlog @solaris # Bug#11754407: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
|
||||
main.func_str @solaris # joro: Bug#11750406
|
||||
main.sp @solaris # joro : Bug#11761625
|
||||
main.query_cache_28249 # Bug#12584161 2009-03-25 main.query_cache_28249 fails sporadically
|
||||
|
||||
main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
|
||||
main.func_str @solaris # joro: Bug#40928
|
||||
main.sp @solaris # joro : Bug#54138
|
||||
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_innodb_bug28430 @solaris # Bug#11754425
|
||||
rpl.rpl_row_sp011 @solaris # Joro : Bug #11753919
|
||||
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
|
||||
rpl_ndb.rpl_ndb_log # Bug#11749433
|
||||
|
||||
stress.ddl_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
|
||||
@ -43,6 +46,3 @@ parts.partition_mgm_lc1_ndb # joro : NDB tests marked as experiment
|
||||
parts.partition_mgm_lc2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
parts.partition_syntax_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
main.gis-rtree # svoj: due to BUG#38965
|
||||
main.type_float # svoj: due to BUG#38965
|
||||
main.type_newdecimal # svoj: due to BUG#38965
|
||||
|
@ -343,6 +343,7 @@ SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
--echo # INSERT INTO t1 VALUES(2)
|
||||
--echo # foreign_key_checks=1 and unique_checks=1
|
||||
--echo # It should not change current session's variables, even error happens
|
||||
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
|
||||
--error 1062
|
||||
BINLOG '
|
||||
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||
|
@ -93,6 +93,7 @@ if (`SELECT @@global.binlog_format != 'ROW' OR @@global.slave_exec_mode = 'STRIC
|
||||
source include/wait_for_slave_sql_error.inc;
|
||||
let $err= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
||||
--echo Last_SQL_Error = $err (expected "duplicate key" error)
|
||||
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
|
||||
SELECT * FROM t1;
|
||||
|
||||
--echo ---- Resolve the conflict on the slave and restart SQL thread ----
|
||||
@ -137,6 +138,7 @@ connection slave;
|
||||
# replication continues.
|
||||
if (`SELECT @@global.binlog_format = 'ROW' AND @@global.slave_exec_mode = 'STRICT'`) {
|
||||
--echo ---- Wait until slave stops with an error ----
|
||||
call mtr.add_suppression("Can.t find record in .t1., Error_code: 1032");
|
||||
let $slave_sql_errno= 1032; # ER_KEY_NOT_FOUND
|
||||
source include/wait_for_slave_sql_error.inc;
|
||||
|
||||
|
@ -121,6 +121,16 @@ SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9,
|
||||
hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20;
|
||||
|
||||
#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.*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
|
||||
--echo * Select count and 20 rows from Slave *
|
||||
|
@ -766,6 +766,10 @@ RESET MASTER;
|
||||
connection slave;
|
||||
START SLAVE;
|
||||
|
||||
call mtr.add_suppression("Slave SQL.*Error .Unknown table .t6.. on query.* Error_code: 1051");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Duplicate column name .c6.. on query.* Error_code: 1060");
|
||||
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column . ...e mismatch.* Error_code: 1535");
|
||||
|
||||
--echo *** Master Data Insert ***
|
||||
connection master;
|
||||
set @b1 = 'b1b1b1b1';
|
||||
|
@ -63,6 +63,8 @@ eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
# 1062 = ER_DUP_ENTRY
|
||||
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
|
||||
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
|
||||
--let $slave_sql_errno= 1062
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
|
||||
|
@ -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
|
||||
|
@ -371,7 +371,9 @@ INSERT INTO t3 VALUES (1, "", 1);
|
||||
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
|
||||
|
||||
connection slave;
|
||||
# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
|
||||
# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
|
||||
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
|
||||
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: 1032");
|
||||
--let $slave_sql_errno= 1535
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error.inc
|
||||
|
@ -147,6 +147,7 @@ sync_slave_with_master;
|
||||
connection master;
|
||||
INSERT INTO t4 VALUES (4);
|
||||
connection slave;
|
||||
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* Error_code: 1535");
|
||||
--let $slave_skip_counter= 2
|
||||
--let $slave_sql_errno= 1535
|
||||
--let $show_slave_sql_error= 1
|
||||
|
@ -25,6 +25,7 @@ drop table t1;
|
||||
|
||||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.* error code=1062.*Error on slave:.* Error_code: 0");
|
||||
let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
|
||||
let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
|
||||
--echo Error: "$error" (expected different error codes on master and slave)
|
||||
|
@ -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
|
||||
|
||||
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# 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 General Public License as published by
|
||||
@ -68,7 +68,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"),
|
||||
@ -122,11 +122,9 @@ INSERT INTO global_suppressions VALUES
|
||||
("Slave: The incident LOST_EVENTS occured on the master"),
|
||||
("Slave: Unknown error.* 1105"),
|
||||
("Slave: Can't drop database.* database doesn't exist"),
|
||||
("Slave SQL:.*(Error_code: \[\[:digit:\]\]+|Query:.*)"),
|
||||
("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"),
|
||||
@ -139,55 +137,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 */
|
||||
@ -205,15 +169,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) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2007, 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,6 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (c) 2007, 2008 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
# Copyright (c) 2007, 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
|
||||
@ -29,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
|
||||
@ -159,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){
|
||||
|
@ -1,8 +1,7 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
# Copyright (c) 2007, 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
|
||||
@ -110,7 +109,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
|
||||
@ -150,7 +149,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");
|
||||
|
@ -32,6 +32,7 @@ our @EXPORT= qw(report_option mtr_print_line mtr_print_thick_line
|
||||
use mtr_match;
|
||||
use My::Platform;
|
||||
use POSIX qw[ _exit ];
|
||||
use IO::Handle qw[ flush ];
|
||||
require "mtr_io.pl";
|
||||
|
||||
my $tot_real_time= 0;
|
||||
@ -477,6 +478,7 @@ sub mtr_warning (@) {
|
||||
|
||||
# Print error to screen and then exit
|
||||
sub mtr_error (@) {
|
||||
IO::Handle::flush(\*STDOUT) if IS_WINDOWS;
|
||||
print STDERR _name(). _timestamp().
|
||||
"mysql-test-run: *** ERROR: ". join(" ", @_). "\n";
|
||||
if (IS_WINDOWS)
|
||||
|
@ -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
|
||||
|
@ -1345,4 +1345,33 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (a TEXT, id INT, b INT);
|
||||
ALTER TABLE t1 DROP COLUMN a, ADD COLUMN c TEXT FIRST;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Test for bug #12652385 - "61493: REORDERING COLUMNS TO POSITION
|
||||
# FIRST CAN CAUSE DATA TO BE CORRUPTED".
|
||||
#
|
||||
drop table if exists t1;
|
||||
# Use MyISAM engine as the fact that InnoDB doesn't support
|
||||
# in-place ALTER TABLE in cases when columns are being renamed
|
||||
# hides some bugs.
|
||||
create table t1 (i int, j int) engine=myisam;
|
||||
insert into t1 value (1, 2);
|
||||
# First, test for original problem described in the bug report.
|
||||
select * from t1;
|
||||
i j
|
||||
1 2
|
||||
# Change of column order by the below ALTER TABLE statement should
|
||||
# affect both column names and column contents.
|
||||
alter table t1 modify column j int first;
|
||||
select * from t1;
|
||||
j i
|
||||
2 1
|
||||
# Now test for similar problem with the same root.
|
||||
# The below ALTER TABLE should change not only the name but
|
||||
# also the value for the last column of the table.
|
||||
alter table t1 drop column i, add column k int default 0;
|
||||
select * from t1;
|
||||
j k
|
||||
2 0
|
||||
# Clean-up.
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
|
@ -123,3 +123,29 @@ CREATE TABLE t2 SELECT 1 FROM t1, t1 t3 GROUP BY t3.a PROCEDURE ANALYSE();
|
||||
ERROR HY000: Incorrect usage of PROCEDURE and non-SELECT
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# Bug#11765202: Dbug_violation_helper::~Dbug_violation_helper(): Assertion `!_entered' failed.
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
CREATE TABLE t1 (a VARCHAR(2) CHARSET UTF8 NOT NULL);
|
||||
INSERT INTO t1 VALUES ('e'),('e'),('e-');
|
||||
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;
|
||||
|
12
mysql-test/r/archive_debug.result
Normal file
12
mysql-test/r/archive_debug.result
Normal file
@ -0,0 +1,12 @@
|
||||
#
|
||||
# BUG#12402794 - 60976: CRASH, VALGRIND WARNING AND MEMORY LEAK
|
||||
# WITH PARTITIONED ARCHIVE TABLES
|
||||
#
|
||||
CREATE TABLE t1(a INT) ENGINE=ARCHIVE;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
SET SESSION debug='d,simulate_archive_open_failure';
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check error Corrupt
|
||||
SET SESSION debug=DEFAULT;
|
||||
DROP TABLE t1;
|
@ -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
|
||||
|
@ -238,3 +238,6 @@ select a from t1 where a like "abcdefgh
|
||||
a
|
||||
abcdefghá
|
||||
drop table t1;
|
||||
set global LC_MESSAGES=convert((@@global.log_bin_trust_function_creators)
|
||||
using cp1250);
|
||||
ERROR HY000: Unknown system variable 'LC_MESSAGES'
|
||||
|
@ -375,6 +375,8 @@ FD FD FD D18D FD
|
||||
FE FE FE D18E FE
|
||||
FF FF FF D18F FF
|
||||
DROP TABLE t1;
|
||||
set global LC_TIME_NAMES=convert((-8388608) using cp1251);
|
||||
ERROR HY000: Unknown locale: '-8388608'
|
||||
#
|
||||
# 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.
|
||||
|
2
mysql-test/r/ctype_eucjpms.result
Executable file → Normal file
2
mysql-test/r/ctype_eucjpms.result
Executable file → Normal file
@ -9859,3 +9859,5 @@ hex(convert(_eucjpms 0xA5FE41 using ucs2))
|
||||
select hex(convert(_eucjpms 0x8FABF841 using ucs2));
|
||||
hex(convert(_eucjpms 0x8FABF841 using ucs2))
|
||||
003F0041
|
||||
set global LC_TIME_NAMES=convert((convert((0x63) using eucjpms)) using utf8);
|
||||
ERROR HY000: Unknown locale: 'c'
|
||||
|
@ -218,4 +218,10 @@ hex(a) hex(lower(a)) hex(upper(a))
|
||||
8352835E 8352835E 8352835E
|
||||
8372835E 8372835E 8372835E
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11766519 - Bug#59648: MY_STRTOLL10_MB2: ASSERTION `(*ENDPTR - S) % 2 == 0' FAILED.
|
||||
#
|
||||
SELECT QUOTE('ƒ\');
|
||||
QUOTE('ƒ\')
|
||||
'ƒ\'
|
||||
# End of 5.1 tests
|
||||
|
@ -990,8 +990,8 @@ old_password(name)
|
||||
????????
|
||||
select quote(name) from bug20536;
|
||||
quote(name)
|
||||
????????
|
||||
????????????????
|
||||
'test1'
|
||||
'\'test\\_2\''
|
||||
drop table bug20536;
|
||||
set names ucs2;
|
||||
ERROR 42000: Variable 'character_set_client' can't be set to the value of 'ucs2'
|
||||
@ -1238,4 +1238,15 @@ CREATE VIEW v1 AS SELECT 1 from t1
|
||||
WHERE t1.b <=> (SELECT a FROM t1 WHERE a < SOME(SELECT '1'));
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#59648 my_strtoll10_mb2: Assertion `(*endptr - s) % 2 == 0' failed.
|
||||
#
|
||||
SELECT HEX(CHAR(COALESCE(NULL, CHAR(COUNT('%s') USING ucs2), 1, @@global.license, NULL) USING cp850));
|
||||
HEX(CHAR(COALESCE(NULL, CHAR(COUNT('%s') USING ucs2), 1, @@global.license, NULL) USING cp850))
|
||||
00
|
||||
SELECT CONVERT(QUOTE(CHAR(0xf5 using ucs2)), SIGNED);
|
||||
CONVERT(QUOTE(CHAR(0xf5 using ucs2)), SIGNED)
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
End of 5.0 tests
|
||||
|
@ -724,7 +724,7 @@ utf8_general_ci utf8_general_ci
|
||||
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 */;
|
||||
|
||||
USE `mysqltest1`;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
@ -757,8 +757,8 @@ DELIMITER ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
@ -791,7 +791,7 @@ DELIMITER ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
|
||||
---> Dumping mysqltest1 to ddl_i18n_koi8r.sp.mysqltest1.sql
|
||||
|
||||
@ -800,7 +800,7 @@ ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 */;
|
||||
|
||||
USE `mysqltest2`;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
@ -833,8 +833,8 @@ DELIMITER ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
@ -867,7 +867,7 @@ DELIMITER ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
|
||||
---> Dumping mysqltest2 to ddl_i18n_koi8r.sp.mysqltest2.sql
|
||||
|
||||
@ -1742,7 +1742,7 @@ CREATE TABLE `t1` (
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
INSERT INTO `t1` VALUES (1),(0),(1);
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
@ -1770,8 +1770,8 @@ DELIMITER ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
@ -1799,7 +1799,7 @@ DELIMITER ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
|
||||
---> Dumping mysqltest1 to ddl_i18n_koi8r.triggers.mysqltest1.sql
|
||||
|
||||
@ -1821,7 +1821,7 @@ CREATE TABLE `t1` (
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
INSERT INTO `t1` VALUES (1),(0),(1);
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
@ -1849,8 +1849,8 @@ DELIMITER ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
@ -1878,7 +1878,7 @@ DELIMITER ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
|
||||
---> Dumping mysqltest2 to ddl_i18n_koi8r.triggers.mysqltest2.sql
|
||||
|
||||
@ -2486,7 +2486,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER
|
||||
USE `mysqltest1`;
|
||||
/*!50106 SET @save_time_zone= @@TIME_ZONE */ ;
|
||||
DELIMITER ;;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
|
||||
@ -2512,9 +2512,9 @@ END */ ;;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;;
|
||||
DELIMITER ;;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
|
||||
@ -2540,7 +2540,7 @@ END */ ;;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;;
|
||||
DELIMITER ;
|
||||
/*!50106 SET TIME_ZONE= @save_time_zone */ ;
|
||||
|
||||
@ -2553,7 +2553,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER
|
||||
USE `mysqltest2`;
|
||||
/*!50106 SET @save_time_zone= @@TIME_ZONE */ ;
|
||||
DELIMITER ;;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
|
||||
@ -2579,9 +2579,9 @@ END */ ;;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET cp866 COLLATE cp866_general_ci ;;
|
||||
DELIMITER ;;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
|
||||
@ -2607,7 +2607,7 @@ END */ ;;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET cp866 COLLATE cp866_general_ci ;;
|
||||
DELIMITER ;
|
||||
/*!50106 SET TIME_ZONE= @save_time_zone */ ;
|
||||
|
||||
|
@ -724,7 +724,7 @@ utf8_general_ci utf8_general_ci
|
||||
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 */;
|
||||
|
||||
USE `mysqltest1`;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
@ -757,8 +757,8 @@ DELIMITER ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
@ -791,7 +791,7 @@ DELIMITER ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
|
||||
---> Dumping mysqltest1 to ddl_i18n_utf8sp.mysqltest1.sql
|
||||
|
||||
@ -800,7 +800,7 @@ ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 */;
|
||||
|
||||
USE `mysqltest2`;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
@ -833,8 +833,8 @@ DELIMITER ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
@ -867,7 +867,7 @@ DELIMITER ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
|
||||
---> Dumping mysqltest2 to ddl_i18n_utf8sp.mysqltest2.sql
|
||||
|
||||
@ -1742,7 +1742,7 @@ CREATE TABLE `t1` (
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
INSERT INTO `t1` VALUES (1),(0),(1);
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
@ -1770,8 +1770,8 @@ DELIMITER ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
@ -1799,7 +1799,7 @@ DELIMITER ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
|
||||
---> Dumping mysqltest1 to ddl_i18n_utf8triggers.mysqltest1.sql
|
||||
|
||||
@ -1821,7 +1821,7 @@ CREATE TABLE `t1` (
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
INSERT INTO `t1` VALUES (1),(0),(1);
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
@ -1849,8 +1849,8 @@ DELIMITER ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
@ -1878,7 +1878,7 @@ DELIMITER ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||
|
||||
---> Dumping mysqltest2 to ddl_i18n_utf8triggers.mysqltest2.sql
|
||||
|
||||
@ -2486,7 +2486,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER
|
||||
USE `mysqltest1`;
|
||||
/*!50106 SET @save_time_zone= @@TIME_ZONE */ ;
|
||||
DELIMITER ;;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
|
||||
@ -2512,9 +2512,9 @@ END */ ;;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;;
|
||||
DELIMITER ;;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
|
||||
@ -2540,7 +2540,7 @@ END */ ;;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;;
|
||||
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;;
|
||||
ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;;
|
||||
DELIMITER ;
|
||||
/*!50106 SET TIME_ZONE= @save_time_zone */ ;
|
||||
|
||||
@ -2553,7 +2553,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER
|
||||
USE `mysqltest2`;
|
||||
/*!50106 SET @save_time_zone= @@TIME_ZONE */ ;
|
||||
DELIMITER ;;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
|
||||
@ -2579,9 +2579,9 @@ END */ ;;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET cp866 COLLATE cp866_general_ci ;;
|
||||
DELIMITER ;;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
|
||||
@ -2607,7 +2607,7 @@ END */ ;;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;;
|
||||
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;;
|
||||
ALTER DATABASE `mysqltest2` CHARACTER SET cp866 COLLATE cp866_general_ci ;;
|
||||
DELIMITER ;
|
||||
/*!50106 SET TIME_ZONE= @save_time_zone */ ;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -419,7 +419,7 @@ SET TIME_ZONE= '+04:00';
|
||||
ALTER EVENT e1 DO SELECT 2;
|
||||
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 e1 root@localhost -03:00 RECURRING NULL 1 DAY 2005-12-31 20:58:59 2030-01-03 00:00:00 ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
events_test e1 root@localhost -03:00 RECURRING NULL 1 DAY 2005-12-31 20:58:59 2030-01-03 00:00:00 DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
DROP EVENT e1;
|
||||
SET TIME_ZONE='+05:00';
|
||||
CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO
|
||||
@ -535,6 +535,7 @@ DROP EVENT e3;
|
||||
DROP EVENT e2;
|
||||
DROP EVENT e1;
|
||||
SET TIME_ZONE=@save_time_zone;
|
||||
SET TIMESTAMP=DEFAULT;
|
||||
drop event if exists new_event;
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY 0 SECOND DO SELECT 1;
|
||||
ERROR HY000: INTERVAL is either not positive or too big
|
||||
@ -747,6 +748,68 @@ 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;
|
||||
#
|
||||
# Bug#12546938 (formerly known as bug#61005):
|
||||
# CREATE IF NOT EXIST EVENT WILL CREATE MULTIPLE RUNNING EVENTS
|
||||
#
|
||||
USE events_test;
|
||||
SET GLOBAL event_scheduler = ON;
|
||||
DROP TABLE IF EXISTS table_bug12546938;
|
||||
DROP EVENT IF EXISTS event_Bug12546938;
|
||||
CREATE TABLE table_bug12546938 (i INT);
|
||||
# Create an event which will be executed with a small delay
|
||||
# and won't be automatically dropped after that.
|
||||
CREATE EVENT event_Bug12546938
|
||||
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND ON COMPLETION PRESERVE
|
||||
ENABLE DO
|
||||
BEGIN
|
||||
INSERT INTO table_bug12546938 VALUES(1);
|
||||
END
|
||||
|
|
||||
# Now try to create the same event using CREATE EVENT IF NOT EXISTS.
|
||||
# A warning should be emitted. A new event should not be created nor
|
||||
# the old event should be re-executed.
|
||||
CREATE EVENT IF NOT EXISTS event_bug12546938
|
||||
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND ON COMPLETION PRESERVE
|
||||
ENABLE DO
|
||||
BEGIN
|
||||
INSERT INTO table_bug12546938 VALUES (1);
|
||||
END
|
||||
|
|
||||
Warnings:
|
||||
Note 1537 Event 'event_bug12546938' already exists
|
||||
# Wait until at least one instance of event is executed.
|
||||
# Check that only one instance of our event was executed.
|
||||
SELECT COUNT(*) FROM table_bug12546938;
|
||||
COUNT(*)
|
||||
1
|
||||
# Clean-up.
|
||||
DROP EVENT IF EXISTS event_Bug12546938;
|
||||
DROP TABLE table_bug12546938;
|
||||
SET GLOBAL EVENT_SCHEDULER = OFF;
|
||||
DROP DATABASE IF EXISTS event_test11764334;
|
||||
CREATE DATABASE event_test11764334;
|
||||
USE event_test11764334;
|
||||
CREATE EVENT ev1 ON SCHEDULE EVERY 3 SECOND DISABLE DO SELECT 1;
|
||||
SHOW EVENTS IN event_test11764334 WHERE NAME='ev1';
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
event_test11764334 ev1 root@localhost SYSTEM RECURRING NULL 3 SECOND # # DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
ALTER EVENT ev1 ON SCHEDULE EVERY 4 SECOND;
|
||||
SHOW EVENTS IN event_test11764334 WHERE NAME='ev1';
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
event_test11764334 ev1 root@localhost SYSTEM RECURRING NULL 4 SECOND # # DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
DROP EVENT ev1;
|
||||
DROP DATABASE event_test11764334;
|
||||
USE test;
|
||||
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;
|
||||
|
19
mysql-test/r/func_encrypt_ucs2.result
Normal file
19
mysql-test/r/func_encrypt_ucs2.result
Normal file
@ -0,0 +1,19 @@
|
||||
#
|
||||
# Bug#59648 my_strtoll10_mb2: Assertion `(*endptr - s) % 2 == 0' failed.
|
||||
#
|
||||
SELECT CHAR_LENGTH(DES_ENCRYPT(0, CHAR('1' USING ucs2)));
|
||||
CHAR_LENGTH(DES_ENCRYPT(0, CHAR('1' USING ucs2)))
|
||||
9
|
||||
SELECT CONVERT(DES_ENCRYPT(0, CHAR('1' USING ucs2)),UNSIGNED);
|
||||
CONVERT(DES_ENCRYPT(0, CHAR('1' USING ucs2)),UNSIGNED)
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: '?T?iK?j??'
|
||||
SELECT CHAR_LENGTH(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' USING ucs2)));
|
||||
CHAR_LENGTH(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' USING ucs2)))
|
||||
4
|
||||
SELECT CONVERT(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' using ucs2)), UNSIGNED);
|
||||
CONVERT(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' using ucs2)), UNSIGNED)
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'test'
|
@ -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,39 @@ 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'
|
||||
#
|
||||
# Bug#12392636 ASSERTION FAILED: SCALE >= 0 && PRECISION > 0 && SCALE <= PRECISION
|
||||
#
|
||||
SELECT SUM(DISTINCT (TRUNCATE((.1), NULL)));
|
||||
SUM(DISTINCT (TRUNCATE((.1), NULL)))
|
||||
NULL
|
||||
End of 5.1 tests
|
||||
|
@ -1375,4 +1375,55 @@ 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
|
||||
#
|
||||
# Bug#12403504 AFTER FIX FOR #11889186 : ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0
|
||||
#
|
||||
SELECT MAKEDATE(11111111,1);
|
||||
MAKEDATE(11111111,1)
|
||||
NULL
|
||||
SELECT WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1);
|
||||
WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1)
|
||||
NULL
|
||||
End of 5.1 tests
|
||||
|
@ -1549,3 +1549,30 @@ HANDLER t1 READ a NEXT;
|
||||
HANDLER t1 CLOSE;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests.
|
||||
#
|
||||
# Bug #57323/11764487: myisam corruption with insert ignore
|
||||
# and invalid spatial data
|
||||
#
|
||||
CREATE TABLE t1(a LINESTRING NOT NULL, b GEOMETRY NOT NULL,
|
||||
SPATIAL KEY(a), SPATIAL KEY(b)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(GEOMFROMTEXT("point (0 0)"), GEOMFROMTEXT("point (1 1)"));
|
||||
INSERT IGNORE INTO t1 SET a=GEOMFROMTEXT("point (-6 0)"), b=GEOMFROMTEXT("error");
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
INSERT IGNORE INTO t1 SET a=GEOMFROMTEXT("point (-6 0)"), b=NULL;
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
SELECT ASTEXT(a), ASTEXT(b) FROM t1;
|
||||
ASTEXT(a) ASTEXT(b)
|
||||
POINT(0 0) POINT(1 1)
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a INT NOT NULL, b GEOMETRY NOT NULL,
|
||||
KEY(a), SPATIAL KEY(b)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(0, GEOMFROMTEXT("point (1 1)"));
|
||||
INSERT IGNORE INTO t1 SET a=0, b=GEOMFROMTEXT("error");
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
INSERT IGNORE INTO t1 SET a=1, b=NULL;
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
SELECT a, ASTEXT(b) FROM t1;
|
||||
a ASTEXT(b)
|
||||
0 POINT(1 1)
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -1034,4 +1034,45 @@ p
|
||||
NULL
|
||||
NULL
|
||||
drop table t1;
|
||||
#
|
||||
# Test for bug #59888 "debug assertion when attempt to create spatial index
|
||||
# on char > 31 bytes".
|
||||
#
|
||||
create table t1(a char(32) not null) engine=myisam;
|
||||
create spatial index i on t1 (a);
|
||||
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
|
||||
|
@ -1855,4 +1855,40 @@ ON 1 WHERE t2.f1 > 1 GROUP BY t2.f1;
|
||||
COUNT(*)
|
||||
2
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#59839: Aggregation followed by subquery yields wrong result
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
b INT,
|
||||
c INT,
|
||||
KEY (a, b)
|
||||
);
|
||||
INSERT INTO t1 VALUES
|
||||
( 1, 1, 1 ),
|
||||
( 1, 2, 2 ),
|
||||
( 1, 3, 3 ),
|
||||
( 1, 4, 6 ),
|
||||
( 1, 5, 5 ),
|
||||
( 1, 9, 13 ),
|
||||
( 2, 1, 6 ),
|
||||
( 2, 2, 7 ),
|
||||
( 2, 3, 8 );
|
||||
EXPLAIN
|
||||
SELECT a, AVG(t1.b),
|
||||
(SELECT t11.c FROM t1 t11 WHERE t11.a = t1.a AND t11.b = AVG(t1.b)) AS t11c,
|
||||
(SELECT t12.c FROM t1 t12 WHERE t12.a = t1.a AND t12.b = AVG(t1.b)) AS t12c
|
||||
FROM t1 GROUP BY a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 index NULL a 10 NULL 9 Using index
|
||||
3 DEPENDENT SUBQUERY t12 ref a a 10 func,func 2 Using where
|
||||
2 DEPENDENT SUBQUERY t11 ref a a 10 func,func 2 Using where
|
||||
SELECT a, AVG(t1.b),
|
||||
(SELECT t11.c FROM t1 t11 WHERE t11.a = t1.a AND t11.b = AVG(t1.b)) AS t11c,
|
||||
(SELECT t12.c FROM t1 t12 WHERE t12.a = t1.a AND t12.b = AVG(t1.b)) AS t12c
|
||||
FROM t1 GROUP BY a;
|
||||
a AVG(t1.b) t11c t12c
|
||||
1 4.0000 6 6
|
||||
2 2.0000 7 7
|
||||
DROP TABLE t1;
|
||||
# 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
|
||||
|
366
mysql-test/r/implicit_char_to_num_conversion.result
Normal file
366
mysql-test/r/implicit_char_to_num_conversion.result
Normal file
@ -0,0 +1,366 @@
|
||||
DROP TABLE IF EXISTS t5;
|
||||
CREATE TABLE t5(c1 BIT(2) PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (0), (1), (2);
|
||||
SELECT HEX(c1) FROM t5 ORDER BY c1;
|
||||
HEX(c1)
|
||||
0
|
||||
1
|
||||
2
|
||||
SELECT HEX(c1) FROM t5 WHERE c1 = b'1' ORDER BY c1;
|
||||
HEX(c1)
|
||||
1
|
||||
SELECT HEX(c1) FROM t5 WHERE c1 <=> b'1' ORDER BY c1;
|
||||
HEX(c1)
|
||||
1
|
||||
SELECT HEX(c1) FROM t5 WHERE c1 != b'1' ORDER BY c1;
|
||||
HEX(c1)
|
||||
0
|
||||
2
|
||||
SELECT HEX(c1) FROM t5 WHERE c1 >= '1' ORDER BY c1;
|
||||
HEX(c1)
|
||||
1
|
||||
2
|
||||
SELECT HEX(c1) FROM t5 WHERE c1 <= '1' ORDER BY c1;
|
||||
HEX(c1)
|
||||
0
|
||||
1
|
||||
SELECT HEX(c1) FROM t5 WHERE c1 < '1' ORDER BY c1;
|
||||
HEX(c1)
|
||||
0
|
||||
SELECT HEX(c1) FROM t5 WHERE c1 > '0' ORDER BY c1;
|
||||
HEX(c1)
|
||||
1
|
||||
2
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 FLOAT(5,2) PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (95.95), (-10.10), (1), (0);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-10.10
|
||||
0.00
|
||||
1.00
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 >= '95' ORDER BY c1;
|
||||
c1
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 <= '10.10' ORDER BY c1;
|
||||
c1
|
||||
-10.10
|
||||
0.00
|
||||
1.00
|
||||
SELECT c1 FROM t5 WHERE c1 != '1' ORDER BY c1;
|
||||
c1
|
||||
-10.10
|
||||
0.00
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 < '1' ORDER BY c1;
|
||||
c1
|
||||
-10.10
|
||||
0.00
|
||||
SELECT c1 FROM t5 WHERE c1 > '0' ORDER BY c1;
|
||||
c1
|
||||
1.00
|
||||
95.95
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 TINYINT PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (95), (10),(11),(-8);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-8
|
||||
10
|
||||
11
|
||||
95
|
||||
SELECT c1 FROM t5 WHERE c1 = '10' ORDER BY c1;
|
||||
c1
|
||||
10
|
||||
SELECT c1 FROM t5 WHERE c1 <=> '10' ORDER BY c1;
|
||||
c1
|
||||
10
|
||||
SELECT c1 FROM t5 WHERE c1 >= '95' ORDER BY c1;
|
||||
c1
|
||||
95
|
||||
SELECT c1 FROM t5 WHERE c1 <= '11' ORDER BY c1;
|
||||
c1
|
||||
-8
|
||||
10
|
||||
11
|
||||
SELECT c1 FROM t5 WHERE c1 != '-8' ORDER BY c1;
|
||||
c1
|
||||
10
|
||||
11
|
||||
95
|
||||
SELECT c1 FROM t5 WHERE c1 < '11' ORDER BY c1;
|
||||
c1
|
||||
-8
|
||||
10
|
||||
SELECT c1 FROM t5 WHERE c1 > '10' ORDER BY c1;
|
||||
c1
|
||||
11
|
||||
95
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 SMALLINT PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (395), (-200), (100), (111);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-200
|
||||
100
|
||||
111
|
||||
395
|
||||
SELECT c1 FROM t5 WHERE c1 = '100' ORDER BY c1;
|
||||
c1
|
||||
100
|
||||
SELECT c1 FROM t5 WHERE c1 <=> '100' ORDER BY c1;
|
||||
c1
|
||||
100
|
||||
SELECT c1 FROM t5 WHERE c1 >= '395' ORDER BY c1;
|
||||
c1
|
||||
395
|
||||
SELECT c1 FROM t5 WHERE c1 <= '-200' ORDER BY c1;
|
||||
c1
|
||||
-200
|
||||
SELECT c1 FROM t5 WHERE c1 != '100' ORDER BY c1;
|
||||
c1
|
||||
-200
|
||||
111
|
||||
395
|
||||
SELECT c1 FROM t5 WHERE c1 < '111' ORDER BY c1;
|
||||
c1
|
||||
-200
|
||||
100
|
||||
SELECT c1 FROM t5 WHERE c1 > '111' ORDER BY c1;
|
||||
c1
|
||||
395
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 MEDIUMINT PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (-8388607), (311),(215),(88608);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-8388607
|
||||
215
|
||||
311
|
||||
88608
|
||||
SELECT c1 FROM t5 WHERE c1 = '311' ORDER BY c1;
|
||||
c1
|
||||
311
|
||||
SELECT c1 FROM t5 WHERE c1 <=> '311' ORDER BY c1;
|
||||
c1
|
||||
311
|
||||
SELECT c1 FROM t5 WHERE c1 >= '215' ORDER BY c1;
|
||||
c1
|
||||
215
|
||||
311
|
||||
88608
|
||||
SELECT c1 FROM t5 WHERE c1 <= '88608' ORDER BY c1;
|
||||
c1
|
||||
-8388607
|
||||
215
|
||||
311
|
||||
88608
|
||||
SELECT c1 FROM t5 WHERE c1 != '-8388607' ORDER BY c1;
|
||||
c1
|
||||
215
|
||||
311
|
||||
88608
|
||||
SELECT c1 FROM t5 WHERE c1 < '215' ORDER BY c1;
|
||||
c1
|
||||
-8388607
|
||||
SELECT c1 FROM t5 WHERE c1 > '215' ORDER BY c1;
|
||||
c1
|
||||
311
|
||||
88608
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 INT PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (-2147483647), (1011),(15),(9388607);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-2147483647
|
||||
15
|
||||
1011
|
||||
9388607
|
||||
SELECT c1 FROM t5 WHERE c1 = '9388607' ORDER BY c1;
|
||||
c1
|
||||
9388607
|
||||
SELECT c1 FROM t5 WHERE c1 <=> '9388607' ORDER BY c1;
|
||||
c1
|
||||
9388607
|
||||
SELECT c1 FROM t5 WHERE c1 >= '15' ORDER BY c1;
|
||||
c1
|
||||
15
|
||||
1011
|
||||
9388607
|
||||
SELECT c1 FROM t5 WHERE c1 <= '1011' ORDER BY c1;
|
||||
c1
|
||||
-2147483647
|
||||
15
|
||||
1011
|
||||
SELECT c1 FROM t5 WHERE c1 != '-2147483647' ORDER BY c1;
|
||||
c1
|
||||
15
|
||||
1011
|
||||
9388607
|
||||
SELECT c1 FROM t5 WHERE c1 < '15' ORDER BY c1;
|
||||
c1
|
||||
-2147483647
|
||||
SELECT c1 FROM t5 WHERE c1 > '15' ORDER BY c1;
|
||||
c1
|
||||
1011
|
||||
9388607
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 BIGINT PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (-9223372036854775807), (12011),(500),(3372036854775808);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-9223372036854775807
|
||||
500
|
||||
12011
|
||||
3372036854775808
|
||||
SELECT c1 FROM t5 WHERE c1 = '-9223372036854775807' ORDER BY c1;
|
||||
c1
|
||||
-9223372036854775807
|
||||
SELECT c1 FROM t5 WHERE c1 <=> '-9223372036854775807' ORDER BY c1;
|
||||
c1
|
||||
-9223372036854775807
|
||||
SELECT c1 FROM t5 WHERE c1 >= '12011' ORDER BY c1;
|
||||
c1
|
||||
12011
|
||||
3372036854775808
|
||||
SELECT c1 FROM t5 WHERE c1 <= '500' ORDER BY c1;
|
||||
c1
|
||||
-9223372036854775807
|
||||
500
|
||||
SELECT c1 FROM t5 WHERE c1 != '3372036854775808' ORDER BY c1;
|
||||
c1
|
||||
-9223372036854775807
|
||||
500
|
||||
12011
|
||||
SELECT c1 FROM t5 WHERE c1 < '12011' ORDER BY c1;
|
||||
c1
|
||||
-9223372036854775807
|
||||
500
|
||||
SELECT c1 FROM t5 WHERE c1 > '12011' ORDER BY c1;
|
||||
c1
|
||||
3372036854775808
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 DOUBLE(5,2) PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (95.95), (11.11),(5),(-908.92);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 = '11.11' ORDER BY c1;
|
||||
c1
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 <=> '11.11' ORDER BY c1;
|
||||
c1
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 >= '5' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 <= '95.95' ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 != '-908.92' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 < '95.95' ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 > '-908.92' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 NUMERIC(5,2) PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (95.95), (11.11),(5),(-908.92);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 = '11.11' ORDER BY c1;
|
||||
c1
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 <=> '11.11' ORDER BY c1;
|
||||
c1
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 >= '5' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 <= '95.95' ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 != '-908.92' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 < '95.95' ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 > '-908.92' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 DECIMAL(5,2) PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (95.95), (11.11),(5),(-908.92);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 = '11.11' ORDER BY c1;
|
||||
c1
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 <=> '11.11' ORDER BY c1;
|
||||
c1
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 >= '5' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 <= '95.95' ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 != '-908.92' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 < '95.95' ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 > '-908.92' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
DROP TABLE t5;
|
@ -841,7 +841,7 @@ SET max_heap_table_size = 16384;
|
||||
SET @old_myisam_data_pointer_size = @@myisam_data_pointer_size;
|
||||
SET GLOBAL myisam_data_pointer_size = 2;
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
|
||||
call mtr.add_suppression("mysqld: The table '.*#sql.*' is full");
|
||||
call mtr.add_suppression("mysqld.*: The table '.*#sql.*' is full");
|
||||
INSERT IGNORE INTO t1 SELECT t1.a FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6,t1 t7;
|
||||
Got one of the listed errors
|
||||
SET GLOBAL myisam_data_pointer_size = @old_myisam_data_pointer_size;
|
||||
|
@ -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;
|
||||
|
@ -4591,5 +4591,42 @@ CREATE TABLE `comment_table` (i INT COMMENT 'FIELD COMMENT') COMMENT = 'TABLE CO
|
||||
</mysqldump>
|
||||
DROP TABLE `comment_table`;
|
||||
#
|
||||
# BUG#11766310 : 59398: MYSQLDUMP 5.1 CAN'T HANDLE A DASH ("-") IN
|
||||
# DATABASE NAMES IN ALTER DATABASE
|
||||
#
|
||||
CREATE DATABASE `test-database`;
|
||||
USE `test-database`;
|
||||
CREATE TABLE `test` (`c1` VARCHAR(10)) ENGINE=MYISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
CREATE TRIGGER `trig` BEFORE INSERT ON `test` FOR EACH ROW BEGIN
|
||||
END |
|
||||
ALTER DATABASE `test-database` CHARACTER SET latin1 COLLATE latin1_swedish_ci;
|
||||
ALTER DATABASE `test-database` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `test` (
|
||||
`c1` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
ALTER DATABASE `test-database` CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
/*!50003 SET character_set_client = latin1 */ ;
|
||||
/*!50003 SET character_set_results = latin1 */ ;
|
||||
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = '' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trig` BEFORE INSERT ON `test` FOR EACH ROW BEGIN
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!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'
|
||||
|
@ -1,5 +1,72 @@
|
||||
drop table if exists t1, t2;
|
||||
#
|
||||
# Bug#11765667: bug#58655: ASSERTION FAILED,
|
||||
# SERVER CRASHES WITH MYSQLD GOT SIGNAL 6
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||
dt DATE, st VARCHAR(255), uid INT,
|
||||
id2nd LONGBLOB, filler VARCHAR(255), PRIMARY KEY(id, dt)
|
||||
);
|
||||
INSERT INTO t1 (dt, st, uid, id2nd, filler) VALUES
|
||||
('1991-03-14', 'Initial Insert', 200, 1234567, 'No Data'),
|
||||
('1991-02-26', 'Initial Insert', 201, 1234567, 'No Data'),
|
||||
('1992-03-16', 'Initial Insert', 234, 1234567, 'No Data'),
|
||||
('1992-07-02', 'Initial Insert', 287, 1234567, 'No Data'),
|
||||
('1991-05-26', 'Initial Insert', 256, 1234567, 'No Data'),
|
||||
('1991-04-25', 'Initial Insert', 222, 1234567, 'No Data'),
|
||||
('1993-03-12', 'Initial Insert', 267, 1234567, 'No Data'),
|
||||
('1993-03-14', 'Initial Insert', 291, 1234567, 'No Data'),
|
||||
('1991-12-20', 'Initial Insert', 298, 1234567, 'No Data'),
|
||||
('1994-10-31', 'Initial Insert', 220, 1234567, 'No Data');
|
||||
ALTER TABLE t1 PARTITION BY LIST (YEAR(dt)) (
|
||||
PARTITION d1 VALUES IN (1991, 1994),
|
||||
PARTITION d2 VALUES IN (1993),
|
||||
PARTITION d3 VALUES IN (1992, 1995, 1996)
|
||||
);
|
||||
INSERT INTO t1 (dt, st, uid, id2nd, filler) VALUES
|
||||
('1991-07-14', 'After Partitioning Insert', 299, 1234567, 'Insert row');
|
||||
UPDATE t1 SET filler='Updating the row' WHERE uid=298;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#59297: Can't find record in 'tablename' on update inner join
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
a char(2) NOT NULL,
|
||||
b char(2) NOT NULL,
|
||||
c int(10) unsigned NOT NULL,
|
||||
d varchar(255) DEFAULT NULL,
|
||||
e varchar(1000) DEFAULT NULL,
|
||||
PRIMARY KEY (a, b, c),
|
||||
KEY (a),
|
||||
KEY (a, b)
|
||||
)
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 20 */;
|
||||
INSERT INTO t1 (a, b, c, d, e) VALUES
|
||||
('07', '03', 343, '1', '07_03_343'),
|
||||
('01', '04', 343, '2', '01_04_343'),
|
||||
('01', '06', 343, '3', '01_06_343'),
|
||||
('01', '07', 343, '4', '01_07_343'),
|
||||
('01', '08', 343, '5', '01_08_343'),
|
||||
('01', '09', 343, '6', '01_09_343'),
|
||||
('03', '03', 343, '7', '03_03_343'),
|
||||
('03', '06', 343, '8', '03_06_343'),
|
||||
('03', '07', 343, '9', '03_07_343'),
|
||||
('04', '03', 343, '10', '04_03_343'),
|
||||
('04', '06', 343, '11', '04_06_343'),
|
||||
('05', '03', 343, '12', '05_03_343'),
|
||||
('11', '03', 343, '13', '11_03_343'),
|
||||
('11', '04', 343, '14', '11_04_343')
|
||||
;
|
||||
UPDATE t1 AS A,
|
||||
(SELECT '03' AS a, '06' AS b, 343 AS c, 'last' AS d) AS B
|
||||
SET A.e = B.d
|
||||
WHERE A.a = '03'
|
||||
AND A.b = '06'
|
||||
AND A.c = 343;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#57113: ha_partition::extra(ha_extra_function):
|
||||
# Assertion `m_extra_cache' failed
|
||||
CREATE TABLE t1
|
||||
|
@ -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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
Tests of syncronization of stored procedure execution.
|
||||
Tests of synchronization of stored procedure execution.
|
||||
#
|
||||
# Bug#48157: crash in Item_field::used_tables
|
||||
#
|
||||
@ -20,4 +20,16 @@ SET DEBUG_SYNC = 'now SIGNAL go';
|
||||
# code, this test statement will hang.
|
||||
DROP TABLE t1, t2;
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# test for bug#11756013
|
||||
#
|
||||
DROP SCHEMA IF EXISTS s1;
|
||||
CREATE SCHEMA s1;
|
||||
CREATE PROCEDURE s1.p1() BEGIN END;
|
||||
SET DEBUG_SYNC='before_db_dir_check SIGNAL check_db WAIT_FOR dropped_schema';
|
||||
CALL s1.p1;
|
||||
SET DEBUG_SYNC='now WAIT_FOR check_db';
|
||||
DROP SCHEMA s1;
|
||||
SET DEBUG_SYNC='now SIGNAL dropped_schema';
|
||||
ERROR 42000: Unknown database 's1'
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
|
9
mysql-test/r/ssl_cipher.result
Normal file
9
mysql-test/r/ssl_cipher.result
Normal file
@ -0,0 +1,9 @@
|
||||
#
|
||||
# BUG#11760210 - SSL_CIPHER_LIST NOT SET OR RETURNED FOR "SHOW STATUS LIKE 'SSL_CIPHER_LIST'"
|
||||
#
|
||||
SHOW STATUS LIKE 'Ssl_cipher';
|
||||
Variable_name Value
|
||||
Ssl_cipher AES128-SHA
|
||||
SHOW STATUS LIKE 'Ssl_cipher_list';
|
||||
Variable_name Value
|
||||
Ssl_cipher_list AES128-SHA
|
@ -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;
|
||||
|
@ -43,3 +43,101 @@ DROP TABLE t2;
|
||||
DROP USER mysqltest_dfn@localhost;
|
||||
DROP USER mysqltest_inv@localhost;
|
||||
DROP DATABASE mysqltest_db1;
|
||||
USE test;
|
||||
#
|
||||
# Bug#45235: 5.1 does not support 5.0-only syntax triggers in any way
|
||||
#
|
||||
DROP TABLE IF EXISTS t1, t2, t3;
|
||||
CREATE TABLE t1 ( a INT );
|
||||
CREATE TABLE t2 ( a INT );
|
||||
CREATE TABLE t3 ( a INT );
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
INSERT INTO t2 VALUES (1), (2), (3);
|
||||
INSERT INTO t3 VALUES (1), (2), (3);
|
||||
# We simulate importing a trigger from 5.0 by writing a .TRN file for
|
||||
# each trigger plus a .TRG file the way MySQL 5.0 would have done it,
|
||||
# with syntax allowed in 5.0 only.
|
||||
#
|
||||
# Note that in 5.0 the following lines are missing from t1.TRG:
|
||||
#
|
||||
# client_cs_names='latin1'
|
||||
# connection_cl_names='latin1_swedish_ci'
|
||||
# db_cl_names='latin1_swedish_ci'
|
||||
# We will get parse errors for most DDL and DML statements when the table
|
||||
# has broken triggers. The parse error refers to the first broken
|
||||
# trigger.
|
||||
CREATE TRIGGER tr16 AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO t1 VALUES (1);
|
||||
ERROR 42000: Trigger 'tr13' has an error in its body: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a USING t1 a' at line 1'
|
||||
CREATE TRIGGER tr22 BEFORE INSERT ON t2 FOR EACH ROW DELETE FROM non_existing_table;
|
||||
ERROR 42000: Unknown trigger has an error in its body: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Not allowed syntax here, and trigger name cant be extracted either.' at line 1'
|
||||
SHOW TRIGGERS;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
tr11 INSERT t1 DELETE FROM t3 BEFORE NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
tr12 INSERT t1 DELETE FROM t3 AFTER NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
tr14 DELETE t1 DELETE FROM non_existing_table AFTER NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
Warnings:
|
||||
Warning 1603 Triggers for table `test`.`t1` have no creation context
|
||||
Warning 1603 Triggers for table `test`.`t2` have no creation context
|
||||
INSERT INTO t1 VALUES (1);
|
||||
ERROR 42000: Trigger 'tr13' has an error in its body: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a USING t1 a' at line 1'
|
||||
INSERT INTO t2 VALUES (1);
|
||||
ERROR 42000: Unknown trigger has an error in its body: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Not allowed syntax here, and trigger name cant be extracted either.' at line 1'
|
||||
DELETE FROM t1;
|
||||
ERROR 42000: Trigger 'tr13' has an error in its body: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a USING t1 a' at line 1'
|
||||
UPDATE t1 SET a = 1 WHERE a = 1;
|
||||
ERROR 42000: Trigger 'tr13' has an error in its body: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a USING t1 a' at line 1'
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
RENAME TABLE t1 TO t1_2;
|
||||
ERROR 42000: Trigger 'tr13' has an error in its body: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a USING t1 a' at line 1'
|
||||
SHOW TRIGGERS;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
tr11 INSERT t1 DELETE FROM t3 BEFORE NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
tr12 INSERT t1 DELETE FROM t3 AFTER NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
tr14 DELETE t1 DELETE FROM non_existing_table AFTER NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
Warnings:
|
||||
Warning 1603 Triggers for table `test`.`t1` have no creation context
|
||||
DROP TRIGGER tr11;
|
||||
Warnings:
|
||||
Warning 1603 Triggers for table `test`.`t1` have no creation context
|
||||
DROP TRIGGER tr12;
|
||||
DROP TRIGGER tr13;
|
||||
DROP TRIGGER tr14;
|
||||
DROP TRIGGER tr15;
|
||||
SHOW TRIGGERS;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
# Make sure there is no trigger file left.
|
||||
# We write the same trigger files one more time to test DROP TABLE.
|
||||
DROP TABLE t1;
|
||||
Warnings:
|
||||
Warning 1603 Triggers for table `test`.`t1` have no creation context
|
||||
DROP TABLE t2;
|
||||
Warnings:
|
||||
Warning 1603 Triggers for table `test`.`t2` have no creation context
|
||||
DROP TABLE t3;
|
||||
# Make sure there is no trigger file left.
|
||||
CREATE TABLE t1 ( a INT );
|
||||
CREATE TABLE t2 ( a INT );
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
INSERT INTO t2 VALUES (1), (2), (3);
|
||||
# We write three trigger files. First trigger is syntaxically incorrect, next trigger is correct
|
||||
# and last trigger is broken.
|
||||
# Next we try to execute SHOW CREATE TRGGIR command for broken trigger and then try to drop one.
|
||||
FLUSH TABLE t1;
|
||||
SHOW CREATE TRIGGER tr12;
|
||||
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
|
||||
tr12 CREATE DEFINER=`root`@`localhost` TRIGGER tr12 BEFORE INSERT ON t1 FOR EACH ROW DELETE FROM t2 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
Warnings:
|
||||
Warning 1603 Triggers for table `test`.`t1` have no creation context
|
||||
SHOW CREATE TRIGGER tr11;
|
||||
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
|
||||
tr11 CREATE DEFINER=`root`@`localhost` TRIGGER tr11 BEFORE DELETE ON t1 FOR EACH ROW DELETE FROM t1 a USING t1 a latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
DROP TRIGGER tr12;
|
||||
Warnings:
|
||||
Warning 1603 Triggers for table `test`.`t1` have no creation context
|
||||
DROP TRIGGER tr11;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
|
@ -2134,10 +2134,8 @@ CREATE TRIGGER trg1 BEFORE INSERT ON t2 FOR EACH ROW INSERT/*!INTO*/t1 VALUES (1
|
||||
# Used to crash
|
||||
SHOW TRIGGERS IN db1;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
Warnings:
|
||||
Warning 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VALUES (1)' at line 1
|
||||
INSERT INTO t2 VALUES (1);
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VALUES (1)' at line 1
|
||||
ERROR 42000: Trigger 'trg1' has an error in its body: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VALUES (1)' at line 1'
|
||||
SELECT * FROM t1;
|
||||
b
|
||||
# Work around Bug#45235
|
||||
|
@ -1913,4 +1913,17 @@ group by PAY.id + 1;
|
||||
mult v_net_with_discount v_total
|
||||
1.0000 27.18 27.180000
|
||||
DROP TABLE currencies, payments, sub_tasks;
|
||||
#
|
||||
# Bug#55436: buffer overflow in debug binary of dbug_buff in
|
||||
# Field_new_decimal::store_value
|
||||
#
|
||||
SET SQL_MODE='';
|
||||
CREATE TABLE t1(f1 DECIMAL(44,24)) ENGINE=MYISAM;
|
||||
INSERT INTO t1 SET f1 = -64878E-85;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f1' at row 1
|
||||
SELECT f1 FROM t1;
|
||||
f1
|
||||
0.000000000000000000000000
|
||||
DROP TABLE IF EXISTS t1;
|
||||
End of 5.1 tests
|
||||
|
@ -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
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user