new merge from 5.1
This commit is contained in:
commit
009aca9c90
@ -9,15 +9,19 @@
|
||||
*.core
|
||||
*.d
|
||||
*.da
|
||||
*.dll
|
||||
*.exe
|
||||
*.exp
|
||||
*.gcda
|
||||
*.gcno
|
||||
*.gcov
|
||||
*.idb
|
||||
*.ilk
|
||||
*.la
|
||||
*.lai
|
||||
*.lib
|
||||
*.lo
|
||||
*.manifest
|
||||
*.map
|
||||
*.o
|
||||
*.obj
|
||||
@ -87,6 +91,7 @@ BitKeeper/tmp/*
|
||||
BitKeeper/tmp/bkr3sAHD
|
||||
BitKeeper/tmp/gone
|
||||
CMakeFiles/*
|
||||
CMakeFiles
|
||||
COPYING
|
||||
COPYING.LIB
|
||||
Docs/#manual.texi#
|
||||
@ -146,6 +151,7 @@ Makefile
|
||||
Makefile.in
|
||||
Makefile.in'
|
||||
PENDING/*
|
||||
scripts/scripts
|
||||
TAGS
|
||||
VC++Files/client/mysql_amd64.dsp
|
||||
ac_available_languages_fragment
|
||||
@ -1968,6 +1974,7 @@ sql-bench/test-transactions
|
||||
sql-bench/test-wisconsin
|
||||
sql/*.cpp
|
||||
sql/*.ds?
|
||||
sql/*.def
|
||||
sql/*.vcproj
|
||||
sql/.deps/client.Po
|
||||
sql/.deps/derror.Po
|
||||
@ -2100,6 +2107,7 @@ sql/.libs/udf_example.lai
|
||||
sql/.libs/udf_example.so.0
|
||||
sql/.libs/udf_example.so.0.0.0
|
||||
sql/client.c
|
||||
sql/cmake_dummy.cc
|
||||
sql/Doxyfile
|
||||
sql/f.c
|
||||
sql/gen_lex_hash
|
||||
@ -3030,6 +3038,7 @@ vio/viotest.cpp
|
||||
win/configure.data
|
||||
win/vs71cache.txt
|
||||
win/vs8cache.txt
|
||||
win/nmake_cache.txt
|
||||
ylwrap
|
||||
zlib/*.ds?
|
||||
zlib/*.vcproj
|
||||
|
@ -100,7 +100,7 @@ if [ "x$warning_mode" != "xpedantic" ]; then
|
||||
# C++ warnings
|
||||
cxx_warnings="$warnings -Wno-unused-parameter"
|
||||
# cxx_warnings="$cxx_warnings -Woverloaded-virtual -Wsign-promo"
|
||||
cxx_warnings="$cxx_warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
|
||||
cxx_warnings="$cxx_warnings -Wnon-virtual-dtor"
|
||||
# Added unless --with-debug=full
|
||||
debug_extra_cflags="-O0 -g3 -gdwarf-2"
|
||||
else
|
||||
|
@ -6,6 +6,6 @@ path=`dirname $0`
|
||||
extra_flags="$pentium_cflags $debug_cflags"
|
||||
extra_configs="$pentium_configs $debug_configs $static_link"
|
||||
|
||||
extra_configs="$extra_configs --with-debug=full --with-mysqlfs --without-server --without-pstack"
|
||||
extra_configs="$extra_configs --with-debug=full --with-mysqlfs --without-server"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -42,8 +42,7 @@ ADD_DEFINITIONS(-DSHAREDIR="share")
|
||||
# Set debug options
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFORCE_INIT_OF_VARS")
|
||||
|
||||
|
||||
SET(localstatedir "C:\\mysql\\data")
|
||||
SET(localstatedir "C:\\\\mysql\\\\data\\\\")
|
||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-huge.cnf.sh
|
||||
${CMAKE_SOURCE_DIR}/support-files/my-huge.ini @ONLY)
|
||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-innodb-heavy-4G.cnf.sh
|
||||
|
@ -1,119 +0,0 @@
|
||||
MySQL FLOSS License Exception
|
||||
|
||||
The MySQL AB Exception for Free/Libre and Open Source
|
||||
Software-only Applications Using MySQL Client Libraries (the
|
||||
"FLOSS Exception").
|
||||
|
||||
Version 0.6, 7 March 2007
|
||||
|
||||
Exception Intent
|
||||
|
||||
We want specified Free/Libre and Open Source Software (``FLOSS'')
|
||||
applications to be able to use specified GPL-licensed MySQL client
|
||||
libraries (the ``Program'') despite the fact that not all FLOSS
|
||||
licenses are compatible with version 2 of the GNU General Public
|
||||
License (the ``GPL'').
|
||||
|
||||
Legal Terms and Conditions
|
||||
|
||||
As a special exception to the terms and conditions of version 2.0
|
||||
of the GPL:
|
||||
|
||||
1. You are free to distribute a Derivative Work that is formed
|
||||
entirely from the Program and one or more works (each, a
|
||||
"FLOSS Work") licensed under one or more of the licenses
|
||||
listed below in section 1, as long as:
|
||||
a. You obey the GPL in all respects for the Program and the
|
||||
Derivative Work, except for identifiable sections of the
|
||||
Derivative Work which are not derived from the Program,
|
||||
and which can reasonably be considered independent and
|
||||
separate works in themselves,
|
||||
b. all identifiable sections of the Derivative Work which
|
||||
are not derived from the Program, and which can
|
||||
reasonably be considered independent and separate works
|
||||
in themselves,
|
||||
i. are distributed subject to one of the FLOSS licenses
|
||||
listed below, and
|
||||
ii. the object code or executable form of those sections
|
||||
are accompanied by the complete corresponding
|
||||
machine-readable source code for those sections on
|
||||
the same medium and under the same FLOSS license as
|
||||
the corresponding object code or executable forms of
|
||||
those sections, and
|
||||
c. any works which are aggregated with the Program or with a
|
||||
Derivative Work on a volume of a storage or distribution
|
||||
medium in accordance with the GPL, can reasonably be
|
||||
considered independent and separate works in themselves
|
||||
which are not derivatives of either the Program, a
|
||||
Derivative Work or a FLOSS Work.
|
||||
If the above conditions are not met, then the Program may only
|
||||
be copied, modified, distributed or used under the terms and
|
||||
conditions of the GPL or another valid licensing option from
|
||||
MySQL AB.
|
||||
|
||||
2. FLOSS License List
|
||||
|
||||
License name Version(s)/Copyright Date
|
||||
Academic Free License 2.0
|
||||
Apache Software License 1.0/1.1/2.0
|
||||
Apple Public Source License 2.0
|
||||
Artistic license From Perl 5.8.0
|
||||
BSD license "July 22 1999"
|
||||
Common Development and Distribution License (CDDL) 1.0
|
||||
Common Public License 1.0
|
||||
Eclipse Public License 1.0
|
||||
GNU Library or "Lesser" General Public License (LGPL) 2.0/2.1
|
||||
Jabber Open Source License 1.0
|
||||
MIT license (As listed in file MIT-License.txt) ---
|
||||
Mozilla Public License (MPL) 1.0/1.1
|
||||
Open Software License 2.0
|
||||
OpenSSL license (with original SSLeay license) "2003" ("1998")
|
||||
PHP License 3.0
|
||||
Python license (CNRI Python License) ---
|
||||
Python Software Foundation License 2.1.1
|
||||
Sleepycat License "1999"
|
||||
University of Illinois/NCSA Open Source License ---
|
||||
W3C License "2001"
|
||||
X11 License "2001"
|
||||
Zlib/libpng License ---
|
||||
Zope Public License 2.0
|
||||
|
||||
Due to the many variants of some of the above licenses, we
|
||||
require that any version follow the 2003 version of the Free
|
||||
Software Foundation's Free Software Definition
|
||||
(http://www.gnu.org/philosophy/free-sw.html) or version 1.9 of
|
||||
the Open Source Definition by the Open Source Initiative
|
||||
(http://www.opensource.org/docs/definition.php).
|
||||
|
||||
3. Definitions
|
||||
|
||||
a. Terms used, but not defined, herein shall have the
|
||||
meaning provided in the GPL.
|
||||
b. Derivative Work means a derivative work under copyright
|
||||
law.
|
||||
|
||||
4. Applicability: This FLOSS Exception applies to all Programs
|
||||
that contain a notice placed by MySQL AB saying that the
|
||||
Program may be distributed under the terms of this FLOSS
|
||||
Exception. If you create or distribute a work which is a
|
||||
Derivative Work of both the Program and any other work
|
||||
licensed under the GPL, then this FLOSS Exception is not
|
||||
available for that work; thus, you must remove the FLOSS
|
||||
Exception notice from that work and comply with the GPL in all
|
||||
respects, including by retaining all GPL notices. You may
|
||||
choose to redistribute a copy of the Program exclusively under
|
||||
the terms of the GPL by removing the FLOSS Exception notice
|
||||
from that copy of the Program, provided that the copy has
|
||||
never been modified by you or any third party.
|
||||
|
||||
Appendix A. Qualified Libraries and Packages
|
||||
|
||||
The following is a non-exhaustive list of libraries and packages
|
||||
which are covered by the FLOSS License Exception. Please note that
|
||||
this appendix is provided merely as an additional service to
|
||||
specific FLOSS projects wishing to simplify licensing information
|
||||
for their users. Compliance with one of the licenses noted under
|
||||
the "FLOSS license list" section remains a prerequisite.
|
||||
|
||||
Package Name Qualifying License and Version
|
||||
Apache Portable Runtime (APR) Apache Software License 2.0
|
@ -19,11 +19,10 @@ AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
# These are built from source in the Docs directory
|
||||
EXTRA_DIST = INSTALL-SOURCE INSTALL-WIN-SOURCE \
|
||||
README COPYING EXCEPTIONS-CLIENT CMakeLists.txt
|
||||
README COPYING CMakeLists.txt
|
||||
|
||||
SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
|
||||
@readline_topdir@ sql-common scripts \
|
||||
@pstack_dir@ \
|
||||
@sql_union_dirs@ unittest \
|
||||
@sql_server@ @man_dirs@ tests \
|
||||
netware @libmysqld_dirs@ \
|
||||
@ -32,7 +31,6 @@ SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
|
||||
|
||||
DIST_SUBDIRS = . include Docs zlib \
|
||||
cmd-line-utils sql-common scripts \
|
||||
pstack \
|
||||
strings mysys dbug extra regex libmysql libmysql_r client unittest storage plugin \
|
||||
vio sql man tests \
|
||||
netware libmysqld \
|
||||
|
@ -1449,8 +1449,8 @@ static struct my_option my_long_options[] =
|
||||
&opt_sigint_ignore, &opt_sigint_ignore, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"one-database", 'o',
|
||||
"Only update the default database. This is useful for skipping updates "
|
||||
"to other database in the update log.",
|
||||
"Ignore statements except those that occur while the default "
|
||||
"database is the one named at the command line.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef USE_POPEN
|
||||
{"pager", OPT_PAGER,
|
||||
@ -2736,6 +2736,10 @@ static void get_current_db()
|
||||
{
|
||||
MYSQL_RES *res;
|
||||
|
||||
/* If one_database is set, current_db is not supposed to change. */
|
||||
if (one_database)
|
||||
return;
|
||||
|
||||
my_free(current_db, MYF(MY_ALLOW_ZERO_PTR));
|
||||
current_db= NULL;
|
||||
/* In case of error below current_db will be NULL */
|
||||
@ -3725,7 +3729,8 @@ print_tab_data(MYSQL_RES *result)
|
||||
}
|
||||
|
||||
static int
|
||||
com_tee(String *buffer, char *line __attribute__((unused)))
|
||||
com_tee(String *buffer __attribute__((unused)),
|
||||
char *line __attribute__((unused)))
|
||||
{
|
||||
char file_name[FN_REFLEN], *end, *param;
|
||||
|
||||
@ -3784,7 +3789,8 @@ com_notee(String *buffer __attribute__((unused)),
|
||||
|
||||
#ifdef USE_POPEN
|
||||
static int
|
||||
com_pager(String *buffer, char *line __attribute__((unused)))
|
||||
com_pager(String *buffer __attribute__((unused)),
|
||||
char *line __attribute__((unused)))
|
||||
{
|
||||
char pager_name[FN_REFLEN], *end, *param;
|
||||
|
||||
@ -3911,7 +3917,8 @@ com_rehash(String *buffer __attribute__((unused)),
|
||||
|
||||
#ifdef USE_POPEN
|
||||
static int
|
||||
com_shell(String *buffer, char *line __attribute__((unused)))
|
||||
com_shell(String *buffer __attribute__((unused)),
|
||||
char *line __attribute__((unused)))
|
||||
{
|
||||
char *shell_cmd;
|
||||
|
||||
@ -4003,7 +4010,8 @@ com_connect(String *buffer, char *line)
|
||||
}
|
||||
|
||||
|
||||
static int com_source(String *buffer, char *line)
|
||||
static int com_source(String *buffer __attribute__((unused)),
|
||||
char *line)
|
||||
{
|
||||
char source_name[FN_REFLEN], *end, *param;
|
||||
LINE_BUFFER *line_buff;
|
||||
@ -4908,7 +4916,8 @@ static void init_username()
|
||||
}
|
||||
}
|
||||
|
||||
static int com_prompt(String *buffer, char *line)
|
||||
static int com_prompt(String *buffer __attribute__((unused)),
|
||||
char *line)
|
||||
{
|
||||
char *ptr=strchr(line, ' ');
|
||||
prompt_counter = 0;
|
||||
|
@ -444,7 +444,7 @@ struct st_command
|
||||
char *query, *query_buf,*first_argument,*last_argument,*end;
|
||||
DYNAMIC_STRING content;
|
||||
int first_word_len, query_len;
|
||||
my_bool abort_on_error;
|
||||
my_bool abort_on_error, used_replace;
|
||||
struct st_expected_errors expected_errors;
|
||||
char require_file[FN_REFLEN];
|
||||
enum enum_commands type;
|
||||
@ -3287,7 +3287,7 @@ static int get_list_files(DYNAMIC_STRING *ds, const DYNAMIC_STRING *ds_dirname,
|
||||
if (ds_wild && ds_wild->length &&
|
||||
wild_compare(file->name, ds_wild->str, 0))
|
||||
continue;
|
||||
dynstr_append(ds, file->name);
|
||||
replace_dynstr_append(ds, file->name);
|
||||
dynstr_append(ds, "\n");
|
||||
}
|
||||
set_wild_chars(0);
|
||||
@ -3317,6 +3317,7 @@ static void do_list_files(struct st_command *command)
|
||||
{"file", ARG_STRING, FALSE, &ds_wild, "Filename (incl. wildcard)"}
|
||||
};
|
||||
DBUG_ENTER("do_list_files");
|
||||
command->used_replace= 1;
|
||||
|
||||
check_command_args(command, command->first_argument,
|
||||
list_files_args,
|
||||
@ -3358,6 +3359,7 @@ static void do_list_files_write_file_command(struct st_command *command,
|
||||
{"file", ARG_STRING, FALSE, &ds_wild, "Filename (incl. wildcard)"}
|
||||
};
|
||||
DBUG_ENTER("do_list_files_write_file");
|
||||
command->used_replace= 1;
|
||||
|
||||
check_command_args(command, command->first_argument,
|
||||
list_files_args,
|
||||
@ -5261,8 +5263,13 @@ void do_connect(struct st_command *command)
|
||||
opt_charsets_dir);
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
if (opt_use_ssl || con_ssl)
|
||||
if (opt_use_ssl)
|
||||
con_ssl= 1;
|
||||
#endif
|
||||
|
||||
if (con_ssl)
|
||||
{
|
||||
#ifdef HAVE_OPENSSL
|
||||
mysql_ssl_set(&con_slot->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
|
||||
opt_ssl_capath, opt_ssl_cipher);
|
||||
#if MYSQL_VERSION_ID >= 50000
|
||||
@ -5271,28 +5278,30 @@ void do_connect(struct st_command *command)
|
||||
mysql_options(&con_slot->mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
|
||||
&opt_ssl_verify_server_cert);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __WIN__
|
||||
if (con_pipe)
|
||||
{
|
||||
#ifdef __WIN__
|
||||
opt_protocol= MYSQL_PROTOCOL_PIPE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (opt_protocol)
|
||||
mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol);
|
||||
|
||||
#ifdef HAVE_SMEM
|
||||
if (con_shm)
|
||||
{
|
||||
#ifdef HAVE_SMEM
|
||||
uint protocol= MYSQL_PROTOCOL_MEMORY;
|
||||
if (!ds_shm.length)
|
||||
die("Missing shared memory base name");
|
||||
mysql_options(&con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME, ds_shm.str);
|
||||
mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, &protocol);
|
||||
#endif
|
||||
}
|
||||
#ifdef HAVE_SMEM
|
||||
else if (shared_memory_base_name)
|
||||
{
|
||||
mysql_options(&con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME,
|
||||
@ -5300,7 +5309,6 @@ void do_connect(struct st_command *command)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Use default db name */
|
||||
if (ds_database.length == 0)
|
||||
dynstr_set(&ds_database, opt_db);
|
||||
@ -7788,13 +7796,16 @@ static void dump_backtrace(void)
|
||||
{
|
||||
struct st_connection *conn= cur_con;
|
||||
|
||||
my_safe_print_str("read_command_buf", read_command_buf,
|
||||
sizeof(read_command_buf));
|
||||
fprintf(stderr, "read_command_buf (%p): ", read_command_buf);
|
||||
my_safe_print_str(read_command_buf, sizeof(read_command_buf));
|
||||
|
||||
if (conn)
|
||||
{
|
||||
my_safe_print_str("conn->name", conn->name, conn->name_len);
|
||||
fprintf(stderr, "conn->name (%p): ", conn->name);
|
||||
my_safe_print_str(conn->name, conn->name_len);
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
my_safe_print_str("conn->cur_query", conn->cur_query, conn->cur_query_len);
|
||||
fprintf(stderr, "conn->cur_query (%p): ", conn->cur_query);
|
||||
my_safe_print_str(conn->cur_query, conn->cur_query_len);
|
||||
#endif
|
||||
}
|
||||
fputs("Attempting backtrace...\n", stderr);
|
||||
@ -8395,7 +8406,7 @@ int main(int argc, char **argv)
|
||||
memset(&saved_expected_errors, 0, sizeof(saved_expected_errors));
|
||||
}
|
||||
|
||||
if (command_executed != last_command_executed)
|
||||
if (command_executed != last_command_executed || command->used_replace)
|
||||
{
|
||||
/*
|
||||
As soon as any command has been executed,
|
||||
|
@ -71,8 +71,12 @@ public:
|
||||
static void *operator new(size_t size, MEM_ROOT *mem_root)
|
||||
{ return (void*) alloc_root(mem_root, (uint) size); }
|
||||
static void operator delete(void *ptr_arg, size_t size)
|
||||
{ TRASH(ptr_arg, size); }
|
||||
static void operator delete(void *ptr_arg, MEM_ROOT *mem_root)
|
||||
{
|
||||
(void) ptr_arg;
|
||||
(void) size;
|
||||
TRASH(ptr_arg, size);
|
||||
}
|
||||
static void operator delete(void *, MEM_ROOT *)
|
||||
{ /* never called */ }
|
||||
~String() { free(); }
|
||||
|
||||
|
@ -136,7 +136,7 @@ ed_delete_prev_word(EditLine *el, int c __attribute__((__unused__)))
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
ed_delete_next_char(EditLine *el, int c)
|
||||
ed_delete_next_char(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
#ifdef notdef /* XXX */
|
||||
#define EL el->el_line
|
||||
@ -431,7 +431,8 @@ ed_argument_digit(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
ed_unassigned(EditLine *el, int c __attribute__((__unused__)))
|
||||
ed_unassigned(EditLine *el __attribute__((__unused__)),
|
||||
int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
return (CC_ERROR);
|
||||
|
@ -95,10 +95,9 @@ static char break_chars[] = { ' ', '\t', '\n', '"', '\\', '\'', '`', '@', '$',
|
||||
char *
|
||||
fn_tilde_expand(const char *txt)
|
||||
{
|
||||
struct passwd pwres, *pass;
|
||||
struct passwd *pass;
|
||||
char *temp;
|
||||
size_t len = 0;
|
||||
char pwbuf[1024];
|
||||
|
||||
if (txt[0] != '~')
|
||||
return (strdup(txt));
|
||||
|
@ -202,7 +202,7 @@ _move_history(int op)
|
||||
*/
|
||||
static int
|
||||
/*ARGSUSED*/
|
||||
_getc_function(EditLine *el, char *c)
|
||||
_getc_function(EditLine *el __attribute__((__unused__)), char *c)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1613,7 +1613,8 @@ rl_insert(int count, int c)
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
rl_newline(int count, int c)
|
||||
rl_newline(int count __attribute__((__unused__)),
|
||||
int c __attribute__((__unused__)))
|
||||
{
|
||||
/*
|
||||
* Readline-4.0 appears to ignore the args.
|
||||
@ -1623,7 +1624,7 @@ rl_newline(int count, int c)
|
||||
|
||||
/*ARGSUSED*/
|
||||
static unsigned char
|
||||
rl_bind_wrapper(EditLine *el, unsigned char c)
|
||||
rl_bind_wrapper(EditLine *el __attribute__((__unused__)), unsigned char c)
|
||||
{
|
||||
if (map[c] == NULL)
|
||||
return CC_ERROR;
|
||||
@ -1718,7 +1719,7 @@ rl_get_previous_history(int count, int key)
|
||||
|
||||
void
|
||||
/*ARGSUSED*/
|
||||
rl_prep_terminal(int meta_flag)
|
||||
rl_prep_terminal(int meta_flag __attribute__((__unused__)))
|
||||
{
|
||||
el_set(e, EL_PREP_TERM, 1);
|
||||
}
|
||||
@ -1922,7 +1923,8 @@ _rl_qsort_string_compare(char **s1, char **s2)
|
||||
|
||||
int
|
||||
/*ARGSUSED*/
|
||||
rl_kill_text(int from, int to)
|
||||
rl_kill_text(int from __attribute__((__unused__)),
|
||||
int to __attribute__((__unused__)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -1941,20 +1943,25 @@ rl_get_keymap(void)
|
||||
|
||||
void
|
||||
/*ARGSUSED*/
|
||||
rl_set_keymap(Keymap k)
|
||||
rl_set_keymap(Keymap k __attribute__((__unused__)))
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
/*ARGSUSED*/
|
||||
rl_generic_bind(int type, const char * keyseq, const char * data, Keymap k)
|
||||
rl_generic_bind(int type __attribute__((__unused__)),
|
||||
const char * keyseq __attribute__((__unused__)),
|
||||
const char * data __attribute__((__unused__)),
|
||||
Keymap k __attribute__((__unused__)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
/*ARGSUSED*/
|
||||
rl_bind_key_in_map(int key, Function *fun, Keymap k)
|
||||
rl_bind_key_in_map(int key __attribute__((__unused__)),
|
||||
Function *fun __attribute__((__unused__)),
|
||||
Keymap k __attribute__((__unused__)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ vi_paste_prev(EditLine *el, int c __attribute__((__unused__)))
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_prev_big_word(EditLine *el, int c)
|
||||
vi_prev_big_word(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
if (el->el_line.cursor == el->el_line.buffer)
|
||||
@ -195,7 +195,7 @@ vi_prev_word(EditLine *el, int c __attribute__((__unused__)))
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_next_big_word(EditLine *el, int c)
|
||||
vi_next_big_word(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
if (el->el_line.cursor >= el->el_line.lastchar - 1)
|
||||
@ -462,7 +462,7 @@ vi_delete_meta(EditLine *el, int c __attribute__((__unused__)))
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_end_big_word(EditLine *el, int c)
|
||||
vi_end_big_word(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
if (el->el_line.cursor == el->el_line.lastchar)
|
||||
@ -797,7 +797,7 @@ vi_repeat_prev_char(EditLine *el, int c __attribute__((__unused__)))
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_match(EditLine *el, int c)
|
||||
vi_match(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
const char match_chars[] = "()[]{}";
|
||||
char *cp;
|
||||
@ -844,7 +844,7 @@ vi_match(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_undo_line(EditLine *el, int c)
|
||||
vi_undo_line(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
cv_undo(el);
|
||||
@ -858,7 +858,7 @@ vi_undo_line(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_to_column(EditLine *el, int c)
|
||||
vi_to_column(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
el->el_line.cursor = el->el_line.buffer;
|
||||
@ -872,7 +872,7 @@ vi_to_column(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_yank_end(EditLine *el, int c)
|
||||
vi_yank_end(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
cv_yank(el, el->el_line.cursor,
|
||||
@ -886,7 +886,7 @@ vi_yank_end(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_yank(EditLine *el, int c)
|
||||
vi_yank(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
return cv_action(el, YANK);
|
||||
@ -898,7 +898,7 @@ vi_yank(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_comment_out(EditLine *el, int c)
|
||||
vi_comment_out(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
el->el_line.cursor = el->el_line.buffer;
|
||||
@ -919,7 +919,8 @@ extern char *get_alias_text(const char *) __weak_reference(get_alias_text);
|
||||
#endif
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_alias(EditLine *el, int c)
|
||||
vi_alias(EditLine *el __attribute__((__unused__)),
|
||||
int c __attribute__((__unused__)))
|
||||
{
|
||||
#if defined(__weak_reference) && !defined(__FreeBSD__)
|
||||
char alias_name[3];
|
||||
@ -949,7 +950,7 @@ vi_alias(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_to_history_line(EditLine *el, int c)
|
||||
vi_to_history_line(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
int sv_event_no = el->el_history.eventno;
|
||||
el_action_t rval;
|
||||
@ -994,7 +995,7 @@ vi_to_history_line(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_histedit(EditLine *el, int c)
|
||||
vi_histedit(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
int fd;
|
||||
pid_t pid;
|
||||
@ -1050,7 +1051,7 @@ vi_histedit(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_history_word(EditLine *el, int c)
|
||||
vi_history_word(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
const char *wp = HIST_FIRST(el);
|
||||
const char *wep, *wsp;
|
||||
@ -1099,7 +1100,7 @@ vi_history_word(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_redo(EditLine *el, int c)
|
||||
vi_redo(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
c_redo_t *r = &el->el_chared.c_redo;
|
||||
|
||||
|
@ -855,7 +855,7 @@ _rl_read_init_file (filename, include_level)
|
||||
{
|
||||
register int i;
|
||||
char *buffer, *openname, *line, *end;
|
||||
size_t file_size;
|
||||
size_t file_size = 0;
|
||||
|
||||
current_readline_init_file = filename;
|
||||
current_readline_init_include_level = include_level;
|
||||
|
@ -1839,8 +1839,11 @@ rl_username_completion_function (text, state)
|
||||
#else /* !__WIN32__ && !__OPENNT) */
|
||||
static char *username = (char *)NULL;
|
||||
static struct passwd *entry;
|
||||
static int namelen, first_char, first_char_loc;
|
||||
static int first_char, first_char_loc;
|
||||
char *value;
|
||||
#if defined (HAVE_GETPWENT)
|
||||
static int namelen;
|
||||
#endif
|
||||
|
||||
if (state == 0)
|
||||
{
|
||||
@ -1850,7 +1853,9 @@ rl_username_completion_function (text, state)
|
||||
first_char_loc = first_char == '~';
|
||||
|
||||
username = savestring (&text[first_char_loc]);
|
||||
#if defined (HAVE_GETPWENT)
|
||||
namelen = strlen (username);
|
||||
#endif
|
||||
setpwent ();
|
||||
}
|
||||
|
||||
|
@ -693,7 +693,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
|
||||
case 's':
|
||||
{
|
||||
char *new_event;
|
||||
int delimiter, failed, si, l_temp, ws, we;
|
||||
int delimiter, failed, si, l_temp, we;
|
||||
|
||||
if (c == 's')
|
||||
{
|
||||
@ -792,7 +792,6 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
|
||||
{
|
||||
for (; temp[si] && whitespace (temp[si]); si++)
|
||||
;
|
||||
ws = si;
|
||||
we = history_tokenize_word (temp, si);
|
||||
}
|
||||
|
||||
|
@ -402,6 +402,7 @@ history_truncate_file (fname, lines)
|
||||
if (bp > buffer && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1))
|
||||
{
|
||||
bytes_written= write (file, bp, chars_read - (bp - buffer));
|
||||
(void) bytes_written;
|
||||
|
||||
#if defined (__BEOS__)
|
||||
/* BeOS ignores O_TRUNC. */
|
||||
|
@ -617,7 +617,7 @@ rl_search_history (direction, invoking_key)
|
||||
int direction, invoking_key __attribute__((unused));
|
||||
{
|
||||
_rl_search_cxt *cxt; /* local for now, but saved globally */
|
||||
int c, r;
|
||||
int r;
|
||||
|
||||
RL_SETSTATE(RL_STATE_ISEARCH);
|
||||
cxt = _rl_isearch_init (direction);
|
||||
@ -632,7 +632,7 @@ rl_search_history (direction, invoking_key)
|
||||
r = -1;
|
||||
for (;;)
|
||||
{
|
||||
c = _rl_search_getchar (cxt);
|
||||
_rl_search_getchar (cxt);
|
||||
/* We might want to handle EOF here (c == 0) */
|
||||
r = _rl_isearch_dispatch (cxt, cxt->lastc);
|
||||
if (r <= 0)
|
||||
@ -655,9 +655,9 @@ int
|
||||
_rl_isearch_callback (cxt)
|
||||
_rl_search_cxt *cxt;
|
||||
{
|
||||
int c, r;
|
||||
int r;
|
||||
|
||||
c = _rl_search_getchar (cxt);
|
||||
_rl_search_getchar (cxt);
|
||||
/* We might want to handle EOF here */
|
||||
r = _rl_isearch_dispatch (cxt, cxt->lastc);
|
||||
|
||||
|
@ -115,7 +115,7 @@ rl_insert_close (count, invoking_key)
|
||||
else
|
||||
{
|
||||
#if defined (HAVE_SELECT)
|
||||
int orig_point, match_point, ready;
|
||||
int orig_point, match_point;
|
||||
struct timeval timer;
|
||||
fd_set readfds;
|
||||
|
||||
@ -136,7 +136,7 @@ rl_insert_close (count, invoking_key)
|
||||
orig_point = rl_point;
|
||||
rl_point = match_point;
|
||||
(*rl_redisplay_function) ();
|
||||
ready = select (1, &readfds, (fd_set *)NULL, (fd_set *)NULL, &timer);
|
||||
select (1, &readfds, (fd_set *)NULL, (fd_set *)NULL, &timer);
|
||||
rl_point = orig_point;
|
||||
#else /* !HAVE_SELECT */
|
||||
_rl_insert_char (count, invoking_key);
|
||||
|
@ -447,11 +447,10 @@ readline_internal_char ()
|
||||
readline_internal_charloop ()
|
||||
#endif
|
||||
{
|
||||
static int lastc, eof_found;
|
||||
static int lastc;
|
||||
int c, code, lk;
|
||||
|
||||
lastc = -1;
|
||||
eof_found = 0;
|
||||
|
||||
#if !defined (READLINE_CALLBACKS)
|
||||
while (rl_done == 0)
|
||||
|
@ -268,7 +268,7 @@ _rl_get_screen_size (tty, ignore_env)
|
||||
|
||||
#if !defined (__DJGPP__)
|
||||
if (_rl_screenwidth <= 0 && term_string_buffer)
|
||||
_rl_screenwidth = tgetnum ("co");
|
||||
_rl_screenwidth = tgetnum ((char *)"co");
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -284,7 +284,7 @@ _rl_get_screen_size (tty, ignore_env)
|
||||
|
||||
#if !defined (__DJGPP__)
|
||||
if (_rl_screenheight <= 0 && term_string_buffer)
|
||||
_rl_screenheight = tgetnum ("li");
|
||||
_rl_screenheight = tgetnum ((char *)"li");
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -516,7 +516,7 @@ _rl_init_terminal_io (terminal_name)
|
||||
if (!_rl_term_cr)
|
||||
_rl_term_cr = "\r";
|
||||
|
||||
_rl_term_autowrap = tgetflag ("am") && tgetflag ("xn");
|
||||
_rl_term_autowrap = tgetflag ((char *)"am") && tgetflag ((char *)"xn");
|
||||
|
||||
/* Allow calling application to set default height and width, using
|
||||
rl_set_screen_size */
|
||||
@ -531,7 +531,7 @@ _rl_init_terminal_io (terminal_name)
|
||||
|
||||
/* Check to see if this terminal has a meta key and clear the capability
|
||||
variables if there is none. */
|
||||
term_has_meta = (tgetflag ("km") || tgetflag ("MT"));
|
||||
term_has_meta = (tgetflag ((char *)"km") || tgetflag ((char *)"MT"));
|
||||
if (!term_has_meta)
|
||||
_rl_term_mm = _rl_term_mo = (char *)NULL;
|
||||
|
||||
|
@ -811,11 +811,10 @@ _rl_overwrite_char (count, c)
|
||||
int i;
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
char mbkey[MB_LEN_MAX];
|
||||
int k;
|
||||
|
||||
/* Read an entire multibyte character sequence to insert COUNT times. */
|
||||
if (count > 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
||||
k = _rl_read_mbstring (c, mbkey, MB_LEN_MAX);
|
||||
_rl_read_mbstring (c, mbkey, MB_LEN_MAX);
|
||||
#endif
|
||||
|
||||
rl_begin_undo_group ();
|
||||
|
@ -8,16 +8,21 @@ AC_DEFUN([MY_MAINTAINER_MODE], [
|
||||
[AS_HELP_STRING([--enable-mysql-maintainer-mode],
|
||||
[Enable a MySQL maintainer-specific development environment])],
|
||||
[USE_MYSQL_MAINTAINER_MODE=$enableval],
|
||||
[USE_MYSQL_MAINTAINER_MODE=no])
|
||||
[AS_IF([test "$with_debug" != "no"],
|
||||
[USE_MYSQL_MAINTAINER_MODE=yes], [USE_MYSQL_MAINTAINER_MODE=no])])
|
||||
AC_MSG_RESULT([$USE_MYSQL_MAINTAINER_MODE])
|
||||
])
|
||||
|
||||
# Set warning options required under maintainer mode.
|
||||
AC_DEFUN([MY_MAINTAINER_MODE_WARNINGS], [
|
||||
# Detect ICC posing as GCC.
|
||||
AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
|
||||
[INTEL_COMPILER=no], [INTEL_COMPILER=yes])
|
||||
# Setup GCC warning options.
|
||||
AS_IF([test "$GCC" = "yes"], [
|
||||
AS_IF([test "$GCC" = "yes" -a "$INTEL_COMPILER" = "no"], [
|
||||
C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror"
|
||||
CXX_WARNINGS="${C_WARNINGS} -Wno-unused-parameter"
|
||||
C_WARNINGS="${C_WARNINGS} -Wdeclaration-after-statement"
|
||||
])
|
||||
|
||||
# Test whether the warning options work.
|
||||
|
66
configure.in
66
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.54], [], [mysql])
|
||||
AC_INIT([MySQL Server], [5.1.55], [], [mysql])
|
||||
|
||||
AC_CONFIG_SRCDIR([sql/mysqld.cc])
|
||||
AC_CANONICAL_SYSTEM
|
||||
@ -103,6 +103,13 @@ AC_SUBST(SHARED_LIB_MAJOR_VERSION)
|
||||
AC_SUBST(SHARED_LIB_VERSION)
|
||||
AC_SUBST(AVAILABLE_LANGUAGES)
|
||||
|
||||
# Check whether a debug mode should be enabled.
|
||||
AC_ARG_WITH([debug],
|
||||
AS_HELP_STRING([--with-debug@<:@=full@:>@],
|
||||
[Enable various amounts of debugging support (full adds a slow memory checker).]),
|
||||
[with_debug=$withval],
|
||||
[with_debug=no])
|
||||
|
||||
# Whether the maintainer mode should be enabled.
|
||||
MY_MAINTAINER_MODE
|
||||
|
||||
@ -903,46 +910,6 @@ struct request_info *req;
|
||||
])
|
||||
AC_SUBST(WRAPLIBS)
|
||||
|
||||
if test "$TARGET_LINUX" = "true"; then
|
||||
AC_ARG_WITH(pstack,
|
||||
[ --with-pstack Use the pstack backtrace library],
|
||||
[ USE_PSTACK=$withval ],
|
||||
[ USE_PSTACK=no ])
|
||||
pstack_libs=
|
||||
pstack_dir=
|
||||
if test "$USE_PSTACK" = yes -a "$TARGET_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386"
|
||||
then
|
||||
have_libiberty= have_libbfd=
|
||||
my_save_LIBS="$LIBS"
|
||||
dnl I have no idea if this is a good test - can not find docs for libiberty
|
||||
AC_CHECK_LIB([iberty], [fdmatch],
|
||||
[have_libiberty=yes
|
||||
AC_CHECK_LIB([bfd], [bfd_openr], [have_libbfd=yes], , [-liberty])])
|
||||
LIBS="$my_save_LIBS"
|
||||
|
||||
if test x"$have_libiberty" = xyes -a x"$have_libbfd" = xyes
|
||||
then
|
||||
pstack_dir="pstack"
|
||||
pstack_libs="../pstack/libpstack.a -lbfd -liberty"
|
||||
# We must link staticly when using pstack
|
||||
with_mysqld_ldflags="-all-static"
|
||||
AC_SUBST([pstack_dir])
|
||||
AC_SUBST([pstack_libs])
|
||||
AC_DEFINE([USE_PSTACK], [1], [the pstack backtrace library])
|
||||
dnl This check isn't needed, but might be nice to give some feedback....
|
||||
dnl AC_CHECK_HEADER(libiberty.h,
|
||||
dnl have_libiberty_h=yes,
|
||||
dnl have_libiberty_h=no)
|
||||
else
|
||||
USE_PSTACK="no"
|
||||
fi
|
||||
else
|
||||
USE_PSTACK="no"
|
||||
fi
|
||||
fi
|
||||
AC_MSG_CHECKING([if we should use pstack])
|
||||
AC_MSG_RESULT([$USE_PSTACK])
|
||||
|
||||
# Check for gtty if termio.h doesn't exists
|
||||
if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
|
||||
then
|
||||
@ -1171,7 +1138,7 @@ dnl Is this the right match for DEC OSF on alpha?
|
||||
sql/Makefile.in)
|
||||
# Use gen_lex_hash.linux instead of gen_lex_hash
|
||||
# Add library dependencies to mysqld_DEPENDENCIES
|
||||
lib_DEPENDENCIES="\$(pstack_libs) \$(openssl_libs) \$(yassl_libs)"
|
||||
lib_DEPENDENCIES="\$(openssl_libs) \$(yassl_libs)"
|
||||
cat > $filesed << EOF
|
||||
s,\(\./gen_lex_hash\)\$(EXEEXT),\1.linux,
|
||||
s%\(mysqld_DEPENDENCIES = \)%\1$lib_DEPENDENCIES %
|
||||
@ -1674,11 +1641,6 @@ then
|
||||
DEBUG_OPTIMIZE_CXX=""
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(debug,
|
||||
[ --with-debug Add debug code
|
||||
--with-debug=full Add debug code (adds memory checker, very slow)],
|
||||
[with_debug=$withval],
|
||||
[with_debug=no])
|
||||
if test "$with_debug" = "yes"
|
||||
then
|
||||
# Medium debug.
|
||||
@ -2071,6 +2033,13 @@ MYSQL_TYPE_QSORT
|
||||
AC_FUNC_UTIME_NULL
|
||||
AC_FUNC_VPRINTF
|
||||
|
||||
AC_CHECK_DECLS([fdatasync],,,
|
||||
[
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
AC_CHECK_FUNCS(alarm bfill bmove bsearch bzero \
|
||||
chsize cuserid fchmod fcntl \
|
||||
fconvert fdatasync fesetround finite fpresetsticky fpsetmask fsync ftruncate \
|
||||
@ -2871,9 +2840,6 @@ esac
|
||||
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
|
||||
|
||||
# Output results
|
||||
if test -d "$srcdir/pstack" ; then
|
||||
AC_CONFIG_FILES(pstack/Makefile pstack/aout/Makefile)
|
||||
fi
|
||||
if test -d "$srcdir/cmd-line-utils/readline" ; then
|
||||
AC_CONFIG_FILES(cmd-line-utils/readline/Makefile)
|
||||
fi
|
||||
|
28
dbug/dbug.c
28
dbug/dbug.c
@ -744,6 +744,7 @@ void _db_set_init_(const char *control)
|
||||
CODE_STATE tmp_cs;
|
||||
bzero((uchar*) &tmp_cs, sizeof(tmp_cs));
|
||||
tmp_cs.stack= &init_settings;
|
||||
tmp_cs.process= db_process ? db_process : "dbug";
|
||||
DbugParse(&tmp_cs, control);
|
||||
}
|
||||
|
||||
@ -2267,6 +2268,33 @@ static void dbug_flush(CODE_STATE *cs)
|
||||
} /* dbug_flush */
|
||||
|
||||
|
||||
void _db_flush_()
|
||||
{
|
||||
CODE_STATE *cs= NULL;
|
||||
get_code_state_or_return;
|
||||
(void) fflush(cs->stack->out_file);
|
||||
}
|
||||
|
||||
|
||||
#ifndef __WIN__
|
||||
void _db_suicide_()
|
||||
{
|
||||
int retval;
|
||||
sigset_t new_mask;
|
||||
sigfillset(&new_mask);
|
||||
|
||||
fprintf(stderr, "SIGKILL myself\n");
|
||||
fflush(stderr);
|
||||
|
||||
retval= kill(getpid(), SIGKILL);
|
||||
assert(retval == 0);
|
||||
retval= sigsuspend(&new_mask);
|
||||
fprintf(stderr, "sigsuspend returned %d errno %d \n", retval, errno);
|
||||
assert(FALSE); /* With full signal mask, we should never return here. */
|
||||
}
|
||||
#endif /* ! __WIN__ */
|
||||
|
||||
|
||||
void _db_lock_file_()
|
||||
{
|
||||
CODE_STATE *cs=0;
|
||||
|
@ -122,6 +122,7 @@ extern "C" {
|
||||
#define CANT_DELETE_OPEN_FILES 1
|
||||
|
||||
#define FN_LIBCHAR '\\'
|
||||
#define FN_DIRSEP "/\\" /* Valid directory separators */
|
||||
#define FN_ROOTDIR "\\"
|
||||
#define FN_DEVCHAR ':'
|
||||
|
||||
|
@ -332,6 +332,7 @@ inline ulonglong double2ulonglong(double d)
|
||||
/* File name handling */
|
||||
|
||||
#define FN_LIBCHAR '\\'
|
||||
#define FN_DIRSEP "/\\" /* Valid directory separators */
|
||||
#define FN_ROOTDIR "\\"
|
||||
#define FN_DEVCHAR ':'
|
||||
#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
|
||||
|
@ -464,6 +464,8 @@ extern my_bool my_parse_charset_xml(const char *bug, size_t len,
|
||||
int (*add)(CHARSET_INFO *cs));
|
||||
extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end,
|
||||
pchar c);
|
||||
extern size_t my_strcspn(CHARSET_INFO *cs, const char *str, const char *end,
|
||||
const char *accept);
|
||||
|
||||
my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, size_t len);
|
||||
my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, size_t len);
|
||||
|
@ -73,7 +73,9 @@ extern "C" {
|
||||
extern void *(*my_str_malloc)(size_t);
|
||||
extern void (*my_str_free)(void *);
|
||||
|
||||
#if defined(HAVE_STPCPY)
|
||||
#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER)
|
||||
#define strmov(A,B) __builtin_stpcpy((A),(B))
|
||||
#elif defined(HAVE_STPCPY)
|
||||
#define strmov(A,B) stpcpy((A),(B))
|
||||
#ifndef stpcpy
|
||||
extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */
|
||||
|
@ -32,8 +32,15 @@
|
||||
|
||||
/* GNU C/C++ */
|
||||
#if defined __GNUC__
|
||||
/* Convenience macro to test the minimum required GCC version. */
|
||||
# define MY_GNUC_PREREQ(maj, min) \
|
||||
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
|
||||
/* Any after 2.95... */
|
||||
# define MY_ALIGN_EXT
|
||||
/* Comunicate to the compiler the unreachability of the code. */
|
||||
# if MY_GNUC_PREREQ(4,5)
|
||||
# define MY_ASSERT_UNREACHABLE() __builtin_unreachable()
|
||||
# endif
|
||||
|
||||
/* Microsoft Visual C++ */
|
||||
#elif defined _MSC_VER
|
||||
@ -67,8 +74,13 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
Generic compiler-dependent features.
|
||||
Generic (compiler-independent) features.
|
||||
*/
|
||||
|
||||
#ifndef MY_GNUC_PREREQ
|
||||
# define MY_GNUC_PREREQ(maj, min) (0)
|
||||
#endif
|
||||
|
||||
#ifndef MY_ALIGNOF
|
||||
# ifdef __cplusplus
|
||||
template<typename type> struct my_alignof_helper { char m1; type m2; };
|
||||
@ -79,6 +91,10 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef MY_ASSERT_UNREACHABLE
|
||||
# define MY_ASSERT_UNREACHABLE() do { assert(0); } while (0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
C++ Type Traits
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
/* Copyright (c) 2010, 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
|
||||
@ -13,8 +13,18 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _dbug_h
|
||||
#define _dbug_h
|
||||
#ifndef MY_DBUG_INCLUDED
|
||||
#define MY_DBUG_INCLUDED
|
||||
|
||||
#ifndef __WIN__
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <signal.h>
|
||||
#endif /* not __WIN__ */
|
||||
|
||||
#if defined(__cplusplus) && !defined(DBUG_OFF)
|
||||
class Dbug_violation_helper
|
||||
@ -69,6 +79,7 @@ extern void _db_end_(void);
|
||||
extern void _db_lock_file_(void);
|
||||
extern void _db_unlock_file_(void);
|
||||
extern FILE *_db_fp_(void);
|
||||
extern void _db_flush_();
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@ -124,6 +135,35 @@ extern FILE *_db_fp_(void);
|
||||
#define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len))
|
||||
#define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len))
|
||||
#define IF_DBUG(A) A
|
||||
#ifndef __WIN__
|
||||
#define DBUG_ABORT() (_db_flush_(), abort())
|
||||
#else
|
||||
/*
|
||||
Avoid popup with abort/retry/ignore buttons. When BUG#31745 is fixed we can
|
||||
call abort() instead of _exit(3) (now it would cause a "test signal" popup).
|
||||
*/
|
||||
#include <crtdbg.h>
|
||||
#define DBUG_ABORT() (_db_flush_(),\
|
||||
(void)_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE),\
|
||||
(void)_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR),\
|
||||
_exit(3))
|
||||
#endif
|
||||
|
||||
/*
|
||||
Make the program fail, without creating a core file.
|
||||
abort() will send SIGABRT which (most likely) generates core.
|
||||
Use SIGKILL instead, which cannot be caught.
|
||||
We also pause the current thread, until the signal is actually delivered.
|
||||
An alternative would be to use _exit(EXIT_FAILURE),
|
||||
but then valgrind would report lots of memory leaks.
|
||||
*/
|
||||
#ifdef __WIN__
|
||||
#define DBUG_SUICIDE() DBUG_ABORT()
|
||||
#else
|
||||
extern void _db_suicide_();
|
||||
#define DBUG_SUICIDE() (_db_flush_(), _db_suicide_())
|
||||
#endif
|
||||
|
||||
#else /* No debugger */
|
||||
|
||||
#define DBUG_ENTER(a1)
|
||||
@ -152,8 +192,12 @@ extern FILE *_db_fp_(void);
|
||||
#define DBUG_EXPLAIN(buf,len)
|
||||
#define DBUG_EXPLAIN_INITIAL(buf,len)
|
||||
#define IF_DBUG(A)
|
||||
#define DBUG_ABORT() do { } while(0)
|
||||
#define DBUG_SUICIDE() do { } while(0)
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* MY_DBUG_INCLUDED */
|
||||
|
@ -758,6 +758,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
||||
|
||||
#ifndef FN_LIBCHAR
|
||||
#define FN_LIBCHAR '/'
|
||||
#define FN_DIRSEP "/" /* Valid directory separators */
|
||||
#define FN_ROOTDIR "/"
|
||||
#endif
|
||||
#define MY_NFILE 64 /* This is only used to save filenames */
|
||||
|
@ -492,7 +492,8 @@ int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line);
|
||||
int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file,
|
||||
uint line);
|
||||
int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
|
||||
struct timespec *abstime, const char *file, uint line);
|
||||
const struct timespec *abstime,
|
||||
const char *file, uint line);
|
||||
void safe_mutex_global_init(void);
|
||||
void safe_mutex_end(FILE *file);
|
||||
|
||||
|
@ -47,7 +47,7 @@ C_MODE_START
|
||||
#if defined(HAVE_STACKTRACE) || defined(HAVE_BACKTRACE)
|
||||
void my_init_stacktrace();
|
||||
void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack);
|
||||
void my_safe_print_str(const char* name, const char* val, int max_len);
|
||||
void my_safe_print_str(const char* val, int max_len);
|
||||
void my_write_core(int sig);
|
||||
#if BACKTRACE_DEMANGLE
|
||||
char *my_demangle(const char *mangled_name, int *status);
|
||||
|
@ -20,7 +20,6 @@
|
||||
/* Things we don't need in the embedded version of MySQL */
|
||||
/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
|
||||
|
||||
#undef HAVE_PSTACK /* No stacktrace */
|
||||
#undef HAVE_OPENSSL
|
||||
#undef HAVE_SMEM /* No shared memory */
|
||||
#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
|
||||
|
@ -64,7 +64,8 @@ extern const char * NEAR globerrs[]; /* my_error_messages is here */
|
||||
#define EE_FILE_NOT_CLOSED 30
|
||||
#define EE_CHANGE_OWNERSHIP 31
|
||||
#define EE_CHANGE_PERMISSIONS 32
|
||||
#define EE_ERROR_LAST 32 /* Copy last error nr */
|
||||
#define EE_CANT_SEEK 33
|
||||
#define EE_ERROR_LAST 33 /* Copy last error nr */
|
||||
/* Add error numbers before EE_ERROR_LAST and change it accordingly. */
|
||||
|
||||
/* exit codes for all MySQL programs */
|
||||
|
@ -5,8 +5,7 @@
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# There are special exceptions to the terms and conditions of the GPL as it
|
||||
# is applied to this software. View the full text of the exception in file
|
||||
# EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
# is applied to this software.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -5,8 +5,7 @@
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# There are special exceptions to the terms and conditions of the GPL as it
|
||||
# is applied to this software. View the full text of the exception in file
|
||||
# EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
# is applied to this software.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -5,8 +5,7 @@
|
||||
the Free Software Foundation.
|
||||
|
||||
There are special exceptions to the terms and conditions of the GPL as it
|
||||
is applied to this software. View the full text of the exception in file
|
||||
EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
is applied to this software.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -5,8 +5,7 @@
|
||||
the Free Software Foundation.
|
||||
|
||||
There are special exceptions to the terms and conditions of the GPL as it
|
||||
is applied to this software. View the full text of the exception in file
|
||||
EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
is applied to this software.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -5,8 +5,7 @@
|
||||
the Free Software Foundation.
|
||||
|
||||
There are special exceptions to the terms and conditions of the GPL as it
|
||||
is applied to this software. View the full text of the exception in file
|
||||
EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
is applied to this software.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -5,8 +5,7 @@
|
||||
the Free Software Foundation.
|
||||
|
||||
There are special exceptions to the terms and conditions of the GPL as it
|
||||
is applied to this software. View the full text of the exception in file
|
||||
EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
is applied to this software.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -5,8 +5,7 @@
|
||||
the Free Software Foundation.
|
||||
|
||||
There are special exceptions to the terms and conditions of the GPL as it
|
||||
is applied to this software. View the full text of the exception in file
|
||||
EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
is applied to this software.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -131,8 +130,8 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
|
||||
mysql_port = MYSQL_PORT;
|
||||
#ifndef MSDOS
|
||||
{
|
||||
struct servent *serv_ptr;
|
||||
char *env;
|
||||
struct servent *serv_ptr __attribute__((unused));
|
||||
|
||||
/*
|
||||
if builder specifically requested a default port, use that
|
||||
|
@ -5,8 +5,7 @@
|
||||
the Free Software Foundation.
|
||||
|
||||
There are special exceptions to the terms and conditions of the GPL as it
|
||||
is applied to this software. View the full text of the exception in file
|
||||
EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
is applied to this software.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -5,8 +5,7 @@
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# There are special exceptions to the terms and conditions of the GPL as it
|
||||
# is applied to this software. View the full text of the exception in file
|
||||
# EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
# is applied to this software.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -43,8 +43,6 @@ 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.mysqlhotcopy_myisam # horst: due to bug#54129
|
||||
main.mysqlhotcopy_archive # horst: due to bug#54129
|
||||
main.gis-rtree # svoj: due to BUG#38965
|
||||
main.type_float # svoj: due to BUG#38965
|
||||
main.type_newdecimal # svoj: due to BUG#38965
|
||||
|
@ -0,0 +1,2 @@
|
||||
perl mysql-test-run.pl --timer --force --comment=1st --experimental=collections/default.experimental 1st
|
||||
perl mysql-test-run.pl --timer --force --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 parts.partition_alter1_2_ndb parts.part_supported_sql_func_innodb parts.partition_alter1_2_innodb parts.partition_alter4_innodb parts.partition_alter1_1_2_ndb parts.partition_alter1_1_2_innodb parts.partition_alter1_1_ndb rpl_ndb.rpl_truncate_7ndb_2 main.archive-big main.sum_distinct-big main.mysqlbinlog_row_big main.alter_table-big main.variables-big main.type_newdecimal-big main.read_many_rows_innodb main.log_tables-big main.count_distinct3 main.events_time_zone main.merge-big main.create-big main.events_stress main.ssl-big
|
5
mysql-test/collections/mysql-5.1-bugteam.daily
Normal file
5
mysql-test/collections/mysql-5.1-bugteam.daily
Normal file
@ -0,0 +1,5 @@
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed --embedded --experimental=collections/default.experimental
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental
|
4
mysql-test/collections/mysql-5.1-bugteam.push
Normal file
4
mysql-test/collections/mysql-5.1-bugteam.push
Normal file
@ -0,0 +1,4 @@
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --suite=main --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed --suite=main --embedded --experimental=collections/default.experimental --skip-ndb
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental --skip-ndb
|
@ -302,5 +302,58 @@ BINLOG '
|
||||
SHOW BINLOG EVENTS;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo
|
||||
--echo # BUG#54903 BINLOG statement toggles session variables
|
||||
--echo # ----------------------------------------------------------------------
|
||||
--echo # This test verify that BINLOG statement doesn't change current session's
|
||||
--echo # variables foreign_key_checks and unique_checks.
|
||||
--echo
|
||||
CREATE TABLE t1 (c1 INT KEY);
|
||||
|
||||
SET @@SESSION.foreign_key_checks= ON;
|
||||
SET @@SESSION.unique_checks= ON;
|
||||
|
||||
--echo # INSERT INTO t1 VALUES (1)
|
||||
--echo # foreign_key_checks=0 and unique_checks=0
|
||||
BINLOG '
|
||||
dfLtTBMBAAAAKQAAANcAAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||
dfLtTBcBAAAAIgAAAPkAAAAAABcAAAAAAAcAAf/+AQAAAA==
|
||||
';
|
||||
|
||||
SELECT * FROM t1;
|
||||
--echo # Their values should be ON
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
|
||||
--echo
|
||||
SET @@SESSION.foreign_key_checks= OFF;
|
||||
SET @@SESSION.unique_checks= OFF;
|
||||
|
||||
--echo # INSERT INTO t1 VALUES(2)
|
||||
--echo # foreign_key_checks=1 and unique_checks=1
|
||||
BINLOG '
|
||||
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
|
||||
';
|
||||
|
||||
SELECT * FROM t1;
|
||||
--echo # Their values should be OFF
|
||||
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
|
||||
--error 1062
|
||||
BINLOG '
|
||||
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
|
||||
';
|
||||
|
||||
SELECT * FROM t1;
|
||||
--echo # Their values should be OFF
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
disconnect fresh;
|
||||
|
||||
|
@ -60,6 +60,7 @@
|
||||
# Please, remove this test case after pushing WL#2687.
|
||||
################################################################################
|
||||
|
||||
RESET MASTER;
|
||||
|
||||
--echo ###################################################################################
|
||||
--echo # CONFIGURATION
|
||||
|
61
mysql-test/extra/rpl_tests/rpl_stop_slave.test
Normal file
61
mysql-test/extra/rpl_tests/rpl_stop_slave.test
Normal file
@ -0,0 +1,61 @@
|
||||
#
|
||||
# Auxiliary file which is used to test BUG#56118
|
||||
#
|
||||
# Slave should apply all statements in the transaction before stop if any
|
||||
# temporary table is created or dropped.
|
||||
#
|
||||
# USEAGE:
|
||||
# --let $tmp_table_stm= a SQL statement
|
||||
# --source extra/rpl_tests/rpl_stop_slave.test
|
||||
#
|
||||
|
||||
if (`SELECT "$tmp_table_stm" = ''`)
|
||||
{
|
||||
--echo \$tmp_table_stm is NULL
|
||||
--die $tmp_table_stm is NULL
|
||||
}
|
||||
|
||||
--echo
|
||||
--echo [ On Master ]
|
||||
connection master;
|
||||
BEGIN;
|
||||
DELETE FROM t1;
|
||||
eval $tmp_table_stm;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
DROP TEMPORARY TABLE tt1;
|
||||
COMMIT;
|
||||
|
||||
--echo
|
||||
--echo [ On Slave ]
|
||||
connection slave;
|
||||
|
||||
# To check if slave SQL thread is applying INSERT statement
|
||||
let $show_statement= SHOW PROCESSLIST;
|
||||
let $field= Info;
|
||||
let $condition= LIKE 'INSERT%';
|
||||
source include/wait_show_condition.inc;
|
||||
|
||||
send STOP SLAVE SQL_THREAD;
|
||||
|
||||
--echo
|
||||
--echo [ On Slave1 ]
|
||||
connection slave1;
|
||||
--echo # To resume slave SQL thread
|
||||
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
|
||||
--echo
|
||||
--echo [ On Slave ]
|
||||
connection slave;
|
||||
reap;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
|
||||
--echo # Slave should stop after the transaction has committed.
|
||||
--echo # So t1 on master is same to t1 on slave.
|
||||
let diff_table_1=master:test.t1;
|
||||
let diff_table_2=slave:test.t1;
|
||||
source include/diff_tables.inc;
|
||||
|
||||
connection slave;
|
||||
START SLAVE SQL_THREAD;
|
||||
source include/wait_for_slave_sql_to_start.inc;
|
46
mysql-test/include/ctype_8bit.inc
Normal file
46
mysql-test/include/ctype_8bit.inc
Normal file
@ -0,0 +1,46 @@
|
||||
#
|
||||
# Test Unicode conversion, upper, lower
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
CREATE TABLE t1 AS SELECT ' ' AS a LIMIT 0;
|
||||
INSERT INTO t1 VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07);
|
||||
INSERT INTO t1 VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
|
||||
INSERT INTO t1 VALUES (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17);
|
||||
INSERT INTO t1 VALUES (0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
|
||||
INSERT INTO t1 VALUES (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27);
|
||||
INSERT INTO t1 VALUES (0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
|
||||
INSERT INTO t1 VALUES (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37);
|
||||
INSERT INTO t1 VALUES (0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
|
||||
INSERT INTO t1 VALUES (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47);
|
||||
INSERT INTO t1 VALUES (0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
|
||||
INSERT INTO t1 VALUES (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57);
|
||||
INSERT INTO t1 VALUES (0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
|
||||
INSERT INTO t1 VALUES (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67);
|
||||
INSERT INTO t1 VALUES (0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
|
||||
INSERT INTO t1 VALUES (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77);
|
||||
INSERT INTO t1 VALUES (0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
|
||||
INSERT INTO t1 VALUES (0x80),(0x81),(0x82),(0x83),(0x84),(0x85),(0x86),(0x87);
|
||||
INSERT INTO t1 VALUES (0x88),(0x89),(0x8A),(0x8B),(0x8C),(0x8D),(0x8E),(0x8F);
|
||||
INSERT INTO t1 VALUES (0x90),(0x91),(0x92),(0x93),(0x94),(0x95),(0x96),(0x97);
|
||||
INSERT INTO t1 VALUES (0x98),(0x99),(0x9A),(0x9B),(0x9C),(0x9D),(0x9E),(0x9F);
|
||||
INSERT INTO t1 VALUES (0xA0),(0xA1),(0xA2),(0xA3),(0xA4),(0xA5),(0xA6),(0xA7);
|
||||
INSERT INTO t1 VALUES (0xA8),(0xA9),(0xAA),(0xAB),(0xAC),(0xAD),(0xAE),(0xAF);
|
||||
INSERT INTO t1 VALUES (0xB0),(0xB1),(0xB2),(0xB3),(0xB4),(0xB5),(0xB6),(0xB7);
|
||||
INSERT INTO t1 VALUES (0xB8),(0xB9),(0xBA),(0xBB),(0xBC),(0xBD),(0xBE),(0xBF);
|
||||
INSERT INTO t1 VALUES (0xC0),(0xC1),(0xC2),(0xC3),(0xC4),(0xC5),(0xC6),(0xC7);
|
||||
INSERT INTO t1 VALUES (0xC8),(0xC9),(0xCA),(0xCB),(0xCC),(0xCD),(0xCE),(0xCF);
|
||||
INSERT INTO t1 VALUES (0xD0),(0xD1),(0xD2),(0xD3),(0xD4),(0xD5),(0xD6),(0xD7);
|
||||
INSERT INTO t1 VALUES (0xD8),(0xD9),(0xDA),(0xDB),(0xDC),(0xDD),(0xDE),(0xDF);
|
||||
INSERT INTO t1 VALUES (0xE0),(0xE1),(0xE2),(0xE3),(0xE4),(0xE5),(0xE6),(0xE7);
|
||||
INSERT INTO t1 VALUES (0xE8),(0xE9),(0xEA),(0xEB),(0xEC),(0xED),(0xEE),(0xEF);
|
||||
INSERT INTO t1 VALUES (0xF0),(0xF1),(0xF2),(0xF3),(0xF4),(0xF5),(0xF6),(0xF7);
|
||||
INSERT INTO t1 VALUES (0xF8),(0xF9),(0xFA),(0xFB),(0xFC),(0xFD),(0xFE),(0xFF);
|
||||
SELECT
|
||||
HEX(a) AS chr,
|
||||
HEX(LOWER(a)) AS upper,
|
||||
HEX(LOWER(a)) AS lower,
|
||||
HEX(@utf8:=CONVERT(a USING utf8)) AS utf8,
|
||||
HEX(@roundtrip:=CAST(@utf8 AS CHAR)) AS roundtrip,
|
||||
if(a=BINARY @roundtrip,'','Round trip unsafe') AS issafe
|
||||
FROM t1 ORDER BY chr;
|
||||
DROP TABLE t1;
|
@ -343,3 +343,55 @@ explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 4
|
||||
select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#56423: Different count with SELECT and CREATE SELECT queries
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
b INT,
|
||||
c INT,
|
||||
d INT,
|
||||
PRIMARY KEY (a),
|
||||
KEY (c),
|
||||
KEY bd (b,d)
|
||||
);
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
(1, 0, 1, 0),
|
||||
(2, 1, 1, 1),
|
||||
(3, 1, 1, 1),
|
||||
(4, 0, 1, 1);
|
||||
|
||||
EXPLAIN
|
||||
SELECT a
|
||||
FROM t1
|
||||
WHERE c = 1 AND b = 1 AND d = 1;
|
||||
|
||||
CREATE TABLE t2 ( a INT )
|
||||
SELECT a
|
||||
FROM t1
|
||||
WHERE c = 1 AND b = 1 AND d = 1;
|
||||
|
||||
SELECT * FROM t2;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
CREATE TABLE t1( a INT, b INT, KEY(a), KEY(b) );
|
||||
INSERT INTO t1 VALUES (1, 2), (1, 2), (1, 2), (1, 2);
|
||||
SELECT * FROM t1 FORCE INDEX(a, b) WHERE a = 1 AND b = 2;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # Code coverage of fix.
|
||||
CREATE TABLE t1 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT);
|
||||
INSERT INTO t1 (b) VALUES (1);
|
||||
UPDATE t1 SET b = 2 WHERE a = 1;
|
||||
SELECT * FROM t1;
|
||||
|
||||
CREATE TABLE t2 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(1) );
|
||||
INSERT INTO t2 (b) VALUES ('a');
|
||||
UPDATE t2 SET b = 'b' WHERE a = 1;
|
||||
SELECT * FROM t2;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
21
mysql-test/include/io_thd_fault_injection.inc
Normal file
21
mysql-test/include/io_thd_fault_injection.inc
Normal file
@ -0,0 +1,21 @@
|
||||
#
|
||||
# Takes the flag as an argument:
|
||||
# -- let $io_thd_injection_fault_flag=+d,fault_injection_new_file_rotate_event
|
||||
# -- source include/io_thd_fault_injection.inc
|
||||
#
|
||||
|
||||
SET @old_debug=@@global.debug;
|
||||
-- disable_warnings
|
||||
-- source include/stop_slave.inc
|
||||
-- enable_warnings
|
||||
-- eval SET GLOBAL debug="+d,$io_thd_injection_fault_flag"
|
||||
|
||||
START SLAVE io_thread;
|
||||
-- source include/wait_for_slave_io_to_stop.inc
|
||||
-- source include/wait_for_slave_io_error.inc
|
||||
|
||||
-- eval SET GLOBAL debug="-d,$io_thd_injection_fault_flag"
|
||||
SET GLOBAL debug=@old_debug;
|
||||
|
||||
# restart because slave is in bad shape
|
||||
-- source include/restart_mysqld.inc
|
@ -1,14 +1,16 @@
|
||||
|
||||
# Write file to make mysql-test-run.pl expect the "crash", but don't start
|
||||
# it until it's told to
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--let $_server_id= `SELECT @@server_id`
|
||||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
|
||||
--exec echo "wait" > $_expect_file_name
|
||||
|
||||
# Send shutdown to the connected server and give
|
||||
# it 10 seconds to die before zapping it
|
||||
shutdown_server 10;
|
||||
|
||||
# Write file to make mysql-test-run.pl start up the server again
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--exec echo "restart" > $_expect_file_name
|
||||
|
||||
# Turn on reconnect
|
||||
--enable_reconnect
|
||||
|
@ -476,3 +476,24 @@ SELECT a FROM t2;
|
||||
a
|
||||
2
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug#39828 autoinc wraps around when offset and increment > 1
|
||||
#
|
||||
CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) engine=MyISAM;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
INSERT INTO t1 VALUES (18446744073709551601);
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=10;
|
||||
SELECT @@SESSION.AUTO_INCREMENT_OFFSET;
|
||||
@@SESSION.AUTO_INCREMENT_OFFSET
|
||||
1
|
||||
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
|
||||
ERROR 22003: Out of range value for column 't1' at row 167
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
1
|
||||
18446744073709551601
|
||||
18446744073709551611
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=default;
|
||||
SET @@SESSION.AUTO_INCREMENT_OFFSET=default;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -18,7 +18,7 @@ change_user
|
||||
SELECT @@session.sql_big_selects;
|
||||
@@session.sql_big_selects
|
||||
0
|
||||
SET @@global.max_join_size = -1;
|
||||
SET @@global.max_join_size = 18446744073709551615;
|
||||
SET @@session.max_join_size = default;
|
||||
change_user
|
||||
SELECT @@session.sql_big_selects;
|
||||
|
@ -215,6 +215,17 @@ SET GLOBAL event_scheduler = OFF;
|
||||
|
||||
# -- End of Bug#35074.
|
||||
|
||||
#
|
||||
# -- Bug#49752: 2469.126.2 unintentionally breaks authentication
|
||||
# against MySQL 5.1 server
|
||||
#
|
||||
GRANT ALL ON test.* TO 'Azundris12345678'@'localhost' IDENTIFIED BY 'test123';
|
||||
FLUSH PRIVILEGES;
|
||||
DROP USER 'Azundris12345678'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
#
|
||||
# -- End of Bug#49752
|
||||
#
|
||||
# ------------------------------------------------------------------
|
||||
# -- End of 5.1 tests
|
||||
# ------------------------------------------------------------------
|
||||
|
@ -70,3 +70,311 @@ we_ivo NULL
|
||||
we_martin NULL
|
||||
we_toshko NULL
|
||||
drop table t1;
|
||||
#
|
||||
# Start of 5.1 tests
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
cp1251_general_ci
|
||||
CREATE TABLE t1 AS SELECT ' ' AS a LIMIT 0;
|
||||
INSERT INTO t1 VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07);
|
||||
INSERT INTO t1 VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
|
||||
INSERT INTO t1 VALUES (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17);
|
||||
INSERT INTO t1 VALUES (0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
|
||||
INSERT INTO t1 VALUES (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27);
|
||||
INSERT INTO t1 VALUES (0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
|
||||
INSERT INTO t1 VALUES (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37);
|
||||
INSERT INTO t1 VALUES (0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
|
||||
INSERT INTO t1 VALUES (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47);
|
||||
INSERT INTO t1 VALUES (0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
|
||||
INSERT INTO t1 VALUES (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57);
|
||||
INSERT INTO t1 VALUES (0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
|
||||
INSERT INTO t1 VALUES (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67);
|
||||
INSERT INTO t1 VALUES (0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
|
||||
INSERT INTO t1 VALUES (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77);
|
||||
INSERT INTO t1 VALUES (0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
|
||||
INSERT INTO t1 VALUES (0x80),(0x81),(0x82),(0x83),(0x84),(0x85),(0x86),(0x87);
|
||||
INSERT INTO t1 VALUES (0x88),(0x89),(0x8A),(0x8B),(0x8C),(0x8D),(0x8E),(0x8F);
|
||||
INSERT INTO t1 VALUES (0x90),(0x91),(0x92),(0x93),(0x94),(0x95),(0x96),(0x97);
|
||||
INSERT INTO t1 VALUES (0x98),(0x99),(0x9A),(0x9B),(0x9C),(0x9D),(0x9E),(0x9F);
|
||||
INSERT INTO t1 VALUES (0xA0),(0xA1),(0xA2),(0xA3),(0xA4),(0xA5),(0xA6),(0xA7);
|
||||
INSERT INTO t1 VALUES (0xA8),(0xA9),(0xAA),(0xAB),(0xAC),(0xAD),(0xAE),(0xAF);
|
||||
INSERT INTO t1 VALUES (0xB0),(0xB1),(0xB2),(0xB3),(0xB4),(0xB5),(0xB6),(0xB7);
|
||||
INSERT INTO t1 VALUES (0xB8),(0xB9),(0xBA),(0xBB),(0xBC),(0xBD),(0xBE),(0xBF);
|
||||
INSERT INTO t1 VALUES (0xC0),(0xC1),(0xC2),(0xC3),(0xC4),(0xC5),(0xC6),(0xC7);
|
||||
INSERT INTO t1 VALUES (0xC8),(0xC9),(0xCA),(0xCB),(0xCC),(0xCD),(0xCE),(0xCF);
|
||||
INSERT INTO t1 VALUES (0xD0),(0xD1),(0xD2),(0xD3),(0xD4),(0xD5),(0xD6),(0xD7);
|
||||
INSERT INTO t1 VALUES (0xD8),(0xD9),(0xDA),(0xDB),(0xDC),(0xDD),(0xDE),(0xDF);
|
||||
INSERT INTO t1 VALUES (0xE0),(0xE1),(0xE2),(0xE3),(0xE4),(0xE5),(0xE6),(0xE7);
|
||||
INSERT INTO t1 VALUES (0xE8),(0xE9),(0xEA),(0xEB),(0xEC),(0xED),(0xEE),(0xEF);
|
||||
INSERT INTO t1 VALUES (0xF0),(0xF1),(0xF2),(0xF3),(0xF4),(0xF5),(0xF6),(0xF7);
|
||||
INSERT INTO t1 VALUES (0xF8),(0xF9),(0xFA),(0xFB),(0xFC),(0xFD),(0xFE),(0xFF);
|
||||
SELECT
|
||||
HEX(a) AS chr,
|
||||
HEX(LOWER(a)) AS upper,
|
||||
HEX(LOWER(a)) AS lower,
|
||||
HEX(@utf8:=CONVERT(a USING utf8)) AS utf8,
|
||||
HEX(@roundtrip:=CAST(@utf8 AS CHAR)) AS roundtrip,
|
||||
if(a=BINARY @roundtrip,'','Round trip unsafe') AS issafe
|
||||
FROM t1 ORDER BY chr;
|
||||
chr upper lower utf8 roundtrip issafe
|
||||
00 00 00 00 00
|
||||
01 01 01 01 01
|
||||
02 02 02 02 02
|
||||
03 03 03 03 03
|
||||
04 04 04 04 04
|
||||
05 05 05 05 05
|
||||
06 06 06 06 06
|
||||
07 07 07 07 07
|
||||
08 08 08 08 08
|
||||
09 09 09 09 09
|
||||
0A 0A 0A 0A 0A
|
||||
0B 0B 0B 0B 0B
|
||||
0C 0C 0C 0C 0C
|
||||
0D 0D 0D 0D 0D
|
||||
0E 0E 0E 0E 0E
|
||||
0F 0F 0F 0F 0F
|
||||
10 10 10 10 10
|
||||
11 11 11 11 11
|
||||
12 12 12 12 12
|
||||
13 13 13 13 13
|
||||
14 14 14 14 14
|
||||
15 15 15 15 15
|
||||
16 16 16 16 16
|
||||
17 17 17 17 17
|
||||
18 18 18 18 18
|
||||
19 19 19 19 19
|
||||
1A 1A 1A 1A 1A
|
||||
1B 1B 1B 1B 1B
|
||||
1C 1C 1C 1C 1C
|
||||
1D 1D 1D 1D 1D
|
||||
1E 1E 1E 1E 1E
|
||||
1F 1F 1F 1F 1F
|
||||
20 20 20 20 20
|
||||
21 21 21 21 21
|
||||
22 22 22 22 22
|
||||
23 23 23 23 23
|
||||
24 24 24 24 24
|
||||
25 25 25 25 25
|
||||
26 26 26 26 26
|
||||
27 27 27 27 27
|
||||
28 28 28 28 28
|
||||
29 29 29 29 29
|
||||
2A 2A 2A 2A 2A
|
||||
2B 2B 2B 2B 2B
|
||||
2C 2C 2C 2C 2C
|
||||
2D 2D 2D 2D 2D
|
||||
2E 2E 2E 2E 2E
|
||||
2F 2F 2F 2F 2F
|
||||
30 30 30 30 30
|
||||
31 31 31 31 31
|
||||
32 32 32 32 32
|
||||
33 33 33 33 33
|
||||
34 34 34 34 34
|
||||
35 35 35 35 35
|
||||
36 36 36 36 36
|
||||
37 37 37 37 37
|
||||
38 38 38 38 38
|
||||
39 39 39 39 39
|
||||
3A 3A 3A 3A 3A
|
||||
3B 3B 3B 3B 3B
|
||||
3C 3C 3C 3C 3C
|
||||
3D 3D 3D 3D 3D
|
||||
3E 3E 3E 3E 3E
|
||||
3F 3F 3F 3F 3F
|
||||
40 40 40 40 40
|
||||
41 61 61 41 41
|
||||
42 62 62 42 42
|
||||
43 63 63 43 43
|
||||
44 64 64 44 44
|
||||
45 65 65 45 45
|
||||
46 66 66 46 46
|
||||
47 67 67 47 47
|
||||
48 68 68 48 48
|
||||
49 69 69 49 49
|
||||
4A 6A 6A 4A 4A
|
||||
4B 6B 6B 4B 4B
|
||||
4C 6C 6C 4C 4C
|
||||
4D 6D 6D 4D 4D
|
||||
4E 6E 6E 4E 4E
|
||||
4F 6F 6F 4F 4F
|
||||
50 70 70 50 50
|
||||
51 71 71 51 51
|
||||
52 72 72 52 52
|
||||
53 73 73 53 53
|
||||
54 74 74 54 54
|
||||
55 75 75 55 55
|
||||
56 76 76 56 56
|
||||
57 77 77 57 57
|
||||
58 78 78 58 58
|
||||
59 79 79 59 59
|
||||
5A 7A 7A 5A 5A
|
||||
5B 5B 5B 5B 5B
|
||||
5C 5C 5C 5C 5C
|
||||
5D 5D 5D 5D 5D
|
||||
5E 5E 5E 5E 5E
|
||||
5F 5F 5F 5F 5F
|
||||
60 60 60 60 60
|
||||
61 61 61 61 61
|
||||
62 62 62 62 62
|
||||
63 63 63 63 63
|
||||
64 64 64 64 64
|
||||
65 65 65 65 65
|
||||
66 66 66 66 66
|
||||
67 67 67 67 67
|
||||
68 68 68 68 68
|
||||
69 69 69 69 69
|
||||
6A 6A 6A 6A 6A
|
||||
6B 6B 6B 6B 6B
|
||||
6C 6C 6C 6C 6C
|
||||
6D 6D 6D 6D 6D
|
||||
6E 6E 6E 6E 6E
|
||||
6F 6F 6F 6F 6F
|
||||
70 70 70 70 70
|
||||
71 71 71 71 71
|
||||
72 72 72 72 72
|
||||
73 73 73 73 73
|
||||
74 74 74 74 74
|
||||
75 75 75 75 75
|
||||
76 76 76 76 76
|
||||
77 77 77 77 77
|
||||
78 78 78 78 78
|
||||
79 79 79 79 79
|
||||
7A 7A 7A 7A 7A
|
||||
7B 7B 7B 7B 7B
|
||||
7C 7C 7C 7C 7C
|
||||
7D 7D 7D 7D 7D
|
||||
7E 7E 7E 7E 7E
|
||||
7F 7F 7F 7F 7F
|
||||
80 90 90 D082 80
|
||||
81 83 83 D083 81
|
||||
82 82 82 E2809A 82
|
||||
83 83 83 D193 83
|
||||
84 84 84 E2809E 84
|
||||
85 85 85 E280A6 85
|
||||
86 86 86 E280A0 86
|
||||
87 87 87 E280A1 87
|
||||
88 88 88 E282AC 88
|
||||
89 89 89 E280B0 89
|
||||
8A 9A 9A D089 8A
|
||||
8B 8B 8B E280B9 8B
|
||||
8C 9C 9C D08A 8C
|
||||
8D 9D 9D D08C 8D
|
||||
8E 9E 9E D08B 8E
|
||||
8F 9F 9F D08F 8F
|
||||
90 90 90 D192 90
|
||||
91 91 91 E28098 91
|
||||
92 92 92 E28099 92
|
||||
93 93 93 E2809C 93
|
||||
94 94 94 E2809D 94
|
||||
95 95 95 E280A2 95
|
||||
96 96 96 E28093 96
|
||||
97 97 97 E28094 97
|
||||
98 98 98 3F 3F Round trip unsafe
|
||||
99 99 99 E284A2 99
|
||||
9A 9A 9A D199 9A
|
||||
9B 9B 9B E280BA 9B
|
||||
9C 9C 9C D19A 9C
|
||||
9D 9D 9D D19C 9D
|
||||
9E 9E 9E D19B 9E
|
||||
9F 9F 9F D19F 9F
|
||||
A0 A0 A0 C2A0 A0
|
||||
A1 A2 A2 D08E A1
|
||||
A2 A2 A2 D19E A2
|
||||
A3 BC BC D088 A3
|
||||
A4 A4 A4 C2A4 A4
|
||||
A5 B4 B4 D290 A5
|
||||
A6 A6 A6 C2A6 A6
|
||||
A7 A7 A7 C2A7 A7
|
||||
A8 B8 B8 D081 A8
|
||||
A9 A9 A9 C2A9 A9
|
||||
AA BA BA D084 AA
|
||||
AB AB AB C2AB AB
|
||||
AC AC AC C2AC AC
|
||||
AD AD AD C2AD AD
|
||||
AE AE AE C2AE AE
|
||||
AF BF BF D087 AF
|
||||
B0 B0 B0 C2B0 B0
|
||||
B1 B1 B1 C2B1 B1
|
||||
B2 B3 B3 D086 B2
|
||||
B3 B3 B3 D196 B3
|
||||
B4 B4 B4 D291 B4
|
||||
B5 B5 B5 C2B5 B5
|
||||
B6 B6 B6 C2B6 B6
|
||||
B7 B7 B7 C2B7 B7
|
||||
B8 B8 B8 D191 B8
|
||||
B9 B9 B9 E28496 B9
|
||||
BA BA BA D194 BA
|
||||
BB BB BB C2BB BB
|
||||
BC BC BC D198 BC
|
||||
BD BE BE D085 BD
|
||||
BE BE BE D195 BE
|
||||
BF BF BF D197 BF
|
||||
C0 E0 E0 D090 C0
|
||||
C1 E1 E1 D091 C1
|
||||
C2 E2 E2 D092 C2
|
||||
C3 E3 E3 D093 C3
|
||||
C4 E4 E4 D094 C4
|
||||
C5 E5 E5 D095 C5
|
||||
C6 E6 E6 D096 C6
|
||||
C7 E7 E7 D097 C7
|
||||
C8 E8 E8 D098 C8
|
||||
C9 E9 E9 D099 C9
|
||||
CA EA EA D09A CA
|
||||
CB EB EB D09B CB
|
||||
CC EC EC D09C CC
|
||||
CD ED ED D09D CD
|
||||
CE EE EE D09E CE
|
||||
CF EF EF D09F CF
|
||||
D0 F0 F0 D0A0 D0
|
||||
D1 F1 F1 D0A1 D1
|
||||
D2 F2 F2 D0A2 D2
|
||||
D3 F3 F3 D0A3 D3
|
||||
D4 F4 F4 D0A4 D4
|
||||
D5 F5 F5 D0A5 D5
|
||||
D6 F6 F6 D0A6 D6
|
||||
D7 F7 F7 D0A7 D7
|
||||
D8 F8 F8 D0A8 D8
|
||||
D9 F9 F9 D0A9 D9
|
||||
DA FA FA D0AA DA
|
||||
DB FB FB D0AB DB
|
||||
DC FC FC D0AC DC
|
||||
DD FD FD D0AD DD
|
||||
DE FE FE D0AE DE
|
||||
DF FF FF D0AF DF
|
||||
E0 E0 E0 D0B0 E0
|
||||
E1 E1 E1 D0B1 E1
|
||||
E2 E2 E2 D0B2 E2
|
||||
E3 E3 E3 D0B3 E3
|
||||
E4 E4 E4 D0B4 E4
|
||||
E5 E5 E5 D0B5 E5
|
||||
E6 E6 E6 D0B6 E6
|
||||
E7 E7 E7 D0B7 E7
|
||||
E8 E8 E8 D0B8 E8
|
||||
E9 E9 E9 D0B9 E9
|
||||
EA EA EA D0BA EA
|
||||
EB EB EB D0BB EB
|
||||
EC EC EC D0BC EC
|
||||
ED ED ED D0BD ED
|
||||
EE EE EE D0BE EE
|
||||
EF EF EF D0BF EF
|
||||
F0 F0 F0 D180 F0
|
||||
F1 F1 F1 D181 F1
|
||||
F2 F2 F2 D182 F2
|
||||
F3 F3 F3 D183 F3
|
||||
F4 F4 F4 D184 F4
|
||||
F5 F5 F5 D185 F5
|
||||
F6 F6 F6 D186 F6
|
||||
F7 F7 F7 D187 F7
|
||||
F8 F8 F8 D188 F8
|
||||
F9 F9 F9 D189 F9
|
||||
FA FA FA D18A FA
|
||||
FB FB FB D18B FB
|
||||
FC FC FC D18C FC
|
||||
FD FD FD D18D FD
|
||||
FE FE FE D18E FE
|
||||
FF FF FF D18F FF
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
@ -409,3 +409,11 @@ select hex(cast(_ascii 0x7f as char(1) character set latin1));
|
||||
hex(cast(_ascii 0x7f as char(1) character set latin1))
|
||||
7F
|
||||
End of 5.0 tests
|
||||
#
|
||||
# Bug#58022 ... like ... escape export_set ( ... ) crashes when export_set returns warnings
|
||||
#
|
||||
SELECT '' LIKE '' ESCAPE EXPORT_SET(1, 1, 1, 1, '');
|
||||
'' LIKE '' ESCAPE EXPORT_SET(1, 1, 1, 1, '')
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
|
@ -2374,6 +2374,16 @@ hex(convert(_latin1 0xA4A2 using ujis)) hex(c2)
|
||||
DROP PROCEDURE sp1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
#
|
||||
# Bug#57257 Replace(ExtractValue(...)) causes MySQL crash
|
||||
#
|
||||
SET NAMES utf8;
|
||||
SELECT CONVERT(REPLACE(EXPORT_SET('a','a','a','','a'),'00','') USING ujis);
|
||||
CONVERT(REPLACE(EXPORT_SET('a','a','a','','a'),'00','') USING ujis)
|
||||
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'a'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'a'
|
||||
set names default;
|
||||
set character_set_database=default;
|
||||
set character_set_server=default;
|
||||
|
@ -1898,3 +1898,34 @@ CONVERT(a, CHAR) CONVERT(b, CHAR)
|
||||
70000 1092
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
SELECT LENGTH(RPAD(0.0115E88, 61297, _utf8'яэюя'));
|
||||
LENGTH(RPAD(0.0115E88, 61297, _utf8'яэюя'))
|
||||
61297
|
||||
SELECT LENGTH(RPAD(0.0115E88, 61297, _utf8'йцуя'));
|
||||
LENGTH(RPAD(0.0115E88, 61297, _utf8'йцуя'))
|
||||
61297
|
||||
SELECT HEX(RPAD(0x20, 2, _utf8 0xD18F));
|
||||
HEX(RPAD(0x20, 2, _utf8 0xD18F))
|
||||
20D1
|
||||
SELECT HEX(RPAD(0x20, 4, _utf8 0xD18F));
|
||||
HEX(RPAD(0x20, 4, _utf8 0xD18F))
|
||||
20D18FD1
|
||||
SELECT HEX(LPAD(0x20, 2, _utf8 0xD18F));
|
||||
HEX(LPAD(0x20, 2, _utf8 0xD18F))
|
||||
D120
|
||||
SELECT HEX(LPAD(0x20, 4, _utf8 0xD18F));
|
||||
HEX(LPAD(0x20, 4, _utf8 0xD18F))
|
||||
D18FD120
|
||||
SELECT HEX(RPAD(_utf8 0xD18F, 3, 0x20));
|
||||
HEX(RPAD(_utf8 0xD18F, 3, 0x20))
|
||||
D18F20
|
||||
SELECT HEX(LPAD(_utf8 0xD18F, 3, 0x20));
|
||||
HEX(LPAD(_utf8 0xD18F, 3, 0x20))
|
||||
20D18F
|
||||
SELECT HEX(INSERT(_utf8 0xD18F, 2, 1, 0x20));
|
||||
HEX(INSERT(_utf8 0xD18F, 2, 1, 0x20))
|
||||
D120
|
||||
SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
|
||||
HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20))
|
||||
D120D18E
|
||||
End of 5.1 tests
|
||||
|
@ -609,3 +609,17 @@ SELECT DATE_FORMAT("2009-01-01",'%W %d %M %Y') as valid_date;
|
||||
valid_date
|
||||
Thursday 01 January 2009
|
||||
"End of 5.0 tests"
|
||||
#
|
||||
# Start of 5.1 tests
|
||||
#
|
||||
#
|
||||
# Bug#58005 utf8 + get_format causes failed assertion: !str || str != Ptr'
|
||||
#
|
||||
SET NAMES utf8;
|
||||
SELECT LEAST('%', GET_FORMAT(datetime, 'eur'), CAST(GET_FORMAT(datetime, 'eur') AS CHAR(65535)));
|
||||
LEAST('%', GET_FORMAT(datetime, 'eur'), CAST(GET_FORMAT(datetime, 'eur') AS CHAR(65535)))
|
||||
%
|
||||
SET NAMES latin1;
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
@ -400,4 +400,15 @@ SELECT 0 FROM
|
||||
(SELECT 0) t61;
|
||||
0
|
||||
0
|
||||
#
|
||||
# A nested materialized derived table is used before being populated.
|
||||
# (addon for bug#19077)
|
||||
#
|
||||
CREATE TABLE t1 (i INT, j BIGINT);
|
||||
INSERT INTO t1 VALUES (1, 2), (2, 2), (3, 2);
|
||||
SELECT * FROM (SELECT MIN(i) FROM t1
|
||||
WHERE j = SUBSTRING('12', (SELECT * FROM (SELECT MIN(j) FROM t1) t2))) t3;
|
||||
MIN(i)
|
||||
1
|
||||
DROP TABLE t1;
|
||||
# End of 5.0 tests
|
||||
|
@ -251,4 +251,50 @@ EXPLAIN SELECT c1 FROM t1 WHERE c2 = 1 AND c4 = 1 AND c5 = 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref c2,c2_2 c2 10 const,const 3 Using where
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#56814 Explain + subselect + fulltext crashes server
|
||||
#
|
||||
CREATE TABLE t1(f1 VARCHAR(6) NOT NULL,
|
||||
FULLTEXT KEY(f1),UNIQUE(f1));
|
||||
INSERT INTO t1 VALUES ('test');
|
||||
EXPLAIN SELECT 1 FROM t1
|
||||
WHERE 1 > ALL((SELECT 1 FROM t1 JOIN t1 a ON (MATCH(t1.f1) AGAINST (""))
|
||||
WHERE t1.f1 GROUP BY t1.f1));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
2 SUBQUERY a system NULL NULL NULL NULL 1 Using filesort
|
||||
2 SUBQUERY t1 fulltext f1 f1 0 1 Using where
|
||||
PREPARE stmt FROM
|
||||
'EXPLAIN SELECT 1 FROM t1
|
||||
WHERE 1 > ALL((SELECT 1 FROM t1 RIGHT OUTER JOIN t1 a
|
||||
ON (MATCH(t1.f1) AGAINST (""))
|
||||
WHERE t1.f1 GROUP BY t1.f1))';
|
||||
EXECUTE stmt;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
2 SUBQUERY a system NULL NULL NULL NULL 1 Using filesort
|
||||
2 SUBQUERY t1 fulltext f1 f1 0 1 Using where
|
||||
EXECUTE stmt;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
2 SUBQUERY a system NULL NULL NULL NULL 1 Using filesort
|
||||
2 SUBQUERY t1 fulltext f1 f1 0 1 Using where
|
||||
DEALLOCATE PREPARE stmt;
|
||||
PREPARE stmt FROM
|
||||
'EXPLAIN SELECT 1 FROM t1
|
||||
WHERE 1 > ALL((SELECT 1 FROM t1 JOIN t1 a
|
||||
ON (MATCH(t1.f1) AGAINST (""))
|
||||
WHERE t1.f1 GROUP BY t1.f1))';
|
||||
EXECUTE stmt;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
2 SUBQUERY a system NULL NULL NULL NULL 1 Using filesort
|
||||
2 SUBQUERY t1 fulltext f1 f1 0 1 Using where
|
||||
EXECUTE stmt;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
2 SUBQUERY a system NULL NULL NULL NULL 1 Using filesort
|
||||
2 SUBQUERY t1 fulltext f1 f1 0 1 Using where
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests.
|
||||
|
@ -644,4 +644,40 @@ Table Op Msg_type Msg_text
|
||||
test.t1 repair status OK
|
||||
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#54484 explain + prepared statement: crash and Got error -1 from storage engine
|
||||
#
|
||||
CREATE TABLE t1(f1 VARCHAR(6) NOT NULL, FULLTEXT KEY(f1), UNIQUE(f1));
|
||||
INSERT INTO t1 VALUES ('test');
|
||||
SELECT 1 FROM t1 WHERE 1 >
|
||||
ALL((SELECT 1 FROM t1 JOIN t1 a
|
||||
ON (MATCH(t1.f1) against (""))
|
||||
WHERE t1.f1 GROUP BY t1.f1)) xor f1;
|
||||
1
|
||||
1
|
||||
PREPARE stmt FROM
|
||||
'SELECT 1 FROM t1 WHERE 1 >
|
||||
ALL((SELECT 1 FROM t1 RIGHT OUTER JOIN t1 a
|
||||
ON (MATCH(t1.f1) against (""))
|
||||
WHERE t1.f1 GROUP BY t1.f1)) xor f1';
|
||||
EXECUTE stmt;
|
||||
1
|
||||
1
|
||||
EXECUTE stmt;
|
||||
1
|
||||
1
|
||||
DEALLOCATE PREPARE stmt;
|
||||
PREPARE stmt FROM
|
||||
'SELECT 1 FROM t1 WHERE 1 >
|
||||
ALL((SELECT 1 FROM t1 JOIN t1 a
|
||||
ON (MATCH(t1.f1) against (""))
|
||||
WHERE t1.f1 GROUP BY t1.f1))';
|
||||
EXECUTE stmt;
|
||||
1
|
||||
1
|
||||
EXECUTE stmt;
|
||||
1
|
||||
1
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -1029,4 +1029,24 @@ GROUP_CONCAT(t1.a ORDER BY t1.a)
|
||||
1,1,2,2
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#57194 group_concat cause crash and/or invalid memory reads with type errors
|
||||
#
|
||||
CREATE TABLE t1(f1 int);
|
||||
INSERT INTO t1 values (0),(0);
|
||||
SELECT POLYGON((SELECT 1 FROM (SELECT 1 IN (GROUP_CONCAT(t1.f1)) FROM t1, t1 t GROUP BY t.f1 ) d));
|
||||
ERROR 22007: Illegal non geometric '(select 1 from (select (1 = group_concat(`test`.`t1`.`f1` separator ',')) AS `1 IN (GROUP_CONCAT(t1.f1))` from `test`.`t1` join `test`.`t1` `t` group by `t`.`f1`) `d`)' value found during parsing
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#58396 group_concat and explain extended are still crashy
|
||||
#
|
||||
CREATE TABLE t1(a INT);
|
||||
EXPLAIN EXTENDED SELECT UPDATEXML('1', a, '1')
|
||||
FROM t1 ORDER BY (SELECT GROUP_CONCAT(1) FROM t1);
|
||||
ERROR HY000: Only constant XPATH queries are supported
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1105 Only constant XPATH queries are supported
|
||||
Note 1003 select updatexml('1',`test`.`t1`.`a`,'1') AS `UPDATEXML('1', a, '1')` from `test`.`t1` order by (select group_concat(1 separator ',') from `test`.`t1`)
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -482,4 +482,20 @@ RAND(i)
|
||||
0.155220427694936
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#57477 SIGFPE when dividing a huge number a negative number
|
||||
#
|
||||
SELECT -9999999999999999991 DIV -1;
|
||||
-9999999999999999991 DIV -1
|
||||
-9223372036854775808
|
||||
Warnings:
|
||||
Error 1292 Truncated incorrect DECIMAL value: ''
|
||||
SELECT -9223372036854775808 DIV -1;
|
||||
-9223372036854775808 DIV -1
|
||||
-9223372036854775808
|
||||
SELECT -9223372036854775808 MOD -1;
|
||||
-9223372036854775808 MOD -1
|
||||
0
|
||||
SELECT -9223372036854775808999 MOD -1;
|
||||
-9223372036854775808999 MOD -1
|
||||
0
|
||||
End of 5.1 tests
|
||||
|
@ -351,4 +351,10 @@ GREATEST(a, (SELECT b FROM t1 LIMIT 1))
|
||||
3
|
||||
1
|
||||
DROP TABLE t1;
|
||||
SELECT INET_NTOA(0);
|
||||
INET_NTOA(0)
|
||||
0.0.0.0
|
||||
SELECT '1' IN ('1', INET_NTOA(0));
|
||||
'1' IN ('1', INET_NTOA(0))
|
||||
1
|
||||
End of tests
|
||||
|
@ -2600,4 +2600,16 @@ ORDER BY QUOTE(t1.a);
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#57913 large negative number to string conversion functions crash
|
||||
# Bug#57810 case/when/then : Assertion failed: length || !scale
|
||||
#
|
||||
SELECT '1' IN ('1', SUBSTRING(-9223372036854775809, 1));
|
||||
'1' IN ('1', SUBSTRING(-9223372036854775809, 1))
|
||||
1
|
||||
SELECT CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3));
|
||||
CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3))
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DECIMAL value: ''
|
||||
End of 5.1 tests
|
||||
|
@ -1343,4 +1343,18 @@ SELECT 1 FROM t1 ORDER BY @x:=makedate(a,a);
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #52160: crash and inconsistent results when grouping
|
||||
# by a function and column
|
||||
#
|
||||
CREATE TABLE t1(a CHAR(10) NOT NULL);
|
||||
INSERT INTO t1 VALUES (''),('');
|
||||
SELECT COUNT(*) FROM t1 GROUP BY TIME_TO_SEC(a);
|
||||
COUNT(*)
|
||||
2
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: ''
|
||||
Warning 1292 Truncated incorrect time value: ''
|
||||
Warning 1292 Truncated incorrect time value: ''
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -1429,3 +1429,14 @@ DROP USER 'testbug'@localhost;
|
||||
DROP TABLE db2.t1;
|
||||
DROP DATABASE db1;
|
||||
DROP DATABASE db2;
|
||||
#
|
||||
# Bug #36742
|
||||
#
|
||||
grant usage on Foo.* to myuser@Localhost identified by 'foo';
|
||||
grant select on Foo.* to myuser@localhost;
|
||||
select host,user from mysql.user where User='myuser';
|
||||
host user
|
||||
localhost myuser
|
||||
revoke select on Foo.* from myuser@localhost;
|
||||
delete from mysql.user where User='myuser';
|
||||
flush privileges;
|
||||
|
@ -21,123 +21,108 @@ grant select on test.* to CUser@LOCALHOST;
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
|
||||
user host db select_priv
|
||||
CUser LOCALHOST test Y
|
||||
CUser localhost test Y
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
|
||||
user host db select_priv
|
||||
CUser localhost test Y
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
|
||||
user host db select_priv
|
||||
DROP USER CUser@localhost;
|
||||
DROP USER CUser@LOCALHOST;
|
||||
ERROR HY000: Operation DROP USER failed for 'CUser'@'localhost'
|
||||
create table t1 (a int);
|
||||
grant select on test.t1 to CUser@localhost;
|
||||
grant select on test.t1 to CUser@LOCALHOST;
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
|
||||
user host db Table_name Table_priv Column_priv
|
||||
CUser LOCALHOST test t1 Select
|
||||
CUser localhost test t1 Select
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
|
||||
user host db Table_name Table_priv Column_priv
|
||||
CUser localhost test t1 Select
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
|
||||
user host db Table_name Table_priv Column_priv
|
||||
DROP USER CUser@localhost;
|
||||
DROP USER CUser@LOCALHOST;
|
||||
ERROR HY000: Operation DROP USER failed for 'CUser'@'localhost'
|
||||
grant select(a) on test.t1 to CUser@localhost;
|
||||
grant select(a) on test.t1 to CUser@LOCALHOST;
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
|
||||
user host db Table_name Table_priv Column_priv
|
||||
CUser LOCALHOST test t1 Select
|
||||
CUser localhost test t1 Select
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
|
||||
user host db Table_name Table_priv Column_priv
|
||||
CUser localhost test t1 Select
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
|
||||
user host db Table_name Table_priv Column_priv
|
||||
DROP USER CUser@localhost;
|
||||
DROP USER CUser@LOCALHOST;
|
||||
ERROR HY000: Operation DROP USER failed for 'CUser'@'localhost'
|
||||
drop table t1;
|
||||
grant select on test.* to CUser2@localhost;
|
||||
grant select on test.* to CUser2@LOCALHOST;
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
|
||||
user host
|
||||
CUser2 LOCALHOST
|
||||
CUser2 localhost
|
||||
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
|
||||
user host db select_priv
|
||||
CUser2 LOCALHOST test Y
|
||||
CUser2 localhost test Y
|
||||
REVOKE SELECT ON test.* FROM 'CUser2'@'LOCALHOST';
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
|
||||
user host
|
||||
CUser2 LOCALHOST
|
||||
CUser2 localhost
|
||||
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
|
||||
user host db select_priv
|
||||
CUser2 localhost test Y
|
||||
REVOKE SELECT ON test.* FROM 'CUser2'@'localhost';
|
||||
ERROR 42000: There is no such grant defined for user 'CUser2' on host 'localhost'
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
|
||||
user host
|
||||
CUser2 LOCALHOST
|
||||
CUser2 localhost
|
||||
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
|
||||
user host db select_priv
|
||||
DROP USER CUser2@localhost;
|
||||
DROP USER CUser2@LOCALHOST;
|
||||
ERROR HY000: Operation DROP USER failed for 'CUser2'@'localhost'
|
||||
CREATE DATABASE mysqltest_1;
|
||||
CREATE TABLE mysqltest_1.t1 (a INT);
|
||||
CREATE USER 'mysqltest1'@'%';
|
||||
|
@ -1845,4 +1845,14 @@ SELECT SUBSTRING(a,1,10), LENGTH(a) FROM t1 GROUP BY a;
|
||||
SUBSTRING(a,1,10) LENGTH(a)
|
||||
1111111111 1300
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#57688 Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field
|
||||
#
|
||||
CREATE TABLE t1(f1 INT NOT NULL);
|
||||
INSERT INTO t1 VALUES (16777214),(0);
|
||||
SELECT COUNT(*) FROM t1 LEFT JOIN t1 t2
|
||||
ON 1 WHERE t2.f1 > 1 GROUP BY t2.f1;
|
||||
COUNT(*)
|
||||
2
|
||||
DROP TABLE t1;
|
||||
# End of 5.1 tests
|
||||
|
@ -324,6 +324,61 @@ key1 key2 key3
|
||||
38 38 38
|
||||
39 39 39
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#56423: Different count with SELECT and CREATE SELECT queries
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
b INT,
|
||||
c INT,
|
||||
d INT,
|
||||
PRIMARY KEY (a),
|
||||
KEY (c),
|
||||
KEY bd (b,d)
|
||||
);
|
||||
INSERT INTO t1 VALUES
|
||||
(1, 0, 1, 0),
|
||||
(2, 1, 1, 1),
|
||||
(3, 1, 1, 1),
|
||||
(4, 0, 1, 1);
|
||||
EXPLAIN
|
||||
SELECT a
|
||||
FROM t1
|
||||
WHERE c = 1 AND b = 1 AND d = 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge c,bd c,bd 5,10 NULL 1 Using intersect(c,bd); Using where; Using index
|
||||
CREATE TABLE t2 ( a INT )
|
||||
SELECT a
|
||||
FROM t1
|
||||
WHERE c = 1 AND b = 1 AND d = 1;
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
2
|
||||
3
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1( a INT, b INT, KEY(a), KEY(b) );
|
||||
INSERT INTO t1 VALUES (1, 2), (1, 2), (1, 2), (1, 2);
|
||||
SELECT * FROM t1 FORCE INDEX(a, b) WHERE a = 1 AND b = 2;
|
||||
a b
|
||||
1 2
|
||||
1 2
|
||||
1 2
|
||||
1 2
|
||||
DROP TABLE t1;
|
||||
# Code coverage of fix.
|
||||
CREATE TABLE t1 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT);
|
||||
INSERT INTO t1 (b) VALUES (1);
|
||||
UPDATE t1 SET b = 2 WHERE a = 1;
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
1 2
|
||||
CREATE TABLE t2 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(1) );
|
||||
INSERT INTO t2 (b) VALUES ('a');
|
||||
UPDATE t2 SET b = 'b' WHERE a = 1;
|
||||
SELECT * FROM t2;
|
||||
a b
|
||||
1 b
|
||||
DROP TABLE t1, t2;
|
||||
#---------------- 2-sweeps read Index merge test 2 -------------------------------
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
drop table if exists t1;
|
||||
|
@ -1158,6 +1158,61 @@ key1 key2 key3
|
||||
38 38 38
|
||||
39 39 39
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#56423: Different count with SELECT and CREATE SELECT queries
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
b INT,
|
||||
c INT,
|
||||
d INT,
|
||||
PRIMARY KEY (a),
|
||||
KEY (c),
|
||||
KEY bd (b,d)
|
||||
);
|
||||
INSERT INTO t1 VALUES
|
||||
(1, 0, 1, 0),
|
||||
(2, 1, 1, 1),
|
||||
(3, 1, 1, 1),
|
||||
(4, 0, 1, 1);
|
||||
EXPLAIN
|
||||
SELECT a
|
||||
FROM t1
|
||||
WHERE c = 1 AND b = 1 AND d = 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref c,bd bd 10 const,const 2 Using where
|
||||
CREATE TABLE t2 ( a INT )
|
||||
SELECT a
|
||||
FROM t1
|
||||
WHERE c = 1 AND b = 1 AND d = 1;
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
2
|
||||
3
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1( a INT, b INT, KEY(a), KEY(b) );
|
||||
INSERT INTO t1 VALUES (1, 2), (1, 2), (1, 2), (1, 2);
|
||||
SELECT * FROM t1 FORCE INDEX(a, b) WHERE a = 1 AND b = 2;
|
||||
a b
|
||||
1 2
|
||||
1 2
|
||||
1 2
|
||||
1 2
|
||||
DROP TABLE t1;
|
||||
# Code coverage of fix.
|
||||
CREATE TABLE t1 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT);
|
||||
INSERT INTO t1 (b) VALUES (1);
|
||||
UPDATE t1 SET b = 2 WHERE a = 1;
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
1 2
|
||||
CREATE TABLE t2 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(1) );
|
||||
INSERT INTO t2 (b) VALUES ('a');
|
||||
UPDATE t2 SET b = 'b' WHERE a = 1;
|
||||
SELECT * FROM t2;
|
||||
a b
|
||||
1 b
|
||||
DROP TABLE t1, t2;
|
||||
#---------------- 2-sweeps read Index merge test 2 -------------------------------
|
||||
SET SESSION STORAGE_ENGINE = MyISAM;
|
||||
drop table if exists t1;
|
||||
|
@ -1397,4 +1397,34 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
Warnings:
|
||||
Note 1003 select straight_join `test`.`jt1`.`f1` AS `f1` from `test`.`t1` `jt6` left join (`test`.`t1` `jt3` join `test`.`t1` `jt4` left join `test`.`t1` `jt5` on(1) left join `test`.`t1` `jt2` on(1)) on((`test`.`jt6`.`f1` and 1)) left join `test`.`t1` `jt1` on(1) where 1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#57688 Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field
|
||||
#
|
||||
CREATE TABLE t1 (f1 INT NOT NULL, PRIMARY KEY (f1));
|
||||
CREATE TABLE t2 (f1 INT NOT NULL, f2 INT NOT NULL, PRIMARY KEY (f1, f2));
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t2 VALUES (3, 3);
|
||||
INSERT INTO t2 VALUES (7, 7);
|
||||
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1
|
||||
WHERE t1.f1 = 4
|
||||
GROUP BY t2.f1, t2.f2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 system PRIMARY NULL NULL NULL 1 Using temporary; Using filesort
|
||||
1 SIMPLE t2 ref PRIMARY PRIMARY 4 const 1 Using index
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1
|
||||
WHERE t1.f1 = 4
|
||||
GROUP BY t2.f1, t2.f2;
|
||||
f1 f1 f2
|
||||
4 NULL NULL
|
||||
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1
|
||||
WHERE t1.f1 = 4 AND t2.f1 IS NOT NULL AND t2.f2 IS NOT NULL
|
||||
GROUP BY t2.f1, t2.f2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 system PRIMARY NULL NULL NULL 1 Using filesort
|
||||
1 SIMPLE t2 ref PRIMARY PRIMARY 4 const 1 Using where; Using index
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1
|
||||
WHERE t1.f1 = 4 AND t2.f1 IS NOT NULL AND t2.f2 IS NOT NULL
|
||||
GROUP BY t2.f1, t2.f2;
|
||||
f1 f1 f2
|
||||
DROP TABLE t1,t2;
|
||||
End of 5.1 tests
|
||||
|
@ -334,8 +334,7 @@ test.t1 check status OK
|
||||
DROP TABLE t1,t2;
|
||||
set global key_cache_block_size= @my_key_cache_block_size;
|
||||
set @@global.key_buffer_size=0;
|
||||
Warnings:
|
||||
Warning 1438 Cannot drop default keycache
|
||||
ERROR HY000: Cannot drop default keycache
|
||||
select @@global.key_buffer_size;
|
||||
@@global.key_buffer_size
|
||||
2097152
|
||||
|
@ -899,6 +899,16 @@ TIMESTAMP 1 1 SELECT SQL_NO_CACHE 'Bug#31700 - KEY', f1,f2,f3,SLEEP(1.1) FROM t1
|
||||
TIMESTAMP 1 1 SELECT SQL_NO_CACHE 'Bug#31700 - PK', f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f1=2
|
||||
DROP TABLE t1;
|
||||
TRUNCATE TABLE mysql.slow_log;
|
||||
use mysql;
|
||||
drop table if exists renamed_general_log;
|
||||
drop table if exists renamed_slow_log;
|
||||
RENAME TABLE general_log TO renamed_general_log;
|
||||
ERROR HY000: Cannot rename 'general_log'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to 'general_log'
|
||||
RENAME TABLE slow_log TO renamed_slow_log;
|
||||
ERROR HY000: Cannot rename 'slow_log'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to 'slow_log'
|
||||
use test;
|
||||
flush tables with read lock;
|
||||
unlock tables;
|
||||
SET @@session.long_query_time= @old_long_query_time;
|
||||
SET @@global.log_output= @old_log_output;
|
||||
SET @@global.slow_query_log= @old_slow_query_log;
|
||||
|
7
mysql-test/r/lowercase_table4.result
Executable file
7
mysql-test/r/lowercase_table4.result
Executable file
@ -0,0 +1,7 @@
|
||||
#
|
||||
# Bug#46941 crash with lower_case_table_names=2 and
|
||||
# foreign data dictionary confusion
|
||||
#
|
||||
CREATE DATABASE XY;
|
||||
USE XY;
|
||||
DROP DATABASE XY;
|
@ -2024,6 +2024,8 @@ SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE
|
||||
TABLE_SCHEMA = 'test' and TABLE_NAME='tm1';
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT
|
||||
NULL test tm1 BASE TABLE NULL NULL NULL # # # # # # # # # # NULL # # Unable to open underlying table which is differently defined or of non-MyISAM ty
|
||||
Warnings:
|
||||
Warning 1168 Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
DROP TABLE tm1;
|
||||
CREATE TABLE t1(C1 INT, C2 INT, KEY C1(C1), KEY C2(C2)) ENGINE=MYISAM;
|
||||
CREATE TABLE t2(C1 INT, C2 INT, KEY C1(C1), KEY C2(C2)) ENGINE=MYISAM;
|
||||
|
@ -659,4 +659,15 @@ Error 1242 Subquery returns more than 1 row
|
||||
Error 1242 Subquery returns more than 1 row
|
||||
DROP TABLE t1, t2, t3;
|
||||
SET SESSION sql_safe_updates = DEFAULT;
|
||||
#
|
||||
# Bug#52157 various crashes and assertions with multi-table update, stored function
|
||||
#
|
||||
CREATE FUNCTION f1 () RETURNS BLOB RETURN 1;
|
||||
CREATE TABLE t1 (f1 DATE);
|
||||
INSERT INTO t1 VALUES('2001-01-01');
|
||||
UPDATE (SELECT 1 FROM t1 WHERE f1 = (SELECT f1() FROM t1)) x, t1 SET f1 = 1;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect datetime value: '1'
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1;
|
||||
end of tests
|
||||
|
@ -235,4 +235,73 @@ Bug #47147: mysql client option --skip-column-names does not apply to vertical o
|
||||
*************************** 1. row ***************************
|
||||
1
|
||||
|
||||
#
|
||||
# Bug #54899: --one-database option cannot handle DROP/CREATE DATABASE
|
||||
# commands.
|
||||
#
|
||||
CREATE DATABASE connected_db;
|
||||
USE connected_db;
|
||||
SHOW TABLES;
|
||||
Tables_in_connected_db
|
||||
table_in_connected_db
|
||||
DROP DATABASE connected_db;
|
||||
|
||||
#
|
||||
# Testing --one-database option
|
||||
#
|
||||
CREATE DATABASE connected_db;
|
||||
SHOW TABLES IN connected_db;
|
||||
Tables_in_connected_db
|
||||
t1
|
||||
SHOW TABLES IN test;
|
||||
Tables_in_test
|
||||
t1
|
||||
USE test;
|
||||
DROP TABLE t1;
|
||||
DROP DATABASE connected_db;
|
||||
|
||||
SHOW TABLES IN test;
|
||||
Tables_in_test
|
||||
SHOW TABLES IN test1;
|
||||
Tables_in_test1
|
||||
DROP DATABASE test1;
|
||||
|
||||
#
|
||||
# Checking --one-database option followed by the execution of
|
||||
# connect command.
|
||||
#
|
||||
CREATE DATABASE connected_db;
|
||||
SHOW TABLES IN connected_db;
|
||||
Tables_in_connected_db
|
||||
t1
|
||||
t2
|
||||
SHOW TABLES IN test;
|
||||
Tables_in_test
|
||||
t1
|
||||
t2
|
||||
DROP TABLE test.t1;
|
||||
DROP TABLE test.t2;
|
||||
DROP DATABASE connected_db;
|
||||
|
||||
#
|
||||
# Checking --one-database option with no database specified
|
||||
# at command-line.
|
||||
#
|
||||
SHOW TABLES IN test;
|
||||
Tables_in_test
|
||||
|
||||
#
|
||||
# Checking --one-database option with non_existent_db
|
||||
# specified with USE command
|
||||
#
|
||||
CREATE DATABASE connected_db;
|
||||
SHOW TABLES IN connected_db;
|
||||
Tables_in_connected_db
|
||||
table_in_connected_db
|
||||
|
||||
SHOW TABLES IN connected_db;
|
||||
Tables_in_connected_db
|
||||
table_in_connected_db
|
||||
DROP DATABASE connected_db;
|
||||
|
||||
End of tests
|
||||
|
@ -804,7 +804,7 @@ drop table t1;
|
||||
mysqltest: At line 1: change user failed: Unknown database 'inexistent'
|
||||
mysqltest: At line 1: change user failed: Access denied for user 'inexistent'@'localhost' (using password: NO)
|
||||
mysqltest: At line 1: change user failed: Access denied for user 'root'@'localhost' (using password: YES)
|
||||
file1.txt
|
||||
REPLACED_FILE1.txt
|
||||
file1.txt
|
||||
file2.txt
|
||||
file11.txt
|
||||
|
@ -1,5 +1,31 @@
|
||||
drop table if exists t1, t2;
|
||||
#
|
||||
# Bug#56287: crash when using Partition datetime in sub in query
|
||||
#
|
||||
CREATE TABLE t1
|
||||
(c1 bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
c2 varchar(40) not null default '',
|
||||
c3 datetime not NULL,
|
||||
PRIMARY KEY (c1,c3),
|
||||
KEY partidx(c3))
|
||||
ENGINE=InnoDB
|
||||
PARTITION BY RANGE (TO_DAYS(c3))
|
||||
(PARTITION p200912 VALUES LESS THAN (to_days('2010-01-01')),
|
||||
PARTITION p201103 VALUES LESS THAN (to_days('2011-04-01')),
|
||||
PARTITION p201912 VALUES LESS THAN MAXVALUE);
|
||||
insert into t1(c2,c3) values ("Test row",'2010-01-01 00:00:00');
|
||||
SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
|
||||
PARTITION_NAME TABLE_ROWS
|
||||
p200912 0
|
||||
p201103 1
|
||||
p201912 0
|
||||
SELECT count(*) FROM t1 p where c3 in
|
||||
(select c3 from t1 t where t.c3 < date '2011-04-26 19:19:44'
|
||||
and t.c3 > date '2011-04-26 19:18:44') ;
|
||||
count(*)
|
||||
0
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#51830: Incorrect partition pruning on range partition (regression)
|
||||
#
|
||||
CREATE TABLE t1 (a INT NOT NULL)
|
||||
@ -387,3 +413,9 @@ a b
|
||||
3 2003-03-03
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (i1 int NOT NULL primary key, f1 int) ENGINE = InnoDB
|
||||
PARTITION BY HASH(i1) PARTITIONS 2;
|
||||
INSERT INTO t1 VALUES (1,1), (2,2);
|
||||
SELECT * FROM t1 WHERE i1 = ( SELECT i1 FROM t1 WHERE f1=0 LIMIT 1 );
|
||||
i1 f1
|
||||
DROP TABLE t1;
|
||||
|
@ -1,3 +1,76 @@
|
||||
call mtr.add_suppression("nnoDB: Error: table `test`.`t1` .* Partition.* InnoDB internal");
|
||||
#
|
||||
# Bug#55091: Server crashes on ADD PARTITION after a failed attempt
|
||||
#
|
||||
SET @old_innodb_file_format_check = @@global.innodb_file_format_check;
|
||||
SET @old_innodb_file_format = @@global.innodb_file_format;
|
||||
SET @old_innodb_file_per_table = @@global.innodb_file_per_table;
|
||||
SET @old_innodb_strict_mode = @@global.innodb_strict_mode;
|
||||
SET @@global.innodb_file_format = Barracuda,
|
||||
@@global.innodb_file_per_table = ON,
|
||||
@@global.innodb_strict_mode = ON;
|
||||
# Connection con1
|
||||
CREATE TABLE t1 (id INT NOT NULL
|
||||
PRIMARY KEY,
|
||||
user_num CHAR(10)
|
||||
) ENGINE = InnoDB
|
||||
KEY_BLOCK_SIZE=4
|
||||
PARTITION BY HASH(id) PARTITIONS 1;
|
||||
t1#P#p0.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` int(11) NOT NULL,
|
||||
`user_num` char(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
|
||||
/*!50100 PARTITION BY HASH (id)
|
||||
PARTITIONS 1 */
|
||||
SET GLOBAL innodb_file_per_table = OFF;
|
||||
# Connection con2
|
||||
LOCK TABLE t1 WRITE;
|
||||
# ALTER fails because COMPRESSED/KEY_BLOCK_SIZE
|
||||
# are incompatible with innodb_file_per_table = OFF;
|
||||
ALTER TABLE t1 ADD PARTITION PARTITIONS 1;
|
||||
ERROR HY000: Got error 1478 from storage engine
|
||||
t1#P#p0.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
# This SET is not needed to reproduce the bug,
|
||||
# it is here just to make the test case more realistic
|
||||
SET innodb_strict_mode = OFF;
|
||||
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
t1.frm
|
||||
t1.par
|
||||
ALTER TABLE t1 REBUILD PARTITION p0;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
UNLOCK TABLES;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` int(11) NOT NULL,
|
||||
`user_num` char(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
|
||||
/*!50100 PARTITION BY HASH (id)
|
||||
PARTITIONS 3 */
|
||||
DROP TABLE t1;
|
||||
# Connection default
|
||||
SET @@global.innodb_strict_mode = @old_innodb_strict_mode;
|
||||
SET @@global.innodb_file_format = @old_innodb_file_format;
|
||||
SET @@global.innodb_file_per_table = @old_innodb_file_per_table;
|
||||
SET @@global.innodb_file_format_check = @old_innodb_file_format_check;
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE `t``\""e` (a INT, PRIMARY KEY (a))
|
||||
ENGINE=InnoDB
|
||||
|
@ -8,3 +8,5 @@ ERROR 42000: DELETE command denied to user 'bug51770'@'localhost' for table 'plu
|
||||
GRANT DELETE ON mysql.plugin TO bug51770@localhost;
|
||||
UNINSTALL PLUGIN example;
|
||||
DROP USER bug51770@localhost;
|
||||
INSTALL PLUGIN example SONAME '../ha_example.so';
|
||||
ERROR HY000: No paths allowed for shared library
|
||||
|
@ -660,6 +660,8 @@ flush tables;
|
||||
SHOW TABLE STATUS like 't1';
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 NULL NULL NULL NULL # # # # NULL NULL NULL NULL NULL NULL NULL NULL Incorrect information in file: './test/t1.frm'
|
||||
Warnings:
|
||||
Warning 1033 Incorrect information in file: './test/t1.frm'
|
||||
show create table t1;
|
||||
ERROR HY000: Incorrect information in file: './test/t1.frm'
|
||||
drop table if exists t1;
|
||||
|
@ -73,4 +73,40 @@ CALL p1 ();
|
||||
ERROR HY000: Trigger does not exist
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug#54375: Error in stored procedure leaves connection
|
||||
# in different default schema
|
||||
#
|
||||
SET @@SQL_MODE = 'STRICT_ALL_TABLES';
|
||||
DROP DATABASE IF EXISTS db1;
|
||||
CREATE DATABASE db1;
|
||||
USE db1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (c1 int NOT NULL PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
CREATE FUNCTION f1 (
|
||||
some_value int
|
||||
)
|
||||
RETURNS smallint
|
||||
DETERMINISTIC
|
||||
BEGIN
|
||||
INSERT INTO t1 SET c1 = some_value;
|
||||
RETURN(LAST_INSERT_ID());
|
||||
END$$
|
||||
DROP DATABASE IF EXISTS db2;
|
||||
CREATE DATABASE db2;
|
||||
USE db2;
|
||||
SELECT DATABASE();
|
||||
DATABASE()
|
||||
db2
|
||||
SELECT db1.f1(1);
|
||||
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||
SELECT DATABASE();
|
||||
DATABASE()
|
||||
db2
|
||||
USE test;
|
||||
DROP FUNCTION db1.f1;
|
||||
DROP TABLE db1.t1;
|
||||
DROP DATABASE db1;
|
||||
DROP DATABASE db2;
|
||||
End of 5.1 tests
|
||||
|
@ -974,3 +974,14 @@ ERROR 42000: Display width out of range for column 'cast as char' (max = 4294967
|
||||
explain select convert(1, binary(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
|
||||
ERROR 42000: Display width out of range for column 'cast as char' (max = 4294967295)
|
||||
End of 5.0 tests
|
||||
# Bug #52160: crash and inconsistent results when grouping
|
||||
# by a function and column
|
||||
CREATE FUNCTION f1() RETURNS TINYBLOB RETURN 1;
|
||||
CREATE TABLE t1(a CHAR(1));
|
||||
INSERT INTO t1 VALUES ('0'), ('0');
|
||||
SELECT COUNT(*) FROM t1 GROUP BY f1(), a;
|
||||
COUNT(*)
|
||||
2
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -447,4 +447,7 @@ IF(
|
||||
count(*), 1)
|
||||
1
|
||||
DROP TABLE t1;
|
||||
select @v:=@v:=sum(1) from dual;
|
||||
@v:=@v:=sum(1)
|
||||
1
|
||||
End of 5.1 tests
|
||||
|
@ -1,20 +1,20 @@
|
||||
SET SESSION transaction_prealloc_size=1024*1024*1024*1;
|
||||
SHOW PROCESSLIST;
|
||||
Id User Host db Command Time State Info
|
||||
<Id> root localhost test Query <Time> NULL SHOW PROCESSLIST
|
||||
<Id> root <Host> test Query <Time> NULL SHOW PROCESSLIST
|
||||
SET SESSION transaction_prealloc_size=1024*1024*1024*2;
|
||||
SHOW PROCESSLIST;
|
||||
Id User Host db Command Time State Info
|
||||
<Id> root localhost test Query <Time> NULL SHOW PROCESSLIST
|
||||
<Id> root <Host> test Query <Time> NULL SHOW PROCESSLIST
|
||||
SET SESSION transaction_prealloc_size=1024*1024*1024*3;
|
||||
SHOW PROCESSLIST;
|
||||
Id User Host db Command Time State Info
|
||||
<Id> root localhost test Query <Time> NULL SHOW PROCESSLIST
|
||||
<Id> root <Host> test Query <Time> NULL SHOW PROCESSLIST
|
||||
SET SESSION transaction_prealloc_size=1024*1024*1024*4;
|
||||
SHOW PROCESSLIST;
|
||||
Id User Host db Command Time State Info
|
||||
<Id> root localhost test Query <Time> NULL SHOW PROCESSLIST
|
||||
<Id> root <Host> test Query <Time> NULL SHOW PROCESSLIST
|
||||
SET SESSION transaction_prealloc_size=1024*1024*1024*5;
|
||||
SHOW PROCESSLIST;
|
||||
Id User Host db Command Time State Info
|
||||
<Id> root localhost test Query <Time> NULL SHOW PROCESSLIST
|
||||
<Id> root <Host> test Query <Time> NULL SHOW PROCESSLIST
|
||||
|
@ -1511,4 +1511,37 @@ SELECT @@skip_name_resolve;
|
||||
SHOW VARIABLES LIKE 'skip_name_resolve';
|
||||
Variable_name Value
|
||||
skip_name_resolve OFF
|
||||
#
|
||||
# Bug #43233 : Some server variables are clipped during "update,"
|
||||
# not "check" stage
|
||||
#
|
||||
SET @kbs=@@global.key_buffer_size;
|
||||
SET @kcbs=@@global.key_cache_block_size;
|
||||
throw errors in STRICT mode
|
||||
SET SQL_MODE=STRICT_ALL_TABLES;
|
||||
SET @@global.max_binlog_cache_size=-1;
|
||||
ERROR 42000: Variable 'max_binlog_cache_size' can't be set to the value of '-1'
|
||||
SET @@global.max_join_size=0;
|
||||
ERROR 42000: Variable 'max_join_size' can't be set to the value of '0'
|
||||
SET @@global.key_buffer_size=0;
|
||||
ERROR HY000: Cannot drop default keycache
|
||||
SET @@global.key_cache_block_size=0;
|
||||
ERROR 42000: Variable 'key_cache_block_size' can't be set to the value of '0'
|
||||
throw warnings in default mode
|
||||
SET SQL_MODE=DEFAULT;
|
||||
SET @@global.max_binlog_cache_size=-1;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect max_binlog_cache_size value: '-1'
|
||||
SET @@global.max_join_size=0;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect max_join_size value: '0'
|
||||
SET @@global.key_buffer_size=0;
|
||||
ERROR HY000: Cannot drop default keycache
|
||||
SET @@global.key_cache_block_size=0;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect key_cache_block_size value: '0'
|
||||
SET @@global.max_binlog_cache_size=DEFAULT;
|
||||
SET @@global.max_join_size=DEFAULT;
|
||||
SET @@global.key_buffer_size=@kbs;
|
||||
SET @@global.key_cache_block_size=@kcbs;
|
||||
End of 5.1 tests
|
||||
|
@ -840,6 +840,8 @@ show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MyISAM 10 Fixed 0 0 0 # 1024 0 NULL # # NULL latin1_swedish_ci NULL
|
||||
v1 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL View 'test.v1' references invalid table(s) or column(s) or function(s) or define
|
||||
Warnings:
|
||||
Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
create view v1 as select 99999999999999999999999999999999999999999999999999999 as col1;
|
||||
@ -3882,6 +3884,19 @@ 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#57703 create view cause Assertion failed: 0, file .\item_subselect.cc, line 846
|
||||
#
|
||||
CREATE TABLE t1(a int);
|
||||
CREATE VIEW v1 AS SELECT 1 FROM t1 GROUP BY
|
||||
SUBSTRING(1 FROM (SELECT 3 FROM t1 WHERE a >= ANY(SELECT 1)));
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#57352 valgrind warnings when creating view
|
||||
#
|
||||
CREATE VIEW v1 AS SELECT 1 IN (1 LIKE 2,0) AS f;
|
||||
DROP VIEW v1;
|
||||
# -----------------------------------------------------------------
|
||||
# -- End of 5.1 tests.
|
||||
# -----------------------------------------------------------------
|
||||
|
@ -1093,4 +1093,24 @@ Warnings:
|
||||
Warning 1525 Incorrect XML value: 'parse error at line 1 pos 23: unexpected END-OF-INPUT'
|
||||
Warning 1525 Incorrect XML value: 'parse error at line 1 pos 23: unexpected END-OF-INPUT'
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#57257 Replace(ExtractValue(...)) causes MySQL crash
|
||||
#
|
||||
SET NAMES utf8;
|
||||
SELECT REPLACE(EXTRACTVALUE('1', '/a'),'ds','');
|
||||
REPLACE(EXTRACTVALUE('1', '/a'),'ds','')
|
||||
|
||||
#
|
||||
# Bug #57820 extractvalue crashes
|
||||
#
|
||||
SELECT AVG(DISTINCT EXTRACTVALUE((''),('$@k')));
|
||||
AVG(DISTINCT EXTRACTVALUE((''),('$@k')))
|
||||
NULL
|
||||
#
|
||||
# Bug#57279 updatexml dies with: Assertion failed: str_arg[length] == 0
|
||||
#
|
||||
SELECT UPDATEXML(NULL, (LPAD(0.1111E-15, '2011', 1)), 1);
|
||||
ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' value found during parsing
|
||||
SELECT EXTRACTVALUE('', LPAD(0.1111E-15, '2011', 1));
|
||||
ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' value found during parsing
|
||||
End of 5.1 tests
|
||||
|
@ -2,7 +2,9 @@ call mtr.add_suppression('Attempting backtrace');
|
||||
call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
|
||||
call mtr.add_suppression('MSYQL_BIN_LOG::open failed to sync the index file');
|
||||
call mtr.add_suppression('Turning logging off for the whole duration of the MySQL server process.');
|
||||
call mtr.add_suppression('Could not open .*');
|
||||
call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to clean registers before purging logs.');
|
||||
RESET MASTER;
|
||||
flush logs;
|
||||
flush logs;
|
||||
flush logs;
|
||||
@ -116,11 +118,31 @@ master-bin.000011
|
||||
# This should put the server in unsafe state and stop
|
||||
# accepting any command. If we inject a fault at this
|
||||
# point and continue the execution the server crashes.
|
||||
# Besides the flush command does not report an error.
|
||||
#
|
||||
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
|
||||
SELECT @index;
|
||||
@index
|
||||
master-bin.000006
|
||||
master-bin.000007
|
||||
master-bin.000008
|
||||
master-bin.000009
|
||||
master-bin.000010
|
||||
master-bin.000011
|
||||
|
||||
# fault_injection_registering_index
|
||||
SET SESSION debug="+d,fault_injection_registering_index";
|
||||
flush logs;
|
||||
ERROR HY000: Can't open file: 'master-bin.000012' (errno: 1)
|
||||
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
|
||||
SELECT @index;
|
||||
@index
|
||||
master-bin.000006
|
||||
master-bin.000007
|
||||
master-bin.000008
|
||||
master-bin.000009
|
||||
master-bin.000010
|
||||
master-bin.000011
|
||||
|
||||
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
|
||||
SELECT @index;
|
||||
@index
|
||||
@ -135,6 +157,18 @@ master-bin.000012
|
||||
# fault_injection_updating_index
|
||||
SET SESSION debug="+d,fault_injection_updating_index";
|
||||
flush logs;
|
||||
ERROR HY000: Can't open file: 'master-bin.000013' (errno: 1)
|
||||
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
|
||||
SELECT @index;
|
||||
@index
|
||||
master-bin.000006
|
||||
master-bin.000007
|
||||
master-bin.000008
|
||||
master-bin.000009
|
||||
master-bin.000010
|
||||
master-bin.000011
|
||||
master-bin.000012
|
||||
|
||||
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
|
||||
SELECT @index;
|
||||
@index
|
||||
|
@ -1,3 +1,4 @@
|
||||
RESET MASTER;
|
||||
###################################################################################
|
||||
# CONFIGURATION
|
||||
###################################################################################
|
||||
|
@ -1330,3 +1330,62 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
# # Query 1 # COMMIT
|
||||
DROP TABLE t1;
|
||||
|
||||
# BUG#54903 BINLOG statement toggles session variables
|
||||
# ----------------------------------------------------------------------
|
||||
# This test verify that BINLOG statement doesn't change current session's
|
||||
# variables foreign_key_checks and unique_checks.
|
||||
|
||||
CREATE TABLE t1 (c1 INT KEY);
|
||||
SET @@SESSION.foreign_key_checks= ON;
|
||||
SET @@SESSION.unique_checks= ON;
|
||||
# INSERT INTO t1 VALUES (1)
|
||||
# foreign_key_checks=0 and unique_checks=0
|
||||
BINLOG '
|
||||
dfLtTBMBAAAAKQAAANcAAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||
dfLtTBcBAAAAIgAAAPkAAAAAABcAAAAAAAcAAf/+AQAAAA==
|
||||
';
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
1
|
||||
# Their values should be ON
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
Variable_name Value
|
||||
foreign_key_checks ON
|
||||
unique_checks ON
|
||||
|
||||
SET @@SESSION.foreign_key_checks= OFF;
|
||||
SET @@SESSION.unique_checks= OFF;
|
||||
# INSERT INTO t1 VALUES(2)
|
||||
# foreign_key_checks=1 and unique_checks=1
|
||||
BINLOG '
|
||||
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
|
||||
';
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
1
|
||||
2
|
||||
# Their values should be OFF
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
Variable_name Value
|
||||
foreign_key_checks OFF
|
||||
unique_checks OFF
|
||||
# INSERT INTO t1 VALUES(2)
|
||||
# foreign_key_checks=1 and unique_checks=1
|
||||
# It should not change current session's variables, even error happens
|
||||
BINLOG '
|
||||
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
|
||||
';
|
||||
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
1
|
||||
2
|
||||
# Their values should be OFF
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
Variable_name Value
|
||||
foreign_key_checks OFF
|
||||
unique_checks OFF
|
||||
DROP TABLE t1;
|
||||
|
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